From e654398e46e37abf457b2b1122ab898d2c51c49f Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:43:15 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1157644 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- arts/builder/autorouter.h | 10 +- arts/builder/createtool.cpp | 36 +-- arts/builder/createtool.h | 38 +-- arts/builder/dirmanager.cpp | 10 +- arts/builder/dirmanager.h | 2 +- arts/builder/drawutils.cpp | 4 +- arts/builder/drawutils.h | 4 +- arts/builder/execdlg.cpp | 58 ++-- arts/builder/execdlg.h | 20 +- arts/builder/interfacedlg.cpp | 46 +-- arts/builder/interfacedlg.h | 14 +- arts/builder/main.cpp | 150 +++++----- arts/builder/main.h | 8 +- arts/builder/menumaker.cpp | 22 +- arts/builder/menumaker.h | 18 +- arts/builder/module.cpp | 80 +++--- arts/builder/module.h | 18 +- arts/builder/mwidget.cpp | 58 ++-- arts/builder/mwidget.h | 24 +- arts/builder/portposdlg.cpp | 56 ++-- arts/builder/portposdlg.h | 14 +- arts/builder/propertypanel.cpp | 92 +++--- arts/builder/propertypanel.h | 10 +- arts/builder/qttableview.cpp | 148 +++++----- arts/builder/qttableview.h | 30 +- arts/builder/retrievedlg.cpp | 44 +-- arts/builder/retrievedlg.h | 22 +- arts/builder/scomponent.cpp | 4 +- arts/builder/scomponent.h | 8 +- arts/builder/structureport.cpp | 48 ++-- arts/builder/structureport.h | 6 +- arts/gui/kde/artstestgui.cpp | 2 +- arts/gui/kde/dbtest.cpp | 4 +- arts/gui/kde/dbtest.h | 6 +- arts/gui/kde/kartswidget.cpp | 36 +-- arts/gui/kde/kartswidget.h | 12 +- arts/gui/kde/kbutton_impl.cpp | 20 +- arts/gui/kde/kbutton_impl.h | 12 +- arts/gui/kde/kcombobox_impl.cpp | 12 +- arts/gui/kde/kcombobox_impl.h | 14 +- arts/gui/kde/kfader.cpp | 12 +- arts/gui/kde/kfader.h | 8 +- arts/gui/kde/kfader_impl.cpp | 6 +- arts/gui/kde/kfader_impl.h | 8 +- arts/gui/kde/kframe_impl.cpp | 12 +- arts/gui/kde/kframe_impl.h | 4 +- arts/gui/kde/kgraph.cpp | 36 +-- arts/gui/kde/kgraph.h | 18 +- arts/gui/kde/kgraph_impl.cpp | 2 +- arts/gui/kde/kgraph_impl.h | 6 +- arts/gui/kde/kgraphline_impl.cpp | 2 +- arts/gui/kde/khbox_impl.cpp | 8 +- arts/gui/kde/khbox_impl.h | 4 +- arts/gui/kde/klabel_impl.cpp | 30 +- arts/gui/kde/klabel_impl.h | 24 +- arts/gui/kde/klayoutbox_impl.cpp | 56 ++-- arts/gui/kde/klayoutbox_impl.h | 24 +- arts/gui/kde/klevelmeter_firebars.cpp | 32 +-- arts/gui/kde/klevelmeter_firebars.h | 14 +- arts/gui/kde/klevelmeter_impl.cpp | 14 +- arts/gui/kde/klevelmeter_impl.h | 2 +- arts/gui/kde/klevelmeter_linebars.cpp | 28 +- arts/gui/kde/klevelmeter_linebars.h | 8 +- arts/gui/kde/klevelmeter_normalbars.cpp | 16 +- arts/gui/kde/klevelmeter_normalbars.h | 18 +- arts/gui/kde/klevelmeter_private.h | 10 +- arts/gui/kde/klevelmeter_small.cpp | 20 +- arts/gui/kde/klevelmeter_small.h | 4 +- arts/gui/kde/klevelmeter_template.h | 12 +- arts/gui/kde/klineedit_impl.cpp | 8 +- arts/gui/kde/klineedit_impl.h | 4 +- arts/gui/kde/kpopupbox_impl.cpp | 28 +- arts/gui/kde/kpopupbox_private.h | 114 ++++---- arts/gui/kde/kpoti.cpp | 152 +++++----- arts/gui/kde/kpoti.h | 50 ++-- arts/gui/kde/kpoti_impl.cpp | 8 +- arts/gui/kde/kpoti_impl.h | 8 +- arts/gui/kde/kspinbox_impl.cpp | 12 +- arts/gui/kde/kspinbox_impl.h | 16 +- arts/gui/kde/ktickmarks_impl.cpp | 42 +-- arts/gui/kde/ktickmarks_impl.h | 10 +- arts/gui/kde/kvbox_impl.cpp | 8 +- arts/gui/kde/kvbox_impl.h | 4 +- arts/gui/kde/kvolumefader_impl.cpp | 32 +-- arts/gui/kde/kvolumefader_impl.h | 20 +- arts/gui/kde/kwidget_impl.cpp | 20 +- arts/gui/kde/kwidget_impl.h | 8 +- arts/gui/kde/kwidgetrepo.cpp | 4 +- arts/gui/kde/kwidgetrepo.h | 8 +- arts/modules/common/env_mixeritem_impl.cc | 2 +- .../effects/kstereovolumecontrolgui_impl.cpp | 6 +- .../modules/effects/kstereovolumecontrolgui_impl.h | 16 +- arts/modules/synth/c_filter_stuff.h | 12 +- arts/tools/artsactions.cpp | 44 +-- arts/tools/artsactions.h | 8 +- arts/tools/artscontrolapplet.cpp | 32 +-- arts/tools/artscontrolapplet.h | 10 +- arts/tools/artscontrolapplet_private.h | 32 +-- arts/tools/audiomanager.cpp | 40 +-- arts/tools/audiomanager.h | 22 +- arts/tools/choosebusdlg.cpp | 44 +-- arts/tools/choosebusdlg.h | 8 +- arts/tools/environmentview.cpp | 58 ++-- arts/tools/environmentview.h | 6 +- arts/tools/fftscopeview.cpp | 36 +-- arts/tools/fftscopeview.h | 6 +- arts/tools/levelmeters.cpp | 64 ++--- arts/tools/levelmeters.h | 42 +-- arts/tools/main.cpp | 28 +- arts/tools/main.h | 20 +- arts/tools/mediatypesview.cpp | 10 +- arts/tools/mediatypesview.h | 2 +- arts/tools/midiinstdlg.cpp | 86 +++--- arts/tools/midiinstdlg.h | 14 +- arts/tools/midimanagerview.cpp | 44 +-- arts/tools/midimanagerview.h | 2 +- arts/tools/midiportdlg.cpp | 28 +- arts/tools/midiportdlg.h | 20 +- arts/tools/statusview.cpp | 26 +- arts/tools/statusview.h | 10 +- arts/tools/templateview.cpp | 4 +- arts/tools/templateview.h | 6 +- juk/actioncollection.cpp | 2 +- juk/advancedsearchdialog.cpp | 48 ++-- juk/advancedsearchdialog.h | 16 +- juk/akodeplayer.cpp | 4 +- juk/akodeplayer.h | 2 +- juk/artsplayer.cpp | 6 +- juk/artsplayer.h | 4 +- juk/cache.cpp | 54 ++-- juk/cache.h | 8 +- juk/categoryreaderinterface.cpp | 14 +- juk/categoryreaderinterface.h | 18 +- juk/collectionlist.cpp | 50 ++-- juk/collectionlist.h | 56 ++-- juk/coverdialog.cpp | 38 +-- juk/coverdialog.h | 6 +- juk/covericonview.cpp | 8 +- juk/covericonview.h | 6 +- juk/coverinfo.cpp | 64 ++--- juk/coverinfo.h | 8 +- juk/covermanager.cpp | 142 ++++----- juk/covermanager.h | 46 +-- juk/deletedialog.cpp | 26 +- juk/deletedialog.h | 12 +- juk/directorylist.cpp | 22 +- juk/directorylist.h | 14 +- juk/dynamicplaylist.cpp | 16 +- juk/dynamicplaylist.h | 14 +- juk/exampleoptions.cpp | 28 +- juk/exampleoptions.h | 12 +- juk/filehandle.cpp | 46 +-- juk/filehandle.h | 26 +- juk/filehandleproperties.h | 28 +- juk/filerenamer.cpp | 256 ++++++++--------- juk/filerenamer.h | 80 +++--- juk/filerenamerconfigdlg.cpp | 2 +- juk/filerenamerconfigdlg.h | 2 +- juk/filerenameroptions.cpp | 26 +- juk/filerenameroptions.h | 4 +- juk/folderplaylist.cpp | 22 +- juk/folderplaylist.h | 14 +- juk/gstreamerplayer.cpp | 8 +- juk/gstreamerplayer.h | 4 +- juk/historyplaylist.cpp | 24 +- juk/historyplaylist.h | 16 +- juk/juk.cpp | 96 +++---- juk/juk.h | 4 +- juk/jukIface.h | 56 ++-- juk/k3bexporter.cpp | 40 +-- juk/keydialog.cpp | 36 +-- juk/keydialog.h | 18 +- juk/ktrm.cpp | 80 +++--- juk/ktrm.h | 18 +- juk/mediafiles.cpp | 38 +-- juk/mediafiles.h | 22 +- juk/musicbrainzquery.cpp | 10 +- juk/musicbrainzquery.h | 2 +- juk/nowplaying.cpp | 102 +++---- juk/nowplaying.h | 44 +-- juk/player.h | 4 +- juk/playermanager.cpp | 54 ++-- juk/playermanager.h | 22 +- juk/playlist.cpp | 320 ++++++++++----------- juk/playlist.h | 118 ++++---- juk/playlistbox.cpp | 142 ++++----- juk/playlistbox.h | 74 ++--- juk/playlistcollection.cpp | 214 +++++++------- juk/playlistcollection.h | 82 +++--- juk/playlistexporter.h | 2 +- juk/playlistinterface.cpp | 6 +- juk/playlistinterface.h | 4 +- juk/playlistitem.cpp | 60 ++-- juk/playlistitem.h | 36 +-- juk/playlistsearch.cpp | 20 +- juk/playlistsearch.h | 32 +-- juk/playlistsplitter.cpp | 68 ++--- juk/playlistsplitter.h | 14 +- juk/searchplaylist.cpp | 14 +- juk/searchplaylist.h | 6 +- juk/searchwidget.cpp | 76 ++--- juk/searchwidget.h | 16 +- juk/slideraction.cpp | 94 +++--- juk/slideraction.h | 22 +- juk/sortedstringlist.cpp | 20 +- juk/sortedstringlist.h | 16 +- juk/splashscreen.cpp | 16 +- juk/splashscreen.h | 2 +- juk/statuslabel.cpp | 60 ++-- juk/statuslabel.h | 12 +- juk/stringhash.h | 20 +- juk/stringshare.cpp | 8 +- juk/stringshare.h | 6 +- juk/systemtray.cpp | 172 +++++------ juk/systemtray.h | 52 ++-- juk/tag.cpp | 36 +-- juk/tag.h | 50 ++-- juk/tageditor.cpp | 180 ++++++------ juk/tageditor.h | 22 +- juk/tagguesser.cpp | 56 ++-- juk/tagguesser.h | 52 ++-- juk/tagguesserconfigdlg.cpp | 46 +-- juk/tagguesserconfigdlg.h | 6 +- juk/tagguessertest.cpp | 44 +-- juk/tagrenameroptions.cpp | 38 +-- juk/tagrenameroptions.h | 24 +- juk/tagtransactionmanager.cpp | 28 +- juk/tagtransactionmanager.h | 20 +- juk/trackpickerdialog.cpp | 12 +- juk/trackpickerdialog.h | 4 +- juk/tracksequenceiterator.cpp | 4 +- juk/tracksequencemanager.cpp | 10 +- juk/tracksequencemanager.h | 2 +- juk/treeviewitemplaylist.cpp | 12 +- juk/treeviewitemplaylist.h | 4 +- juk/upcomingplaylist.cpp | 12 +- juk/upcomingplaylist.h | 12 +- juk/viewmode.cpp | 94 +++--- juk/viewmode.h | 40 +-- juk/webimagefetcher.cpp | 44 +-- juk/webimagefetcher.h | 32 +-- juk/webimagefetcherdialog.cpp | 78 ++--- juk/webimagefetcherdialog.h | 22 +- kaboodle/conf.cpp | 14 +- kaboodle/conf.h | 4 +- kaboodle/controls.cpp | 38 +-- kaboodle/controls.h | 34 +-- kaboodle/engine.cpp | 10 +- kaboodle/engine.h | 4 +- kaboodle/kaboodle_factory.cpp | 4 +- kaboodle/kaboodle_factory.h | 2 +- kaboodle/main.cpp | 2 +- kaboodle/player.cpp | 28 +- kaboodle/player.h | 18 +- kaboodle/userinterface.cpp | 34 +-- kaboodle/userinterface.h | 10 +- kaboodle/view.cpp | 74 ++--- kaboodle/view.h | 22 +- kaudiocreator/encodefileimp.cpp | 14 +- kaudiocreator/encodefileimp.h | 6 +- kaudiocreator/encoder.cpp | 58 ++-- kaudiocreator/encoder.h | 18 +- kaudiocreator/encoder_prefs_addons.h | 8 +- kaudiocreator/encoderconfig.ui.h | 2 +- kaudiocreator/encoderconfigimp.cpp | 56 ++-- kaudiocreator/encoderconfigimp.h | 10 +- kaudiocreator/general.ui.h | 10 +- kaudiocreator/job.cpp | 26 +- kaudiocreator/job.h | 30 +- kaudiocreator/jobqueimp.cpp | 46 +-- kaudiocreator/jobqueimp.h | 16 +- kaudiocreator/kaudiocreator.cpp | 102 +++---- kaudiocreator/kaudiocreator.h | 6 +- kaudiocreator/ripper.cpp | 48 ++-- kaudiocreator/ripper.h | 18 +- kaudiocreator/tracksimp.cpp | 98 +++---- kaudiocreator/tracksimp.h | 36 +-- kaudiocreator/wizard.ui.h | 14 +- kfile-plugins/au/kfile_au.cpp | 30 +- kfile-plugins/au/kfile_au.h | 2 +- kfile-plugins/avi/kfile_avi.cpp | 32 +-- kfile-plugins/avi/kfile_avi.h | 8 +- kfile-plugins/flac/kfile_flac.cpp | 74 ++--- kfile-plugins/flac/kfile_flac.h | 12 +- kfile-plugins/m3u/kfile_m3u.cpp | 26 +- kfile-plugins/m3u/kfile_m3u.h | 2 +- kfile-plugins/mp3/kfile_mp3.cpp | 88 +++--- kfile-plugins/mp3/kfile_mp3.h | 10 +- kfile-plugins/mpc/kfile_mpc.cpp | 68 ++--- kfile-plugins/mpc/kfile_mpc.h | 10 +- kfile-plugins/mpeg/kfile_mpeg.cpp | 42 +-- kfile-plugins/mpeg/kfile_mpeg.h | 8 +- kfile-plugins/ogg/kfile_ogg.cpp | 92 +++--- kfile-plugins/ogg/kfile_ogg.h | 10 +- kfile-plugins/sid/kfile_sid.cpp | 44 +-- kfile-plugins/sid/kfile_sid.h | 6 +- kfile-plugins/theora/kfile_theora.cpp | 26 +- kfile-plugins/theora/kfile_theora.h | 2 +- kfile-plugins/wav/kfile_wav.cpp | 32 +-- kfile-plugins/wav/kfile_wav.h | 2 +- kioslave/audiocd/audiocd.cpp | 126 ++++---- kioslave/audiocd/audiocd.h | 12 +- kioslave/audiocd/kcmaudiocd/kcmaudiocd.cpp | 84 +++--- kioslave/audiocd/kcmaudiocd/kcmaudiocd.h | 6 +- kioslave/audiocd/plugins/audiocdencoder.cpp | 26 +- kioslave/audiocd/plugins/audiocdencoder.h | 10 +- kioslave/audiocd/plugins/flac/encoderflac.cpp | 18 +- kioslave/audiocd/plugins/flac/encoderflac.h | 4 +- .../audiocd/plugins/lame/collectingprocess.cpp | 44 +-- kioslave/audiocd/plugins/lame/collectingprocess.h | 6 +- kioslave/audiocd/plugins/lame/encoderlame.cpp | 84 +++--- kioslave/audiocd/plugins/lame/encoderlame.h | 14 +- kioslave/audiocd/plugins/vorbis/encodervorbis.cpp | 22 +- kioslave/audiocd/plugins/vorbis/encodervorbis.h | 6 +- kioslave/audiocd/plugins/wav/encodercda.cpp | 2 +- kioslave/audiocd/plugins/wav/encodercda.h | 4 +- kioslave/audiocd/plugins/wav/encoderwav.cpp | 4 +- kioslave/audiocd/plugins/wav/encoderwav.h | 4 +- kmid/channel.cpp | 44 +-- kmid/channel.h | 56 ++-- kmid/channel3d.cpp | 28 +- kmid/channel3d.h | 30 +- kmid/channel4d.cpp | 36 +-- kmid/channel4d.h | 38 +-- kmid/channelcfgdlg.cpp | 24 +- kmid/channelcfgdlg.h | 8 +- kmid/channelview.cpp | 12 +- kmid/channelview.h | 8 +- kmid/collectdlg.cpp | 72 ++--- kmid/collectdlg.h | 24 +- kmid/kdisptext.cpp | 42 +-- kmid/kdisptext.h | 28 +- kmid/klcdnumber.cpp | 54 ++-- kmid/klcdnumber.h | 30 +- kmid/kmidIface.h | 2 +- kmid/kmid_part.cpp | 26 +- kmid/kmid_part.h | 12 +- kmid/kmidbutton.h | 12 +- kmid/kmidclient.cpp | 110 +++---- kmid/kmidclient.h | 34 +-- kmid/kmidframe.cpp | 128 ++++----- kmid/kmidframe.h | 24 +- kmid/ktrianglebutton.cpp | 34 +-- kmid/ktrianglebutton.h | 20 +- kmid/main.cpp | 8 +- kmid/midicfgdlg.cpp | 46 +-- kmid/midicfgdlg.h | 10 +- kmid/qslidertime.cpp | 28 +- kmid/qslidertime.h | 14 +- kmid/rhythmview.cpp | 14 +- kmid/rhythmview.h | 10 +- kmix/KMixApp.cpp | 2 +- kmix/dialogselectmaster.cpp | 48 ++-- kmix/dialogselectmaster.h | 16 +- kmix/dialogviewconfiguration.cpp | 36 +-- kmix/dialogviewconfiguration.h | 12 +- kmix/kledbutton.cpp | 22 +- kmix/kledbutton.h | 16 +- kmix/kmix-platforms.cpp | 4 +- kmix/kmix.cpp | 94 +++--- kmix/kmix.h | 24 +- kmix/kmixapplet.cpp | 106 +++---- kmix/kmixapplet.h | 42 +-- kmix/kmixctrl.cpp | 4 +- kmix/kmixdockwidget.cpp | 60 ++-- kmix/kmixdockwidget.h | 16 +- kmix/kmixerwidget.cpp | 52 ++-- kmix/kmixerwidget.h | 18 +- kmix/kmixprefdlg.cpp | 60 ++-- kmix/kmixprefdlg.h | 28 +- kmix/kmixtoolbox.cpp | 40 +-- kmix/kmixtoolbox.h | 16 +- kmix/ksmallslider.cpp | 150 +++++----- kmix/ksmallslider.h | 44 +-- kmix/mdwenum.cpp | 48 ++-- kmix/mdwenum.h | 12 +- kmix/mdwslider.cpp | 244 ++++++++-------- kmix/mdwslider.h | 42 +-- kmix/mdwswitch.cpp | 48 ++-- kmix/mdwswitch.h | 18 +- kmix/mixdevice.cpp | 18 +- kmix/mixdevice.h | 26 +- kmix/mixdevicewidget.cpp | 30 +- kmix/mixdevicewidget.h | 16 +- kmix/mixer.cpp | 42 +-- kmix/mixer.h | 46 +-- kmix/mixerIface.h | 2 +- kmix/mixer_alsa.h | 12 +- kmix/mixer_alsa9.cpp | 22 +- kmix/mixer_backend.cpp | 6 +- kmix/mixer_backend.h | 4 +- kmix/mixer_hpux.cpp | 6 +- kmix/mixer_hpux.h | 2 +- kmix/mixer_irix.cpp | 2 +- kmix/mixer_none.cpp | 2 +- kmix/mixer_oss.cpp | 18 +- kmix/mixer_oss.h | 10 +- kmix/mixer_oss4.cpp | 28 +- kmix/mixer_oss4.h | 8 +- kmix/mixer_sun.cpp | 12 +- kmix/mixer_sun.h | 4 +- kmix/mixertoolbox.cpp | 22 +- kmix/mixertoolbox.h | 6 +- kmix/mixset.cpp | 8 +- kmix/mixset.h | 12 +- kmix/verticaltext.cpp | 20 +- kmix/verticaltext.h | 10 +- kmix/viewapplet.cpp | 46 +-- kmix/viewapplet.h | 14 +- kmix/viewbase.cpp | 24 +- kmix/viewbase.h | 14 +- kmix/viewdockareapopup.cpp | 48 ++-- kmix/viewdockareapopup.h | 18 +- kmix/viewgrid.cpp | 16 +- kmix/viewgrid.h | 10 +- kmix/viewinput.cpp | 6 +- kmix/viewinput.h | 2 +- kmix/viewoutput.cpp | 4 +- kmix/viewoutput.h | 2 +- kmix/viewsliders.cpp | 16 +- kmix/viewsliders.h | 8 +- kmix/viewsurround.cpp | 36 +-- kmix/viewsurround.h | 12 +- kmix/viewswitches.cpp | 26 +- kmix/viewswitches.h | 12 +- krec/krecconfig_files.cpp | 26 +- krec/krecconfig_files.h | 8 +- krec/krecconfig_fileswidget.cpp | 62 ++-- krec/krecconfig_fileswidget.h | 32 +-- krec/krecconfigure.cpp | 76 ++--- krec/krecconfigure.h | 26 +- krec/krecexport_template.cpp | 6 +- krec/krecexport_template.h | 26 +- krec/krecexport_wave.cpp | 18 +- krec/krecexport_wave.h | 10 +- krec/krecfile.cpp | 106 +++---- krec/krecfile.h | 90 +++--- krec/krecfileview.cpp | 44 +-- krec/krecfileview.h | 12 +- krec/krecfileviewhelpers.cpp | 80 +++--- krec/krecfileviewhelpers.h | 52 ++-- krec/krecfilewidgets.cpp | 104 +++---- krec/krecfilewidgets.h | 44 +-- krec/krecglobal.cpp | 26 +- krec/krecglobal.h | 34 +-- krec/krecnewproperties.cpp | 48 ++-- krec/krecnewproperties.h | 12 +- krec/krecord.cpp | 72 ++--- krec/krecord.h | 2 +- krec/krecord_private.h | 16 +- krec/main.cpp | 2 +- krec/mp3_export/krecexport_mp3.cpp | 20 +- krec/mp3_export/krecexport_mp3.h | 10 +- krec/ogg_export/krecexport_ogg.cpp | 22 +- krec/ogg_export/krecexport_ogg.h | 10 +- kscd/bwlednum.cpp | 46 +-- kscd/bwlednum.h | 26 +- kscd/cddbdlg.cpp | 36 +-- kscd/cddbdlg.h | 8 +- kscd/configWidget.cpp | 22 +- kscd/configWidget.h | 2 +- kscd/docking.cpp | 42 +-- kscd/docking.h | 22 +- kscd/kcompactdisc.cpp | 62 ++-- kscd/kcompactdisc.h | 48 ++-- kscd/kscd.cpp | 304 ++++++++++---------- kscd/kscd.h | 68 ++--- kscd/ledlamp.cpp | 20 +- kscd/ledlamp.h | 6 +- libkcddb/asynccddbplookup.cpp | 20 +- libkcddb/asynccddbplookup.h | 14 +- libkcddb/asynchttplookup.cpp | 26 +- libkcddb/asynchttplookup.h | 4 +- libkcddb/asynchttpsubmit.cpp | 4 +- libkcddb/asynchttpsubmit.h | 2 +- libkcddb/asyncsmtpsubmit.cpp | 10 +- libkcddb/asyncsmtpsubmit.h | 4 +- libkcddb/cache.cpp | 46 +-- libkcddb/cache.h | 8 +- libkcddb/categories.cpp | 4 +- libkcddb/categories.h | 16 +- libkcddb/cddb.cpp | 24 +- libkcddb/cddb.h | 30 +- libkcddb/cddbplookup.cpp | 12 +- libkcddb/cddbplookup.h | 2 +- libkcddb/cdinfo.cpp | 60 ++-- libkcddb/cdinfo.h | 42 +-- libkcddb/cdinfodialogbase.ui.h | 52 ++-- libkcddb/cdinfoencodingwidget.cpp | 26 +- libkcddb/cdinfoencodingwidget.h | 12 +- libkcddb/client.cpp | 28 +- libkcddb/client.h | 2 +- libkcddb/config.h | 2 +- libkcddb/genres.cpp | 8 +- libkcddb/genres.h | 16 +- libkcddb/httplookup.cpp | 24 +- libkcddb/httplookup.h | 6 +- libkcddb/httpsubmit.cpp | 4 +- libkcddb/httpsubmit.h | 4 +- libkcddb/kcmcddb/cddbconfigwidget.cpp | 30 +- libkcddb/kcmcddb/cddbconfigwidget.h | 2 +- libkcddb/kcmcddb/kcmcddb.cpp | 24 +- libkcddb/kcmcddb/kcmcddb.h | 2 +- libkcddb/lookup.cpp | 10 +- libkcddb/lookup.h | 16 +- libkcddb/sites.cpp | 30 +- libkcddb/sites.h | 12 +- libkcddb/smtpsubmit.cpp | 6 +- libkcddb/smtpsubmit.h | 4 +- libkcddb/submit.cpp | 10 +- libkcddb/submit.h | 8 +- libkcddb/synccddbplookup.cpp | 20 +- libkcddb/synccddbplookup.h | 4 +- libkcddb/synchttplookup.cpp | 10 +- libkcddb/synchttplookup.h | 2 +- libkcddb/synchttpsubmit.cpp | 2 +- libkcddb/synchttpsubmit.h | 2 +- libkcddb/syncsmtpsubmit.cpp | 4 +- libkcddb/syncsmtpsubmit.h | 4 +- libkcddb/test/asynccddblookuptest.cpp | 6 +- libkcddb/test/asynccddblookuptest.h | 2 +- libkcddb/test/asynchttplookuptest.cpp | 6 +- libkcddb/test/asynchttplookuptest.h | 2 +- libkcddb/test/asynchttpsubmittest.cpp | 10 +- libkcddb/test/asynchttpsubmittest.h | 2 +- libkcddb/test/asyncsmtpsubmittest.cpp | 10 +- libkcddb/test/asyncsmtpsubmittest.h | 2 +- libkcddb/test/sitestest.cpp | 4 +- libkcddb/test/synchttpsubmittest.cpp | 4 +- libkcddb/test/syncsmtpsubmittest.cpp | 4 +- mpeglib/lib/util/abstract/abs_thread.h | 2 +- noatun/library/app.cpp | 74 ++--- noatun/library/cmodule.cpp | 66 ++--- noatun/library/cmodule.h | 8 +- noatun/library/controls.cpp | 38 +-- noatun/library/downloader.cpp | 46 +-- noatun/library/effects.cpp | 38 +-- noatun/library/effectview.cpp | 106 +++---- noatun/library/effectview.h | 14 +- noatun/library/engine.cpp | 42 +-- noatun/library/equalizer.cpp | 66 ++--- noatun/library/equalizerview.cpp | 136 ++++----- noatun/library/equalizerview.h | 32 +-- noatun/library/globalvideo.h | 4 +- noatun/library/ksaver.cpp | 28 +- noatun/library/ksaver.h | 20 +- noatun/library/mimetypetree.cpp | 32 +-- noatun/library/mimetypetree.h | 8 +- noatun/library/noatun/app.h | 18 +- noatun/library/noatun/controls.h | 36 +-- noatun/library/noatun/downloader.h | 26 +- noatun/library/noatun/effects.h | 28 +- noatun/library/noatun/engine.h | 10 +- noatun/library/noatun/equalizer.h | 40 +-- noatun/library/noatun/player.h | 18 +- noatun/library/noatun/playlist.h | 66 ++--- noatun/library/noatun/playlistsaver.h | 8 +- noatun/library/noatun/plugin.h | 12 +- noatun/library/noatun/pluginloader.h | 56 ++-- noatun/library/noatun/pref.h | 8 +- noatun/library/noatun/scrollinglabel.h | 16 +- noatun/library/noatun/stdaction.h | 40 +-- noatun/library/noatun/stereobuttonaction.h | 12 +- noatun/library/noatun/vequalizer.h | 42 +-- noatun/library/noatun/video.h | 10 +- noatun/library/noatunlistview.h | 2 +- noatun/library/noatunstdaction.cpp | 130 ++++----- noatun/library/noatuntags/tags.cpp | 46 +-- noatun/library/noatuntags/tagsgetter.h | 14 +- noatun/library/player.cpp | 38 +-- noatun/library/playlist.cpp | 62 ++-- noatun/library/playlistsaver.cpp | 136 ++++----- noatun/library/plugin.cpp | 62 ++-- noatun/library/plugin_deps.h | 6 +- noatun/library/pluginloader.cpp | 90 +++--- noatun/library/pluginmodule.cpp | 110 +++---- noatun/library/pluginmodule.h | 20 +- noatun/library/pref.cpp | 20 +- noatun/library/scrollinglabel.cpp | 28 +- noatun/library/stereobuttonaction.cpp | 12 +- noatun/library/titleproxy.cpp | 72 ++--- noatun/library/titleproxy.h | 44 +-- noatun/library/vequalizer.cpp | 146 +++++----- noatun/library/video.cpp | 38 +-- noatun/modules/artseffects/extrastereogui_impl.cc | 10 +- noatun/modules/artseffects/extrastereogui_impl.h | 6 +- noatun/modules/dcopiface/dcopiface.cpp | 52 ++-- noatun/modules/dcopiface/dcopiface.h | 32 +-- noatun/modules/excellent/userinterface.cpp | 92 +++--- noatun/modules/excellent/userinterface.h | 22 +- noatun/modules/htmlexport/htmlexport.cpp | 80 +++--- noatun/modules/htmlexport/htmlexport.h | 46 +-- noatun/modules/infrared/infrared.cpp | 12 +- noatun/modules/infrared/infrared.h | 4 +- noatun/modules/infrared/irprefs.cpp | 96 +++---- noatun/modules/infrared/irprefs.h | 14 +- noatun/modules/infrared/lirc.cpp | 38 +-- noatun/modules/infrared/lirc.h | 22 +- noatun/modules/kaiman/pref.cpp | 32 +-- noatun/modules/kaiman/pref.h | 8 +- noatun/modules/kaiman/style.cpp | 190 ++++++------ noatun/modules/kaiman/style.h | 140 ++++----- noatun/modules/kaiman/userinterface.cpp | 110 +++---- noatun/modules/kaiman/userinterface.h | 12 +- noatun/modules/keyz/keyz.cpp | 78 ++--- noatun/modules/keyz/keyz.h | 4 +- noatun/modules/kjofol-skin/helpers.cpp | 4 +- noatun/modules/kjofol-skin/kjbackground.cpp | 6 +- noatun/modules/kjofol-skin/kjbackground.h | 10 +- noatun/modules/kjofol-skin/kjbutton.cpp | 34 +-- noatun/modules/kjofol-skin/kjbutton.h | 20 +- noatun/modules/kjofol-skin/kjequalizer.cpp | 40 +-- noatun/modules/kjofol-skin/kjequalizer.h | 22 +- noatun/modules/kjofol-skin/kjfont.cpp | 72 ++--- noatun/modules/kjofol-skin/kjfont.h | 34 +-- noatun/modules/kjofol-skin/kjloader.cpp | 132 ++++----- noatun/modules/kjofol-skin/kjloader.h | 56 ++-- noatun/modules/kjofol-skin/kjprefs.cpp | 142 ++++----- noatun/modules/kjofol-skin/kjprefs.h | 22 +- noatun/modules/kjofol-skin/kjseeker.cpp | 34 +-- noatun/modules/kjofol-skin/kjseeker.h | 22 +- noatun/modules/kjofol-skin/kjsliders.cpp | 44 +-- noatun/modules/kjofol-skin/kjsliders.h | 50 ++-- noatun/modules/kjofol-skin/kjtextdisplay.cpp | 128 ++++----- noatun/modules/kjofol-skin/kjtextdisplay.h | 88 +++--- noatun/modules/kjofol-skin/kjvis.cpp | 94 +++--- noatun/modules/kjofol-skin/kjvis.h | 38 +-- noatun/modules/kjofol-skin/kjwidget.cpp | 22 +- noatun/modules/kjofol-skin/kjwidget.h | 24 +- noatun/modules/kjofol-skin/parser.cpp | 40 +-- noatun/modules/kjofol-skin/parser.h | 38 +-- noatun/modules/marquis/marquis.cpp | 24 +- noatun/modules/metatag/edit.cpp | 116 ++++---- noatun/modules/metatag/edit.h | 24 +- noatun/modules/metatag/metatag.cpp | 16 +- noatun/modules/metatag/metatag.h | 6 +- noatun/modules/monoscope/monoscope.cpp | 16 +- noatun/modules/monoscope/monoscope.h | 6 +- noatun/modules/net/net.cpp | 12 +- noatun/modules/net/net.h | 8 +- noatun/modules/noatunui/userinterface.cpp | 124 ++++---- noatun/modules/noatunui/userinterface.h | 28 +- noatun/modules/simple/propertiesdialog.ui.h | 14 +- noatun/modules/simple/userinterface.cpp | 152 +++++----- noatun/modules/simple/userinterface.h | 32 +-- noatun/modules/splitplaylist/find.cpp | 26 +- noatun/modules/splitplaylist/find.h | 8 +- noatun/modules/splitplaylist/playlist.cpp | 20 +- noatun/modules/splitplaylist/playlist.h | 8 +- noatun/modules/splitplaylist/view.cpp | 210 +++++++------- noatun/modules/splitplaylist/view.h | 58 ++-- noatun/modules/systray/cmodule.cpp | 26 +- noatun/modules/systray/cmodule.h | 6 +- noatun/modules/systray/kitsystemtray.cpp | 18 +- noatun/modules/systray/kitsystemtray.h | 14 +- noatun/modules/systray/systray.cpp | 156 +++++----- noatun/modules/systray/systray.h | 20 +- noatun/modules/voiceprint/prefs.cpp | 28 +- noatun/modules/voiceprint/prefs.h | 4 +- noatun/modules/voiceprint/voiceprint.cpp | 22 +- noatun/modules/voiceprint/voiceprint.h | 14 +- noatun/modules/winskin/fileInfo.cpp | 4 +- noatun/modules/winskin/guiSpectrumAnalyser.cpp | 42 +-- noatun/modules/winskin/guiSpectrumAnalyser.h | 12 +- noatun/modules/winskin/skinMap.h | 2 +- noatun/modules/winskin/waBalanceSlider.cpp | 8 +- noatun/modules/winskin/waButton.cpp | 8 +- noatun/modules/winskin/waButton.h | 10 +- noatun/modules/winskin/waClutterbar.cpp | 2 +- noatun/modules/winskin/waClutterbar.h | 4 +- noatun/modules/winskin/waColor.cpp | 6 +- noatun/modules/winskin/waColor.h | 8 +- noatun/modules/winskin/waDigit.cpp | 6 +- noatun/modules/winskin/waDigit.h | 12 +- noatun/modules/winskin/waIndicator.cpp | 2 +- noatun/modules/winskin/waIndicator.h | 4 +- noatun/modules/winskin/waInfo.cpp | 34 +-- noatun/modules/winskin/waInfo.h | 22 +- noatun/modules/winskin/waJumpSlider.cpp | 10 +- noatun/modules/winskin/waJumpSlider.h | 4 +- noatun/modules/winskin/waLabel.cpp | 16 +- noatun/modules/winskin/waLabel.h | 12 +- noatun/modules/winskin/waMain.cpp | 2 +- noatun/modules/winskin/waMain.h | 2 +- noatun/modules/winskin/waRegion.cpp | 38 +-- noatun/modules/winskin/waRegion.h | 18 +- noatun/modules/winskin/waSkin.cpp | 162 +++++------ noatun/modules/winskin/waSkin.h | 26 +- noatun/modules/winskin/waSkinManager.cpp | 58 ++-- noatun/modules/winskin/waSkinManager.h | 28 +- noatun/modules/winskin/waSkinModel.cpp | 106 +++---- noatun/modules/winskin/waSkinModel.h | 34 +-- noatun/modules/winskin/waSlider.cpp | 14 +- noatun/modules/winskin/waSlider.h | 12 +- noatun/modules/winskin/waStatus.cpp | 2 +- noatun/modules/winskin/waStatus.h | 4 +- noatun/modules/winskin/waTitleBar.cpp | 14 +- noatun/modules/winskin/waTitleBar.h | 14 +- noatun/modules/winskin/waVolumeSlider.cpp | 8 +- noatun/modules/winskin/waWidget.cpp | 8 +- noatun/modules/winskin/waWidget.h | 8 +- noatun/modules/winskin/winSkinConfig.cpp | 68 ++--- noatun/modules/winskin/winSkinConfig.h | 14 +- noatun/modules/winskin/winSkinVis.cpp | 4 +- noatun/modules/winskin/winSkinVis.h | 6 +- noatun/noatun20update.cpp | 20 +- xine_artsplugin/tools/thumbnail/videocreator.cpp | 34 +-- xine_artsplugin/tools/thumbnail/videocreator.h | 10 +- 708 files changed, 11093 insertions(+), 11093 deletions(-) diff --git a/arts/builder/autorouter.h b/arts/builder/autorouter.h index e65f531a..cd422c4f 100644 --- a/arts/builder/autorouter.h +++ b/arts/builder/autorouter.h @@ -33,19 +33,19 @@ #include #endif -#include -#include +#include +#include class PathInfo { public: int x1, x2, y1, y2, cost, depth; - QString history; + TQString history; int operator<(const PathInfo& x) const { return cost < x.cost; } int operator==(const PathInfo& x) const { return cost == x.cost; } }; -typedef QValueList PathQueue; +typedef TQValueList PathQueue; class ARCommand; @@ -96,7 +96,7 @@ protected: pthread_t route_thread; #endif - QPtrList command_queue; + TQPtrList command_queue; bool thread_terminate_now; /*************************/ diff --git a/arts/builder/createtool.cpp b/arts/builder/createtool.cpp index d533a8fa..a08515f3 100644 --- a/arts/builder/createtool.cpp +++ b/arts/builder/createtool.cpp @@ -25,8 +25,8 @@ #include "structureport.h" //#include -#include -#include +#include +#include #include #include @@ -50,7 +50,7 @@ CreateTool::CreateTool(ModuleWidget *mwidget) width = -1; height = -1; - componentRect = QRect(0, 0, 0, 0); + componentRect = TQRect(0, 0, 0, 0); } CreateTool::~CreateTool() @@ -60,7 +60,7 @@ CreateTool::~CreateTool() mwidget->setMouseTracking(oldMouseTracking); } -void CreateTool::mousePressEvent(QMouseEvent *e) +void CreateTool::mousePressEvent(TQMouseEvent *e) { int x = mwidget->findCol(e->x()); int y = mwidget->findRow(e->y()); @@ -74,7 +74,7 @@ void CreateTool::mousePressEvent(QMouseEvent *e) mwidget->leaveTool(this); } -void CreateTool::mouseMoveEvent(QMouseEvent *e) +void CreateTool::mouseMoveEvent(TQMouseEvent *e) { if(width == -1) estimateSize(); @@ -90,9 +90,9 @@ void CreateTool::mouseMoveEvent(QMouseEvent *e) if(!posok) return; mwidget->repaint(componentRect); - componentRect = QRect(cellx, celly, cellx2 - cellx, celly2 - celly); + componentRect = TQRect(cellx, celly, cellx2 - cellx, celly2 - celly); - QPainter *p = new QPainter; + TQPainter *p = new QPainter; p->begin(mwidget); p->save(); @@ -102,7 +102,7 @@ void CreateTool::mouseMoveEvent(QMouseEvent *e) delete p; } -void CreateTool::mouseReleaseEvent(QMouseEvent *e) +void CreateTool::mouseReleaseEvent(TQMouseEvent *e) { } @@ -241,17 +241,17 @@ CreatePortTool::CreatePortTool(ModuleWidget *mwidget, this->type = type; } -MoveComponentsTool::MoveComponentsTool(ModuleWidget *widget, QMouseEvent *e) +MoveComponentsTool::MoveComponentsTool(ModuleWidget *widget, TQMouseEvent *e) : MWidgetTool(widget), lastPos(e->pos()) { } -void MoveComponentsTool::mousePressEvent(QMouseEvent *e) +void MoveComponentsTool::mousePressEvent(TQMouseEvent *e) { } -void MoveComponentsTool::mouseMoveEvent(QMouseEvent *e) +void MoveComponentsTool::mouseMoveEvent(TQMouseEvent *e) { int dx = (e->x() - lastPos.x())/mwidget->cellsize; int dy = (e->y() - lastPos.y())/mwidget->cellsize; @@ -283,7 +283,7 @@ void MoveComponentsTool::mouseMoveEvent(QMouseEvent *e) mwidget->reRoute(); } -void MoveComponentsTool::mouseReleaseEvent(QMouseEvent *e) +void MoveComponentsTool::mouseReleaseEvent(TQMouseEvent *e) { mwidget->leaveTool(this, true); } @@ -295,20 +295,20 @@ ConnectPortsTool::ConnectPortsTool(ModuleWidget *widget, ModulePort *connectingP firstPos = mwidget->portPos(connectingPort) + connectingPort->clickrect.center(); } -void ConnectPortsTool::mousePressEvent(QMouseEvent *e) +void ConnectPortsTool::mousePressEvent(TQMouseEvent *e) { } -void ConnectPortsTool::mouseMoveEvent(QMouseEvent *e) +void ConnectPortsTool::mouseMoveEvent(TQMouseEvent *e) { - QPainter painter(mwidget); + TQPainter painter(mwidget); painter.setPen(Qt::white); - mwidget->repaint(QRect(firstPos, lastPos).normalize()); + mwidget->repaint(TQRect(firstPos, lastPos).normalize()); painter.drawLine(firstPos, e->pos()); lastPos = e->pos(); } -void ConnectPortsTool::mouseReleaseEvent(QMouseEvent *e) +void ConnectPortsTool::mouseReleaseEvent(TQMouseEvent *e) { StructureComponent *component; ModulePort *otherPort; @@ -334,6 +334,6 @@ void ConnectPortsTool::mouseReleaseEvent(QMouseEvent *e) } } } - mwidget->repaint(QRect(firstPos, lastPos).normalize()); + mwidget->repaint(TQRect(firstPos, lastPos).normalize()); mwidget->leaveTool(this); } diff --git a/arts/builder/createtool.h b/arts/builder/createtool.h index c8fe0763..15a4b5e7 100644 --- a/arts/builder/createtool.h +++ b/arts/builder/createtool.h @@ -22,8 +22,8 @@ #ifndef _CREATETOOL_H #define _CREATETOOL_H -#include -#include +#include +#include #include "structure.h" #include "module.h" @@ -41,17 +41,17 @@ public: MWidgetTool(ModuleWidget *mwidget); virtual ~MWidgetTool(); - virtual void mousePressEvent(QMouseEvent *e) = 0; - virtual void mouseMoveEvent(QMouseEvent *e) = 0; - virtual void mouseReleaseEvent(QMouseEvent *e) = 0; + virtual void mousePressEvent(TQMouseEvent *e) = 0; + virtual void mouseMoveEvent(TQMouseEvent *e) = 0; + virtual void mouseReleaseEvent(TQMouseEvent *e) = 0; }; class CreateTool: public MWidgetTool { protected: - QCursor oldCursor; + TQCursor oldCursor; bool oldMouseTracking; - QRect componentRect; + TQRect componentRect; int width, height; public: @@ -61,9 +61,9 @@ public: virtual void estimateSize() = 0; virtual void performCreate(int x, int y) = 0; - void mousePressEvent(QMouseEvent *e); - void mouseMoveEvent(QMouseEvent *e); - void mouseReleaseEvent(QMouseEvent *e); + void mousePressEvent(TQMouseEvent *e); + void mouseMoveEvent(TQMouseEvent *e); + void mouseReleaseEvent(TQMouseEvent *e); }; class CreateModuleTool: public CreateTool @@ -106,27 +106,27 @@ public: class MoveComponentsTool: public MWidgetTool { - QPoint lastPos; + TQPoint lastPos; public: - MoveComponentsTool(ModuleWidget *widget, QMouseEvent *e); + MoveComponentsTool(ModuleWidget *widget, TQMouseEvent *e); - void mousePressEvent(QMouseEvent *e); - void mouseMoveEvent(QMouseEvent *e); - void mouseReleaseEvent(QMouseEvent *e); + void mousePressEvent(TQMouseEvent *e); + void mouseMoveEvent(TQMouseEvent *e); + void mouseReleaseEvent(TQMouseEvent *e); }; class ConnectPortsTool: public MWidgetTool { ModulePort *connectingPort; - QPoint firstPos, lastPos; + TQPoint firstPos, lastPos; public: ConnectPortsTool(ModuleWidget *widget, ModulePort *connectingPort); - void mousePressEvent(QMouseEvent *e); - void mouseMoveEvent(QMouseEvent *e); - void mouseReleaseEvent(QMouseEvent *e); + void mousePressEvent(TQMouseEvent *e); + void mouseMoveEvent(TQMouseEvent *e); + void mouseReleaseEvent(TQMouseEvent *e); }; #endif diff --git a/arts/builder/dirmanager.cpp b/arts/builder/dirmanager.cpp index 27347738..2f22f104 100644 --- a/arts/builder/dirmanager.cpp +++ b/arts/builder/dirmanager.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include @@ -68,19 +68,19 @@ const char *DirManager::baseDir() return d; } -char *DirManager::directory(const char *subdir, const QString &desc) +char *DirManager::directory(const char *subdir, const TQString &desc) { const char *home = getenv("HOME"); if(home == 0) return strdup(""); - QCString dirname = QCString(home) + "/arts" + subdir; + TQCString dirname = TQCString(home) + "/arts" + subdir; struct stat buf; if(stat(dirname.data(), &buf) == -1) { - QString message; - QString dir = QFile::decodeName(dirname); + TQString message; + TQString dir = TQFile::decodeName(dirname); message = i18n("You need the folder %1.\n" "It will be used to store %2.\nShould I create it now?") .arg(dir).arg(desc); diff --git a/arts/builder/dirmanager.h b/arts/builder/dirmanager.h index b007bcbe..17ec4343 100644 --- a/arts/builder/dirmanager.h +++ b/arts/builder/dirmanager.h @@ -24,7 +24,7 @@ class DirManager { protected: - static char *directory(const char *subdir, const QString& desc); + static char *directory(const char *subdir, const TQString& desc); public: static const char *mapDir(); static const char *sessionDir(); diff --git a/arts/builder/drawutils.cpp b/arts/builder/drawutils.cpp index 43b449e8..c2c0ef3f 100644 --- a/arts/builder/drawutils.cpp +++ b/arts/builder/drawutils.cpp @@ -21,9 +21,9 @@ #include "drawutils.h" -QString DrawUtils::cropText(QPainter *p, QString text, int maxlen, int& textwidth) +TQString DrawUtils::cropText(TQPainter *p, TQString text, int maxlen, int& textwidth) { - QString label = text; + TQString label = text; while(p->fontMetrics().width(label) > maxlen && label.length() > 0) { int i = label.find('_'); diff --git a/arts/builder/drawutils.h b/arts/builder/drawutils.h index 25032eb3..08aadb3c 100644 --- a/arts/builder/drawutils.h +++ b/arts/builder/drawutils.h @@ -22,10 +22,10 @@ #ifndef __DRAWUTILS_H__ #define __DRAWUTILS_H__ -#include +#include class DrawUtils { public: - static QString cropText(QPainter *p, QString text, int maxlen, int& textwidth); + static TQString cropText(TQPainter *p, TQString text, int maxlen, int& textwidth); }; #endif diff --git a/arts/builder/execdlg.cpp b/arts/builder/execdlg.cpp index 4ed8bac9..ccd1ae40 100644 --- a/arts/builder/execdlg.cpp +++ b/arts/builder/execdlg.cpp @@ -19,12 +19,12 @@ */ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -37,44 +37,44 @@ #include "execdlg.h" #include "dirmanager.h" #include -#include +#include #ifndef KDE_USE_FINAL -static void min_size(QWidget *w) { +static void min_size(TQWidget *w) { w->setMinimumSize(w->sizeHint()); } #endif -ExecDlg::ExecDlg(QWidget *parent, ExecutableStructure *structure) - :QDialog(parent,"X") +ExecDlg::ExecDlg(TQWidget *parent, ExecutableStructure *structure) + :TQDialog(parent,"X") /*, TRUE)*/ { this->structure = structure; setCaption(i18n("aRts Module Execution")); - mainlayout = new QVBoxLayout(this); + mainlayout = new TQVBoxLayout(this); // caption label: "Synthesis running..." mainlayout->addSpacing(5); - QLabel *captionlabel = new QLabel(this); - QFont labelfont(captionlabel->font()); + TQLabel *captionlabel = new TQLabel(this); + TQFont labelfont(captionlabel->font()); labelfont.setPointSize(labelfont.pointSize()*3/2); captionlabel->setFont(labelfont); - captionlabel->setText(QString(" ")+i18n("Synthesis running...")+QString(" ")); + captionlabel->setText(TQString(" ")+i18n("Synthesis running...")+TQString(" ")); captionlabel->setAlignment(AlignCenter); min_size(captionlabel); mainlayout->addWidget(captionlabel); - cpuusagelabel = new QLabel(this); + cpuusagelabel = new TQLabel(this); cpuusagelabel->setText(i18n("CPU usage: unknown")); - cpuusagetimer = new QTimer( this ); - connect( cpuusagetimer, SIGNAL(timeout()), - this, SLOT(updateCpuUsage()) ); - connect( cpuusagetimer, SIGNAL(timeout()), - this, SLOT(guiServerTick()) ); + cpuusagetimer = new TQTimer( this ); + connect( cpuusagetimer, TQT_SIGNAL(timeout()), + this, TQT_SLOT(updateCpuUsage()) ); + connect( cpuusagetimer, TQT_SIGNAL(timeout()), + this, TQT_SLOT(guiServerTick()) ); cpuusagetimer->start( 2000, false ); min_size(cpuusagelabel); @@ -107,7 +107,7 @@ ExecDlg::ExecDlg(QWidget *parent, ExecutableStructure *structure) // buttons - QHBoxLayout *buttonlayout = new QHBoxLayout; + TQHBoxLayout *buttonlayout = new QHBoxLayout; mainlayout->addSpacing(5); mainlayout->addLayout(buttonlayout); mainlayout->addSpacing(5); @@ -115,15 +115,15 @@ ExecDlg::ExecDlg(QWidget *parent, ExecutableStructure *structure) buttonlayout->addSpacing(5); KButtonBox *bbox = new KButtonBox(this); - bbox->addButton(KStdGuiItem::help(), this, SLOT( help() )); + bbox->addButton(KStdGuiItem::help(), this, TQT_SLOT( help() )); bbox->addStretch(1); - QButton *savebutton = bbox->addButton(KStdGuiItem::saveAs()); - connect( savebutton, SIGNAL( clicked() ), SLOT(saveSession() ) ); + TQButton *savebutton = bbox->addButton(KStdGuiItem::saveAs()); + connect( savebutton, TQT_SIGNAL( clicked() ), TQT_SLOT(saveSession() ) ); - QButton *okbutton = bbox->addButton(KStdGuiItem::ok()); - connect( okbutton, SIGNAL( clicked() ), SLOT(accept() ) ); + TQButton *okbutton = bbox->addButton(KStdGuiItem::ok()); + connect( okbutton, TQT_SIGNAL( clicked() ), TQT_SLOT(accept() ) ); bbox->layout(); //min_size(bbox); @@ -178,7 +178,7 @@ void ExecDlg::updateCpuUsage() void ExecDlg::done( int r ) { structure->stopExecute(); - QDialog::done(r); + TQDialog::done(r); emit ready(); } @@ -186,11 +186,11 @@ void ExecDlg::saveSession() { chdir(DirManager::sessionDir()); - QString filename = KFileDialog::getSaveFileName(0,"*.arts-session",this); + TQString filename = KFileDialog::getSaveFileName(0,"*.arts-session",this); if(!filename.isEmpty()) { arts_debug("save... %s",filename.local8Bit().data()); - structure->saveSession(QFile::encodeName(filename)); + structure->saveSession(TQFile::encodeName(filename)); } } diff --git a/arts/builder/execdlg.h b/arts/builder/execdlg.h index 43562d2f..1fbd8069 100644 --- a/arts/builder/execdlg.h +++ b/arts/builder/execdlg.h @@ -23,23 +23,23 @@ #define __EXECDLG_H_ #include "structure.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include -class ExecDlg :public QDialog { +class ExecDlg :public TQDialog { Q_OBJECT public: - QTimer *cpuusagetimer; - QLabel *cpuusagelabel; - QVBoxLayout *mainlayout,*sliderlayout; + TQTimer *cpuusagetimer; + TQLabel *cpuusagelabel; + TQVBoxLayout *mainlayout,*sliderlayout; ExecutableStructure *structure; void start(); void done(int r); - ExecDlg(QWidget *parent, ExecutableStructure *structure); + ExecDlg(TQWidget *parent, ExecutableStructure *structure); protected slots: void updateCpuUsage(); diff --git a/arts/builder/interfacedlg.cpp b/arts/builder/interfacedlg.cpp index 82d985ed..a96a1b35 100644 --- a/arts/builder/interfacedlg.cpp +++ b/arts/builder/interfacedlg.cpp @@ -21,41 +21,41 @@ #include "interfacedlg.h" #include "structureport.h" -#include -#include -#include +#include +#include +#include #include -#include -#include +#include +#include #include #include #include #include -#include +#include #include #include #include #include -#include +#include #include using namespace std; -InterfaceDlg::InterfaceDlg(QWidget *parent) :QDialog(parent,"Props", TRUE) +InterfaceDlg::InterfaceDlg(TQWidget *parent) :TQDialog(parent,"Props", TRUE) { setCaption(i18n("aRts: Structureport View")); - QVBoxLayout *mainlayout = new QVBoxLayout(this); - //QHBoxLayout *contentslayout = new QHBoxLayout; + TQVBoxLayout *mainlayout = new TQVBoxLayout(this); + //TQHBoxLayout *contentslayout = new QHBoxLayout; // object type /* mainlayout->addSpacing(5); - QLabel *objectlabel = new QLabel(this); - QFont labelfont(objectlabel->font()); + TQLabel *objectlabel = new TQLabel(this); + TQFont labelfont(objectlabel->font()); labelfont.setPointSize(labelfont.pointSize()*3/2); objectlabel->setFont(labelfont); - objectlabel->setText(QString(" ")+i18n("Object type: ")+QString(port->owner->name())+QString(" ")); + objectlabel->setText(TQString(" ")+i18n("Object type: ")+TQString(port->owner->name())+TQString(" ")); objectlabel->setAlignment(AlignCenter); min_size(objectlabel); mainlayout->addWidget(objectlabel); @@ -65,7 +65,7 @@ InterfaceDlg::InterfaceDlg(QWidget *parent) :QDialog(parent,"Props", TRUE) /* mainlayout->addSpacing(5); - QLabel *portlabel = new QLabel(this); + TQLabel *portlabel = new TQLabel(this); labelfont.setPointSize(labelfont.pointSize()*4/5); portlabel->setFont(labelfont); portlabel->setText(i18n("Port description: ")+ port->description); @@ -88,14 +88,14 @@ InterfaceDlg::InterfaceDlg(QWidget *parent) :QDialog(parent,"Props", TRUE) */ // list - listbox = new QListBox(this); + listbox = new TQListBox(this); update(); listbox->setMinimumSize(340,400); mainlayout->addWidget(listbox); - connect( listbox, SIGNAL( doubleClicked ( QListBoxItem *)), this, - SLOT(accept())); + connect( listbox, TQT_SIGNAL( doubleClicked ( TQListBoxItem *)), this, + TQT_SLOT(accept())); // hruler mainlayout->addSpacing(5); @@ -104,7 +104,7 @@ InterfaceDlg::InterfaceDlg(QWidget *parent) :QDialog(parent,"Props", TRUE) // buttons - QHBoxLayout *buttonlayout = new QHBoxLayout; + TQHBoxLayout *buttonlayout = new QHBoxLayout; mainlayout->addSpacing(5); mainlayout->addLayout(buttonlayout); mainlayout->addSpacing(5); @@ -112,14 +112,14 @@ InterfaceDlg::InterfaceDlg(QWidget *parent) :QDialog(parent,"Props", TRUE) buttonlayout->addSpacing(5); KButtonBox *bbox = new KButtonBox(this); - bbox->addButton(KStdGuiItem::help(), this, SLOT( help() )); + bbox->addButton(KStdGuiItem::help(), this, TQT_SLOT( help() )); bbox->addStretch(1); - QButton *okbutton = bbox->addButton(KStdGuiItem::ok()); - connect( okbutton, SIGNAL( clicked() ), SLOT(accept() ) ); + TQButton *okbutton = bbox->addButton(KStdGuiItem::ok()); + connect( okbutton, TQT_SIGNAL( clicked() ), TQT_SLOT(accept() ) ); - QButton *cancelbutton = bbox->addButton(KStdGuiItem::cancel()); - connect( cancelbutton, SIGNAL( clicked() ), SLOT(reject() ) ); + TQButton *cancelbutton = bbox->addButton(KStdGuiItem::cancel()); + connect( cancelbutton, TQT_SIGNAL( clicked() ), TQT_SLOT(reject() ) ); bbox->layout(); //min_size(bbox); diff --git a/arts/builder/interfacedlg.h b/arts/builder/interfacedlg.h index d5a888c4..4524eaaa 100644 --- a/arts/builder/interfacedlg.h +++ b/arts/builder/interfacedlg.h @@ -24,19 +24,19 @@ #include "structure.h" #include "structureport.h" -#include -#include -#include -#include +#include +#include +#include +#include #include -class InterfaceDlg :public QDialog { +class InterfaceDlg :public TQDialog { Q_OBJECT protected: - QListBox *listbox; + TQListBox *listbox; public: - InterfaceDlg(QWidget *parent); + InterfaceDlg(TQWidget *parent); std::string interfaceName(); void update(const std::string& interface, const std::string& indent); diff --git a/arts/builder/main.cpp b/arts/builder/main.cpp index 9cc300ed..4630f2f7 100644 --- a/arts/builder/main.cpp +++ b/arts/builder/main.cpp @@ -54,8 +54,8 @@ #include #include #include -#include -#include +#include +#include #include @@ -78,7 +78,7 @@ protected: public: ArtsBuilderApp(); - ArtsBuilderApp(QString filename); + ArtsBuilderApp(TQString filename); void start(); void end(); }; @@ -146,7 +146,7 @@ ArtsBuilderWindow::ArtsBuilderWindow(const char *name) arts_debug("PORT: modulewidget"); modulewidget = new ModuleWidget(structure, mainDock, "mwidget"); mainDock->setWidget(modulewidget); - connect(modulewidget, SIGNAL(modified(bool)), SLOT(setModified(bool))); + connect(modulewidget, TQT_SIGNAL(modified(bool)), TQT_SLOT(setModified(bool))); arts_debug("PORT: modulewidget ok"); // allow others to dock to the 4 sides @@ -167,20 +167,20 @@ ArtsBuilderWindow::ArtsBuilderWindow(const char *name) 80); // relation target/this (in percent) // selection - connect(modulewidget, SIGNAL(portSelected(ModulePort *)), - propertyPanel, SLOT (setSelectedPort(ModulePort *))); - connect(propertyPanel, SIGNAL(portSelected(ModulePort *)), - modulewidget, SLOT (selectPort(ModulePort *))); - connect(modulewidget, SIGNAL(componentSelected(StructureComponent *)), - propertyPanel, SLOT (setSelectedComponent(StructureComponent *))); + connect(modulewidget, TQT_SIGNAL(portSelected(ModulePort *)), + propertyPanel, TQT_SLOT (setSelectedPort(ModulePort *))); + connect(propertyPanel, TQT_SIGNAL(portSelected(ModulePort *)), + modulewidget, TQT_SLOT (selectPort(ModulePort *))); + connect(modulewidget, TQT_SIGNAL(componentSelected(StructureComponent *)), + propertyPanel, TQT_SLOT (setSelectedComponent(StructureComponent *))); // connection - connect(propertyPanel, SIGNAL(startConnection(ModulePort *)), - modulewidget, SLOT (startConnection(ModulePort *))); + connect(propertyPanel, TQT_SIGNAL(startConnection(ModulePort *)), + modulewidget, TQT_SLOT (startConnection(ModulePort *))); // port properties changed - connect(propertyPanel, SIGNAL(portPropertiesChanged(ModulePort *)), - modulewidget, SLOT (portPropertiesChanged(ModulePort *))); + connect(propertyPanel, TQT_SIGNAL(portPropertiesChanged(ModulePort *)), + modulewidget, TQT_SLOT (portPropertiesChanged(ModulePort *))); arts_debug("PORT: setcanvas"); structure->setCanvas(modulewidget); @@ -251,25 +251,25 @@ ArtsBuilderWindow::ArtsBuilderWindow(const char *name) */ #if 000 - connect(menubar, SIGNAL(highlighted(int)), this, SLOT(activateMenu(int))); - connect(m_view, SIGNAL(activated(int)), modulewidget, SLOT(setZoom(int))); - connect(m_ports, SIGNAL(activated(int)), this, SLOT(addPort(int))); - connect(m_file_new, SIGNAL(activated(int)), this, SLOT(fileNew(int))); + connect(menubar, TQT_SIGNAL(highlighted(int)), this, TQT_SLOT(activateMenu(int))); + connect(m_view, TQT_SIGNAL(activated(int)), modulewidget, TQT_SLOT(setZoom(int))); + connect(m_ports, TQT_SIGNAL(activated(int)), this, TQT_SLOT(addPort(int))); + connect(m_file_new, TQT_SIGNAL(activated(int)), this, TQT_SLOT(fileNew(int))); - //connect(m_modules, SIGNAL(activated(int)), this, SLOT(addModule(int))); + //connect(m_modules, TQT_SIGNAL(activated(int)), this, TQT_SLOT(addModule(int))); /* - connect(m_modules_synth, SIGNAL(activated(int)), this, SLOT(addModule(int))); - connect(m_modules_gui, SIGNAL(activated(int)), this, SLOT(addModule(int))); - connect(m_modules_instruments, SIGNAL(activated(int)), this, SLOT(addModule(int))); - connect(m_modules_other, SIGNAL(activated(int)), this, SLOT(addModule(int))); + connect(m_modules_synth, TQT_SIGNAL(activated(int)), this, TQT_SLOT(addModule(int))); + connect(m_modules_gui, TQT_SIGNAL(activated(int)), this, TQT_SLOT(addModule(int))); + connect(m_modules_instruments, TQT_SIGNAL(activated(int)), this, TQT_SLOT(addModule(int))); + connect(m_modules_other, TQT_SIGNAL(activated(int)), this, TQT_SLOT(addModule(int))); */ - connect(kapp, SIGNAL(lastWindowClosed()), this , SLOT(quit())); + connect(kapp, TQT_SIGNAL(lastWindowClosed()), this , TQT_SLOT(quit())); // update the modules menu once for the start #endif arts_debug("PORT: activatemenu"); - connect(menumaker, SIGNAL(activated(const char *)), this, SLOT(addModule(const char *))); + connect(menumaker, TQT_SIGNAL(activated(const char *)), this, TQT_SLOT(addModule(const char *))); fillModuleMenu(); arts_debug("PORT: activatemenu ok"); setupActions(); @@ -277,13 +277,13 @@ ArtsBuilderWindow::ArtsBuilderWindow(const char *name) createGUI(); // connect to aboutToShow to correctly show state of dockwidget there: - QPopupMenu *viewmenu = (QPopupMenu*)factory()->container("view", this); + TQPopupMenu *viewmenu = (TQPopupMenu*)factory()->container("view", this); if (viewmenu) - connect(viewmenu, SIGNAL(aboutToShow()), this, SLOT(viewMenuAboutToShow())); + connect(viewmenu, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(viewMenuAboutToShow())); else arts_debug("view menu not found!"); - m_filename = QString::null; + m_filename = TQString::null; setModified(false); installEventFilter(propertyPanel); @@ -292,55 +292,55 @@ ArtsBuilderWindow::ArtsBuilderWindow(const char *name) void ArtsBuilderWindow::setupActions() { // File menu - KStdAction::openNew(this, SLOT(fileNew()), actionCollection()); + KStdAction::openNew(this, TQT_SLOT(fileNew()), actionCollection()); - (void)new KAction(i18n("Open Session..."), 0, this, SLOT(openSession()), + (void)new KAction(i18n("Open Session..."), 0, this, TQT_SLOT(openSession()), actionCollection(), "file_open_session"); - KStdAction::open(this, SLOT(open()), actionCollection()); - (void)new KAction(i18n("Open E&xample..."), Qt::CTRL + Qt::Key_X, this, SLOT(openExample()), + KStdAction::open(this, TQT_SLOT(open()), actionCollection()); + (void)new KAction(i18n("Open E&xample..."), Qt::CTRL + Qt::Key_X, this, TQT_SLOT(openExample()), actionCollection(), "file_open_example"); - KStdAction::save(this, SLOT(save()), actionCollection()); - KStdAction::saveAs(this, SLOT(saveAs()), actionCollection()); - (void)new KAction(i18n("&Retrieve From Server..."), Qt::CTRL + Qt::Key_R, this, SLOT(retrieve()), + KStdAction::save(this, TQT_SLOT(save()), actionCollection()); + KStdAction::saveAs(this, TQT_SLOT(saveAs()), actionCollection()); + (void)new KAction(i18n("&Retrieve From Server..."), Qt::CTRL + Qt::Key_R, this, TQT_SLOT(retrieve()), actionCollection(), "file_retrieve_from_server"); - (void)new KAction(i18n("&Execute Structure"), "artsbuilderexecute", Qt::CTRL + Qt::Key_E, this, SLOT(execute()), + (void)new KAction(i18n("&Execute Structure"), "artsbuilderexecute", Qt::CTRL + Qt::Key_E, this, TQT_SLOT(execute()), actionCollection(), "file_execute_structure"); - (void)new KAction(i18n("&Rename Structure..."), Qt::CTRL + Qt::Key_R, this, SLOT(rename()), + (void)new KAction(i18n("&Rename Structure..."), Qt::CTRL + Qt::Key_R, this, TQT_SLOT(rename()), actionCollection(), "file_rename_structure"); - (void)new KAction(i18n("&Publish Structure"), Qt::CTRL + Qt::Key_P, this, SLOT(publish()), + (void)new KAction(i18n("&Publish Structure"), Qt::CTRL + Qt::Key_P, this, TQT_SLOT(publish()), actionCollection(), "file_publish_structure"); - KStdAction::quit(this, SLOT(close()), actionCollection()); + KStdAction::quit(this, TQT_SLOT(close()), actionCollection()); // Edit menu - (void)new KAction(i18n("&Delete"), Qt::Key_Delete, modulewidget, SLOT(delModule()), + (void)new KAction(i18n("&Delete"), Qt::Key_Delete, modulewidget, TQT_SLOT(delModule()), actionCollection(), "edit_delete"); - KStdAction::selectAll(modulewidget, SLOT(selectAll()), actionCollection()); + KStdAction::selectAll(modulewidget, TQT_SLOT(selectAll()), actionCollection()); // View menu viewPropertiesAction= new KToggleAction(i18n("&Property Panel"), 0, - propertyDock, SLOT(changeHideShowState()), + propertyDock, TQT_SLOT(changeHideShowState()), actionCollection(), "view_properties"); - (void)new KAction(i18n("200%"), 0, this, SLOT(viewAt200()), + (void)new KAction(i18n("200%"), 0, this, TQT_SLOT(viewAt200()), actionCollection(), "view_200"); - (void)new KAction(i18n("150%"), 0, this, SLOT(viewAt150()), + (void)new KAction(i18n("150%"), 0, this, TQT_SLOT(viewAt150()), actionCollection(), "view_150"); - (void)new KAction(i18n("100%"), 0, this, SLOT(viewAt100()), + (void)new KAction(i18n("100%"), 0, this, TQT_SLOT(viewAt100()), actionCollection(), "view_100"); - (void)new KAction(i18n("50%"), 0, this, SLOT(viewAt50()), + (void)new KAction(i18n("50%"), 0, this, TQT_SLOT(viewAt50()), actionCollection(), "view_50"); // Ports menu - (void)new KAction(i18n("Create IN Audio Signal"), 0, this, SLOT(createInAudioSignal()), + (void)new KAction(i18n("Create IN Audio Signal"), 0, this, TQT_SLOT(createInAudioSignal()), actionCollection(), "ports_create_in_audio_signal"); - (void)new KAction(i18n("Create OUT Audio Signal"), 0, this, SLOT(createOutAudioSignal()), + (void)new KAction(i18n("Create OUT Audio Signal"), 0, this, TQT_SLOT(createOutAudioSignal()), actionCollection(), "ports_create_out_audio_signal"); - (void)new KAction(i18n("Create IN String Property"), 0, this, SLOT(createInStringProperty()), + (void)new KAction(i18n("Create IN String Property"), 0, this, TQT_SLOT(createInStringProperty()), actionCollection(), "ports_create_in_string_property"); - (void)new KAction(i18n("Create IN Audio Property"), 0, this, SLOT(createInAudioProperty()), + (void)new KAction(i18n("Create IN Audio Property"), 0, this, TQT_SLOT(createInAudioProperty()), actionCollection(), "ports_create_in_audio_property"); - (void)new KAction(i18n("Implement Interface..."), 0, this, SLOT(addInterface()), + (void)new KAction(i18n("Implement Interface..."), 0, this, TQT_SLOT(addInterface()), actionCollection(), "ports_implement_interface"); - (void)new KAction(i18n("Change Positions/Names..."), 0, this, SLOT(changePortPositions()), + (void)new KAction(i18n("Change Positions/Names..."), 0, this, TQT_SLOT(changePortPositions()), actionCollection(), "ports_change_positions"); } @@ -444,10 +444,10 @@ void ArtsBuilderWindow::publish() i18n("The structure has been published as: '%1' on the server.").arg( structure->name().c_str() )); } -QString ArtsBuilderWindow::getOpenFilename(const char *pattern, const char *initialDir) +TQString ArtsBuilderWindow::getOpenFilename(const char *pattern, const char *initialDir) { arts_debug(">>>>> getOpenFilename"); - QString filename = KFileDialog::getOpenFileName(initialDir, pattern, this); + TQString filename = KFileDialog::getOpenFileName(initialDir, pattern, this); arts_debug(">>>>> opendlg closed"); if(!filename.isEmpty()) { @@ -455,7 +455,7 @@ QString ArtsBuilderWindow::getOpenFilename(const char *pattern, const char *init // check that the file is ok: - FILE *infile = fopen(QFile::encodeName(filename), "r"); + FILE *infile = fopen(TQFile::encodeName(filename), "r"); if(infile) { @@ -463,7 +463,7 @@ QString ArtsBuilderWindow::getOpenFilename(const char *pattern, const char *init return(filename); } } - return QString(""); + return TQString(""); } void ArtsBuilderWindow::fileNew() @@ -474,7 +474,7 @@ void ArtsBuilderWindow::fileNew() propertyPanel->setSelectedComponent(0); structure->clear(); modulewidget->reInit(); - m_filename = QString::null; + m_filename = TQString::null; setModified(false); } @@ -486,14 +486,14 @@ void ArtsBuilderWindow::open() open(getOpenFilename("*.arts", DirManager::structureDir())); } -void ArtsBuilderWindow::open(QString filename) +void ArtsBuilderWindow::open(TQString filename) { if(!promptToSave()) return; if(!filename.isEmpty()) { - structure->load(QFile::encodeName(filename)); + structure->load(TQFile::encodeName(filename)); modulewidget->reInit(); if(!structure->valid()) { @@ -514,12 +514,12 @@ void ArtsBuilderWindow::openSession() if(!promptToSave()) return; - QString filename = getOpenFilename("*.arts-session", DirManager::sessionDir()); + TQString filename = getOpenFilename("*.arts-session", DirManager::sessionDir()); if(!filename.isEmpty()) { Session *session = new Session(); - session->loadSession(QFile::encodeName(filename)); + session->loadSession(TQFile::encodeName(filename)); assert(!execDlg); execDlg = new ExecDlg(0, session); @@ -532,7 +532,7 @@ void ArtsBuilderWindow::openSession() execDlg->start(); execDlg->show(); - connect(execDlg, SIGNAL(ready()), this, SLOT(endexecute())); + connect(execDlg, TQT_SIGNAL(ready()), this, TQT_SLOT(endexecute())); hide(); // m_filename = filename; FIXME: DOESN'T THIS BELONG HERE? @@ -545,14 +545,14 @@ void ArtsBuilderWindow::openExample() if(!promptToSave()) return; - QString dir = locate("data", "artsbuilder/examples/"); + TQString dir = locate("data", "artsbuilder/examples/"); if(!dir) KMessageBox::sorry( this, i18n("Unable to find the examples folder.\nUsing the current folder instead."), i18n("aRts Warning")); - open(getOpenFilename("*.arts", QFile::encodeName(dir))); + open(getOpenFilename("*.arts", TQFile::encodeName(dir))); } void ArtsBuilderWindow::saveAs() @@ -566,19 +566,19 @@ void ArtsBuilderWindow::saveAs() dlg->setSelection(defaultname.c_str()); dlg->setCaption(i18n("Save As")); - QString filename; - if(dlg->exec() == QDialog::Accepted) + TQString filename; + if(dlg->exec() == TQDialog::Accepted) filename = dlg->selectedFile(); delete dlg; - // QString filename = KFileDialog::getSaveFileName(0, "*.arts", this); + // TQString filename = KFileDialog::getSaveFileName(0, "*.arts", this); // filename.detach(); if(!filename.isEmpty()) save(filename); } -bool ArtsBuilderWindow::save(QString filename) +bool ArtsBuilderWindow::save(TQString filename) { arts_debug("trying to save structure as '%s'", filename.local8Bit().data()); @@ -629,7 +629,7 @@ void ArtsBuilderWindow::rename() { bool ok; - QString name = KInputDialog::getText( i18n( "Rename Structure" ), + TQString name = KInputDialog::getText( i18n( "Rename Structure" ), i18n( "Enter structure name:" ), structure->name().c_str(), &ok, this ); if (ok) { @@ -649,7 +649,7 @@ void ArtsBuilderWindow::retrieve() if(rd.exec()) { - QString result = rd.result(); + TQString result = rd.result(); if(!result.isEmpty()) { structure->retrieve(result.local8Bit()); @@ -674,7 +674,7 @@ void ArtsBuilderWindow::execute() execDlg->start(); execDlg->show(); - connect(execDlg, SIGNAL(ready()), this, SLOT(endexecute())); + connect(execDlg, TQT_SIGNAL(ready()), this, TQT_SLOT(endexecute())); hide(); } @@ -838,7 +838,7 @@ bool ArtsBuilderWindow::promptToSave() return true; query = KMessageBox::warningYesNoCancel(this, - i18n("The current structure has been modified.\nWould you like to save it?"), QString::null, KStdGuiItem::save(), KStdGuiItem::discard()); + i18n("The current structure has been modified.\nWould you like to save it?"), TQString::null, KStdGuiItem::save(), KStdGuiItem::discard()); result = false; switch(query) @@ -864,10 +864,10 @@ ArtsBuilderApp::ArtsBuilderApp() start(); } -ArtsBuilderApp::ArtsBuilderApp(QString filename) +ArtsBuilderApp::ArtsBuilderApp(TQString filename) { start(); - if(QFile::exists(filename)) + if(TQFile::exists(filename)) { mainWindow->open(filename); } else { @@ -946,7 +946,7 @@ int main(int argc, char **argv) } if(args->count() > 0) { - ArtsBuilderApp Application(QFile::decodeName(args->arg(0))); + ArtsBuilderApp Application(TQFile::decodeName(args->arg(0))); args->clear(); return Application.exec(); } else { diff --git a/arts/builder/main.h b/arts/builder/main.h index 1ae4473f..e9c17391 100644 --- a/arts/builder/main.h +++ b/arts/builder/main.h @@ -56,7 +56,7 @@ protected: ExecDlg *execDlg; - QString m_filename; + TQString m_filename; bool modified; protected: @@ -68,7 +68,7 @@ public: void clear(); void checkName(); - QString getOpenFilename(const char *pattern, const char *initialDir = 0); + TQString getOpenFilename(const char *pattern, const char *initialDir = 0); bool isModified(); bool promptToSave(); bool queryClose(); @@ -99,8 +99,8 @@ public slots: void saveAs(); void quit(); - void open(QString filename); - bool save(QString filename); + void open(TQString filename); + bool save(TQString filename); void setModified(bool m = true); void execute(); diff --git a/arts/builder/menumaker.cpp b/arts/builder/menumaker.cpp index 54e32e2b..2aed8401 100644 --- a/arts/builder/menumaker.cpp +++ b/arts/builder/menumaker.cpp @@ -8,9 +8,9 @@ using namespace std; MenuEntry::MenuEntry(MenuMaker *menumaker, KActionMenu *parent, const char *text) : menumaker(menumaker), text(text) { - action = new KAction(QString::fromLocal8Bit(text)); + action = new KAction(TQString::fromLocal8Bit(text)); parent->insert(action); - connect(action, SIGNAL(activated()), this, SLOT(activated())); + connect(action, TQT_SIGNAL(activated()), this, TQT_SLOT(activated())); } void MenuEntry::activated() @@ -18,7 +18,7 @@ void MenuEntry::activated() menumaker->menuActivated(text); } -MenuCategory::MenuCategory(const QString& name, const char *prefix, KActionMenu *menu) +MenuCategory::MenuCategory(const TQString& name, const char *prefix, KActionMenu *menu) { _menu = menu; _name = name; @@ -26,7 +26,7 @@ MenuCategory::MenuCategory(const QString& name, const char *prefix, KActionMenu addPrefix(prefix); } -QString MenuCategory::name() +TQString MenuCategory::name() { return _name; } @@ -76,7 +76,7 @@ MenuMaker::MenuMaker(KActionMenu *root) // addCategory("&Synthesis", "Synth_"); // addCategory("&Synthesis/&Waveforms", "Synth_WAVE"); -void MenuMaker::addCategory(const QString& name, const char *prefix) +void MenuMaker::addCategory(const TQString& name, const char *prefix) { MenuCategory *mc = 0,*pc = 0; @@ -93,7 +93,7 @@ void MenuMaker::addCategory(const QString& name, const char *prefix) KActionMenu *newMenu = new KActionMenu(catname(name)); pc->menu()->insert(newMenu); /* 000 */ - /*connect(newMenu,SIGNAL(activated(int)),this,SLOT(menuactivated(int))); + /*connect(newMenu,TQT_SIGNAL(activated(int)),this,TQT_SLOT(menuactivated(int))); pc->menu()->insertItem(catname(name).c_str(), newMenu, CAT_MAGIC_ID);*/ arts_debug("inserting a menu called '%s' in the parent menu '%s'", catname(name).local8Bit().data(),pc->name().local8Bit().data()); @@ -106,7 +106,7 @@ void MenuMaker::addCategory(const QString& name, const char *prefix) } } -MenuCategory *MenuMaker::lookupCategoryByName(const QString& name) +MenuCategory *MenuMaker::lookupCategoryByName(const TQString& name) { MenuCategory *mc = 0; list::iterator i; @@ -137,16 +137,16 @@ void MenuMaker::addItem(const char *name, int index) //mc->menu()->insert(new KAction(name)); // index?? new MenuEntry(this, mc->menu(), name); /* - KAction *action = new KAction(QString(name)); + KAction *action = new KAction(TQString(name)); mc->menu()->insert(action); */ //action->plug(mc->menu()); //mc->menu()->insert(new KAction(name)); // index?? } -QString MenuMaker::basename(const QString& name) +TQString MenuMaker::basename(const TQString& name) { - QString result = ""; + TQString result = ""; int i = name.findRev('/'); if(i != -1) @@ -157,7 +157,7 @@ QString MenuMaker::basename(const QString& name) return result; } -QString MenuMaker::catname(const QString& name) +TQString MenuMaker::catname(const TQString& name) { int i = name.findRev('/'); if(i >= 0) diff --git a/arts/builder/menumaker.h b/arts/builder/menumaker.h index 5b999dc5..f2481a2f 100644 --- a/arts/builder/menumaker.h +++ b/arts/builder/menumaker.h @@ -2,7 +2,7 @@ #define __MENUMAKER_H__ #include -#include +#include #include #include @@ -15,7 +15,7 @@ class MenuEntry : public QObject protected: MenuMaker *menumaker; KAction *action; - QCString text; + TQCString text; public: MenuEntry(MenuMaker *menumaker, KActionMenu *parent, const char *text); @@ -28,15 +28,15 @@ class MenuCategory { protected: KActionMenu *_menu; - QString _name; + TQString _name; std::list prefixList; bool _catchall; public: - MenuCategory(const QString& name, const char *prefix, KActionMenu *menu); + MenuCategory(const TQString& name, const char *prefix, KActionMenu *menu); void addPrefix(const char *prefix); - QString name(); + TQString name(); KActionMenu *menu(); bool catchall(); @@ -53,11 +53,11 @@ public: MenuMaker(KActionMenu *root); - void addCategory(const QString& name, const char *prefix); - MenuCategory *lookupCategoryByName(const QString& name); + void addCategory(const TQString& name, const char *prefix); + MenuCategory *lookupCategoryByName(const TQString& name); void addItem(const char *name, int i); - QString basename(const QString& name); - QString catname(const QString& name); + TQString basename(const TQString& name); + TQString catname(const TQString& name); void clear(); diff --git a/arts/builder/module.cpp b/arts/builder/module.cpp index 94f56591..5432492e 100644 --- a/arts/builder/module.cpp +++ b/arts/builder/module.cpp @@ -24,8 +24,8 @@ #include #include -#include -#include +#include +#include #include #include @@ -56,20 +56,20 @@ bool ModulePort::down() return (PortDesc.isConnected() || PortDesc.hasValue() || selected); } -QColor ModulePort::color(bool isInterface) +TQColor ModulePort::color(bool isInterface) { - if(selected) return QColor(255, 165, 0); + if(selected) return TQColor(255, 165, 0); if(PortDesc.hasValue()) { - if(isinitarg) return QColor(180, 180, 180); - return QColor(100, 100, 255); + if(isinitarg) return TQColor(180, 180, 180); + return TQColor(100, 100, 255); } - if(isinitarg) return QColor(128, 128, 128); + if(isinitarg) return TQColor(128, 128, 128); - if(isInterface) return QColor(100, 100, 100); - return QColor(43, 43, 168); + if(isInterface) return TQColor(100, 100, 100); + return TQColor(43, 43, 168); } Module::Module(Arts::ModuleDesc module, Arts::StructureDesc structuredesc, @@ -94,7 +94,7 @@ Module::Module(const Arts::ModuleInfo& minfo, Arts::StructureDesc structuredesc, void Module::initModule() { - QString iconname; + TQString iconname; KIconLoader iconloader; _selected = false; @@ -107,12 +107,12 @@ void Module::initModule() iconname = _name + ".xpm"; - _pixmap = new QPixmap(iconloader.loadIcon(iconname, KIcon::User)); + _pixmap = new TQPixmap(iconloader.loadIcon(iconname, KIcon::User)); if(!_pixmap->height()) { iconname = _name + ".png"; delete _pixmap; - _pixmap = new QPixmap( iconloader.loadIcon( iconname, KIcon::User ) ); + _pixmap = new TQPixmap( iconloader.loadIcon( iconname, KIcon::User ) ); if( !_pixmap->height() ) { delete _pixmap; @@ -125,12 +125,12 @@ void Module::initModule() { iconname = iconname.mid(6); - _pixmap = new QPixmap(iconloader.loadIcon(iconname, KIcon::User)); + _pixmap = new TQPixmap(iconloader.loadIcon(iconname, KIcon::User)); if(!_pixmap->height()) { iconname.replace( iconname.length() - 4, 3, "png" ); delete _pixmap; - _pixmap = new QPixmap(iconloader.loadIcon(iconname, KIcon::User)); + _pixmap = new TQPixmap(iconloader.loadIcon(iconname, KIcon::User)); if( !_pixmap->height() ) { delete _pixmap; @@ -139,10 +139,10 @@ void Module::initModule() } } /* - FILE *test = fopen(QFile::encodeName(iconname), "r"); + FILE *test = fopen(TQFile::encodeName(iconname), "r"); if(test) { - pixmap = new QPixmap(iconname); + pixmap = new TQPixmap(iconname); fclose(test); } */ @@ -229,24 +229,24 @@ bool Module::drawNeedsBackground(int segment) return (segment == 0); } -void Module::drawSegment(QPainter *p, int cellsize, int segment) +void Module::drawSegment(TQPainter *p, int cellsize, int segment) { int border = cellsize / 10; // for the logo int ltop = (cellsize - border)/2; int lbot = (cellsize + border)/2; - QColor mcolor(43, 43, 168); - QColor mcolorlight(164, 176, 242); + TQColor mcolor(43, 43, 168); + TQColor mcolorlight(164, 176, 242); if(isInterface) { - mcolor = QColor(100, 100, 100); - mcolorlight = QColor(160, 160, 160); + mcolor = TQColor(100, 100, 100); + mcolorlight = TQColor(160, 160, 160); } - QColorGroup g( Qt::white, Qt::blue, mcolorlight, mcolor.dark(), mcolor, + TQColorGroup g( Qt::white, Qt::blue, mcolorlight, mcolor.dark(), mcolor, Qt::black, Qt::black ); - QBrush fill( mcolor ); - QPen textpen(QColor(255, 255, 180), 1); + TQBrush fill( mcolor ); + TQPen textpen(TQColor(255, 255, 180), 1); if(segment == 0) { @@ -263,9 +263,9 @@ void Module::drawSegment(QPainter *p, int cellsize, int segment) float sx = (float)destsize/(float)_pixmap->width(); float sy = (float)destsize/(float)_pixmap->height(); - QWMatrix matrix; + TQWMatrix matrix; matrix.scale(sx, sy); - QPixmap pmscaled = _pixmap->xForm(matrix); + TQPixmap pmscaled = _pixmap->xForm(matrix); p->drawPixmap(border*2, border*2, pmscaled); } return; @@ -300,25 +300,25 @@ void Module::drawSegment(QPainter *p, int cellsize, int segment) { int border = cellsize/7; int textwidth; - QString label = DrawUtils::cropText(p, port->description, + TQString label = DrawUtils::cropText(p, port->description, cellsize/2, textwidth); - QBrush pbrush(port->color(isInterface)); + TQBrush pbrush(port->color(isInterface)); - port->clickrect = QRect(border, direction * cellsize/2 + border, + port->clickrect = TQRect(border, direction * cellsize/2 + border, cellsize/2 - 2*border, cellsize/2 - 2*border); qDrawShadePanel(p, port->clickrect, g, port->down(), 2, &pbrush); #if 0 - QBrush fillport(fill); + TQBrush fillport(fill); if(port->isinitarg) { - fillport = QColor(128, 128, 128); + fillport = TQColor(128, 128, 128); } if(port->selected) { - QBrush fillorange(QColor(255, 165, 0)); + TQBrush fillorange(TQColor(255, 165, 0)); qDrawShadePanel(p, port->clickrect, g, true, 2, &fillorange); } else @@ -329,10 +329,10 @@ void Module::drawSegment(QPainter *p, int cellsize, int segment) } else if(port->PortDesc->hasValue()) { - QBrush fillp(QColor(100, 100, 255)); + TQBrush fillp(TQColor(100, 100, 255)); if(port->isinitarg) { - fillp = QColor(180, 180, 180); + fillp = TQColor(180, 180, 180); } qDrawShadePanel(p, port->clickrect, g, true, 2, &fillp); } @@ -356,10 +356,10 @@ void Module::drawSegment(QPainter *p, int cellsize, int segment) { // object type label int textwidth; - QString label = DrawUtils::cropText(p, _name, cellsize - 4, textwidth); + TQString label = DrawUtils::cropText(p, _name, cellsize - 4, textwidth); p->setPen(textpen); - p->fillRect(1, cellsize - 16, textwidth + 7, 15, QBrush(g.dark())); + p->fillRect(1, cellsize - 16, textwidth + 7, 15, TQBrush(g.dark())); p->drawText(4, cellsize - 5, label); // logo connection @@ -373,7 +373,7 @@ void Module::drawSegment(QPainter *p, int cellsize, int segment) if(selected()) { - QPen pen(Qt::white, 1, Qt::DotLine); + TQPen pen(Qt::white, 1, Qt::DotLine); p->setPen(pen); p->drawLine(0, 0, cellsize - 1, 0); @@ -412,7 +412,7 @@ ModulePort *Module::portAt(int segment, int x, int y) ModulePort *port = findPort(segment, direction); if(port) { - QPoint clickpoint(x, y); + TQPoint clickpoint(x, y); if(port->clickrect.contains(clickpoint)) return port; } } @@ -426,12 +426,12 @@ void Module::dumpPorts(list& ports) for(i = outports.begin(); i != outports.end(); ++i) ports.push_back(*i); } -QPixmap *Module::pixmap() +TQPixmap *Module::pixmap() { return _pixmap; } -QString Module::name() +TQString Module::name() { return _name; } diff --git a/arts/builder/module.h b/arts/builder/module.h index 0d23bb11..6fbff74d 100644 --- a/arts/builder/module.h +++ b/arts/builder/module.h @@ -24,9 +24,9 @@ #include -#include -#include -#include +#include +#include +#include #include #include "artsbuilder.h" @@ -59,7 +59,7 @@ public: int drawsegment, Direction direction, Arts::PortDesc PortDesc); bool down(); - QColor color(bool isInterface); + TQColor color(bool isInterface); }; class Module :public StructureComponent @@ -68,8 +68,8 @@ protected: Arts::StructureDesc StructureDesc; Arts::ModuleDesc ModuleDesc; - QPixmap *_pixmap; - QString _name; + TQPixmap *_pixmap; + TQString _name; int _width, _height; bool moveInternal(int x, int y); @@ -100,9 +100,9 @@ public: void dumpPorts(std::list& ports); bool drawNeedsBackground(int segment); - void drawSegment(QPainter *dest, int cellsize, int segment); - QPixmap *pixmap(); - QString name(); + void drawSegment(TQPainter *dest, int cellsize, int segment); + TQPixmap *pixmap(); + TQString name(); }; #endif diff --git a/arts/builder/mwidget.cpp b/arts/builder/mwidget.cpp index b6c3d841..808b3bcf 100644 --- a/arts/builder/mwidget.cpp +++ b/arts/builder/mwidget.cpp @@ -7,9 +7,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include "createtool.h" @@ -56,22 +56,22 @@ void ModuleWidget::leaveTool(MWidgetTool *tool, bool wasModified) emit modified(wasModified); } -QPoint ModuleWidget::componentPos(const StructureComponent *component) const +TQPoint ModuleWidget::componentPos(const StructureComponent *component) const { int cellx = 0, celly = 0; colXPos(component->x(), &cellx); rowYPos(component->y(), &celly); - return QPoint(cellx, celly); + return TQPoint(cellx, celly); } -QPoint ModuleWidget::portPos(const ModulePort *port) const +TQPoint ModuleWidget::portPos(const ModulePort *port) const { int cellx = 0, celly = 0; colXPos(port->owner->x() + port->drawsegment, &cellx); rowYPos(port->owner->y(), &celly); - return QPoint(cellx, celly); + return TQPoint(cellx, celly); } bool ModuleWidget::insertModule( Module *newModule ) @@ -125,7 +125,7 @@ void ModuleWidget::selectComponent( StructureComponent *component, bool onlyThis endUpdate(); } -void ModuleWidget::mousePressEvent( QMouseEvent *e ) +void ModuleWidget::mousePressEvent( TQMouseEvent *e ) { if(activeTool) { @@ -172,7 +172,7 @@ void ModuleWidget::mousePressEvent( QMouseEvent *e ) } } -void ModuleWidget::mouseMoveEvent( QMouseEvent *e ) +void ModuleWidget::mouseMoveEvent( TQMouseEvent *e ) { if(activeTool) { @@ -181,7 +181,7 @@ void ModuleWidget::mouseMoveEvent( QMouseEvent *e ) } } -void ModuleWidget::mouseReleaseEvent( QMouseEvent *e ) +void ModuleWidget::mouseReleaseEvent( TQMouseEvent *e ) { if(activeTool) { @@ -250,16 +250,16 @@ bool ModuleWidget::hasSpace(StructureComponent *c, int destx, int desty, return true; } -void ModuleWidget::paintCellBackground(QPainter *p, int y, int x) +void ModuleWidget::paintCellBackground(TQPainter *p, int y, int x) { - QColor bgcolor; + TQColor bgcolor; if((y & 1) == 1) - bgcolor = QColor(168, 168, 168); + bgcolor = TQColor(168, 168, 168); else - bgcolor = QColor(146, 168, 146); + bgcolor = TQColor(146, 168, 146); - p->fillRect(0, 0, cellsize, cellsize, QBrush(bgcolor)); + p->fillRect(0, 0, cellsize, cellsize, TQBrush(bgcolor)); p->setPen(bgcolor.dark(115)); p->drawLine(0, 0, 0, cellsize - 1); @@ -296,7 +296,7 @@ void ModuleWidget::endUpdate() { if(!--updateDepth) { - std::list::iterator i; + std::list::iterator i; for(i = UpdateList.begin(); i != UpdateList.end(); i++) { @@ -309,7 +309,7 @@ void ModuleWidget::endUpdate() void ModuleWidget::redrawRect(int x, int y, int width, int height) { - QRect r = QRect(x, y, width, height); + TQRect r = TQRect(x, y, width, height); if(!updateDepth) { @@ -321,7 +321,7 @@ void ModuleWidget::redrawRect(int x, int y, int width, int height) } } -void ModuleWidget::redrawCells(QRect &r) +void ModuleWidget::redrawCells(TQRect &r) { int x, y; @@ -461,18 +461,18 @@ void ModuleWidget::reRoute() void ModuleWidget::redrawAll() { // redraw everything - QRect updaterect(0, 0, cols, rows); + TQRect updaterect(0, 0, cols, rows); redrawCells(updaterect); } -void ModuleWidget::paintConnection(QPainter *p, int x, int y, int arx, int ary) +void ModuleWidget::paintConnection(TQPainter *p, int x, int y, int arx, int ary) { long linetype = autorouter->get(arx, ary); long ud_owner = -1, lr_owner = -1, lr_break = 0, ud_break = 0; autorouter->getowners(arx, ary, ud_owner, lr_owner); - p->setPen(QColor(255, 255, 255)); + p->setPen(TQColor(255, 255, 255)); /* if(linetype == AutoRouter::none) @@ -481,7 +481,7 @@ void ModuleWidget::paintConnection(QPainter *p, int x, int y, int arx, int ary) } if(linetype & AutoRouter::solid) { - QBrush whitefill(QColor(255, 255, 255)); + TQBrush whitefill(TQColor(255, 255, 255)); p->fillRect(x + cellsize/6, y + cellsize/6, cellsize/6, cellsize/6, whitefill); } @@ -513,7 +513,7 @@ void ModuleWidget::paintConnection(QPainter *p, int x, int y, int arx, int ary) p->drawLine(x, y + cellsize/4, x, y + ud_break); } -void ModuleWidget::paintConnections(QPainter *p, int y, int x) +void ModuleWidget::paintConnections(TQPainter *p, int y, int x) { // paints connections in the given 2x2-autorouter-block being a 1x1 block to the user for(int dx = 0; dx < 2; dx++) @@ -521,7 +521,7 @@ void ModuleWidget::paintConnections(QPainter *p, int y, int x) paintConnection(p, (cellsize*dx)/2, (cellsize*dy)/2, x*2 + dx, y*2 + dy); } -void ModuleWidget::paintCell(QPainter *p, int y, int x) +void ModuleWidget::paintCell(TQPainter *p, int y, int x) { #if 0 /* PORT */ if(theArtsBuilderApp->eventStackDepth() > 1) @@ -594,7 +594,7 @@ void ModuleWidget::delModule() if(KMessageBox::warningContinueCancel(0, i18n("Delete %n selected module, port or connection? (No undo possible.)", "Delete %n selected modules, ports and connections? (No undo possible.)", - numSelected), QString::null, i18n("&Delete")) == KMessageBox::Continue) + numSelected), TQString::null, i18n("&Delete")) == KMessageBox::Continue) { selectPort(0L); emit componentSelected(0); @@ -608,7 +608,7 @@ void ModuleWidget::autoRedrawRouter() if(autorouter->needRedraw()) redrawAll(); } -ModuleWidget::ModuleWidget(Structure *structure, QWidget *parent, const char *name, WFlags f) +ModuleWidget::ModuleWidget(Structure *structure, TQWidget *parent, const char *name, WFlags f) : QtTableView( parent, name, f), updateDepth( 0 ), activeTool( 0L ), @@ -636,9 +636,9 @@ ModuleWidget::ModuleWidget(Structure *structure, QWidget *parent, const char *na autorouter = new AutoRouter(cols*2, rows*2); arts_debug("PORT: mw; new ar ok - qtimer"); - QTimer *timer = new QTimer( this ); - connect( timer, SIGNAL(timeout()), - this, SLOT(autoRedrawRouter()) ); + TQTimer *timer = new TQTimer( this ); + connect( timer, TQT_SIGNAL(timeout()), + this, TQT_SLOT(autoRedrawRouter()) ); arts_debug("PORT: mw; tstart"); timer->start( 100, FALSE ); // 100 ms reoccurring check diff --git a/arts/builder/mwidget.h b/arts/builder/mwidget.h index 93f7726f..8f92c946 100644 --- a/arts/builder/mwidget.h +++ b/arts/builder/mwidget.h @@ -55,15 +55,15 @@ protected: ModulePort *selectedPort; std::list *ModuleList; - std::list UpdateList; + std::list UpdateList; - void paintCell(QPainter *p, int y, int x); - void paintCellBackground(QPainter *p, int y, int x); - void paintConnection(QPainter *p, int x, int y, int arx, int ary); - void paintConnections(QPainter *p, int y, int x); - void mousePressEvent( QMouseEvent *e ); - void mouseMoveEvent( QMouseEvent *e ); - void mouseReleaseEvent( QMouseEvent *e ); + void paintCell(TQPainter *p, int y, int x); + void paintCellBackground(TQPainter *p, int y, int x); + void paintConnection(TQPainter *p, int x, int y, int arx, int ary); + void paintConnections(TQPainter *p, int y, int x); + void mousePressEvent( TQMouseEvent *e ); + void mouseMoveEvent( TQMouseEvent *e ); + void mouseReleaseEvent( TQMouseEvent *e ); bool hasSpace(StructureComponent *c, int destx, int desty, bool ignore_selected = false); @@ -72,7 +72,7 @@ protected: void setSelectAll(bool newstate); void beginUpdate(); - void redrawCells(QRect &r); + void redrawCells(TQRect &r); void redrawAll(); void endUpdate(); @@ -105,10 +105,10 @@ public: void reInit(); void leaveTool(MWidgetTool *tool, bool wasModified= false); - QPoint componentPos(const StructureComponent *component) const; - QPoint portPos(const ModulePort *port) const; + TQPoint componentPos(const StructureComponent *component) const; + TQPoint portPos(const ModulePort *port) const; - ModuleWidget( Structure *structure, QWidget *parent = 0, + ModuleWidget( Structure *structure, TQWidget *parent = 0, const char *name = 0, WFlags f = 0); ~ModuleWidget(); diff --git a/arts/builder/portposdlg.cpp b/arts/builder/portposdlg.cpp index 6d5d0deb..3584de45 100644 --- a/arts/builder/portposdlg.cpp +++ b/arts/builder/portposdlg.cpp @@ -21,42 +21,42 @@ #include "portposdlg.h" #include "structureport.h" -#include -#include -#include +#include +#include +#include #include #include #include -#include -#include +#include +#include #include #include #include -#include +#include #include #include -#include +#include #include using namespace std; -PortPosDlg::PortPosDlg(QWidget *parent, Structure *structure) :QDialog(parent,"Props", TRUE) +PortPosDlg::PortPosDlg(TQWidget *parent, Structure *structure) :TQDialog(parent,"Props", TRUE) { this->structure = structure; setCaption(i18n("aRts: Structureport View")); - QVBoxLayout *mainlayout = new QVBoxLayout(this); - //QHBoxLayout *contentslayout = new QHBoxLayout; + TQVBoxLayout *mainlayout = new TQVBoxLayout(this); + //TQHBoxLayout *contentslayout = new QHBoxLayout; // object type /* mainlayout->addSpacing(5); - QLabel *objectlabel = new QLabel(this); - QFont labelfont(objectlabel->font()); + TQLabel *objectlabel = new TQLabel(this); + TQFont labelfont(objectlabel->font()); labelfont.setPointSize(labelfont.pointSize()*3/2); objectlabel->setFont(labelfont); - objectlabel->setText(QString(" ")+i18n("Object type: ")+QString(port->owner->name())+QString(" ")); + objectlabel->setText(TQString(" ")+i18n("Object type: ")+TQString(port->owner->name())+TQString(" ")); objectlabel->setAlignment(AlignCenter); min_size(objectlabel); mainlayout->addWidget(objectlabel); @@ -66,7 +66,7 @@ PortPosDlg::PortPosDlg(QWidget *parent, Structure *structure) :QDialog(parent,"P /* mainlayout->addSpacing(5); - QLabel *portlabel = new QLabel(this); + TQLabel *portlabel = new TQLabel(this); labelfont.setPointSize(labelfont.pointSize()*4/5); portlabel->setFont(labelfont); portlabel->setText(i18n("Port description: ")+ port->description); @@ -89,7 +89,7 @@ PortPosDlg::PortPosDlg(QWidget *parent, Structure *structure) :QDialog(parent,"P */ // list - listbox = new QListBox(this); + listbox = new TQListBox(this); update(); @@ -103,7 +103,7 @@ PortPosDlg::PortPosDlg(QWidget *parent, Structure *structure) :QDialog(parent,"P // buttons - QHBoxLayout *buttonlayout = new QHBoxLayout; + TQHBoxLayout *buttonlayout = new QHBoxLayout; mainlayout->addSpacing(5); mainlayout->addLayout(buttonlayout); mainlayout->addSpacing(5); @@ -111,27 +111,27 @@ PortPosDlg::PortPosDlg(QWidget *parent, Structure *structure) :QDialog(parent,"P buttonlayout->addSpacing(5); KButtonBox *bbox = new KButtonBox(this); - bbox->addButton(KStdGuiItem::help(), this, SLOT( help() )); + bbox->addButton(KStdGuiItem::help(), this, TQT_SLOT( help() )); bbox->addStretch(1); KIconLoader iconloader; - QButton *raise = bbox->addButton(i18n("&Raise")); + TQButton *raise = bbox->addButton(i18n("&Raise")); raise->setPixmap(iconloader.loadIcon("up", KIcon::Small)); - connect( raise, SIGNAL( clicked() ), SLOT( raise() )); + connect( raise, TQT_SIGNAL( clicked() ), TQT_SLOT( raise() )); - QButton *lower = bbox->addButton(i18n("&Lower")); + TQButton *lower = bbox->addButton(i18n("&Lower")); lower->setPixmap(iconloader.loadIcon("down", KIcon::Small)); - connect( lower, SIGNAL( clicked() ), SLOT( lower() )); + connect( lower, TQT_SIGNAL( clicked() ), TQT_SLOT( lower() )); - QButton *rename = bbox->addButton(i18n("R&ename...")); - connect( rename, SIGNAL( clicked() ), SLOT( rename() )); + TQButton *rename = bbox->addButton(i18n("R&ename...")); + connect( rename, TQT_SIGNAL( clicked() ), TQT_SLOT( rename() )); - QButton *okbutton = bbox->addButton(KStdGuiItem::ok()); - connect( okbutton, SIGNAL( clicked() ), SLOT(accept() ) ); + TQButton *okbutton = bbox->addButton(KStdGuiItem::ok()); + connect( okbutton, TQT_SIGNAL( clicked() ), TQT_SLOT(accept() ) ); /* - QButton *cancelbutton = bbox->addButton(i18n("Cancel")); - connect( cancelbutton, SIGNAL( clicked() ), SLOT(reject() ) ); + TQButton *cancelbutton = bbox->addButton(i18n("Cancel")); + connect( cancelbutton, TQT_SIGNAL( clicked() ), TQT_SLOT(reject() ) ); */ bbox->layout(); //min_size(bbox); @@ -188,7 +188,7 @@ void PortPosDlg::rename() assert(port); bool ok; - QString name = KInputDialog::getText( i18n( "Rename Port" ), + TQString name = KInputDialog::getText( i18n( "Rename Port" ), i18n( "Enter port name:" ), port->name(), &ok, this ); if (ok) { diff --git a/arts/builder/portposdlg.h b/arts/builder/portposdlg.h index 775e24be..1adc997c 100644 --- a/arts/builder/portposdlg.h +++ b/arts/builder/portposdlg.h @@ -24,21 +24,21 @@ #include "structure.h" #include "structureport.h" -#include -#include -#include -#include +#include +#include +#include +#include #include -class PortPosDlg :public QDialog { +class PortPosDlg :public TQDialog { Q_OBJECT protected: Structure *structure; - QListBox *listbox; + TQListBox *listbox; std::vector listports; public: - PortPosDlg(QWidget *parent, Structure *structure); + PortPosDlg(TQWidget *parent, Structure *structure); void update(); public slots: diff --git a/arts/builder/propertypanel.cpp b/arts/builder/propertypanel.cpp index 3b281c2a..cca2ee5d 100644 --- a/arts/builder/propertypanel.cpp +++ b/arts/builder/propertypanel.cpp @@ -25,38 +25,38 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include -PropertyPanel::PropertyPanel( QWidget* parent, const char* name, WFlags fl ) +PropertyPanel::PropertyPanel( TQWidget* parent, const char* name, WFlags fl ) : PropertyPanelBase( parent, name, fl ), component(0L), port(0L) { setTitleFont(); setTitleColors(); - connect( kapp, SIGNAL( kdisplayFontChanged() ), - this, SLOT( setTitleFont() )); - connect( kapp, SIGNAL( kdisplayPaletteChanged() ), - this, SLOT( setTitleColors() )); - connect( portValueGroup, SIGNAL( clicked(int) ), - this, SLOT( pvModeChanged(int) )); - connect( constantValueEdit, SIGNAL( returnPressed() ), - this, SLOT( writePortProperties() )); - connect( constantValueComboBox, SIGNAL( activated(int) ), - this, SLOT( writePortProperties() )); - connect( portCombo, SIGNAL( activated(int) ), - this, SLOT( comboPortSelected(int) )); - connect( connectButton, SIGNAL( clicked() ), - this, SLOT( connectButtonClicked() )); + connect( kapp, TQT_SIGNAL( kdisplayFontChanged() ), + this, TQT_SLOT( setTitleFont() )); + connect( kapp, TQT_SIGNAL( kdisplayPaletteChanged() ), + this, TQT_SLOT( setTitleColors() )); + connect( portValueGroup, TQT_SIGNAL( clicked(int) ), + this, TQT_SLOT( pvModeChanged(int) )); + connect( constantValueEdit, TQT_SIGNAL( returnPressed() ), + this, TQT_SLOT( writePortProperties() )); + connect( constantValueComboBox, TQT_SIGNAL( activated(int) ), + this, TQT_SLOT( writePortProperties() )); + connect( portCombo, TQT_SIGNAL( activated(int) ), + this, TQT_SLOT( comboPortSelected(int) )); + connect( connectButton, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( connectButtonClicked() )); constantValueComboBox->hide(); setEnabled( false ); @@ -65,7 +65,7 @@ PropertyPanel::PropertyPanel( QWidget* parent, const char* name, WFlags fl ) void PropertyPanel::setTitleFont() { - QFont titleFont = font(); + TQFont titleFont = font(); titleFont.setPointSizeFloat( titleFont.pointSizeFloat()*1.5f ); moduleNameLabel->setFont( titleFont ); titleFont = font(); @@ -73,35 +73,35 @@ void PropertyPanel::setTitleFont() selectedLabel->setFont( titleFont ); } -QColorGroup PropertyPanel::highlightColorGroup( QColorGroup cg ) +TQColorGroup PropertyPanel::highlightColorGroup( TQColorGroup cg ) { - cg.setColor( QColorGroup::Foreground, cg.highlightedText() ); - cg.setColor( QColorGroup::Background, cg.highlight() ); + cg.setColor( TQColorGroup::Foreground, cg.highlightedText() ); + cg.setColor( TQColorGroup::Background, cg.highlight() ); return cg; } void PropertyPanel::setTitleColors() { - QPalette palette = titleFrame->palette(); + TQPalette palette = titleFrame->palette(); palette.setActive( highlightColorGroup( palette.active() ) ); palette.setInactive( highlightColorGroup( palette.inactive() ) ); palette.setDisabled( highlightColorGroup( palette.disabled() ) ); titleFrame->setPalette( palette ); } -void PropertyPanel::resizeEvent ( QResizeEvent * ) +void PropertyPanel::resizeEvent ( TQResizeEvent * ) { if(width()*3 < height()*4) - mainBoxLayout->setDirection( QBoxLayout::TopToBottom ); + mainBoxLayout->setDirection( TQBoxLayout::TopToBottom ); else - mainBoxLayout->setDirection( QBoxLayout::LeftToRight ); + mainBoxLayout->setDirection( TQBoxLayout::LeftToRight ); } /*************************************************************/ void PropertyPanel::setSelectedComponent( StructureComponent *component ) { - //kdDebug() << QString("PropertyPanel::setSelectedComponent ") << component << endl; + //kdDebug() << TQString("PropertyPanel::setSelectedComponent ") << component << endl; if( this->component == component ) return; this->component = component; @@ -127,8 +127,8 @@ void PropertyPanel::setSelectedComponent( StructureComponent *component ) for(std::list::iterator it = modulePorts.begin(); it != modulePorts.end(); it++) { - QString portTitle = (*it)->description - + QString(" (%1)").arg( (*it)->PortDesc.type().direction == Arts::output ? + TQString portTitle = (*it)->description + + TQString(" (%1)").arg( (*it)->PortDesc.type().direction == Arts::output ? i18n("OUTPUT") : i18n("INPUT") ); portCombo->insertItem( portTitle ); } @@ -149,7 +149,7 @@ void PropertyPanel::setSelectedPort( ModulePort *port ) setSelectedComponent( port->owner ); rereadPortProperties(); portValueGroup->setEnabled( true ); - QString tipText = i18n("Tip: Just typing numbers or alphabetic characters starts entering constant values."); + TQString tipText = i18n("Tip: Just typing numbers or alphabetic characters starts entering constant values."); tipLabel->setText( tipText ); tipLabel->show(); @@ -208,7 +208,7 @@ void PropertyPanel::writePortProperties() void PropertyPanel::writePortProperties( bool reread ) { - //kdDebug() << QString("PropertyPanel::writePortProperties") << endl; + //kdDebug() << TQString("PropertyPanel::writePortProperties") << endl; if(!port) return; // sanity check bool dirty = false; @@ -232,7 +232,7 @@ void PropertyPanel::writePortProperties( bool reread ) if(pvConstantButton->isChecked()) { std::string type = port->PortDesc.type().dataType; - QString newvalue = constantValueEdit->text(); + TQString newvalue = constantValueEdit->text(); Arts::Any a; a.type = type; @@ -270,7 +270,7 @@ void PropertyPanel::writePortProperties( bool reread ) void PropertyPanel::rereadPortProperties() { - //kdDebug() << QString("PropertyPanel::rereadPortProperties") << endl; + //kdDebug() << TQString("PropertyPanel::rereadPortProperties") << endl; if(!port) return; // sanity check std::string dataType = port->PortDesc.type().dataType; @@ -291,7 +291,7 @@ void PropertyPanel::rereadPortProperties() { pvConstantButton->setChecked( true ); - QString constValue; + TQString constValue; Arts::Any value = port->PortDesc.value(); Arts::Buffer b; @@ -337,14 +337,14 @@ void PropertyPanel::rereadPortProperties() pvConnectionButton->setEnabled( port->PortDesc.isConnected() ); } -bool PropertyPanel::eventFilter( QObject *o, QEvent *e ) +bool PropertyPanel::eventFilter( TQObject *o, TQEvent *e ) { - if( port && !constantValueEdit->hasFocus() && (e->type() == QEvent::KeyPress) ) { -// kdDebug() << QString(" ..is KeyPress") << endl; - QString entered = static_cast(e)->text(); + if( port && !constantValueEdit->hasFocus() && (e->type() == TQEvent::KeyPress) ) { +// kdDebug() << TQString(" ..is KeyPress") << endl; + TQString entered = static_cast(e)->text(); bool goodString = entered.length() > 0; -// kdDebug() << QString("pressed '%1'").arg(entered) << endl; +// kdDebug() << TQString("pressed '%1'").arg(entered) << endl; for( unsigned int i = 0; i < entered.length(); i++) goodString = goodString && entered[i].isLetterOrNumber(); @@ -359,7 +359,7 @@ bool PropertyPanel::eventFilter( QObject *o, QEvent *e ) } } // else -// kdDebug() << "event type = " << e->type() << " != " << QEvent::KeyPress << endl; +// kdDebug() << "event type = " << e->type() << " != " << TQEvent::KeyPress << endl; return FALSE; // PropertyPanelBase::eventFilter( o, e ); } @@ -378,7 +378,7 @@ void PropertyPanel::fillEnumChoices(const std::string& type) std::vector::const_iterator eci; for(eci = edef.contents.begin(); eci != edef.contents.end(); ++eci) - constantValueComboBox->insertItem(QString::fromUtf8(eci->name.c_str())); + constantValueComboBox->insertItem(TQString::fromUtf8(eci->name.c_str())); } long PropertyPanel::selectedEnumValue(const std::string& type) diff --git a/arts/builder/propertypanel.h b/arts/builder/propertypanel.h index 28cc7abd..3603ddad 100644 --- a/arts/builder/propertypanel.h +++ b/arts/builder/propertypanel.h @@ -21,7 +21,7 @@ #define PROPERTYPANEL_H #include "propertypanelbase.h" -#include "qpalette.h" +#include "tqpalette.h" #include #include @@ -35,7 +35,7 @@ class PropertyPanel: public PropertyPanelBase Q_OBJECT public: - PropertyPanel( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + PropertyPanel( TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); public slots: void setSelectedComponent( StructureComponent *component ); @@ -53,7 +53,7 @@ protected slots: void writePortProperties( bool reread ); void rereadPortProperties(); - bool eventFilter( QObject *, QEvent * ); + bool eventFilter( TQObject *, TQEvent * ); signals: void startConnection( ModulePort * ); @@ -62,13 +62,13 @@ signals: protected: enum ConnType { ctNone, ctValue, ctConnection }; - void resizeEvent ( QResizeEvent * ); + void resizeEvent ( TQResizeEvent * ); StructureComponent *component; ModulePort *port; std::list modulePorts; - QColorGroup highlightColorGroup( QColorGroup cg ); + TQColorGroup highlightColorGroup( TQColorGroup cg ); bool isEnum(const std::string& type); void fillEnumChoices(const std::string& type); long selectedEnumValue(const std::string& type); diff --git a/arts/builder/qttableview.cpp b/arts/builder/qttableview.cpp index 7f044d25..1a283ed0 100644 --- a/arts/builder/qttableview.cpp +++ b/arts/builder/qttableview.cpp @@ -15,9 +15,9 @@ #include "qttableview.h" #include "qttableview.moc" #ifndef QT_NO_QTTABLEVIEW -#include "qscrollbar.h" -#include "qpainter.h" -#include "qdrawutil.h" +#include "tqscrollbar.h" +#include "tqpainter.h" +#include "tqdrawutil.h" #include enum ScrollBarDirtyFlags { @@ -41,16 +41,16 @@ enum ScrollBarDirtyFlags { class QCornerSquare : public QWidget // internal class { public: - QCornerSquare( QWidget *, const char* = 0 ); - void paintEvent( QPaintEvent * ); + QCornerSquare( TQWidget *, const char* = 0 ); + void paintEvent( TQPaintEvent * ); }; -QCornerSquare::QCornerSquare( QWidget *parent, const char *name ) - : QWidget( parent, name ) +QCornerSquare::QCornerSquare( TQWidget *parent, const char *name ) + : TQWidget( parent, name ) { } -void QCornerSquare::paintEvent( QPaintEvent * ) +void QCornerSquare::paintEvent( TQPaintEvent * ) { } @@ -113,9 +113,9 @@ void QCornerSquare::paintEvent( QPaintEvent * ) \warning Experience has shown that use of this widget tends to cause more bugs than expected and our analysis indicates that the widget's - very flexibility is the problem. If QScrollView or QListBox can + very flexibility is the problem. If TQScrollView or TQListBox can easily be made to do the job you need, we recommend subclassing - those widgets rather than QtTableView. In addition, QScrollView makes + those widgets rather than QtTableView. In addition, TQScrollView makes it easy to have child widgets inside tables, which QtTableView doesn't support at all. @@ -126,7 +126,7 @@ void QCornerSquare::paintEvent( QPaintEvent * ) /*! Constructs a table view. The \a parent, \a name and \f arguments - are passed to the QFrame constructor. + are passed to the TQFrame constructor. The \link setTableFlags() table flags\endlink are all cleared (set to 0). Set \c Tbl_autoVScrollBar or \c Tbl_autoHScrollBar to get automatic scroll @@ -135,17 +135,17 @@ void QCornerSquare::paintEvent( QPaintEvent * ) The \link setCellHeight() cell height\endlink and \link setCellWidth() cell width\endlink are set to 0. - Frame line shapes (QFrame::HLink and QFrame::VLine) are disallowed; - see QFrame::setFrameStyle(). + Frame line shapes (TQFrame::HLink and TQFrame::VLine) are disallowed; + see TQFrame::setFrameStyle(). Note that the \a f argument is \e not \link setTableFlags() table - flags \endlink but rather \link QWidget::QWidget() widget + flags \endlink but rather \link TQWidget::TQWidget() widget flags. \endlink */ -QtTableView::QtTableView( QWidget *parent, const char *name, WFlags f ) - : QFrame( parent, name, f ) +QtTableView::QtTableView( TQWidget *parent, const char *name, WFlags f ) + : TQFrame( parent, name, f ) { nRows = nCols = 0; // zero rows/cols xCellOffs = yCellOffs = 0; // zero offset @@ -179,21 +179,21 @@ QtTableView::~QtTableView() /*! \internal - Reimplements QWidget::setBackgroundColor() for binary compatibility. + Reimplements TQWidget::setBackgroundColor() for binary compatibility. \sa setPalette() */ -void QtTableView::setBackgroundColor( const QColor &c ) +void QtTableView::setBackgroundColor( const TQColor &c ) { - QWidget::setBackgroundColor( c ); + TQWidget::setBackgroundColor( c ); } /*!\reimp */ -void QtTableView::setPalette( const QPalette &p ) +void QtTableView::setPalette( const TQPalette &p ) { - QWidget::setPalette( p ); + TQWidget::setPalette( p ); } /*!\reimp @@ -202,7 +202,7 @@ void QtTableView::setPalette( const QPalette &p ) void QtTableView::show() { showOrHideScrollBars(); - QWidget::show(); + TQWidget::show(); } @@ -226,7 +226,7 @@ void QtTableView::show() event. At present, QtTableView is the only widget that reimplements \link - QWidget::repaint() repaint()\endlink. It does this because by + TQWidget::repaint() repaint()\endlink. It does this because by clearing and then repainting one cell at at time, it can make the screen flicker less than it would otherwise. */ @@ -238,10 +238,10 @@ void QtTableView::repaint( int x, int y, int w, int h, bool erase ) w = width() - x; if ( h < 0 ) h = height() - y; - QRect r( x, y, w, h ); + TQRect r( x, y, w, h ); if ( r.isEmpty() ) return; // nothing to do - QPaintEvent e( r ); + TQPaintEvent e( r ); if ( erase && backgroundMode() != NoBackground ) eraseInPaint = TRUE; // erase when painting paintEvent( &e ); @@ -249,7 +249,7 @@ void QtTableView::repaint( int x, int y, int w, int h, bool erase ) } /*! - \overload void QtTableView::repaint( const QRect &r, bool erase ) + \overload void QtTableView::repaint( const TQRect &r, bool erase ) Replaints rectangle \a r. If \a erase is TRUE draws the background using the palette's background. */ @@ -730,7 +730,7 @@ int QtTableView::totalHeight()
Tbl_autoHScrollBar
The table has a horizontal scroll bar if - and only if - the table is wider than the view.
Tbl_autoScrollBars
- The union of the previous two flags. -
Tbl_clipCellPainting
- The table uses QPainter::setClipRect() to +
Tbl_clipCellPainting
- The table uses TQPainter::setClipRect() to make sure that paintCell() will not draw outside the cell boundaries.
Tbl_cutCellsV
- The table will never show part of a @@ -960,7 +960,7 @@ void QtTableView::updateCell( int row, int col, bool erase ) return; if ( !rowYPos( row, &yPos ) ) return; - QRect uR = QRect( xPos, yPos, + TQRect uR = TQRect( xPos, yPos, cellW ? cellW : cellWidth(col), cellH ? cellH : cellHeight(row) ); repaint( uR.intersect(viewRect()), erase ); @@ -968,7 +968,7 @@ void QtTableView::updateCell( int row, int col, bool erase ) /*! - \fn QRect QtTableView::cellUpdateRect() const + \fn TQRect QtTableView::cellUpdateRect() const This function should be called only from the paintCell() function in subclasses. It returns the portion of a cell that actually needs to be @@ -982,9 +982,9 @@ void QtTableView::updateCell( int row, int col, bool erase ) frame, in \e widget coordinates. */ -QRect QtTableView::viewRect() const +TQRect QtTableView::viewRect() const { - return QRect( frameWidth(), frameWidth(), viewWidth(), viewHeight() ); + return TQRect( frameWidth(), frameWidth(), viewWidth(), viewHeight() ); } @@ -1127,7 +1127,7 @@ void QtTableView::snapToGrid( bool horizontal, bool vertical ) /*! \internal This internal slot is connected to the horizontal scroll bar's - QScrollBar::valueChanged() signal. + TQScrollBar::valueChanged() signal. Moves the table horizontally to offset \a val without updating the scroll bar. @@ -1148,7 +1148,7 @@ void QtTableView::horSbValue( int val ) /*! \internal This internal slot is connected to the horizontal scroll bar's - QScrollBar::sliderMoved() signal. + TQScrollBar::sliderMoved() signal. Scrolls the table smoothly horizontally even if \c Tbl_snapToHGrid is set. */ @@ -1168,7 +1168,7 @@ void QtTableView::horSbSliding( int val ) /*! \internal This internal slot is connected to the horizontal scroll bar's - QScrollBar::sliderReleased() signal. + TQScrollBar::sliderReleased() signal. */ void QtTableView::horSbSlidingDone( ) @@ -1181,7 +1181,7 @@ void QtTableView::horSbSlidingDone( ) /*! \internal This internal slot is connected to the vertical scroll bar's - QScrollBar::valueChanged() signal. + TQScrollBar::valueChanged() signal. Moves the table vertically to offset \a val without updating the scroll bar. @@ -1202,7 +1202,7 @@ void QtTableView::verSbValue( int val ) /*! \internal This internal slot is connected to the vertical scroll bar's - QScrollBar::sliderMoved() signal. + TQScrollBar::sliderMoved() signal. Scrolls the table smoothly vertically even if \c Tbl_snapToVGrid is set. */ @@ -1222,7 +1222,7 @@ void QtTableView::verSbSliding( int val ) /*! \internal This internal slot is connected to the vertical scroll bar's - QScrollBar::sliderReleased() signal. + TQScrollBar::sliderReleased() signal. */ void QtTableView::verSbSlidingDone( ) @@ -1240,18 +1240,18 @@ void QtTableView::verSbSlidingDone( ) do so for each cell. */ -void QtTableView::setupPainter( QPainter * ) +void QtTableView::setupPainter( TQPainter * ) { } /*! - \fn void QtTableView::paintCell( QPainter *p, int row, int col ) + \fn void QtTableView::paintCell( TQPainter *p, int row, int col ) This pure virtual function is called to paint the single cell at \a (row,col) using \a p, which is open when paintCell() is called and must remain open. - The coordinate system is \link QPainter::translate() translated \endlink + The coordinate system is \link TQPainter::translate() translated \endlink so that the origin is at the top-left corner of the cell to be painted, i.e. \e cell coordinates. Do not scale or shear the coordinate system (or if you do, restore the transformation matrix before you @@ -1269,16 +1269,16 @@ void QtTableView::setupPainter( QPainter * ) Calls paintCell() for the cells that needs to be repainted. */ -void QtTableView::paintEvent( QPaintEvent *e ) +void QtTableView::paintEvent( TQPaintEvent *e ) { - QRect updateR = e->rect(); // update rectangle + TQRect updateR = e->rect(); // update rectangle if ( sbDirty ) { bool e = eraseInPaint; updateScrollBars(); eraseInPaint = e; } - QPainter paint( this ); + TQPainter paint( this ); if ( !contentsRect().contains( updateR, TRUE ) ) {// update frame ? drawFrame( &paint ); @@ -1312,11 +1312,11 @@ void QtTableView::paintEvent( QPaintEvent *e ) int xPos = maxX+1; // in case the while() is empty int nextX; int nextY; - QRect winR = viewRect(); - QRect cellR; - QRect cellUR; + TQRect winR = viewRect(); + TQRect cellR; + TQRect cellUR; #ifndef QT_NO_TRANSFORMATIONS - QWMatrix matrix; + TQWMatrix matrix; #endif while ( yPos <= maxY && row < nRows ) { @@ -1384,22 +1384,22 @@ void QtTableView::paintEvent( QPaintEvent *e ) // inside the cells. So QtTableView is reponsible for all pixels // outside the cells. - QRect viewR = viewRect(); - const QColorGroup g = colorGroup(); + TQRect viewR = viewRect(); + const TQColorGroup g = colorGroup(); if ( xPos <= maxX ) { - QRect r = viewR; + TQRect r = viewR; r.setLeft( xPos ); r.setBottom( yPossetCursor( arrowCursor ); #endif @@ -1447,12 +1447,12 @@ QScrollBar *QtTableView::verticalScrollBar() const Q_CHECK_PTR(sb); sb->setTracking( FALSE ); sb->setFocusPolicy( NoFocus ); - connect( sb, SIGNAL(valueChanged(int)), - SLOT(verSbValue(int))); - connect( sb, SIGNAL(sliderMoved(int)), - SLOT(verSbSliding(int))); - connect( sb, SIGNAL(sliderReleased()), - SLOT(verSbSlidingDone())); + connect( sb, TQT_SIGNAL(valueChanged(int)), + TQT_SLOT(verSbValue(int))); + connect( sb, TQT_SIGNAL(sliderMoved(int)), + TQT_SLOT(verSbSliding(int))); + connect( sb, TQT_SIGNAL(sliderReleased()), + TQT_SLOT(verSbSlidingDone())); sb->hide(); that->vScrollBar = sb; return sb; @@ -1466,11 +1466,11 @@ QScrollBar *QtTableView::verticalScrollBar() const values; use findCol() to translate to cell numbers. */ -QScrollBar *QtTableView::horizontalScrollBar() const +TQScrollBar *QtTableView::horizontalScrollBar() const { QtTableView *that = (QtTableView*)this; // semantic const if ( !hScrollBar ) { - QScrollBar *sb = new QScrollBar( QScrollBar::Horizontal, that ); + TQScrollBar *sb = new TQScrollBar( TQScrollBar::Horizontal, that ); #ifndef QT_NO_CURSOR sb->setCursor( arrowCursor ); #endif @@ -1478,12 +1478,12 @@ QScrollBar *QtTableView::horizontalScrollBar() const sb->setFocusPolicy( NoFocus ); Q_CHECK_PTR(sb); sb->setTracking( FALSE ); - connect( sb, SIGNAL(valueChanged(int)), - SLOT(horSbValue(int))); - connect( sb, SIGNAL(sliderMoved(int)), - SLOT(horSbSliding(int))); - connect( sb, SIGNAL(sliderReleased()), - SLOT(horSbSlidingDone())); + connect( sb, TQT_SIGNAL(valueChanged(int)), + TQT_SLOT(horSbValue(int))); + connect( sb, TQT_SIGNAL(sliderMoved(int)), + TQT_SLOT(horSbSliding(int))); + connect( sb, TQT_SIGNAL(sliderReleased()), + TQT_SLOT(horSbSlidingDone())); sb->hide(); that->hScrollBar = sb; return sb; @@ -1787,10 +1787,10 @@ bool QtTableView::colXPos( int col, int *xPos ) const Moves the visible area of the table right by \a xPixels and down by \a yPixels pixels. Both may be negative. - \warning You might find that QScrollView offers a higher-level of + \warning You might find that TQScrollView offers a higher-level of functionality than using QtTableView and this function. - This function is \e not the same as QWidget::scroll(); in particular, + This function is \e not the same as TQWidget::scroll(); in particular, the signs of \a xPixels and \a yPixels have the reverse semantics. \sa setXOffset(), setYOffset(), setOffset(), setTopCell(), @@ -1799,7 +1799,7 @@ bool QtTableView::colXPos( int col, int *xPos ) const void QtTableView::scroll( int xPixels, int yPixels ) { - QWidget::scroll( -xPixels, -yPixels, contentsRect() ); + TQWidget::scroll( -xPixels, -yPixels, contentsRect() ); } @@ -2058,7 +2058,7 @@ void QtTableView::updateFrameSize() if ( autoUpdate() ) { int fh = frameRect().height(); int fw = frameRect().width(); - setFrameRect( QRect(0,0,rw,rh) ); + setFrameRect( TQRect(0,0,rw,rh) ); if ( rw != fw ) update( QMIN(fw,rw) - frameWidth() - 2, 0, frameWidth()+4, rh ); diff --git a/arts/builder/qttableview.h b/arts/builder/qttableview.h index c5a540dd..9acf0179 100644 --- a/arts/builder/qttableview.h +++ b/arts/builder/qttableview.h @@ -16,7 +16,7 @@ #define QTTABLEVIEW_H #ifndef QT_H -#include "qframe.h" +#include "tqframe.h" #endif // QT_H #ifndef QT_NO_QTTABLEVIEW @@ -29,16 +29,16 @@ class QtTableView : public QFrame { Q_OBJECT public: - virtual void setBackgroundColor( const QColor & ); - virtual void setPalette( const QPalette & ); + virtual void setBackgroundColor( const TQColor & ); + virtual void setPalette( const TQPalette & ); void show(); void repaint( bool erase=TRUE ); void repaint( int x, int y, int w, int h, bool erase=TRUE ); - void repaint( const QRect &, bool erase=TRUE ); + void repaint( const TQRect &, bool erase=TRUE ); protected: - QtTableView( QWidget *parent=0, const char *name=0, WFlags f=0 ); + QtTableView( TQWidget *parent=0, const char *name=0, WFlags f=0 ); ~QtTableView(); int numRows() const; @@ -87,8 +87,8 @@ protected: bool rowIsVisible( int row ) const; bool colIsVisible( int col ) const; - QScrollBar *verticalScrollBar() const; - QScrollBar *horizontalScrollBar() const; + TQScrollBar *verticalScrollBar() const; + TQScrollBar *horizontalScrollBar() const; private slots: void horSbValue( int ); @@ -99,11 +99,11 @@ private slots: void verSbSlidingDone(); protected: - virtual void paintCell( QPainter *, int row, int col ) = 0; - virtual void setupPainter( QPainter * ); + virtual void paintCell( TQPainter *, int row, int col ) = 0; + virtual void setupPainter( TQPainter * ); - void paintEvent( QPaintEvent * ); - void resizeEvent( QResizeEvent * ); + void paintEvent( TQPaintEvent * ); + void resizeEvent( TQResizeEvent * ); int findRow( int yPos ) const; int findCol( int xPos ) const; @@ -164,8 +164,8 @@ private: uint tFlags; QRect cellUpdateR; - QScrollBar *vScrollBar; - QScrollBar *hScrollBar; + TQScrollBar *vScrollBar; + TQScrollBar *hScrollBar; QCornerSquare *cornerSquare; private: // Disabled copy constructor and operator= @@ -230,7 +230,7 @@ inline uint QtTableView::tableFlags() const inline bool QtTableView::testTableFlags( uint f ) const { return (tFlags & f) != 0; } -inline QRect QtTableView::cellUpdateRect() const +inline TQRect QtTableView::cellUpdateRect() const { return cellUpdateR; } inline bool QtTableView::autoUpdate() const @@ -239,7 +239,7 @@ inline bool QtTableView::autoUpdate() const inline void QtTableView::repaint( bool erase ) { repaint( 0, 0, width(), height(), erase ); } -inline void QtTableView::repaint( const QRect &r, bool erase ) +inline void QtTableView::repaint( const TQRect &r, bool erase ) { repaint( r.x(), r.y(), r.width(), r.height(), erase ); } inline void QtTableView::updateScrollBars() diff --git a/arts/builder/retrievedlg.cpp b/arts/builder/retrievedlg.cpp index cbf6af95..4e091928 100644 --- a/arts/builder/retrievedlg.cpp +++ b/arts/builder/retrievedlg.cpp @@ -20,13 +20,13 @@ */ #include "retrievedlg.h" -#include -#include -#include +#include +#include +#include #include -#include -#include -#include +#include +#include +#include #include #include #include @@ -34,26 +34,26 @@ #include #include #include -#include +#include -static void min_size(QWidget *w) { +static void min_size(TQWidget *w) { w->setMinimumSize(w->sizeHint()); } -RetrieveDlg::RetrieveDlg(QWidget *parent) :QDialog(parent,"X", TRUE) +RetrieveDlg::RetrieveDlg(TQWidget *parent) :TQDialog(parent,"X", TRUE) { setCaption(i18n("Retrieve Structure From Server")); - QVBoxLayout *mainlayout = new QVBoxLayout(this); + TQVBoxLayout *mainlayout = new TQVBoxLayout(this); // caption label: "Synthesis running..." mainlayout->addSpacing(5); - QLabel *captionlabel = new QLabel(this); - QFont labelfont(captionlabel->font()); + TQLabel *captionlabel = new TQLabel(this); + TQFont labelfont(captionlabel->font()); labelfont.setPointSize(labelfont.pointSize()*3/2); captionlabel->setFont(labelfont); - captionlabel->setText(QString(" ")+i18n("Published structures")+QString(" ")); + captionlabel->setText(TQString(" ")+i18n("Published structures")+TQString(" ")); captionlabel->setAlignment(AlignCenter); min_size(captionlabel); mainlayout->addWidget(captionlabel); @@ -67,7 +67,7 @@ RetrieveDlg::RetrieveDlg(QWidget *parent) :QDialog(parent,"X", TRUE) // listwidget - listbox = new QListBox(this); + listbox = new TQListBox(this); listbox->setMinimumSize(300,200); arts_debug("TODO:PORT:get available structures"); @@ -96,7 +96,7 @@ RetrieveDlg::RetrieveDlg(QWidget *parent) :QDialog(parent,"X", TRUE) // buttons - QHBoxLayout *buttonlayout = new QHBoxLayout; + TQHBoxLayout *buttonlayout = new QHBoxLayout; mainlayout->addSpacing(5); mainlayout->addLayout(buttonlayout); mainlayout->addSpacing(5); @@ -104,14 +104,14 @@ RetrieveDlg::RetrieveDlg(QWidget *parent) :QDialog(parent,"X", TRUE) buttonlayout->addSpacing(5); KButtonBox *bbox = new KButtonBox(this); - bbox->addButton(KStdGuiItem::help(), this, SLOT( help() )); + bbox->addButton(KStdGuiItem::help(), this, TQT_SLOT( help() )); bbox->addStretch(1); - QButton *cancelbutton = bbox->addButton(KStdGuiItem::cancel()); - connect( cancelbutton, SIGNAL( clicked() ), SLOT(reject() ) ); + TQButton *cancelbutton = bbox->addButton(KStdGuiItem::cancel()); + connect( cancelbutton, TQT_SIGNAL( clicked() ), TQT_SLOT(reject() ) ); - QButton *okbutton = bbox->addButton(KStdGuiItem::ok()); - connect( okbutton, SIGNAL( clicked() ), SLOT(accept() ) ); + TQButton *okbutton = bbox->addButton(KStdGuiItem::ok()); + connect( okbutton, TQT_SIGNAL( clicked() ), TQT_SLOT(accept() ) ); bbox->layout(); @@ -121,13 +121,13 @@ RetrieveDlg::RetrieveDlg(QWidget *parent) :QDialog(parent,"X", TRUE) mainlayout->freeze(); } -QString RetrieveDlg::result() +TQString RetrieveDlg::result() { if(listbox->currentItem() != -1) { return(listbox->text(listbox->currentItem())); } - return QString::null; + return TQString::null; } void RetrieveDlg::help() diff --git a/arts/builder/retrievedlg.h b/arts/builder/retrievedlg.h index 97a389aa..e0a6eb0c 100644 --- a/arts/builder/retrievedlg.h +++ b/arts/builder/retrievedlg.h @@ -24,21 +24,21 @@ #include "structure.h" -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include -class RetrieveDlg :public QDialog { +class RetrieveDlg :public TQDialog { Q_OBJECT - QListBox *listbox; + TQListBox *listbox; public: - RetrieveDlg(QWidget *parent); - QString result(); + RetrieveDlg(TQWidget *parent); + TQString result(); public slots: void help(); }; diff --git a/arts/builder/scomponent.cpp b/arts/builder/scomponent.cpp index fb461f3a..094af402 100644 --- a/arts/builder/scomponent.cpp +++ b/arts/builder/scomponent.cpp @@ -21,8 +21,8 @@ #include "scomponent.h" //#include -#include -#include +#include +#include #include StructureComponent::StructureComponent(StructureCanvas *canvas) diff --git a/arts/builder/scomponent.h b/arts/builder/scomponent.h index 3d5970f4..e35b3708 100644 --- a/arts/builder/scomponent.h +++ b/arts/builder/scomponent.h @@ -22,7 +22,7 @@ #ifndef __SCOMPONENT_H__ #define __SCOMPONENT_H__ -#include +#include #include class ModulePort; @@ -65,9 +65,9 @@ public: // drawing virtual bool drawNeedsBackground(int segment) = 0; - virtual void drawSegment(QPainter *dest, int cellsize, int segment) = 0; - virtual QPixmap *pixmap() = 0; - virtual QString name() = 0; + virtual void drawSegment(TQPainter *dest, int cellsize, int segment) = 0; + virtual TQPixmap *pixmap() = 0; + virtual TQString name() = 0; // space checking & positioning (dimensions in cells) bool move(int x, int y); diff --git a/arts/builder/structureport.cpp b/arts/builder/structureport.cpp index b57e9632..35b36b45 100644 --- a/arts/builder/structureport.cpp +++ b/arts/builder/structureport.cpp @@ -21,10 +21,10 @@ #include "structureport.h" #include "drawutils.h" -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include @@ -90,24 +90,24 @@ bool StructurePort::drawNeedsBackground(int segment) return true; } -void StructurePort::drawSegment(QPainter *dest, int cellsize, int segment) +void StructurePort::drawSegment(TQPainter *dest, int cellsize, int segment) { - QString pname = QString::fromLocal8Bit(SPortDesc.name().c_str()); + TQString pname = TQString::fromLocal8Bit(SPortDesc.name().c_str()); assert(segment==0); - QPainter &p = *dest; + TQPainter &p = *dest; int direction = (_port->direction == ModulePort::out)?1:0; // FIXME: make these color defs available at one central place, they // are currently copied from main.cpp - QColor mcolor(43,43,168); - QColor mcolorlight(164,176,242); - QColorGroup g( Qt::white, Qt::blue, mcolorlight, mcolor.dark(), mcolor, + TQColor mcolor(43,43,168); + TQColor mcolorlight(164,176,242); + TQColorGroup g( Qt::white, Qt::blue, mcolorlight, mcolor.dark(), mcolor, Qt::black, Qt::black ); - QBrush fill( mcolor ); - QPen textpen(QColor(255,255,180),1); + TQBrush fill( mcolor ); + TQPen textpen(TQColor(255,255,180),1); int border = cellsize/10; int boxtop = (cellsize/2)*(1-direction); @@ -117,14 +117,14 @@ void StructurePort::drawSegment(QPainter *dest, int cellsize, int segment) // Selection box if(_selected) { - QPen pen(Qt::white,1,Qt::DotLine); + TQPen pen(Qt::white,1,Qt::DotLine); p.setPen(pen); p.drawRect(0,boxtop,cellsize,cellsize/2); } // ... doesn't look centered without the 2*border ?!? int textwidth; - QString label=DrawUtils::cropText(&p, pname, cellsize-border*2, textwidth); + TQString label=DrawUtils::cropText(&p, pname, cellsize-border*2, textwidth); p.drawText(border,border+boxtop,cellsize-border-1,(cellsize/2-1)-2*border, Qt::AlignCenter,label); @@ -133,15 +133,15 @@ void StructurePort::drawSegment(QPainter *dest, int cellsize, int segment) int i; for(i=0;i<3;i++) { - QBrush fbrush; + TQBrush fbrush; int delta = 0; switch(i) { case 0: delta = 0; - fbrush = QBrush(g.light()); + fbrush = TQBrush(g.light()); break; case 1: delta = 2; - fbrush = QBrush(g.dark()); + fbrush = TQBrush(g.dark()); break; case 2: delta = 1; fbrush = fill; @@ -172,7 +172,7 @@ d | | int c = cellsize/12; int d = cellsize/5; - QPointArray a(9); + TQPointArray a(9); a.setPoint(0,b+l,t); a.setPoint(1,b+l,t+c); a.setPoint(2,l,t+c); @@ -211,9 +211,9 @@ d | | { int border = cellsize/7; - QBrush pbrush(_port->color(false)); + TQBrush pbrush(_port->color(false)); - _port->clickrect = QRect(border,direction * cellsize/2 + border, + _port->clickrect = TQRect(border,direction * cellsize/2 + border, cellsize/2-2*border, cellsize/2-2*border); qDrawShadePanel(&p, _port->clickrect, g, _port->down(), 2, &pbrush); } @@ -223,7 +223,7 @@ ModulePort *StructurePort::portAt(int segment, int x, int y) { assert(segment == 0); - QPoint clickpoint(x,y); + TQPoint clickpoint(x,y); if(_port->clickrect.contains(clickpoint)) return _port; return 0; } @@ -233,14 +233,14 @@ void StructurePort::dumpPorts(list& ports) ports.push_back(_port); } -QPixmap *StructurePort::pixmap() +TQPixmap *StructurePort::pixmap() { return 0; } -QString StructurePort::name() +TQString StructurePort::name() { - return QString::fromLocal8Bit(SPortDesc.name().c_str()); + return TQString::fromLocal8Bit(SPortDesc.name().c_str()); } void StructurePort::raisePosition() diff --git a/arts/builder/structureport.h b/arts/builder/structureport.h index 8729cc24..7c9f61f1 100644 --- a/arts/builder/structureport.h +++ b/arts/builder/structureport.h @@ -58,9 +58,9 @@ public: void dumpPorts(std::list& ports); bool drawNeedsBackground(int segment); - void drawSegment(QPainter *dest, int cellsize, int segment); - QPixmap *pixmap(); - QString name(); + void drawSegment(TQPainter *dest, int cellsize, int segment); + TQPixmap *pixmap(); + TQString name(); }; #endif // STRUCTUREPORT_H diff --git a/arts/gui/kde/artstestgui.cpp b/arts/gui/kde/artstestgui.cpp index 1ccde8cf..6d1b798e 100644 --- a/arts/gui/kde/artstestgui.cpp +++ b/arts/gui/kde/artstestgui.cpp @@ -23,7 +23,7 @@ #include "artsgui.h" #include #include -#include +#include #include #include diff --git a/arts/gui/kde/dbtest.cpp b/arts/gui/kde/dbtest.cpp index 164b3630..fef8b0b9 100644 --- a/arts/gui/kde/dbtest.cpp +++ b/arts/gui/kde/dbtest.cpp @@ -10,9 +10,9 @@ #include #include -dBTestWidget::dBTestWidget( QWidget* p, const char* n ) : QWidget( p,n ), dB2VolCalc( -24,6 ) { +dBTestWidget::dBTestWidget( TQWidget* p, const char* n ) : TQWidget( p,n ), dB2VolCalc( -24,6 ) { kdDebug() << k_funcinfo << endl; - ( void* ) KStdAction::quit( this, SLOT( close() ), new KActionCollection( this ) ); + ( void* ) KStdAction::quit( this, TQT_SLOT( close() ), new KActionCollection( this ) ); for ( float i=0; i<=1; i+=0.25 ) kdDebug() << i << " : " << amptodb( i ) << "dB" < +#include #include "dbvolcalc.h" -class dBTestWidget : public QWidget, public dB2VolCalc { +class dBTestWidget : public TQWidget, public dB2VolCalc { Q_OBJECT public: - dBTestWidget( QWidget*, const char* =0 ); + dBTestWidget( TQWidget*, const char* =0 ); ~dBTestWidget(); }; diff --git a/arts/gui/kde/kartswidget.cpp b/arts/gui/kde/kartswidget.cpp index 1a9c6b0e..dde61820 100644 --- a/arts/gui/kde/kartswidget.cpp +++ b/arts/gui/kde/kartswidget.cpp @@ -24,48 +24,48 @@ #include "kartswidget.h" #include "kwidgetrepo.h" #include "debug.h" -#include "qlayout.h" +#include "tqlayout.h" class KArtsWidgetPrivate { public: - QHBoxLayout *layout; + TQHBoxLayout *layout; }; -KArtsWidget::KArtsWidget( QWidget* parent, const char* name ) - :QWidget( parent, name ), _content( Arts::Widget::null() ) +KArtsWidget::KArtsWidget( TQWidget* parent, const char* name ) + :TQWidget( parent, name ), _content( Arts::Widget::null() ) { d = new KArtsWidgetPrivate; - d->layout = new QHBoxLayout(this); + d->layout = new TQHBoxLayout(this); } -KArtsWidget::KArtsWidget( Arts::Widget content, QWidget* parent, const char* name ) - :QWidget( parent, name ), _content( Arts::Widget::null()) +KArtsWidget::KArtsWidget( Arts::Widget content, TQWidget* parent, const char* name ) + :TQWidget( parent, name ), _content( Arts::Widget::null()) { d = new KArtsWidgetPrivate; - d->layout = new QHBoxLayout(this); + d->layout = new TQHBoxLayout(this); setContent(content); } -KArtsWidget::KArtsWidget( Arts::Widget content, QWidget* parent, const char* name, WFlags wflags ) - :QWidget( parent, name, wflags ), _content( Arts::Widget::null() ) +KArtsWidget::KArtsWidget( Arts::Widget content, TQWidget* parent, const char* name, WFlags wflags ) + :TQWidget( parent, name, wflags ), _content( Arts::Widget::null() ) { d = new KArtsWidgetPrivate; - d->layout = new QHBoxLayout( this ); + d->layout = new TQHBoxLayout( this ); setContent( content ); } -KArtsWidget::KArtsWidget(QWidget* parent, const char* name, WFlags wflags ) - :QWidget(parent, name, wflags ), _content(Arts::Widget::null()) +KArtsWidget::KArtsWidget(TQWidget* parent, const char* name, WFlags wflags ) + :TQWidget(parent, name, wflags ), _content(Arts::Widget::null()) { d = new KArtsWidgetPrivate; - d->layout = new QHBoxLayout(this); + d->layout = new TQHBoxLayout(this); } KArtsWidget::~KArtsWidget() { - QWidget *contentAsWidget + TQWidget *contentAsWidget = KWidgetRepo::the()->lookupQWidget(_content.widgetID()); - contentAsWidget->reparent(0,QPoint(0,0),_content.visible()); + contentAsWidget->reparent(0,TQPoint(0,0),_content.visible()); delete d; d = 0; } @@ -74,12 +74,12 @@ KArtsWidget::~KArtsWidget() void KArtsWidget::setContent(Arts::Widget content) { arts_return_if_fail(!content.isNull()); - QWidget *contentAsWidget + TQWidget *contentAsWidget = KWidgetRepo::the()->lookupQWidget(content.widgetID()); arts_return_if_fail(contentAsWidget != 0); _content = content; - contentAsWidget->reparent(this,QPoint(0,0),content.visible()); + contentAsWidget->reparent(this,TQPoint(0,0),content.visible()); d->layout->addWidget(contentAsWidget); } diff --git a/arts/gui/kde/kartswidget.h b/arts/gui/kde/kartswidget.h index 353a09b2..2cd072bc 100644 --- a/arts/gui/kde/kartswidget.h +++ b/arts/gui/kde/kartswidget.h @@ -24,7 +24,7 @@ #ifndef ARTS_GUI_KARTSWIDGET_H #define ARTS_GUI_KARTSWIDGET_H -#include +#include #include "artsgui.h" #include class KArtsWidgetPrivate; @@ -46,7 +46,7 @@ class KArtsWidgetPrivate; * The KArtsWidget class keeps a reference to the content widget, so the * content widget will not be freed until the KArtsWidget gets destroyed. */ -class KDE_EXPORT KArtsWidget : public QWidget { +class KDE_EXPORT KArtsWidget : public TQWidget { private: KArtsWidgetPrivate *d; @@ -57,21 +57,21 @@ public: /** * creates a new KArtsWidget */ - KArtsWidget( QWidget* parent, const char* name ); + KArtsWidget( TQWidget* parent, const char* name ); /** * creates a new KArtsWidget and sets the content to an Arts::Widget */ - KArtsWidget( Arts::Widget content, QWidget* parent, const char* name ); + KArtsWidget( Arts::Widget content, TQWidget* parent, const char* name ); /** * creates a new KArtsWidget with WidgetFlags and content * * BCI: should replace the above in the next major release. ( akrille ) */ - KArtsWidget( Arts::Widget, QWidget* =0, const char* =0, WFlags =0 ); + KArtsWidget( Arts::Widget, TQWidget* =0, const char* =0, WFlags =0 ); // same without the content - KArtsWidget( QWidget* =0, const char* =0, WFlags =0 ); + KArtsWidget( TQWidget* =0, const char* =0, WFlags =0 ); /** * destructor diff --git a/arts/gui/kde/kbutton_impl.cpp b/arts/gui/kde/kbutton_impl.cpp index 119e72e0..34c5791b 100644 --- a/arts/gui/kde/kbutton_impl.cpp +++ b/arts/gui/kde/kbutton_impl.cpp @@ -28,15 +28,15 @@ using namespace Arts; using namespace std; -KButtonMapper::KButtonMapper( KButton_impl *_impl, QPushButton *but ) - : QObject( but, "KButtonMapper" ) +KButtonMapper::KButtonMapper( KButton_impl *_impl, TQPushButton *but ) + : TQObject( but, "KButtonMapper" ) , impl( _impl ) , button( but ) { - connect( but, SIGNAL( pressed() ), this, SLOT( pressed() ) ); - connect( but, SIGNAL( released() ), this, SLOT( released() ) ); - connect( but, SIGNAL( toggled( bool ) ), this, SLOT( toggled( bool ) ) ); - connect( but, SIGNAL( clicked() ), this, SLOT( clicked() ) ); + connect( but, TQT_SIGNAL( pressed() ), this, TQT_SLOT( pressed() ) ); + connect( but, TQT_SIGNAL( released() ), this, TQT_SLOT( released() ) ); + connect( but, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( toggled( bool ) ) ); + connect( but, TQT_SIGNAL( clicked() ), this, TQT_SLOT( clicked() ) ); } void KButtonMapper::pressed() @@ -62,11 +62,11 @@ void KButtonMapper::clicked() impl->emitClicked(); } -KButton_impl::KButton_impl( QPushButton * widget ) - : KWidget_impl( widget ? widget : new QPushButton( 0 ) ) +KButton_impl::KButton_impl( TQPushButton * widget ) + : KWidget_impl( widget ? widget : new TQPushButton( 0 ) ) , _clicked( false ) { - _qpushbutton = static_cast( _qwidget ); + _qpushbutton = static_cast( _qwidget ); ( void )new KButtonMapper( this, _qpushbutton ); } @@ -94,7 +94,7 @@ string KButton_impl::text() void KButton_impl::text(const string& newText) { - _qpushbutton->setText(QString::fromUtf8(newText.c_str())); + _qpushbutton->setText(TQString::fromUtf8(newText.c_str())); } bool KButton_impl::toggle() diff --git a/arts/gui/kde/kbutton_impl.h b/arts/gui/kde/kbutton_impl.h index f254c00a..723c5023 100644 --- a/arts/gui/kde/kbutton_impl.h +++ b/arts/gui/kde/kbutton_impl.h @@ -25,17 +25,17 @@ #ifndef ARTS_GUI_KBUTTON_IMPL_H #define ARTS_GUI_KBUTTON_IMPL_H #include "kwidget_impl.h" -#include +#include namespace Arts { class KButton_impl; -class KButtonMapper : public QObject { +class KButtonMapper : public TQObject { Q_OBJECT KButton_impl *impl; - QPushButton * button; + TQPushButton * button; public: - KButtonMapper(KButton_impl *impl, QPushButton *but); + KButtonMapper(KButton_impl *impl, TQPushButton *but); protected slots: void pressed(); void released(); @@ -50,10 +50,10 @@ private: bool _clicked; protected: - QPushButton * _qpushbutton; + TQPushButton * _qpushbutton; public: - KButton_impl( QPushButton * w = 0 ); + KButton_impl( TQPushButton * w = 0 ); void constructor( Widget parent ); void constructor( const std::string &, Widget ); diff --git a/arts/gui/kde/kcombobox_impl.cpp b/arts/gui/kde/kcombobox_impl.cpp index b73f57f9..eab55d0d 100644 --- a/arts/gui/kde/kcombobox_impl.cpp +++ b/arts/gui/kde/kcombobox_impl.cpp @@ -31,13 +31,13 @@ using namespace Arts; using namespace std; ComboBoxIntMapper::ComboBoxIntMapper(KComboBox_impl *impl, KComboBox *co) - : QObject( co, "map Qt signal to aRts" ) + : TQObject( co, "map Qt signal to aRts" ) ,impl(impl) { - connect(co, SIGNAL(activated(const QString &)), this, SLOT(activated(const QString &))); + connect(co, TQT_SIGNAL(activated(const TQString &)), this, TQT_SLOT(activated(const TQString &))); } -void ComboBoxIntMapper::activated(const QString & newValue) +void ComboBoxIntMapper::activated(const TQString & newValue) { impl->value(string(newValue.utf8().data())); } @@ -56,7 +56,7 @@ string KComboBox_impl::caption() void KComboBox_impl::caption(const string& newCaption) { - m_caption = QString::fromUtf8(newCaption.c_str()); + m_caption = TQString::fromUtf8(newCaption.c_str()); // FIXME: do something with the caption here } @@ -73,7 +73,7 @@ void KComboBox_impl::choices(const vector & newChoices) _kcombobox->clear(); for(vector::const_iterator it = m_choices.begin(); it != m_choices.end(); ++it) { - _kcombobox->insertItem(QString::fromUtf8(it->c_str())); + _kcombobox->insertItem(TQString::fromUtf8(it->c_str())); } if(visible()) choices_changed(newChoices); @@ -89,7 +89,7 @@ void KComboBox_impl::value(const string & newValue) { if(newValue != m_value.utf8().data()) { - m_value = QString::fromUtf8(newValue.c_str()); + m_value = TQString::fromUtf8(newValue.c_str()); for(unsigned int i = 0; i < m_choices.size(); ++i) { if(m_choices[i] == newValue) diff --git a/arts/gui/kde/kcombobox_impl.h b/arts/gui/kde/kcombobox_impl.h index 52a95109..3041d352 100644 --- a/arts/gui/kde/kcombobox_impl.h +++ b/arts/gui/kde/kcombobox_impl.h @@ -26,21 +26,21 @@ #define ARTS_GUI_KCOMBOBOX_IMPL_H #include "kwidget_impl.h" #include -#include -#include -#include +#include +#include +#include namespace Arts { class KComboBox_impl; -class ComboBoxIntMapper :public QObject { +class ComboBoxIntMapper :public TQObject { Q_OBJECT KComboBox_impl *impl; public: ComboBoxIntMapper(KComboBox_impl *impl, KComboBox *co); public slots: - void activated(const QString &); + void activated(const TQString &); }; class KComboBox_impl : virtual public Arts::ComboBox_skel, @@ -48,8 +48,8 @@ class KComboBox_impl : virtual public Arts::ComboBox_skel, { protected: KComboBox * _kcombobox; - QString m_caption; - QString m_value; + TQString m_caption; + TQString m_value; std::vector m_choices; void applyValue(); diff --git a/arts/gui/kde/kfader.cpp b/arts/gui/kde/kfader.cpp index 2978dd0c..e5179f9f 100644 --- a/arts/gui/kde/kfader.cpp +++ b/arts/gui/kde/kfader.cpp @@ -5,14 +5,14 @@ void KFader::init() { } -KFader::KFader( QWidget * parent, const char * name ) - : QSlider( Qt::Vertical, parent, name ) +KFader::KFader( TQWidget * parent, const char * name ) + : TQSlider( Qt::Vertical, parent, name ) { init(); } -KFader::KFader( int minValue, int maxValue, int pageStep, int value, QWidget * parent, const char * name ) - : QSlider( minValue, maxValue, pageStep, value, Qt::Vertical, parent, name ) +KFader::KFader( int minValue, int maxValue, int pageStep, int value, TQWidget * parent, const char * name ) + : TQSlider( minValue, maxValue, pageStep, value, Qt::Vertical, parent, name ) { init(); } @@ -21,11 +21,11 @@ KFader::~KFader() { } -void KFader::setColor( QColor & ) +void KFader::setColor( TQColor & ) { } void KFader::setRange( int minValue, int maxValue ) { - QRangeControl::setRange( minValue, maxValue ); + TQRangeControl::setRange( minValue, maxValue ); } diff --git a/arts/gui/kde/kfader.h b/arts/gui/kde/kfader.h index 71b3ba03..603ad7cd 100644 --- a/arts/gui/kde/kfader.h +++ b/arts/gui/kde/kfader.h @@ -23,7 +23,7 @@ #ifndef _KFADER_H #define _KFADER_H -#include +#include class KFader : public QSlider { @@ -31,12 +31,12 @@ class KFader : public QSlider protected: void init(); public: - KFader( QWidget * parent = 0, const char * name = 0 ); - KFader( int minValue, int maxValue, int pageStep, int value, QWidget * parent = 0, const char * name = 0 ); + KFader( TQWidget * parent = 0, const char * name = 0 ); + KFader( int minValue, int maxValue, int pageStep, int value, TQWidget * parent = 0, const char * name = 0 ); virtual ~KFader(); - void setColor( QColor & ); + void setColor( TQColor & ); virtual void setRange( int, int ); }; diff --git a/arts/gui/kde/kfader_impl.cpp b/arts/gui/kde/kfader_impl.cpp index a0caf7db..27a50191 100644 --- a/arts/gui/kde/kfader_impl.cpp +++ b/arts/gui/kde/kfader_impl.cpp @@ -34,7 +34,7 @@ using namespace std; FaderIntMapper::FaderIntMapper(KFader_impl *impl, KFader *kp) :impl(impl) { - connect(kp, SIGNAL(valueChanged(int)), this, SLOT(valueChanged(int))); + connect(kp, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(valueChanged(int))); } void FaderIntMapper::valueChanged(int pos) @@ -63,7 +63,7 @@ string KFader_impl::caption() void KFader_impl::caption(const string& newText) { - _caption = QString::fromUtf8(newText.c_str()); + _caption = TQString::fromUtf8(newText.c_str()); _kfader->setName(_caption.utf8().data()); } @@ -77,7 +77,7 @@ void KFader_impl::color(const string& newColor) _color = newColor; if(strlen(_color.c_str())) { - QColor qc(_color.c_str()); + TQColor qc(_color.c_str()); _kfader->setColor(qc); } } diff --git a/arts/gui/kde/kfader_impl.h b/arts/gui/kde/kfader_impl.h index 2368d551..0d1b81ed 100644 --- a/arts/gui/kde/kfader_impl.h +++ b/arts/gui/kde/kfader_impl.h @@ -27,15 +27,15 @@ #include "kwidget_impl.h" #include "kfader.h" -#include -#include +#include +#include namespace Arts { class KFader_impl; -class FaderIntMapper :public QObject { +class FaderIntMapper :public TQObject { Q_OBJECT KFader_impl *impl; public: @@ -49,7 +49,7 @@ class KFader_impl : virtual public Arts::Fader_skel, { protected: KFader * _kfader; - QString _caption; + TQString _caption; std::string _color; float _min, _max, _value; float _factor; diff --git a/arts/gui/kde/kframe_impl.cpp b/arts/gui/kde/kframe_impl.cpp index 472484e2..d95da549 100644 --- a/arts/gui/kde/kframe_impl.cpp +++ b/arts/gui/kde/kframe_impl.cpp @@ -19,17 +19,17 @@ // $Id$ #include "kframe_impl.h" -#include +#include #include #include using namespace Arts; using namespace std; -KFrame_impl::KFrame_impl( QFrame * widget ) - : KWidget_impl( widget ? widget : new QFrame ) +KFrame_impl::KFrame_impl( TQFrame * widget ) + : KWidget_impl( widget ? widget : new TQFrame ) { - _qframe = static_cast( _qwidget ); + _qframe = static_cast( _qwidget ); assert( _qframe ); } @@ -80,7 +80,7 @@ Shape KFrame_impl::frameshape() void KFrame_impl::frameshape( Shape fs ) { - _qframe->setFrameShape( ( QFrame::Shape )fs ); + _qframe->setFrameShape( ( TQFrame::Shape )fs ); } Shadow KFrame_impl::frameshadow() @@ -90,7 +90,7 @@ Shadow KFrame_impl::frameshadow() void KFrame_impl::frameshadow( Shadow fs ) { - _qframe->setFrameShadow( ( QFrame::Shadow )fs ); + _qframe->setFrameShadow( ( TQFrame::Shadow )fs ); } REGISTER_IMPLEMENTATION(KFrame_impl); diff --git a/arts/gui/kde/kframe_impl.h b/arts/gui/kde/kframe_impl.h index f4653314..68585b5c 100644 --- a/arts/gui/kde/kframe_impl.h +++ b/arts/gui/kde/kframe_impl.h @@ -30,10 +30,10 @@ class KDE_EXPORT KFrame_impl : virtual public Arts::Frame_skel, public Arts::KWidget_impl { protected: - QFrame * _qframe; + TQFrame * _qframe; public: - KFrame_impl( QFrame * widget = 0 ); + KFrame_impl( TQFrame * widget = 0 ); inline void constructor( Widget p ) { parent( p ); } long margin(); diff --git a/arts/gui/kde/kgraph.cpp b/arts/gui/kde/kgraph.cpp index 80541b96..21d3d8cf 100644 --- a/arts/gui/kde/kgraph.cpp +++ b/arts/gui/kde/kgraph.cpp @@ -23,7 +23,7 @@ #include "kgraph.h" #include "kgraph.moc" #include "kgraphline_impl.h" -#include "qpainter.h" +#include "tqpainter.h" #include #include @@ -31,8 +31,8 @@ using namespace Arts; using namespace std; -KGraph::KGraph( QWidget * parent, const char * name ) - : QWidget( parent, name ) +KGraph::KGraph( TQWidget * parent, const char * name ) + : TQWidget( parent, name ) { setBackgroundColor(white); @@ -65,21 +65,21 @@ void KGraph::removeLine(Arts::KGraphLine_impl *line) lines.remove(line); } -inline QPoint KGraph::g2qPoint(const GraphPoint &gp) +inline TQPoint KGraph::g2qPoint(const GraphPoint &gp) { - return QPoint(int(((gp.x - minx)/(maxx-minx)) * (width()-1)), + return TQPoint(int(((gp.x - minx)/(maxx-minx)) * (width()-1)), int((1.0 - (gp.y - miny)/(maxy-miny)) * (height()-1))); } -inline GraphPoint KGraph::q2gPoint(const QPoint &qp) +inline GraphPoint KGraph::q2gPoint(const TQPoint &qp) { return GraphPoint((float(qp.x())/float(width()-1)) * (maxx-minx) + minx, (1.0 - (float(qp.y())/float(height()-1))) * (maxy-miny) + miny); } -void KGraph::paintEvent( QPaintEvent *e ) +void KGraph::paintEvent( TQPaintEvent *e ) { - QPainter painter(this); + TQPainter painter(this); painter.setClipRect(e->rect()); std::list::iterator li; @@ -88,14 +88,14 @@ void KGraph::paintEvent( QPaintEvent *e ) KGraphLine_impl *gline = *li; vector::iterator pi; - QPoint lastp; + TQPoint lastp; bool first = true; painter.setPen(gline->_color.c_str()); for(pi = gline->_points.begin(); pi != gline->_points.end(); pi++) { - QPoint p = g2qPoint(*pi); + TQPoint p = g2qPoint(*pi); if(!first) painter.drawLine(lastp,p); @@ -109,7 +109,7 @@ void KGraph::paintEvent( QPaintEvent *e ) } } -void KGraph::mousePressEvent(QMouseEvent *e) +void KGraph::mousePressEvent(TQMouseEvent *e) { if(e->button() == LeftButton || e->button() == RightButton) { @@ -122,7 +122,7 @@ void KGraph::mousePressEvent(QMouseEvent *e) int index = 0; for(pi = gline->_points.begin(); pi != gline->_points.end(); pi++, index++) { - QPoint p = g2qPoint(*pi); + TQPoint p = g2qPoint(*pi); int dx = e->x() - p.x(); int dy = e->y() - p.y(); @@ -167,14 +167,14 @@ void KGraph::mousePressEvent(QMouseEvent *e) { KGraphLine_impl *gline = *li; - QPoint lastp; + TQPoint lastp; bool first = true; vector::iterator pi; int index = 0; for(pi = gline->_points.begin(); pi != gline->_points.end(); pi++, index++) { - QPoint p = g2qPoint(*pi); + TQPoint p = g2qPoint(*pi); if(!first && (e->x() > lastp.x()+2) && (e->x() < p.x()-2)) { @@ -183,7 +183,7 @@ void KGraph::mousePressEvent(QMouseEvent *e) if(abs(y-e->y()) < 5) { - GraphPoint gp = q2gPoint(QPoint(e->x(),y)); + GraphPoint gp = q2gPoint(TQPoint(e->x(),y)); vector newPoints; for(int i=0;i<( int )gline->_points.size();i++) @@ -208,9 +208,9 @@ void KGraph::mousePressEvent(QMouseEvent *e) } } -void KGraph::mouseMoveEvent(QMouseEvent *e) +void KGraph::mouseMoveEvent(TQMouseEvent *e) { - QPoint pos = e->pos(); + TQPoint pos = e->pos(); if(pos.x() < 0) pos.setX(0); if(pos.y() < 0) pos.setY(0); @@ -257,7 +257,7 @@ void KGraph::mouseMoveEvent(QMouseEvent *e) } } -void KGraph::mouseReleaseEvent(QMouseEvent *) +void KGraph::mouseReleaseEvent(TQMouseEvent *) { selectedIndex = -1; selectedLine = 0; diff --git a/arts/gui/kde/kgraph.h b/arts/gui/kde/kgraph.h index d3e622ad..83c1aa7c 100644 --- a/arts/gui/kde/kgraph.h +++ b/arts/gui/kde/kgraph.h @@ -23,8 +23,8 @@ #ifndef _KGRAPH_H #define _KGRAPH_H -#include -#include +#include +#include #include "artsgui.h" #include @@ -43,21 +43,21 @@ protected: GraphPoint selectedPoint; int selectedIndex; // -1 if nothing is selected - inline GraphPoint q2gPoint(const QPoint &qp); - inline QPoint g2qPoint(const GraphPoint &gp); + inline GraphPoint q2gPoint(const TQPoint &qp); + inline TQPoint g2qPoint(const GraphPoint &gp); public: - KGraph( QWidget * parent = 0, const char * name = 0 ); + KGraph( TQWidget * parent = 0, const char * name = 0 ); virtual ~KGraph(); void addLine(Arts::KGraphLine_impl *line); void redrawLine(Arts::KGraphLine_impl *line); void removeLine(Arts::KGraphLine_impl *line); - void mousePressEvent(QMouseEvent *me); - void mouseMoveEvent(QMouseEvent *me); - void mouseReleaseEvent(QMouseEvent *me); + void mousePressEvent(TQMouseEvent *me); + void mouseMoveEvent(TQMouseEvent *me); + void mouseReleaseEvent(TQMouseEvent *me); - void paintEvent(QPaintEvent *e); + void paintEvent(TQPaintEvent *e); }; } diff --git a/arts/gui/kde/kgraph_impl.cpp b/arts/gui/kde/kgraph_impl.cpp index 354fdad7..85ad72ad 100644 --- a/arts/gui/kde/kgraph_impl.cpp +++ b/arts/gui/kde/kgraph_impl.cpp @@ -43,7 +43,7 @@ string KGraph_impl::caption() void KGraph_impl::caption(const string& newCaption) { - _caption = QString::fromUtf8(newCaption.c_str()); + _caption = TQString::fromUtf8(newCaption.c_str()); // FIXME: do something with the caption here } diff --git a/arts/gui/kde/kgraph_impl.h b/arts/gui/kde/kgraph_impl.h index e100b095..408ad961 100644 --- a/arts/gui/kde/kgraph_impl.h +++ b/arts/gui/kde/kgraph_impl.h @@ -25,8 +25,8 @@ #include "kwidget_impl.h" #include "kgraph.h" -#include -#include +#include +#include namespace Arts { @@ -37,7 +37,7 @@ class KGraph_impl : virtual public Arts::Graph_skel, public Arts::KWidget_impl { protected: - QString _caption; + TQString _caption; float _minx, _miny, _maxx, _maxy; KGraph * _kgraph; diff --git a/arts/gui/kde/kgraphline_impl.cpp b/arts/gui/kde/kgraphline_impl.cpp index affb5fc2..ccb6ed1f 100644 --- a/arts/gui/kde/kgraphline_impl.cpp +++ b/arts/gui/kde/kgraphline_impl.cpp @@ -112,7 +112,7 @@ void KGraphLine_impl::points(const vector& newPoints) KGraph *KGraphLine_impl::getKGraph() { - QWidget *widget = KWidgetRepo::the()->lookupQWidget(_graphID); + TQWidget *widget = KWidgetRepo::the()->lookupQWidget(_graphID); if(!widget) return 0; diff --git a/arts/gui/kde/khbox_impl.cpp b/arts/gui/kde/khbox_impl.cpp index 29438a09..431ce286 100644 --- a/arts/gui/kde/khbox_impl.cpp +++ b/arts/gui/kde/khbox_impl.cpp @@ -22,15 +22,15 @@ */ #include "khbox_impl.h" -#include +#include using namespace Arts; -KHBox_impl::KHBox_impl( QHBox * widget ) - : KFrame_impl( widget ? widget : new QHBox ) +KHBox_impl::KHBox_impl( TQHBox * widget ) + : KFrame_impl( widget ? widget : new TQHBox ) , _spacing( 5 ) { - _qhbox = static_cast( _qwidget ); + _qhbox = static_cast( _qwidget ); _qhbox->setSpacing( _spacing ); _qhbox->setMargin( 5 ); } diff --git a/arts/gui/kde/khbox_impl.h b/arts/gui/kde/khbox_impl.h index b82bf80c..7b020b39 100644 --- a/arts/gui/kde/khbox_impl.h +++ b/arts/gui/kde/khbox_impl.h @@ -34,10 +34,10 @@ private: long _spacing; protected: - QHBox * _qhbox; + TQHBox * _qhbox; public: - KHBox_impl( QHBox * w = 0 ); + KHBox_impl( TQHBox * w = 0 ); long spacing(); void spacing( long ); diff --git a/arts/gui/kde/klabel_impl.cpp b/arts/gui/kde/klabel_impl.cpp index 774a7de0..dd0a9557 100644 --- a/arts/gui/kde/klabel_impl.cpp +++ b/arts/gui/kde/klabel_impl.cpp @@ -22,12 +22,12 @@ #include "klabel_impl.moc" #include -#include +#include using namespace Arts; using namespace std; -KLabel_impl::KLabel_impl( QFrame *widget ) : KFrame_impl( widget ? widget : new RotateLabel( 0 ) ) { +KLabel_impl::KLabel_impl( TQFrame *widget ) : KFrame_impl( widget ? widget : new RotateLabel( 0 ) ) { _label = static_cast( _qwidget ); } @@ -36,7 +36,7 @@ string KLabel_impl::text() { } void KLabel_impl::text( const string& newtext ) { - _label->title( QString::fromUtf8( newtext.c_str() ) ); + _label->title( TQString::fromUtf8( newtext.c_str() ) ); } long KLabel_impl::align() { return _label->align(); } @@ -50,40 +50,40 @@ void KLabel_impl::bottom( Arts::TextBottom n ) { _label->bottom( n ); } REGISTER_IMPLEMENTATION( KLabel_impl ); -RotateLabel::RotateLabel( QWidget* p, const char* n ) : QFrame( p,n ) { +RotateLabel::RotateLabel( TQWidget* p, const char* n ) : TQFrame( p,n ) { _bottom = Arts::South; _align = Arts::AlignCenter; } -void RotateLabel::paintEvent( QPaintEvent* ) { - QPainter p( this ); +void RotateLabel::paintEvent( TQPaintEvent* ) { + TQPainter p( this ); if ( _bottom == Arts::East ) { p.rotate( 270 ); - p.drawText( QRect( 0,0, -height(), width() ), _align, _title ); + p.drawText( TQRect( 0,0, -height(), width() ), _align, _title ); } else if ( _bottom == Arts::West ) { p.rotate( 90 ); - p.drawText( QRect( 0,0, height(), -width() ), _align, _title ); + p.drawText( TQRect( 0,0, height(), -width() ), _align, _title ); } else if ( _bottom == Arts::North ) { p.rotate( 180 ); - p.drawText( QRect( 0,0, -width(), -height() ), _align, _title ); + p.drawText( TQRect( 0,0, -width(), -height() ), _align, _title ); } else { - p.drawText( QRect( 0,0, width(), height() ), _align, _title ); + p.drawText( TQRect( 0,0, width(), height() ), _align, _title ); } } -void RotateLabel::fontfamily( QString n ) { - QFont font = this->font(); +void RotateLabel::fontfamily( TQString n ) { + TQFont font = this->font(); font.setFamily( n ); this->setFont( font ); } void RotateLabel::fontsize( int n ) { - QFont font = this->font(); + TQFont font = this->font(); font.setPixelSize( n ); this->setFont( font ); } -void RotateLabel::title( QString n ) { +void RotateLabel::title( TQString n ) { _title = n; - QSize size = this->fontMetrics().size( SingleLine, _title ); + TQSize size = this->fontMetrics().size( SingleLine, _title ); if ( _bottom == Arts::East || _bottom == Arts::West ) this->setMinimumSize( size.height(), size.width() ); else diff --git a/arts/gui/kde/klabel_impl.h b/arts/gui/kde/klabel_impl.h index 332b0006..7822e960 100644 --- a/arts/gui/kde/klabel_impl.h +++ b/arts/gui/kde/klabel_impl.h @@ -23,10 +23,10 @@ #define ARTS_KLABEL_IMPL #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -41,7 +41,7 @@ class KDE_EXPORT KLabel_impl : virtual public Arts::Label_skel, protected: RotateLabel* _label; public: - KLabel_impl( QFrame* w=0 ); + KLabel_impl( TQFrame* w=0 ); void constructor( Widget p ) { parent( p ); } std::string text(); @@ -63,16 +63,16 @@ public: } // namespace -class RotateLabel : public QFrame { +class RotateLabel : public TQFrame { Q_OBJECT public: - RotateLabel( QWidget*, const char* =0 ); - void paintEvent( QPaintEvent* ); + RotateLabel( TQWidget*, const char* =0 ); + void paintEvent( TQPaintEvent* ); - void fontfamily( QString ); + void fontfamily( TQString ); void fontsize( int ); - void title( QString ); - QString title() { return _title; } + void title( TQString ); + TQString title() { return _title; } long align() { return _align; } void align( long ); @@ -82,7 +82,7 @@ public: private: long _align; Arts::TextBottom _bottom; - QString _title; + TQString _title; }; #endif diff --git a/arts/gui/kde/klayoutbox_impl.cpp b/arts/gui/kde/klayoutbox_impl.cpp index 7f9efa9b..847e803a 100644 --- a/arts/gui/kde/klayoutbox_impl.cpp +++ b/arts/gui/kde/klayoutbox_impl.cpp @@ -20,21 +20,21 @@ #include "klayoutbox_impl.h" -#include -#include +#include +#include #include -#include -#include -#include +#include +#include +#include #include "kwidgetrepo.h" using namespace Arts; using namespace std; -KLayoutBox_impl::KLayoutBox_impl( QFrame *widget ) : KFrame_impl( widget ? widget :new QFrame( 0 ) ) +KLayoutBox_impl::KLayoutBox_impl( TQFrame *widget ) : KFrame_impl( widget ? widget :new TQFrame( 0 ) ) { - _qframe = static_cast( _qwidget ); - _layout = new QBoxLayout( _qframe, QBoxLayout::LeftToRight ); + _qframe = static_cast( _qwidget ); + _layout = new TQBoxLayout( _qframe, TQBoxLayout::LeftToRight ); } KLayoutBox_impl::~KLayoutBox_impl() { } @@ -42,14 +42,14 @@ KLayoutBox_impl::~KLayoutBox_impl() { void KLayoutBox_impl::addWidget( Arts::Widget widget, long stretch, long align ) { widget.parent( self() ); this->_addChild( widget, "layoutbox_item" ); - QWidget * tmp = KWidgetRepo::the()->lookupQWidget( widget.widgetID() ); + TQWidget * tmp = KWidgetRepo::the()->lookupQWidget( widget.widgetID() ); _layout->addWidget( tmp, stretch, align ); } void KLayoutBox_impl::insertWidget( long index, Arts::Widget widget, long stretch, long align ) { widget.parent( self() ); this->_addChild( widget, "layoutbox_item" ); - QWidget * tmp = KWidgetRepo::the()->lookupQWidget( widget.widgetID() ); + TQWidget * tmp = KWidgetRepo::the()->lookupQWidget( widget.widgetID() ); _layout->insertWidget( index, tmp, stretch, align ); } @@ -70,31 +70,31 @@ long KLayoutBox_impl::layoutmargin() { return _layout->margin(); } void KLayoutBox_impl::layoutmargin( long n ) { _layout->setMargin( n ); this->margin( n ); } Direction KLayoutBox_impl::direction() { return Arts::Direction( _layout->direction() ); } -void KLayoutBox_impl::direction( Direction d ) { _layout->setDirection( QBoxLayout::Direction( d ) ); } +void KLayoutBox_impl::direction( Direction d ) { _layout->setDirection( TQBoxLayout::Direction( d ) ); } REGISTER_IMPLEMENTATION( KLayoutBox_impl ); -KLayoutBox_Separator::KLayoutBox_Separator( QWidget* p, const char* n ) : QWidget( p,n ) { +KLayoutBox_Separator::KLayoutBox_Separator( TQWidget* p, const char* n ) : TQWidget( p,n ) { //kdDebug() << k_funcinfo << endl; } -void KLayoutBox_Separator::resizeEvent( QResizeEvent* ) { kdDebug() << k_funcinfo << size() << endl; } +void KLayoutBox_Separator::resizeEvent( TQResizeEvent* ) { kdDebug() << k_funcinfo << size() << endl; } -void KLayoutBox_Separator::paintEvent( QPaintEvent* ) { +void KLayoutBox_Separator::paintEvent( TQPaintEvent* ) { //kdDebug() << k_funcinfo << size() << endl; - QPainter p( this ); - QStyle::SFlags flags = QStyle::Style_Default; - if ( width() < height() ) flags |= QStyle::Style_Horizontal; - style().drawPrimitive( QStyle::PE_Splitter, &p, rect(), colorGroup(), flags ); + TQPainter p( this ); + TQStyle::SFlags flags = TQStyle::Style_Default; + if ( width() < height() ) flags |= TQStyle::Style_Horizontal; + style().drawPrimitive( TQStyle::PE_Splitter, &p, rect(), colorGroup(), flags ); } -QSize KLayoutBox_Separator::minimumSizeHint() const { - int wh = style().pixelMetric( QStyle::PM_SplitterWidth, this ); - return QSize( wh, wh ); +TQSize KLayoutBox_Separator::minimumSizeHint() const { + int wh = style().pixelMetric( TQStyle::PM_SplitterWidth, this ); + return TQSize( wh, wh ); } -KLayoutBox_Line::KLayoutBox_Line( int width, int space, QWidget* p, const char* n ) - : QWidget( p,n ) +KLayoutBox_Line::KLayoutBox_Line( int width, int space, TQWidget* p, const char* n ) + : TQWidget( p,n ) , _width( width ) , _space( space ) { @@ -102,18 +102,18 @@ KLayoutBox_Line::KLayoutBox_Line( int width, int space, QWidget* p, const char* } -void KLayoutBox_Line::paintEvent( QPaintEvent* ) { +void KLayoutBox_Line::paintEvent( TQPaintEvent* ) { //kdDebug() << k_funcinfo << size() << endl; - QPainter p( this ); - p.setPen( QPen( colorGroup().foreground(), _width ) ); + TQPainter p( this ); + p.setPen( TQPen( colorGroup().foreground(), _width ) ); if ( width() > height() ) p.drawLine( 0, height()/2, width(), height()/2 ); else p.drawLine( width()/2, 0, width()/2, height() ); } -QSize KLayoutBox_Line::minimumSizeHint() const { +TQSize KLayoutBox_Line::minimumSizeHint() const { //kdDebug() << k_funcinfo << size() << endl; int wh = _width + 2* _space; - return QSize( wh, wh ); + return TQSize( wh, wh ); } #include diff --git a/arts/gui/kde/klayoutbox_impl.h b/arts/gui/kde/klayoutbox_impl.h index ee8f18a3..cdebba71 100644 --- a/arts/gui/kde/klayoutbox_impl.h +++ b/arts/gui/kde/klayoutbox_impl.h @@ -36,12 +36,12 @@ class KDE_EXPORT KLayoutBox_impl : virtual public Arts::LayoutBox_skel, public Arts::KFrame_impl { protected: - QFrame* _qframe; - QBoxLayout* _layout; + TQFrame* _qframe; + TQBoxLayout* _layout; LayoutBox self() { return LayoutBox::_from_base( _copy() ); } public: - KLayoutBox_impl( QFrame* w=0 ); + KLayoutBox_impl( TQFrame* w=0 ); ~KLayoutBox_impl(); Direction direction(); @@ -78,23 +78,23 @@ public: } // namespace -class KDE_EXPORT KLayoutBox_Separator : public QWidget { +class KDE_EXPORT KLayoutBox_Separator : public TQWidget { Q_OBJECT public: - KLayoutBox_Separator( QWidget*, const char* =0 ); - void resizeEvent( QResizeEvent* ); - void paintEvent( QPaintEvent* ); - QSize minimumSizeHint() const; + KLayoutBox_Separator( TQWidget*, const char* =0 ); + void resizeEvent( TQResizeEvent* ); + void paintEvent( TQPaintEvent* ); + TQSize minimumSizeHint() const; }; -class KLayoutBox_Line : public QWidget { +class KLayoutBox_Line : public TQWidget { Q_OBJECT private: int _width, _space; public: - KLayoutBox_Line( int, int, QWidget*, const char* =0 ); - void paintEvent( QPaintEvent* ); - QSize minimumSizeHint() const; + KLayoutBox_Line( int, int, TQWidget*, const char* =0 ); + void paintEvent( TQPaintEvent* ); + TQSize minimumSizeHint() const; }; #endif diff --git a/arts/gui/kde/klevelmeter_firebars.cpp b/arts/gui/kde/klevelmeter_firebars.cpp index 83d93d3c..9a78804c 100644 --- a/arts/gui/kde/klevelmeter_firebars.cpp +++ b/arts/gui/kde/klevelmeter_firebars.cpp @@ -21,16 +21,16 @@ #include "klevelmeter_firebars.h" #include -#include -#include +#include +#include -KLevelMeter_FireBars_private::KLevelMeter_FireBars_private( KLevelMeter_FireBars* p, const char* n ) : QWidget( p,n ) { +KLevelMeter_FireBars_private::KLevelMeter_FireBars_private( KLevelMeter_FireBars* p, const char* n ) : TQWidget( p,n ) { _parent = p; - _pixmap = new QPixmap( 0,0 ); -// setPaletteBackgroundColor( QColor( 0,0,255 ) ); + _pixmap = new TQPixmap( 0,0 ); +// setPaletteBackgroundColor( TQColor( 0,0,255 ) ); } -void KLevelMeter_FireBars_private::paintEvent( QPaintEvent* ) { - QPainter p; +void KLevelMeter_FireBars_private::paintEvent( TQPaintEvent* ) { + TQPainter p; if ( _pixmap->size() != this->size() ) { _pixmap->resize( this->size() ); p.begin( _pixmap ); @@ -55,15 +55,15 @@ kdDebug() << k_funcinfo << dir << endl; } p.begin( this ); p.translate( 0,0 ); - p.drawPixmap( QPoint( 0,0 ), *_pixmap ); + p.drawPixmap( TQPoint( 0,0 ), *_pixmap ); p.end(); } -KLevelMeter_FireBars::KLevelMeter_FireBars( Arts::KLevelMeter_impl* impl, QWidget* parent, long substyle, long count, Arts::Direction dir, float _dbmin, float _dbmax ) : KLevelMeter_Template( impl, parent, substyle, count, dir, _dbmin, _dbmax ) { -//kdDebug()<<"KLevelMeter_FireBars::KLevelMeter_FireBars( Arts::KLevelMeter_impl* "<setMinimumSize( 5, 5 ); _bar = new KLevelMeter_FireBars_private( this, 0 ); - _peakwidget = new QWidget( this ); + _peakwidget = new TQWidget( this ); _peakwidget->resize( size() ); _peakwidget->setPaletteBackgroundColor( color( 1 ) ); _peakwidget->hide(); @@ -94,10 +94,10 @@ void KLevelMeter_FireBars::invalue( float n, float p ) { repaint(); } -void KLevelMeter_FireBars::paintEvent( QPaintEvent* ) { - QPainter p( this ); +void KLevelMeter_FireBars::paintEvent( TQPaintEvent* ) { + TQPainter p( this ); //p.setPen( NoPen ); - p.setPen( QColor( 0,0,255 ) ); + p.setPen( TQColor( 0,0,255 ) ); // PeakBar if ( _peak > 1.0/1000 ) { if ( _dir == Arts::BottomToTop || _dir == Arts::TopToBottom ) { @@ -117,8 +117,8 @@ void KLevelMeter_FireBars::paintEvent( QPaintEvent* ) { /** Planned feature: a little Tooltip showing the actual value of the volume in deziBel and perhaps as linear scaleFactor */ -void KLevelMeter_FireBars::mouseMoveEvent( QMouseEvent* /*qme*/ ) { -//kdDebug()<<"KLevelMeter_FireBars::mouseMoveEvent(QMouseEvent* "< diff --git a/arts/gui/kde/klevelmeter_firebars.h b/arts/gui/kde/klevelmeter_firebars.h index 5dcc628a..5d7ff2d7 100644 --- a/arts/gui/kde/klevelmeter_firebars.h +++ b/arts/gui/kde/klevelmeter_firebars.h @@ -26,32 +26,32 @@ class QPixmap; class KLevelMeter_FireBars; -class KLevelMeter_FireBars_private : public QWidget { +class KLevelMeter_FireBars_private : public TQWidget { Q_OBJECT public: KLevelMeter_FireBars_private( KLevelMeter_FireBars*, const char* ); - void paintEvent( QPaintEvent* ); + void paintEvent( TQPaintEvent* ); Arts::Direction dir; private: KLevelMeter_FireBars* _parent; - QPixmap *_pixmap; + TQPixmap *_pixmap; }; class KLevelMeter_FireBars : public KLevelMeter_Template { Q_OBJECT public: - KLevelMeter_FireBars( Arts::KLevelMeter_impl*, QWidget* =0, long substyle=0, long count=0, Arts::Direction =Arts::BottomToTop, float _dbmin=-24, float _dbmax=6 ); + KLevelMeter_FireBars( Arts::KLevelMeter_impl*, TQWidget* =0, long substyle=0, long count=0, Arts::Direction =Arts::BottomToTop, float _dbmin=-24, float _dbmax=6 ); void invalue( float, float =0 ); - void paintEvent( QPaintEvent* ); + void paintEvent( TQPaintEvent* ); - void mouseMoveEvent( QMouseEvent* ); + void mouseMoveEvent( TQMouseEvent* ); private: float _value, _peak; KLevelMeter_FireBars_private *_bar; - QWidget* _peakwidget; + TQWidget* _peakwidget; }; #endif diff --git a/arts/gui/kde/klevelmeter_impl.cpp b/arts/gui/kde/klevelmeter_impl.cpp index 1e090e65..418108ad 100644 --- a/arts/gui/kde/klevelmeter_impl.cpp +++ b/arts/gui/kde/klevelmeter_impl.cpp @@ -23,9 +23,9 @@ #include -#include +#include #include -#include +#include #include #include "klevelmeter_private.h" @@ -41,8 +41,8 @@ using namespace Arts; using namespace std; -KLevelMeter_Private::KLevelMeter_Private( KLevelMeter_impl* impl, QFrame* frame, LevelMeterStyle defstyle, QObject* parent, const char* name ) - : QObject( parent, name ) +KLevelMeter_Private::KLevelMeter_Private( KLevelMeter_impl* impl, TQFrame* frame, LevelMeterStyle defstyle, TQObject* parent, const char* name ) + : TQObject( parent, name ) , _impl( impl ) , _frame( frame ) , _levelmeter( 0 ) @@ -53,7 +53,7 @@ KLevelMeter_Private::KLevelMeter_Private( KLevelMeter_impl* impl, QFrame* frame, , _peak( 20 ), _peakvalue( 0.0 ) , _dbmin( -36 ), _dbmax( 0 ) { - _layout = new QBoxLayout( _frame, QBoxLayout::LeftToRight ); + _layout = new TQBoxLayout( _frame, TQBoxLayout::LeftToRight ); } void KLevelMeter_Private::createWidget() { @@ -78,8 +78,8 @@ void KLevelMeter_Private::createWidget() { _levelmeter->setMinimumSize( 10,10 ); } -KLevelMeter_impl::KLevelMeter_impl( QFrame* w ) : Arts::KFrame_impl( w ? w : new QFrame( 0 ) ) { -//kdDebug()<<"KLevelMeter_impl::KLevelMeter_impl( QFrame* "<createWidget(); } diff --git a/arts/gui/kde/klevelmeter_impl.h b/arts/gui/kde/klevelmeter_impl.h index 2e26b996..b2f58ce8 100644 --- a/arts/gui/kde/klevelmeter_impl.h +++ b/arts/gui/kde/klevelmeter_impl.h @@ -37,7 +37,7 @@ class KLevelMeter_impl : virtual public Arts::LevelMeter_skel, private: KLevelMeter_Private *p; public: - KLevelMeter_impl( QFrame* =0 ); + KLevelMeter_impl( TQFrame* =0 ); LevelMeterStyle style(); void style( LevelMeterStyle ); diff --git a/arts/gui/kde/klevelmeter_linebars.cpp b/arts/gui/kde/klevelmeter_linebars.cpp index 3292ba4a..6d63a18c 100644 --- a/arts/gui/kde/klevelmeter_linebars.cpp +++ b/arts/gui/kde/klevelmeter_linebars.cpp @@ -21,14 +21,14 @@ #include "klevelmeter_linebars.h" #include -#include -#include +#include +#include -KLevelMeter_LineBars::KLevelMeter_LineBars( Arts::KLevelMeter_impl* impl, QWidget* parent, long substyle, long count, Arts::Direction dir, float _dbmin, float _dbmax ) : KLevelMeter_Template( impl, parent, substyle, count, dir, _dbmin, _dbmax ) +KLevelMeter_LineBars::KLevelMeter_LineBars( Arts::KLevelMeter_impl* impl, TQWidget* parent, long substyle, long count, Arts::Direction dir, float _dbmin, float _dbmax ) : KLevelMeter_Template( impl, parent, substyle, count, dir, _dbmin, _dbmax ) , _value( 0.0 ) , _peak( 0.0 ) { -//kdDebug()<<"KLevelMeter_LineBars::KLevelMeter_LineBars( Arts::KLevelMeter_impl* "<setMinimumSize( 5, 5 ); this->substyle( substyle ); _stdcolors = colorGroup(); @@ -47,9 +47,9 @@ void KLevelMeter_LineBars::substyle( long n ) { } long KLevelMeter_LineBars::substyle() { return _substyle; } -void KLevelMeter_LineBars::paintEvent( QPaintEvent* ) { - QPixmap pm( size() ); - QPainter p( &pm ); +void KLevelMeter_LineBars::paintEvent( TQPaintEvent* ) { + TQPixmap pm( size() ); + TQPainter p( &pm ); switch ( _dir ) { case Arts::BottomToTop: @@ -69,16 +69,16 @@ void KLevelMeter_LineBars::paintEvent( QPaintEvent* ) { } if ( _substyle & 1 ) - p.setBrush( ( _peak<1 )?QColor( 0,0,255 ):QColor( 255,0,0 ) ); + p.setBrush( ( _peak<1 )?TQColor( 0,0,255 ):TQColor( 255,0,0 ) ); else - p.setBrush( ( _peak<1 )?color( _value ):QColor( 255,0,0 ) ); + p.setBrush( ( _peak<1 )?color( _value ):TQColor( 255,0,0 ) ); - QColor bgcolor = ( _substyle & 2 ) ? p.brush().color().dark() : _stdcolors.background(); + TQColor bgcolor = ( _substyle & 2 ) ? p.brush().color().dark() : _stdcolors.background(); pm.fill( bgcolor ); p.setPen( NoPen ); - QSize s = size(); + TQSize s = size(); if ( Arts::LeftToRight == _dir || Arts::RightToLeft == _dir ) s.transpose(); @@ -89,7 +89,7 @@ void KLevelMeter_LineBars::paintEvent( QPaintEvent* ) { p.drawRect( 0, top, w, h ); // PeakBar if ( _peak > 1.0/1000 && _peak <= 1.0 ) { - p.setPen( QColor( 255-bgcolor.red(), 255-bgcolor.green(), 255-bgcolor.blue() ) ); + p.setPen( TQColor( 255-bgcolor.red(), 255-bgcolor.green(), 255-bgcolor.blue() ) ); top = int( s.height() * ( 1 - _peak ) ); p.drawLine( 0, top, w, top ); } @@ -100,8 +100,8 @@ void KLevelMeter_LineBars::paintEvent( QPaintEvent* ) { /** Planned feature: a little Tooltip showing the actual value of the volume in deziBel and perhaps as linear scaleFactor */ -void KLevelMeter_LineBars::mouseMoveEvent( QMouseEvent* /*qme*/ ) { -//kdDebug()<<"KLevelMeter_LineBars::mouseMoveEvent(QMouseEvent* "< -#include -#include +#include +#include -KLevelMeter_NormalBars::KLevelMeter_NormalBars( Arts::KLevelMeter_impl* impl, QWidget* parent, long substyle, long count, Arts::Direction dir, float _dbmin, float _dbmax ) : KLevelMeter_Template( impl, parent, substyle, count, dir, _dbmin, _dbmax ) { -//kdDebug()<<"KLevelMeter_NormalBars::KLevelMeter_NormalBars( Arts::KLevelMeter_impl* "<direction() ) ) _layout->setDirection( QBoxLayout::Direction( _dir ) ); + if ( _dir != Arts::Direction( _layout->direction() ) ) _layout->setDirection( TQBoxLayout::Direction( _dir ) ); for ( uint i=0; isetValue( _value ); } @@ -46,8 +46,8 @@ void KLevelMeter_NormalBars::count( long n ) { } } -void KLevelMeter_NormalBars::resizeEvent( QResizeEvent* ) { - //kdDebug()<<"KLevelMeter_NormalBars::resizeEvent( QResizeEvent* )"< +#include class Bar; class QBoxLayout; @@ -31,29 +31,29 @@ class QBoxLayout; class KLevelMeter_NormalBars : public KLevelMeter_Template { Q_OBJECT public: - KLevelMeter_NormalBars( Arts::KLevelMeter_impl*, QWidget* =0, long substyle=0, long count=25, Arts::Direction =Arts::BottomToTop, float _dbmin=-24, float _dbmax=6 ); + KLevelMeter_NormalBars( Arts::KLevelMeter_impl*, TQWidget* =0, long substyle=0, long count=25, Arts::Direction =Arts::BottomToTop, float _dbmin=-24, float _dbmax=6 ); void invalue( float, float =0 ); void count( long ); long count(); - void resizeEvent( QResizeEvent* =0 ); + void resizeEvent( TQResizeEvent* =0 ); private: float _value, _peak; - QPtrList bars; + TQPtrList bars; // long _count; - QBoxLayout *_layout; + TQBoxLayout *_layout; }; -class Bar : public QWidget { +class Bar : public TQWidget { Q_OBJECT private: float _min, _max; - QColor _color; + TQColor _color; bool _on; public: - Bar( float min, float max, QColor color, QWidget* parent ) : QWidget( parent ), _min( min ), _max( max ), _color( color ), _on( false ) { + Bar( float min, float max, TQColor color, TQWidget* parent ) : TQWidget( parent ), _min( min ), _max( max ), _color( color ), _on( false ) { setBackgroundColor( _color.dark() ); } void setValue( float n ) { @@ -68,7 +68,7 @@ public: else setBackgroundColor( _color.dark() ); } } - void setValues( float min, float max, QColor color ) { _min = min; _max = max; _color = color; on( _on ); } + void setValues( float min, float max, TQColor color ) { _min = min; _max = max; _color = color; on( _on ); } }; #endif diff --git a/arts/gui/kde/klevelmeter_private.h b/arts/gui/kde/klevelmeter_private.h index f7ff4e93..79fe49b2 100644 --- a/arts/gui/kde/klevelmeter_private.h +++ b/arts/gui/kde/klevelmeter_private.h @@ -21,7 +21,7 @@ #ifndef ARTS_KLEVELMETER_PRIVATE_H #define ARTS_KLEVELMETER_PRIVATE_H -#include +#include #include "klevelmeter_impl.h" @@ -29,12 +29,12 @@ class KLevelMeter_Template; class QBoxLayout; class KArtsWidget; -class KLevelMeter_Private : public QObject { +class KLevelMeter_Private : public TQObject { Q_OBJECT public: Arts::KLevelMeter_impl* _impl; - QFrame* _frame; - QBoxLayout *_layout; + TQFrame* _frame; + TQBoxLayout *_layout; KLevelMeter_Template *_levelmeter; @@ -46,7 +46,7 @@ public: float _peakvalue; float _dbmin, _dbmax; - KLevelMeter_Private( Arts::KLevelMeter_impl* impl, QFrame* frame, Arts::LevelMeterStyle defstyle, QObject* =0, const char* =0 ); + KLevelMeter_Private( Arts::KLevelMeter_impl* impl, TQFrame* frame, Arts::LevelMeterStyle defstyle, TQObject* =0, const char* =0 ); void createWidget(); }; diff --git a/arts/gui/kde/klevelmeter_small.cpp b/arts/gui/kde/klevelmeter_small.cpp index 1c9c4817..c74dfa44 100644 --- a/arts/gui/kde/klevelmeter_small.cpp +++ b/arts/gui/kde/klevelmeter_small.cpp @@ -21,26 +21,26 @@ #include "klevelmeter_small.h" #include -#include +#include -KLevelMeter_Small::KLevelMeter_Small( Arts::KLevelMeter_impl* impl, QWidget* parent, long substyle, long count, Arts::Direction dir, float _dbmin, float _dbmax ) : KLevelMeter_Template( impl, parent, substyle, count, dir, _dbmin, _dbmax ) { -//kdDebug()<<"KLevelMeter_Small::KLevelMeter_Small( Arts::KLevelMeter_impl* "<setBackgroundColor( color( amptondb( n ) ) ); - else this->setBackgroundColor( QColor( 0,255,0 ).dark() ); + else this->setBackgroundColor( TQColor( 0,255,0 ).dark() ); } -void KLevelMeter_Small::paintEvent( QPaintEvent* /*qpe*/ ) { -//kdDebug()<<"KLevelMeter_Small::paintEvent( QPaintEvent* "<paletteBackgroundColor(); - p.setPen( QColor( 255-bgcolor.red(), 255-bgcolor.green(), 255-bgcolor.blue() ) ); + TQPainter p( this ); + //p.setPen( TQColor( 0,0,0 ) ); + TQColor bgcolor = this->paletteBackgroundColor(); + p.setPen( TQColor( 255-bgcolor.red(), 255-bgcolor.green(), 255-bgcolor.blue() ) ); if ( _dir==Arts::BottomToTop || _dir==Arts::TopToBottom ) { if ( _dir==Arts::BottomToTop ) p.translate( 0, rect().bottom() ); int h = int( this->height() * _peak ); diff --git a/arts/gui/kde/klevelmeter_small.h b/arts/gui/kde/klevelmeter_small.h index ba189dd6..1c2c20e6 100644 --- a/arts/gui/kde/klevelmeter_small.h +++ b/arts/gui/kde/klevelmeter_small.h @@ -26,11 +26,11 @@ class KLevelMeter_Small : public KLevelMeter_Template { Q_OBJECT public: - KLevelMeter_Small( Arts::KLevelMeter_impl*, QWidget* =0, long substyle=0, long count=0, Arts::Direction =Arts::BottomToTop, float _dbmin=-24, float _dbmax=6 ); + KLevelMeter_Small( Arts::KLevelMeter_impl*, TQWidget* =0, long substyle=0, long count=0, Arts::Direction =Arts::BottomToTop, float _dbmin=-24, float _dbmax=6 ); void invalue( float, float =0 ); - void paintEvent( QPaintEvent* ); + void paintEvent( TQPaintEvent* ); private: float _peak; }; diff --git a/arts/gui/kde/klevelmeter_template.h b/arts/gui/kde/klevelmeter_template.h index 1b3915be..c822be40 100644 --- a/arts/gui/kde/klevelmeter_template.h +++ b/arts/gui/kde/klevelmeter_template.h @@ -21,7 +21,7 @@ #ifndef ARTS_KLEVELMETER_TEMPLATE_H #define ARTS_KLEVELMETER_TEMPLATE_H -#include +#include #include @@ -29,13 +29,13 @@ #include "klevelmeter_impl.h" -class KLevelMeter_Template : public QWidget, public dB2VolCalc { +class KLevelMeter_Template : public TQWidget, public dB2VolCalc { Q_OBJECT public: Arts::KLevelMeter_impl* _impl; - KLevelMeter_Template( Arts::KLevelMeter_impl* impl, QWidget* p, long /*substyle*/, long count, Arts::Direction dir, float _dbmin, float _dbmax ) - : QWidget( p ) + KLevelMeter_Template( Arts::KLevelMeter_impl* impl, TQWidget* p, long /*substyle*/, long count, Arts::Direction dir, float _dbmin, float _dbmax ) + : TQWidget( p ) , dB2VolCalc( _dbmin, _dbmax ) , _impl( impl ) , _count( count ) @@ -57,8 +57,8 @@ public: float nilline; /// Gives the colors between green and red - QColor color( float n ) { - return QColor( int( ( n<=nilline )?255*( 1/nilline )*n:255 ), + TQColor color( float n ) { + return TQColor( int( ( n<=nilline )?255*( 1/nilline )*n:255 ), int( ( n<=1 && n>nilline )?255-255*( 1/nilline )*( n-nilline ):( ( n>1 )?0:255 ) ), 0 ); } diff --git a/arts/gui/kde/klineedit_impl.cpp b/arts/gui/kde/klineedit_impl.cpp index 898879f7..e3643645 100644 --- a/arts/gui/kde/klineedit_impl.cpp +++ b/arts/gui/kde/klineedit_impl.cpp @@ -29,11 +29,11 @@ using namespace std; KLineEditStringMapper::KLineEditStringMapper(KLineEdit_impl *impl, KLineEdit *ke) :impl(impl) { - connect(ke, SIGNAL(textChanged(const QString&)), - this, SLOT(textChanged(const QString&))); + connect(ke, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(textChanged(const TQString&))); } -void KLineEditStringMapper::textChanged(const QString& newText) +void KLineEditStringMapper::textChanged(const TQString& newText) { impl->textChanged(newText.utf8().data()); } @@ -52,7 +52,7 @@ string KLineEdit_impl::text() void KLineEdit_impl::text(const string& newText) { - _klineedit->setText(QString::fromUtf8(newText.c_str())); + _klineedit->setText(TQString::fromUtf8(newText.c_str())); } void KLineEdit_impl::textChanged(const string& newText) diff --git a/arts/gui/kde/klineedit_impl.h b/arts/gui/kde/klineedit_impl.h index b9099ac2..2bd6b693 100644 --- a/arts/gui/kde/klineedit_impl.h +++ b/arts/gui/kde/klineedit_impl.h @@ -47,13 +47,13 @@ public: void textChanged(const std::string& newText); }; -class KLineEditStringMapper :public QObject { +class KLineEditStringMapper :public TQObject { Q_OBJECT KLineEdit_impl *impl; public: KLineEditStringMapper(KLineEdit_impl *impl, KLineEdit *ed); public slots: - void textChanged(const QString& newText); + void textChanged(const TQString& newText); }; } diff --git a/arts/gui/kde/kpopupbox_impl.cpp b/arts/gui/kde/kpopupbox_impl.cpp index 2c56c73e..23de74fc 100644 --- a/arts/gui/kde/kpopupbox_impl.cpp +++ b/arts/gui/kde/kpopupbox_impl.cpp @@ -22,7 +22,7 @@ #include "kpopupbox_impl.h" #include "kpopupbox_private.h" -#include +#include using namespace Arts; @@ -54,25 +54,25 @@ void KPopupBox_impl::name( const std::string& n ) { _name = ""; _name = n; _widg // Following the private class: -KPopupBox_widget::KPopupBox_widget( QWidget *parent, const char* name ) : QFrame( parent,name ) +KPopupBox_widget::KPopupBox_widget( TQWidget *parent, const char* name ) : TQFrame( parent,name ) { - this->setFrameShape( QFrame::Box ); + this->setFrameShape( TQFrame::Box ); this->setMargin( 1 ); this->setLineWidth( 1 ); - _titlebar = new QFrame( this ); - _titlebarlayout = new QBoxLayout( _titlebar, QBoxLayout::BottomToTop ); + _titlebar = new TQFrame( this ); + _titlebarlayout = new TQBoxLayout( _titlebar, TQBoxLayout::BottomToTop ); _titlebarlayout->setAutoAdd( true ); _showbutton = new ShowButton( _titlebar ); - connect( _showbutton, SIGNAL( toggled( bool ) ), this, SLOT( hide( bool ) ) ); + connect( _showbutton, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( hide( bool ) ) ); _drag = new HandleDrag( _titlebar ); - connect( _drag, SIGNAL( clicked() ), _showbutton, SLOT( toggle() ) ); + connect( _drag, TQT_SIGNAL( clicked() ), _showbutton, TQT_SLOT( toggle() ) ); _ownbutton = new OwnButton( _titlebar ); - connect( _ownbutton, SIGNAL( toggled( bool ) ), this, SLOT( own( bool ) ) ); + connect( _ownbutton, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( own( bool ) ) ); _artswidget = new OwnWidget( _showbutton, this ); - _layout = new QBoxLayout( this, QBoxLayout::LeftToRight ); + _layout = new TQBoxLayout( this, TQBoxLayout::LeftToRight ); _layout->addWidget( _titlebar , -1 ); _layout->addWidget( _artswidget, 20 ); _layout->addStretch( 0 ); @@ -85,18 +85,18 @@ Arts::Direction KPopupBox_widget::direction() { } void KPopupBox_widget::direction( Arts::Direction n ) { - _layout->setDirection( QBoxLayout::Direction( n ) ); - _showbutton->direction( QBoxLayout::Direction( n ) ); + _layout->setDirection( TQBoxLayout::Direction( n ) ); + _showbutton->direction( TQBoxLayout::Direction( n ) ); switch( n ) { case LeftToRight: case RightToLeft: - _titlebarlayout->setDirection( QBoxLayout::BottomToTop ); + _titlebarlayout->setDirection( TQBoxLayout::BottomToTop ); _drag->setMinimumHeight( 30 ); _drag->setMinimumWidth( 0 ); break; case TopToBottom: case BottomToTop: - _titlebarlayout->setDirection( QBoxLayout::RightToLeft ); + _titlebarlayout->setDirection( TQBoxLayout::RightToLeft ); _drag->setMinimumHeight( 0 ); _drag->setMinimumWidth( 30 ); } @@ -117,7 +117,7 @@ void KPopupBox_widget::own( bool n ) { _artswidget->reparent( 0, _artswidget->mapToGlobal( _artswidget->pos() ), !( _artswidget->isHidden() ) ); else { - _artswidget->reparent( this, QPoint( 0,0 ), !( _artswidget->isHidden() ) ); + _artswidget->reparent( this, TQPoint( 0,0 ), !( _artswidget->isHidden() ) ); _layout->insertWidget( 1, _artswidget, 20 ); } } diff --git a/arts/gui/kde/kpopupbox_private.h b/arts/gui/kde/kpopupbox_private.h index 6b032912..a5072b05 100644 --- a/arts/gui/kde/kpopupbox_private.h +++ b/arts/gui/kde/kpopupbox_private.h @@ -30,13 +30,13 @@ class KArtsWidget; class OwnWidget; class QBoxLayout; -#include +#include class KPopupBox_widget : public QFrame { Q_OBJECT public: - KPopupBox_widget( QWidget* =0, const char* =0); + KPopupBox_widget( TQWidget* =0, const char* =0); ~KPopupBox_widget(); Arts::Direction direction(); @@ -50,10 +50,10 @@ private slots: void hide( bool ); void own( bool ); private: - QBoxLayout *_layout; + TQBoxLayout *_layout; - QFrame *_titlebar; - QBoxLayout *_titlebarlayout; + TQFrame *_titlebar; + TQBoxLayout *_titlebarlayout; HandleDrag *_drag; ShowButton *_showbutton; OwnButton *_ownbutton; @@ -63,34 +63,34 @@ private: // See kpopupbox_impl.h - The eventmapper isn't needed at present, but perhaps in the future... -/*class KPopupBoxEventMapper : public QObject { +/*class KPopupBoxEventMapper : public TQObject { Q_OBJECT public: KPopupBoxEventMapper( KPopupBox_widget *widget, Arts::KPopupBox_impl *impl ) - : QObject( widget,"" ), _widget( widget ), _impl( impl ) + : TQObject( widget,"" ), _widget( widget ), _impl( impl ) {} private: KPopupBox_widget *_widget; Arts::KPopupBox_impl *_impl; };*/ -#include -#include +#include +#include -class HandleDrag : public QWidget { +class HandleDrag : public TQWidget { Q_OBJECT public: - HandleDrag( QWidget *parent, const char* name=0 ) : QWidget( parent,name ) {} - void paintEvent( QPaintEvent * ) { - QPainter p( this ); - QStyle::SFlags flags = QStyle::Style_Default; - if( width() < height() ) flags |= QStyle::Style_Horizontal; - style().drawPrimitive( QStyle::PE_DockWindowHandle, &p, rect(), colorGroup(), flags ); + HandleDrag( TQWidget *parent, const char* name=0 ) : TQWidget( parent,name ) {} + void paintEvent( TQPaintEvent * ) { + TQPainter p( this ); + TQStyle::SFlags flags = TQStyle::Style_Default; + if( width() < height() ) flags |= TQStyle::Style_Horizontal; + style().drawPrimitive( TQStyle::PE_DockWindowHandle, &p, rect(), colorGroup(), flags ); } signals: void clicked(); protected: - virtual void mouseDoubleClickEvent( QMouseEvent * ) { + virtual void mouseDoubleClickEvent( TQMouseEvent * ) { emit clicked(); } }; @@ -103,76 +103,76 @@ static const char* const right_xpm[] = { "5 5 2 1", "# c black", ". c None", ". static const char* const inside_xpm[] = { "5 5 2 1", "# c black", ". c None", "#####", "#...#", "#...#", "#...#", "#####"}; static const char* const own_xpm[] = { "5 5 2 1", "# c black", ". c None", "###..", "#.###", "###.#", ".#..#", ".####"}; -#include -#include +#include +#include -class ShowButton : public QPushButton { +class ShowButton : public TQPushButton { Q_OBJECT private: - QBoxLayout::Direction _dir; - QPixmap _pmleft, _pmright, _pmup, _pmdown; + TQBoxLayout::Direction _dir; + TQPixmap _pmleft, _pmright, _pmup, _pmdown; public: - ShowButton( QWidget *parent, const char* name=0 ) : QPushButton( parent,name ), _dir( QBoxLayout::LeftToRight ) + ShowButton( TQWidget *parent, const char* name=0 ) : TQPushButton( parent,name ), _dir( TQBoxLayout::LeftToRight ) { - connect( this, SIGNAL( toggled( bool ) ), this, SLOT( owntoggle( bool ) ) ); + connect( this, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( owntoggle( bool ) ) ); setToggleButton( true ); - _pmleft = QPixmap( const_cast( left_xpm ) ); - _pmright = QPixmap( const_cast( right_xpm ) ); - _pmup = QPixmap( const_cast( up_xpm ) ); - _pmdown = QPixmap( const_cast( down_xpm ) ); + _pmleft = TQPixmap( const_cast( left_xpm ) ); + _pmright = TQPixmap( const_cast( right_xpm ) ); + _pmup = TQPixmap( const_cast( up_xpm ) ); + _pmdown = TQPixmap( const_cast( down_xpm ) ); setPixmap( _pmright ); } - void direction( QBoxLayout::Direction n ) { _dir=n; } + void direction( TQBoxLayout::Direction n ) { _dir=n; } public slots: void owntoggle( bool b ) { switch( _dir ) { - case QBoxLayout::BottomToTop: + case TQBoxLayout::BottomToTop: if( b ) setPixmap( _pmdown ); else setPixmap( _pmup ); break; - case QBoxLayout::TopToBottom: + case TQBoxLayout::TopToBottom: if( b ) setPixmap( _pmup ); else setPixmap( _pmdown ); break; - case QBoxLayout::LeftToRight: + case TQBoxLayout::LeftToRight: if( b ) setPixmap( _pmright ); else setPixmap( _pmleft ); break; - case QBoxLayout::RightToLeft: + case TQBoxLayout::RightToLeft: if( b ) setPixmap( _pmleft ); else setPixmap( _pmright ); break; } } public: - QSize minimumSizeHint() const { - int wh = style().pixelMetric( QStyle::PM_DockWindowHandleExtent, this ); - return QSize( wh, wh ); + TQSize minimumSizeHint() const { + int wh = style().pixelMetric( TQStyle::PM_DockWindowHandleExtent, this ); + return TQSize( wh, wh ); } - QSizePolicy sizePolicy() const { return QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ); } - QSize minimumSize() const { return minimumSizeHint(); } - QSize sizeHint() const { return minimumSize(); } + TQSizePolicy sizePolicy() const { return TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ); } + TQSize minimumSize() const { return minimumSizeHint(); } + TQSize sizeHint() const { return minimumSize(); } - void drawButton( QPainter * p ) + void 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() ); } }; -class OwnButton : public QPushButton { +class OwnButton : public TQPushButton { Q_OBJECT private: - QPixmap _pmown, _pminside; + TQPixmap _pmown, _pminside; public: - OwnButton( QWidget *parent, const char* name=0 ) : QPushButton( parent,name ) + OwnButton( TQWidget *parent, const char* name=0 ) : TQPushButton( parent,name ) { - connect( this, SIGNAL( toggled( bool ) ), this, SLOT( toggle( bool ) ) ); + connect( this, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( toggle( bool ) ) ); setToggleButton( true ); - _pmown = QPixmap( const_cast( own_xpm ) ); - _pminside = QPixmap( const_cast( inside_xpm ) ); + _pmown = TQPixmap( const_cast( own_xpm ) ); + _pminside = TQPixmap( const_cast( inside_xpm ) ); setPixmap( _pmown ); } @@ -182,17 +182,17 @@ public slots: else setPixmap( _pmown ); } public: - QSize minimumSizeHint() const { - int wh = style().pixelMetric( QStyle::PM_DockWindowHandleExtent, this ); - return QSize( wh, wh ); + TQSize minimumSizeHint() const { + int wh = style().pixelMetric( TQStyle::PM_DockWindowHandleExtent, this ); + return TQSize( wh, wh ); } - QSizePolicy sizePolicy() const { return QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ); } - QSize minimumSize() const { return minimumSizeHint(); } - QSize sizeHint() const { return minimumSize(); } + TQSizePolicy sizePolicy() const { return TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ); } + TQSize minimumSize() const { return minimumSizeHint(); } + TQSize sizeHint() const { return minimumSize(); } - void drawButton( QPainter * p ) + void 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() ); } }; @@ -204,10 +204,10 @@ class OwnWidget : public KArtsWidget Q_OBJECT ShowButton *_b; public: - OwnWidget( ShowButton* b, QWidget* p, const char* n=0, WFlags f=0 ) : KArtsWidget( p,n,f ) { _b = b; } + OwnWidget( ShowButton* b, TQWidget* p, const char* n=0, WFlags f=0 ) : KArtsWidget( p,n,f ) { _b = b; } ~OwnWidget() {} public slots: - void closeEvent( QCloseEvent * ) { _b->toggle(); } + void closeEvent( TQCloseEvent * ) { _b->toggle(); } }; #endif diff --git a/arts/gui/kde/kpoti.cpp b/arts/gui/kde/kpoti.cpp index e12c1bf5..462d640b 100644 --- a/arts/gui/kde/kpoti.cpp +++ b/arts/gui/kde/kpoti.cpp @@ -20,15 +20,15 @@ #include "kpoti.h" #include "kpoti.moc" -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include @@ -53,18 +53,18 @@ struct KPoti::KPotiPrivate bool bgDirty; KPixmap bgdb; - KPixmap bgPixmap( const QColorGroup & colorGroup ) + KPixmap bgPixmap( const TQColorGroup & colorGroup ) { if( bgDirty || bgdb.isNull() ) { bgdb.resize( buttonRect.size() ); - QPainter dbp( &bgdb ); + TQPainter dbp( &bgdb ); dbp.setPen( Qt::NoPen ); - QRect drawRect = bgdb.rect(); + TQRect drawRect = bgdb.rect(); // create mask - QBitmap mask( bgdb.size(), true ); - QPainter maskpainter( &mask ); + TQBitmap mask( bgdb.size(), true ); + TQPainter maskpainter( &mask ); maskpainter.setPen( Qt::NoPen ); maskpainter.setBrush( Qt::color1 ); maskpainter.drawEllipse( drawRect ); @@ -74,7 +74,7 @@ struct KPoti::KPotiPrivate // inset shadow KPixmap gradient( bgdb.size() ); KPixmapEffect::gradient( gradient, colorGroup.light(), colorGroup.dark(), KPixmapEffect::DiagonalGradient ); - dbp.setBrush( QBrush( colorGroup.button(), gradient ) ); + dbp.setBrush( TQBrush( colorGroup.button(), gradient ) ); dbp.drawEllipse( drawRect ); potiRect.setSize( drawRect.size() * 0.9 ); @@ -90,7 +90,7 @@ struct KPoti::KPotiPrivate return bgdb; } - QColor potiColor; + TQColor potiColor; bool potiDirty; KPixmap potidb; KPixmap potiPixmap() @@ -98,13 +98,13 @@ struct KPoti::KPotiPrivate if( ( potiDirty || potidb.isNull() ) && ! potiRect.size().isEmpty() ) { potidb.resize( potiRect.size() ); - QPainter dbp( &potidb ); + TQPainter dbp( &potidb ); dbp.setPen( Qt::NoPen ); - QRect drawRect( potidb.rect() ); + TQRect drawRect( potidb.rect() ); // create mask - QBitmap mask( potidb.size(), true ); - QPainter maskpainter( &mask ); + TQBitmap mask( potidb.size(), true ); + TQPainter maskpainter( &mask ); maskpainter.setPen( Qt::NoPen ); maskpainter.setBrush( Qt::color1 ); maskpainter.drawEllipse( drawRect ); @@ -113,7 +113,7 @@ struct KPoti::KPotiPrivate KPixmap gradient( potidb.size() ); KPixmapEffect::gradient( gradient, potiColor.dark( 130 ), potiColor.light( 130 ), KPixmapEffect::DiagonalGradient ); - dbp.setBrush( QBrush( potiColor, gradient ) ); + dbp.setBrush( TQBrush( potiColor, gradient ) ); dbp.drawEllipse( drawRect ); potiDirty = false; @@ -121,45 +121,45 @@ struct KPoti::KPotiPrivate return potidb; } - QRect buttonRect; - QRect potiRect; - QRect labelRect; - QString label; - QPoint center; + TQRect buttonRect; + TQRect potiRect; + TQRect labelRect; + TQString label; + TQPoint center; }; -QSizePolicy KPoti::sizePolicy() const +TQSizePolicy KPoti::sizePolicy() const { - return QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred ); + return TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Preferred ); } -QSize KPoti::sizeHint() const +TQSize KPoti::sizeHint() const { return minimumSizeHint(); } -QSize KPoti::minimumSizeHint() const +TQSize KPoti::minimumSizeHint() const { int width = 40; int height = 40; if( m_bLabel ) { - QFontMetrics metrics( font() ); + TQFontMetrics metrics( font() ); d->labelRect = metrics.boundingRect( d->label ); d->labelRect.setHeight( metrics.lineSpacing() ); width = KMAX( width, d->labelRect.width() + frameRect().width() - contentsRect().width() ); height += metrics.lineSpacing(); } //kdDebug() << k_funcinfo << "return " << width << "x" << height << endl; - return QSize( width, height ); + return TQSize( width, height ); } -QString KPoti::text() const +TQString KPoti::text() const { return d->label; } -void KPoti::setText( const QString & text ) +void KPoti::setText( const TQString & text ) { d->label = text; setMinimumSize( minimumSizeHint() ); @@ -169,10 +169,10 @@ void KPoti::setText( const QString & text ) /** Constructs a poti. - The \e parent and \e name arguments are sent to the QWidget constructor. + The \e parent and \e name arguments are sent to the TQWidget constructor. */ -KPoti::KPoti( QWidget *parent, const char *name ) - : QFrame( parent, name, WResizeNoErase | WRepaintNoErase ) +KPoti::KPoti( TQWidget *parent, const char *name ) + : TQFrame( parent, name, WResizeNoErase | WRepaintNoErase ) , d( 0 ) { init(); @@ -188,13 +188,13 @@ KPoti::KPoti( QWidget *parent, const char *name ) \arg \e step is the page step value. \arg \e value is the initial value. - The \e parent and \e name arguments are sent to the QWidget constructor. + The \e parent and \e name arguments are sent to the TQWidget constructor. */ KPoti::KPoti( int minValue, int maxValue, int step, - int value, QWidget *parent, const char *name ) - : QFrame( parent, name, WResizeNoErase | WRepaintNoErase ) - , QRangeControl( minValue, maxValue, 1, step, value ) + int value, TQWidget *parent, const char *name ) + : TQFrame( parent, name, WResizeNoErase | WRepaintNoErase ) + , TQRangeControl( minValue, maxValue, 1, step, value ) , d( 0 ) { init(value); @@ -233,7 +233,7 @@ void KPoti::init(int value) void KPoti::initTicks() { - QRect available = contentsRect(); + TQRect available = contentsRect(); if( m_bLabel ) available.rTop() += d->labelRect.height(); d->center = available.center(); @@ -336,7 +336,7 @@ int KPoti::valueFromPosition( float p ) const } /*! - Implements the virtual QRangeControl function. + Implements the virtual TQRangeControl function. */ void KPoti::rangeChange() @@ -347,7 +347,7 @@ void KPoti::rangeChange() } } -void KPoti::paletteChange( const QPalette & ) +void KPoti::paletteChange( const TQPalette & ) { d->bgDirty = true; d->potiDirty = true; @@ -372,7 +372,7 @@ void KPoti::valueChange() Handles resize events for the poti. */ -void KPoti::resizeEvent( QResizeEvent * ) +void KPoti::resizeEvent( TQResizeEvent * ) { rangeChange(); initTicks(); @@ -387,7 +387,7 @@ void KPoti::setLabel(bool s) /** Sets the color of the button */ -void KPoti::setColor( const QColor &c ) +void KPoti::setColor( const TQColor &c ) { d->potiColor = c; d->potiDirty = true; @@ -395,7 +395,7 @@ void KPoti::setColor( const QColor &c ) } -void KPoti::paintPoti( QPainter * p ) +void KPoti::paintPoti( TQPainter * p ) { if( isVisible() ) { @@ -403,11 +403,11 @@ void KPoti::paintPoti( QPainter * p ) if( db.isNull() ) return; - QPainter p2( &db ); + TQPainter p2( &db ); p2.translate( db.rect().center().x(), db.rect().center().y() ); p2.rotate( potiPos * 180.0 / PI ); - QRect pointer( db.width() / -20, db.width() / -2, db.width() / 10, db.width() / 2 ); - QBrush buttonbrush( colorGroup().button() ); + TQRect pointer( db.width() / -20, db.width() / -2, db.width() / 10, db.width() / 2 ); + TQBrush buttonbrush( colorGroup().button() ); qDrawShadePanel( &p2, pointer, colorGroup(), true, 1, &buttonbrush ); p2.end(); @@ -421,7 +421,7 @@ void KPoti::paintPoti( QPainter * p ) void KPoti::reallyMovePoti( float newPos ) { - QPainter p; + TQPainter p; p.begin( this ); p.setPen(NoPen); potiPos = newPos; @@ -436,15 +436,15 @@ void KPoti::reallyMovePoti( float newPos ) Handles paint events for the slider. */ -void KPoti::drawContents( QPainter * p ) +void KPoti::drawContents( TQPainter * p ) { - QPixmap doublebuffer( contentsRect().size() ); + TQPixmap doublebuffer( contentsRect().size() ); doublebuffer.fill( colorGroup().background() ); - QPainter dbp( &doublebuffer ); + TQPainter dbp( &doublebuffer ); if( m_bLabel ) { dbp.setFont( font() ); - QFontMetrics metrics = dbp.fontMetrics(); + TQFontMetrics metrics = dbp.fontMetrics(); dbp.drawText( contentsRect().x() - metrics.leftBearing( d->label[ 0 ] ) + ( contentsRect().width() - d->labelRect.width() ) / 2, metrics.height(), d->label ); } @@ -457,7 +457,7 @@ void KPoti::drawContents( QPainter * p ) dbp.drawPixmap( d->buttonRect, d->bgPixmap( colorGroup() ) ); if( hasFocus() ) - style().drawPrimitive( QStyle::PE_FocusRect, &dbp, d->buttonRect, colorGroup() ); + style().drawPrimitive( TQStyle::PE_FocusRect, &dbp, d->buttonRect, colorGroup() ); paintPoti( &dbp ); dbp.end(); @@ -469,7 +469,7 @@ void KPoti::drawContents( QPainter * p ) Handles mouse press events for the slider. */ -void KPoti::mousePressEvent( QMouseEvent *e ) +void KPoti::mousePressEvent( TQMouseEvent *e ) { resetState(); @@ -493,15 +493,15 @@ void KPoti::mousePressEvent( QMouseEvent *e ) state = TimingDown; subtractPage(); if ( !timer ) - timer = new QTimer( this ); - connect( timer, SIGNAL(timeout()), SLOT(repeatTimeout()) ); + timer = new TQTimer( this ); + connect( timer, TQT_SIGNAL(timeout()), TQT_SLOT(repeatTimeout()) ); timer->start( thresholdTime, TRUE ); } else { state = TimingUp; addPage(); if ( !timer ) - timer = new QTimer( this ); - connect( timer, SIGNAL(timeout()), SLOT(repeatTimeout()) ); + timer = new TQTimer( this ); + connect( timer, TQT_SIGNAL(timeout()), TQT_SLOT(repeatTimeout()) ); timer->start( thresholdTime, TRUE ); } } @@ -509,7 +509,7 @@ void KPoti::mousePressEvent( QMouseEvent *e ) /*! Handles mouse move events for the slider. */ -void KPoti::mouseMoveEvent( QMouseEvent *e ) +void KPoti::mouseMoveEvent( TQMouseEvent *e ) { if ( (e->state() & MidButton) ) { // middle button wins @@ -532,29 +532,29 @@ void KPoti::mouseMoveEvent( QMouseEvent *e ) Handles mouse release events for the slider. */ -void KPoti::mouseReleaseEvent( QMouseEvent *e ) +void KPoti::mouseReleaseEvent( TQMouseEvent *e ) { if ( !(e->button() & LeftButton) ) return; resetState(); } -void KPoti::focusInEvent( QFocusEvent * e ) +void KPoti::focusInEvent( TQFocusEvent * e ) { //setFrameStyle( Raised | Box ); //setLineWidth( 1 ); - QFrame::focusInEvent( e ); + TQFrame::focusInEvent( e ); } -void KPoti::focusOutEvent( QFocusEvent * e ) +void KPoti::focusOutEvent( TQFocusEvent * e ) { //setFrameStyle( NoFrame ); //setLineWidth( 0 ); - QFrame::focusOutEvent( e ); + TQFrame::focusOutEvent( e ); } -void KPoti::enterEvent( QEvent * ) +void KPoti::enterEvent( TQEvent * ) { emit mouseEntered( potiVal ); } @@ -616,7 +616,7 @@ void KPoti::resetState() Handles key press events for the slider. */ -void KPoti::keyPressEvent( QKeyEvent *e ) +void KPoti::keyPressEvent( TQKeyEvent *e ) { switch ( e->key() ) { @@ -656,12 +656,12 @@ void KPoti::keyPressEvent( QKeyEvent *e ) /*! - Makes QRangeControl::setValue() available as a slot. + Makes TQRangeControl::setValue() available as a slot. */ void KPoti::setValue( int value ) { - QRangeControl::setValue( value ); + TQRangeControl::setValue( value ); } @@ -694,9 +694,9 @@ void KPoti::repeatTimeout() Q_ASSERT( timer ); timer->disconnect(); if ( state == TimingDown ) - connect( timer, SIGNAL(timeout()), SLOT(subtractStep()) ); + connect( timer, TQT_SIGNAL(timeout()), TQT_SLOT(subtractStep()) ); else if ( state == TimingUp ) - connect( timer, SIGNAL(timeout()), SLOT(addStep()) ); + connect( timer, TQT_SIGNAL(timeout()), TQT_SLOT(addStep()) ); timer->start( repeatTime, FALSE ); } @@ -708,7 +708,7 @@ void KPoti::repeatTimeout() of the widget, using \a w pixels and \a i intervals. */ -void KPoti::drawTicks( QPainter *p, double dist, double w, int i ) const +void KPoti::drawTicks( TQPainter *p, double dist, double w, int i ) const { p->setPen( colorGroup().foreground() ); double angle,s,c; @@ -725,7 +725,7 @@ void KPoti::drawTicks( QPainter *p, double dist, double w, int i ) const } } -void KPoti::wheelEvent(QWheelEvent *e) +void KPoti::wheelEvent(TQWheelEvent *e) { setValue(value()+e->delta()/120*8); } @@ -760,7 +760,7 @@ void KPoti::setTickmarks( bool s ) not a pixel interval. If \a i is 0, the slider will choose between lineStep() and pageStep(). The initial value of tickInterval() is 0. - \sa tickInterval(), QRangeControl::lineStep(), QRangeControl::pageStep() + \sa tickInterval(), TQRangeControl::lineStep(), TQRangeControl::pageStep() */ void KPoti::setTickInterval( int i ) diff --git a/arts/gui/kde/kpoti.h b/arts/gui/kde/kpoti.h index a87b5162..278d6350 100644 --- a/arts/gui/kde/kpoti.h +++ b/arts/gui/kde/kpoti.h @@ -20,29 +20,29 @@ #ifndef _KPOTI_H #define _KPOTI_H -#include -#include +#include +#include class QTimer; struct QPotiData; -class KPoti : public QFrame, public QRangeControl +class KPoti : public TQFrame, public QRangeControl { Q_OBJECT public: - KPoti( QWidget *parent=0, const char *name=0 ); + KPoti( TQWidget *parent=0, const char *name=0 ); KPoti( int minValue, int maxValue, int step, int value, - QWidget *parent=0, const char *name=0 ); + TQWidget *parent=0, const char *name=0 ); ~KPoti(); void setTracking( bool enable ); bool tracking() const; - void setColor( const QColor & ); + void setColor( const TQColor & ); virtual void setTickmarks( bool ); virtual void setLabel( bool ); @@ -51,16 +51,16 @@ public: virtual void setTickInterval( int ); int tickInterval() const { return tickInt; } - virtual QSizePolicy sizePolicy() const; - virtual QSize sizeHint() const; - virtual QSize minimumSizeHint() const; - QString text() const; + virtual TQSizePolicy sizePolicy() const; + virtual TQSize sizeHint() const; + virtual TQSize minimumSizeHint() const; + TQString text() const; public slots: void setValue( int ); void addStep(); void subtractStep(); - void setText( const QString & ); + void setText( const TQString & ); signals: void valueChanged( int value ); @@ -70,29 +70,29 @@ signals: void mouseEntered(int value); protected: - void resizeEvent( QResizeEvent * ); - void drawContents( QPainter * ); + void resizeEvent( TQResizeEvent * ); + void drawContents( TQPainter * ); - void keyPressEvent( QKeyEvent * ); + void keyPressEvent( TQKeyEvent * ); - void mousePressEvent( QMouseEvent * ); - void mouseReleaseEvent( QMouseEvent * ); - void mouseMoveEvent( QMouseEvent * ); - void enterEvent( QEvent *); + void mousePressEvent( TQMouseEvent * ); + void mouseReleaseEvent( TQMouseEvent * ); + void mouseMoveEvent( TQMouseEvent * ); + void enterEvent( TQEvent *); - void focusInEvent( QFocusEvent *e ); - void focusOutEvent( QFocusEvent *e ); + void focusInEvent( TQFocusEvent *e ); + void focusOutEvent( TQFocusEvent *e ); void valueChange(); void rangeChange(); - virtual void paletteChange( const QPalette & ); + virtual void paletteChange( const TQPalette & ); - virtual void paintPoti( QPainter * ); - void drawButton( QPainter *); - void drawTicks( QPainter *, double, double, int=1 ) const; + virtual void paintPoti( TQPainter * ); + void drawButton( TQPainter *); + void drawTicks( TQPainter *, double, double, int=1 ) const; - virtual void wheelEvent(QWheelEvent *e); + virtual void wheelEvent(TQWheelEvent *e); private slots: void repeatTimeout(); diff --git a/arts/gui/kde/kpoti_impl.cpp b/arts/gui/kde/kpoti_impl.cpp index ba904f7a..ffac2a20 100644 --- a/arts/gui/kde/kpoti_impl.cpp +++ b/arts/gui/kde/kpoti_impl.cpp @@ -32,10 +32,10 @@ using namespace Arts; using namespace std; PotiIntMapper::PotiIntMapper(KPoti_impl *impl, KPoti *kp) - : QObject( kp ) + : TQObject( kp ) , impl( impl ) { - connect(kp, SIGNAL(valueChanged(int)), this, SLOT(valueChanged(int))); + connect(kp, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(valueChanged(int))); } void PotiIntMapper::valueChanged(int pos) @@ -62,7 +62,7 @@ string KPoti_impl::caption() void KPoti_impl::caption(const string& newText) { - _caption = QString::fromUtf8( newText.c_str() ); + _caption = TQString::fromUtf8( newText.c_str() ); _kpoti->setText( _caption ); } @@ -76,7 +76,7 @@ void KPoti_impl::color(const string& newColor) _color = newColor; if(strlen(_color.c_str())) { - QColor qc(_color.c_str()); + TQColor qc(_color.c_str()); _kpoti->setColor(qc); } } diff --git a/arts/gui/kde/kpoti_impl.h b/arts/gui/kde/kpoti_impl.h index a87972c5..0502cdc8 100644 --- a/arts/gui/kde/kpoti_impl.h +++ b/arts/gui/kde/kpoti_impl.h @@ -26,15 +26,15 @@ #include "kframe_impl.h" #include "kpoti.h" -#include -#include +#include +#include namespace Arts { class KPoti_impl; -class PotiIntMapper :public QObject { +class PotiIntMapper :public TQObject { Q_OBJECT KPoti_impl *impl; public: @@ -48,7 +48,7 @@ class KPoti_impl : virtual public Arts::Poti_skel, { protected: KPoti * _kpoti; - QString _caption; + TQString _caption; std::string _color; float _min, _max, _value; float _factor; diff --git a/arts/gui/kde/kspinbox_impl.cpp b/arts/gui/kde/kspinbox_impl.cpp index cd8c90c5..db40ae10 100644 --- a/arts/gui/kde/kspinbox_impl.cpp +++ b/arts/gui/kde/kspinbox_impl.cpp @@ -29,10 +29,10 @@ using namespace Arts; using namespace std; -SpinBoxIntMapper::SpinBoxIntMapper(KSpinBox_impl *impl, QSpinBox *sp) +SpinBoxIntMapper::SpinBoxIntMapper(KSpinBox_impl *impl, TQSpinBox *sp) :impl(impl) { - connect(sp, SIGNAL(valueChanged(int)), this, SLOT(valueChanged(int))); + connect(sp, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(valueChanged(int))); } void SpinBoxIntMapper::valueChanged(int pos) @@ -40,11 +40,11 @@ void SpinBoxIntMapper::valueChanged(int pos) impl->valueChanged(pos); } -KSpinBox_impl::KSpinBox_impl( QSpinBox * widget ) - : KWidget_impl( widget ? widget : new QSpinBox ) +KSpinBox_impl::KSpinBox_impl( TQSpinBox * widget ) + : KWidget_impl( widget ? widget : new TQSpinBox ) { _min = 0; _max = 100; _value = 0; - _qspinbox = static_cast( _qwidget ); + _qspinbox = static_cast( _qwidget ); _qspinbox->setRange( 0, 100 ); ( void )new SpinBoxIntMapper( this, _qspinbox ); } @@ -56,7 +56,7 @@ string KSpinBox_impl::caption() void KSpinBox_impl::caption(const string& newCaption) { - _caption = QString::fromUtf8(newCaption.c_str()); + _caption = TQString::fromUtf8(newCaption.c_str()); // FIXME: do something with the caption here } diff --git a/arts/gui/kde/kspinbox_impl.h b/arts/gui/kde/kspinbox_impl.h index ef662a10..d200c6f3 100644 --- a/arts/gui/kde/kspinbox_impl.h +++ b/arts/gui/kde/kspinbox_impl.h @@ -25,19 +25,19 @@ #define ARTS_GUI_KSPINBOX_IMPL_H #include "kwidget_impl.h" -#include -#include -#include +#include +#include +#include namespace Arts { class KSpinBox_impl; -class SpinBoxIntMapper :public QObject { +class SpinBoxIntMapper :public TQObject { Q_OBJECT KSpinBox_impl *impl; public: - SpinBoxIntMapper(KSpinBox_impl *impl, QSpinBox *sp); + SpinBoxIntMapper(KSpinBox_impl *impl, TQSpinBox *sp); public slots: void valueChanged(int x); }; @@ -46,14 +46,14 @@ class KSpinBox_impl : virtual public Arts::SpinBox_skel, public Arts::KWidget_impl { protected: - QSpinBox * _qspinbox; - QString _caption; + TQSpinBox * _qspinbox; + TQString _caption; long _min, _max, _value; void applyValue(); public: - KSpinBox_impl( QSpinBox * w = 0 ); + KSpinBox_impl( TQSpinBox * w = 0 ); void constructor( Widget p ) { parent( p ); } std::string caption(); diff --git a/arts/gui/kde/ktickmarks_impl.cpp b/arts/gui/kde/ktickmarks_impl.cpp index 4db81ee0..1a95c2a6 100644 --- a/arts/gui/kde/ktickmarks_impl.cpp +++ b/arts/gui/kde/ktickmarks_impl.cpp @@ -21,13 +21,13 @@ #include "ktickmarks_impl.h" #include -#include -#include -#include +#include +#include +#include -KTickmarks_impl::KTickmarks_impl( QFrame* w ) : Arts::KFrame_impl( w ? w : new KTickmarks_Widget( 0 ) ) +KTickmarks_impl::KTickmarks_impl( TQFrame* w ) : Arts::KFrame_impl( w ? w : new KTickmarks_Widget( 0 ) ) { - //kdDebug()<<"KTickmarks_impl::KTickmarks_impl( QFrame* w="<( _qwidget ); } @@ -50,22 +50,22 @@ void KTickmarks_impl::constructor( float min, float max, Arts::Direction dir, lo this->min( min ); this->max( max ); direction( dir ); position( pos ); } -KTickmarks_Widget::KTickmarks_Widget( KTickmarks_impl* impl, QWidget* p, const char* n ) : QFrame( p,n ), dB2VolCalc( -24, 0 ), _impl( impl ), _pos( Arts::posLeft ), _dir( Arts::BottomToTop ), minstep( 1 ), substep( 0.5 ) { +KTickmarks_Widget::KTickmarks_Widget( KTickmarks_impl* impl, TQWidget* p, const char* n ) : TQFrame( p,n ), dB2VolCalc( -24, 0 ), _impl( impl ), _pos( Arts::posLeft ), _dir( Arts::BottomToTop ), minstep( 1 ), substep( 0.5 ) { setMinimumSize( 20,20 ); } -void KTickmarks_Widget::drawContents( QPainter* p ) { - //kdDebug()<<"KTickmarks::drawContents( QPainter* "<setFont( font ); // Determining the size of the largest text (currently the text at the minimum-scale) - QFontMetrics fontmetric( font ); - QRect fontrect = fontmetric.boundingRect( QString::number( dbmin ) ); + TQFontMetrics fontmetric( font ); + TQRect fontrect = fontmetric.boundingRect( TQString::number( dbmin ) ); // Calculating stepsizes float _minstepcount = ( dbmax-dbmin )/minstep; float _minstep = minstep; // this value gets changed @@ -75,8 +75,8 @@ void KTickmarks_Widget::drawContents( QPainter* p ) { int _minsize; // Shorcuts int w,h; - QColor colornormal = colorGroup().foreground(); - QColor colordiff = colorGroup().buttonText(); + TQColor colornormal = colorGroup().foreground(); + TQColor colordiff = colorGroup().buttonText(); if ( _dir == Arts::BottomToTop || _dir == Arts::TopToBottom ) { p->translate( contentsRect().left(), contentsRect().bottom() ); @@ -95,7 +95,7 @@ void KTickmarks_Widget::drawContents( QPainter* p ) { w = contentsRect().width(); // Just a shortcut h=0; // Painting substep marks - p->setPen( QPen( colordiff, 1 ) ); + p->setPen( TQPen( colordiff, 1 ) ); for ( float i=dbmax; i>=dbmin; i-=_substep ) { h = int( -contentsRect().height() * dbtondb( i ) ); if ( _dir==Arts::TopToBottom ) h = 1 - h; @@ -103,7 +103,7 @@ void KTickmarks_Widget::drawContents( QPainter* p ) { if ( right ) p->drawLine( w-3, h, w, h ); } // Painting step marks and texts - p->setPen( QPen( colornormal, 1 ) ); + p->setPen( TQPen( colornormal, 1 ) ); for ( float i=0; i>=dbmin; i-=_minstep ) { h = int( -contentsRect().height() * dbtondb( i ) ); if ( _dir==Arts::TopToBottom ) h = 1 - h; @@ -111,7 +111,7 @@ void KTickmarks_Widget::drawContents( QPainter* p ) { p->drawText( ( w - (left)*6 - (right)*6 - fontrect.width() )/2 + (left)*6 , h-fontrect.height()/2, fontrect.width(), fontrect.height()+2, - Qt::AlignRight|Qt::AlignTop, QString::number( i ) ); + Qt::AlignRight|Qt::AlignTop, TQString::number( i ) ); if ( right ) p->drawLine( w-6, h, w, h ); } for ( float i=_minstep; i<=dbmax; i+=_minstep ) { @@ -121,7 +121,7 @@ void KTickmarks_Widget::drawContents( QPainter* p ) { p->drawText( ( w - (left)*6 - (right)*6 - fontrect.width() )/2 + (left)*6 , h-fontrect.height()/2, fontrect.width(), fontrect.height()+2, - Qt::AlignRight|Qt::AlignTop, QString::number( i ) ); + Qt::AlignRight|Qt::AlignTop, TQString::number( i ) ); if ( right ) p->drawLine( w-6, h, w, h ); } } else { @@ -141,7 +141,7 @@ void KTickmarks_Widget::drawContents( QPainter* p ) { w = 0; // Just a shortcut h = frameWidth() + contentsRect().height(); // Painting substep marks - p->setPen( QPen( colordiff, 1 ) ); + p->setPen( TQPen( colordiff, 1 ) ); for ( float i=dbmax; i>=dbmin; i-=_substep ) { w = this->frameWidth()+ int( contentsRect().width() * dbtondb( i ) ); if ( _dir==Arts::RightToLeft ) w = 1 - w; @@ -149,7 +149,7 @@ void KTickmarks_Widget::drawContents( QPainter* p ) { if ( right ) p->drawLine( w, h-3, w, h ); } // Painting step marks and texts - p->setPen( QPen( colornormal, 1 ) ); + p->setPen( TQPen( colornormal, 1 ) ); for ( float i=0; i>=dbmin; i-=_minstep ) { w = int( contentsRect().width() * dbtondb( i ) ); if ( _dir==Arts::RightToLeft ) w = 1 - w; @@ -157,7 +157,7 @@ void KTickmarks_Widget::drawContents( QPainter* p ) { p->drawText( w - fontrect.width()/2 , ( h - (left)*6 - (right)*6 - fontrect.height() )/2 + (left)*6, fontrect.width(), fontrect.height()+2, - Qt::AlignRight|Qt::AlignTop, QString::number( i ) ); + Qt::AlignRight|Qt::AlignTop, TQString::number( i ) ); if ( right ) p->drawLine( w, h-6, w, h ); } for ( float i=_minstep; i<=dbmax; i+=_minstep ) { @@ -167,7 +167,7 @@ void KTickmarks_Widget::drawContents( QPainter* p ) { p->drawText( w - fontrect.width()/2 , ( h - (left)*6 - (right)*6 - fontrect.height() )/2 + (left)*6, fontrect.width(), fontrect.height()+2, - Qt::AlignRight|Qt::AlignTop, QString::number( i ) ); + Qt::AlignRight|Qt::AlignTop, TQString::number( i ) ); if ( right ) p->drawLine( w, h-6, w, h ); } } diff --git a/arts/gui/kde/ktickmarks_impl.h b/arts/gui/kde/ktickmarks_impl.h index b85e302a..1d0006a1 100644 --- a/arts/gui/kde/ktickmarks_impl.h +++ b/arts/gui/kde/ktickmarks_impl.h @@ -21,7 +21,7 @@ #ifndef ARTS_KLEVELMETER_TICKMARKS_H #define ARTS_KLEVELMETER_TICKMARKS_H -#include +#include #include #include "artsgui.h" @@ -36,7 +36,7 @@ class KTickmarks_impl : virtual public Arts::Tickmarks_skel, virtual public Arts::KFrame_impl { public: - KTickmarks_impl( QFrame* =0 ); + KTickmarks_impl( TQFrame* =0 ); float min(); void min( float ); @@ -59,13 +59,13 @@ private: KTickmarks_Widget* _tmwidget; }; -class KTickmarks_Widget : public QFrame, public dB2VolCalc { +class KTickmarks_Widget : public TQFrame, public dB2VolCalc { Q_OBJECT private: KTickmarks_impl* _impl; public: - KTickmarks_Widget( KTickmarks_impl*, QWidget* =0, const char* =0 ); - void drawContents( QPainter* ); + KTickmarks_Widget( KTickmarks_impl*, TQWidget* =0, const char* =0 ); + void drawContents( TQPainter* ); long _pos; Arts::Direction _dir; diff --git a/arts/gui/kde/kvbox_impl.cpp b/arts/gui/kde/kvbox_impl.cpp index 6d1b0606..b1dc6dd4 100644 --- a/arts/gui/kde/kvbox_impl.cpp +++ b/arts/gui/kde/kvbox_impl.cpp @@ -22,15 +22,15 @@ */ #include "kvbox_impl.h" -#include +#include using namespace Arts; -KVBox_impl::KVBox_impl( QVBox * widget ) - : KFrame_impl( widget ? widget : new QVBox ) +KVBox_impl::KVBox_impl( TQVBox * widget ) + : KFrame_impl( widget ? widget : new TQVBox ) , _spacing( 5 ) { - _qvbox = static_cast( _qwidget ); + _qvbox = static_cast( _qwidget ); _qvbox->setSpacing( _spacing ); _qvbox->setMargin( 5 ); } diff --git a/arts/gui/kde/kvbox_impl.h b/arts/gui/kde/kvbox_impl.h index e9480419..8f9c5b48 100644 --- a/arts/gui/kde/kvbox_impl.h +++ b/arts/gui/kde/kvbox_impl.h @@ -34,10 +34,10 @@ private: long _spacing; protected: - QVBox * _qvbox; + TQVBox * _qvbox; public: - KVBox_impl( QVBox * w = 0 ); + KVBox_impl( TQVBox * w = 0 ); long spacing(); void spacing( long ); diff --git a/arts/gui/kde/kvolumefader_impl.cpp b/arts/gui/kde/kvolumefader_impl.cpp index 1b5cf7fe..1c32f23d 100644 --- a/arts/gui/kde/kvolumefader_impl.cpp +++ b/arts/gui/kde/kvolumefader_impl.cpp @@ -21,17 +21,17 @@ #include "kvolumefader_impl.h" #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include #include #include -KVolumeFader_impl::KVolumeFader_impl( QFrame* w ) +KVolumeFader_impl::KVolumeFader_impl( TQFrame* w ) : Arts::KFrame_impl( w ? w : new KVolumeFader_Widget( 0 ) ) , dB2VolCalc( -36, 6 ) , _dir( Arts::BottomToTop ) @@ -40,7 +40,7 @@ KVolumeFader_impl::KVolumeFader_impl( QFrame* w ) , direction_inupdate( false ) , ignoreUpdates( 0 ) { - //kdDebug()<<"KVolumeFader_impl::KVolumeFader_impl( QFrame* w="<( _qwidget ); _vfwidget->setImpl( this ); } @@ -114,14 +114,14 @@ void KVolumeFader_impl::constructor( float dbmin, float dbmax, Arts::Direction d -KVolumeFader_Widget::KVolumeFader_Widget( QWidget* p, const char* n ) - : QFrame( p,n ) +KVolumeFader_Widget::KVolumeFader_Widget( TQWidget* p, const char* n ) + : TQFrame( p,n ) , _impl( 0 ) , _inupdate( false ) , _value( -1 ) , _dir( Arts::BottomToTop ) , _menu( new KPopupMenu( this ) ) - , _aExactValue( new KAction( i18n( "Set Exact Value..." ), KShortcut(), this, SLOT( exactValue() ), this ) ) + , _aExactValue( new KAction( i18n( "Set Exact Value..." ), KShortcut(), this, TQT_SLOT( exactValue() ), this ) ) { //kdDebug() << k_funcinfo << endl; setMinimumSize( 10,10 ); @@ -144,16 +144,16 @@ void KVolumeFader_Widget::setValue( float n ) { } } -QColor KVolumeFader_Widget::interpolate( QColor low, QColor high, float percent ) { +TQColor KVolumeFader_Widget::interpolate( TQColor low, TQColor high, float percent ) { if ( percent<=0 ) return low; else if ( percent>=1 ) return high; else - return QColor( + return TQColor( int( low.red() + ( high.red()-low.red() ) * percent ), int( low.green() + ( high.green()-low.green() ) * percent ), int( low.blue() + ( high.blue()-low.blue() ) * percent ) ); } -void KVolumeFader_Widget::drawContents( QPainter* p ){ +void KVolumeFader_Widget::drawContents( TQPainter* p ){ if ( _dir==Arts::BottomToTop || _dir==Arts::BottomToTop ) { float h; if ( _dir==Arts::BottomToTop ) h = contentsRect().height() * ( 1 - _value ); @@ -178,11 +178,11 @@ void KVolumeFader_Widget::drawContents( QPainter* p ){ } } -void KVolumeFader_Widget::mousePressEvent( QMouseEvent* ){ +void KVolumeFader_Widget::mousePressEvent( TQMouseEvent* ){ //kdDebug() << k_funcinfo << endl; } -void KVolumeFader_Widget::mouseReleaseEvent( QMouseEvent* qme ){ +void KVolumeFader_Widget::mouseReleaseEvent( TQMouseEvent* qme ){ bool setValue = false; if ( KGlobalSettings::mouseSettings().handed == 0 && qme->button() == Qt::LeftButton ) setValue=true; if ( KGlobalSettings::mouseSettings().handed == 1 && qme->button() == Qt::RightButton ) setValue=true; @@ -206,7 +206,7 @@ void KVolumeFader_Widget::mouseReleaseEvent( QMouseEvent* qme ){ } else _menu->exec( qme->globalPos() ); } -void KVolumeFader_Widget::mouseMoveEvent( QMouseEvent* qme ){ +void KVolumeFader_Widget::mouseMoveEvent( TQMouseEvent* qme ){ switch ( _dir ) { default: case Arts::BottomToTop: @@ -224,7 +224,7 @@ void KVolumeFader_Widget::mouseMoveEvent( QMouseEvent* qme ){ } } -void KVolumeFader_Widget::wheelEvent( QWheelEvent* qwe ){ +void KVolumeFader_Widget::wheelEvent( TQWheelEvent* qwe ){ //kdDebug() << k_funcinfo << endl; if ( qwe->delta() < 0 ) { if ( _impl ) _impl->normalizedvolume( _impl->dbtondb( _impl->dbvolume() - 1 ) ); } if ( qwe->delta() > 0 ) { if ( _impl ) _impl->normalizedvolume( _impl->dbtondb( _impl->dbvolume() + 1 ) ); } diff --git a/arts/gui/kde/kvolumefader_impl.h b/arts/gui/kde/kvolumefader_impl.h index 603ac28e..c2db6a0b 100644 --- a/arts/gui/kde/kvolumefader_impl.h +++ b/arts/gui/kde/kvolumefader_impl.h @@ -21,7 +21,7 @@ #ifndef ARTS_KVOLUMEFADER_TICKMARKS_H #define ARTS_KVOLUMEFADER_TICKMARKS_H -#include +#include #include #include "artsgui.h" @@ -37,7 +37,7 @@ class KVolumeFader_impl : virtual public Arts::VolumeFader_skel, public dB2VolCalc { public: - KVolumeFader_impl( QFrame* =0 ); + KVolumeFader_impl( TQFrame* =0 ); ~KVolumeFader_impl(); float dbmin(); @@ -67,7 +67,7 @@ private: class KPopupMenu; class KAction; -class KVolumeFader_Widget : public QFrame { +class KVolumeFader_Widget : public TQFrame { Q_OBJECT private: KVolumeFader_impl* _impl; @@ -76,19 +76,19 @@ private: Arts::Direction _dir; KPopupMenu *_menu; KAction *_aExactValue; - QColor interpolate( QColor, QColor, float ); + TQColor interpolate( TQColor, TQColor, float ); public: - KVolumeFader_Widget( QWidget* =0, const char* =0 ); + KVolumeFader_Widget( TQWidget* =0, const char* =0 ); ~KVolumeFader_Widget(); void setImpl( KVolumeFader_impl* ); void setValue( float ); void setDirection( Arts::Direction ); protected: - void drawContents( QPainter* ); - void mousePressEvent( QMouseEvent* ); - void mouseReleaseEvent( QMouseEvent* ); - void mouseMoveEvent( QMouseEvent* ); - void wheelEvent( QWheelEvent* ); + void drawContents( TQPainter* ); + void mousePressEvent( TQMouseEvent* ); + void mouseReleaseEvent( TQMouseEvent* ); + void mouseMoveEvent( TQMouseEvent* ); + void wheelEvent( TQWheelEvent* ); private slots: void exactValue(); }; diff --git a/arts/gui/kde/kwidget_impl.cpp b/arts/gui/kde/kwidget_impl.cpp index f5c47055..ede8ad38 100644 --- a/arts/gui/kde/kwidget_impl.cpp +++ b/arts/gui/kde/kwidget_impl.cpp @@ -28,8 +28,8 @@ using namespace Arts; -KWidget_impl::KWidget_impl( QWidget * widget ) - : _qwidget( widget ? widget : new QWidget ) +KWidget_impl::KWidget_impl( TQWidget * widget ) + : _qwidget( widget ? widget : new TQWidget ) { _widgetID = KWidgetRepo::the()->add( this, _qwidget ); @@ -39,8 +39,8 @@ KWidget_impl::KWidget_impl( QWidget * widget ) * the panel got deleted, our widget will be gone, too) */ _guard = new KWidgetGuard(this); - QObject::connect(_qwidget, SIGNAL(destroyed()), - _guard, SLOT(widgetDestroyed())); + TQObject::connect(_qwidget, TQT_SIGNAL(destroyed()), + _guard, TQT_SLOT(widgetDestroyed())); } KWidget_impl::~KWidget_impl() @@ -76,11 +76,11 @@ void KWidget_impl::parent(Arts::Widget newParent) { _parentID = newParent.widgetID(); - QWidget *qparent; + TQWidget *qparent; qparent = KWidgetRepo::the()->lookupQWidget(newParent.widgetID()); if( qparent != 0 ) { - QPoint pos(x(),y()); + TQPoint pos(x(),y()); bool showIt = visible(); _qwidget->reparent(qparent, pos, showIt); } @@ -148,8 +148,8 @@ SizePolicy KWidget_impl::hSizePolicy() void KWidget_impl::hSizePolicy( SizePolicy p ) { - QSizePolicy sp = _qwidget->sizePolicy(); - sp.setHorData( ( QSizePolicy::SizeType )p ); + TQSizePolicy sp = _qwidget->sizePolicy(); + sp.setHorData( ( TQSizePolicy::SizeType )p ); _qwidget->setSizePolicy( sp ); } @@ -160,8 +160,8 @@ SizePolicy KWidget_impl::vSizePolicy() void KWidget_impl::vSizePolicy( SizePolicy p ) { - QSizePolicy sp = _qwidget->sizePolicy(); - sp.setVerData( ( QSizePolicy::SizeType )p ); + TQSizePolicy sp = _qwidget->sizePolicy(); + sp.setVerData( ( TQSizePolicy::SizeType )p ); _qwidget->setSizePolicy( sp ); } diff --git a/arts/gui/kde/kwidget_impl.h b/arts/gui/kde/kwidget_impl.h index 46f29092..292f8cc8 100644 --- a/arts/gui/kde/kwidget_impl.h +++ b/arts/gui/kde/kwidget_impl.h @@ -24,7 +24,7 @@ #ifndef ARTS_GUI_KWIDGET_IMPL_H #define ARTS_GUI_KWIDGET_IMPL_H #include "artsgui.h" -#include +#include #include #include @@ -33,12 +33,12 @@ namespace Arts { class KWidgetGuard; class KDE_EXPORT KWidget_impl : virtual public Arts::Widget_skel { protected: - QWidget * _qwidget; + TQWidget * _qwidget; KWidgetGuard * _guard; long _parentID; long _widgetID; public: - KWidget_impl( QWidget * w = 0 ); + KWidget_impl( TQWidget * w = 0 ); ~KWidget_impl(); @@ -68,7 +68,7 @@ public: void widgetDestroyed(); }; -class KWidgetGuard : public QObject { +class KWidgetGuard : public TQObject { Q_OBJECT protected: KWidget_impl *impl; diff --git a/arts/gui/kde/kwidgetrepo.cpp b/arts/gui/kde/kwidgetrepo.cpp index e0d93bd6..120f9cc5 100644 --- a/arts/gui/kde/kwidgetrepo.cpp +++ b/arts/gui/kde/kwidgetrepo.cpp @@ -63,7 +63,7 @@ KWidgetRepo::~KWidgetRepo() } -long KWidgetRepo::add(KWidget_impl *widget, QWidget *qwidget) +long KWidgetRepo::add(KWidget_impl *widget, TQWidget *qwidget) { long ID = nextID++; widgets[ID] = widget; @@ -71,7 +71,7 @@ long KWidgetRepo::add(KWidget_impl *widget, QWidget *qwidget) return ID; } -QWidget *KWidgetRepo::lookupQWidget(long ID) +TQWidget *KWidgetRepo::lookupQWidget(long ID) { return qwidgets[ID]; } diff --git a/arts/gui/kde/kwidgetrepo.h b/arts/gui/kde/kwidgetrepo.h index adab8090..1bcb5870 100644 --- a/arts/gui/kde/kwidgetrepo.h +++ b/arts/gui/kde/kwidgetrepo.h @@ -24,7 +24,7 @@ #define KWIDGETREPO_H #include -#include +#include #include #include "artsgui.h" @@ -35,7 +35,7 @@ namespace Arts { class KWidgetRepo { protected: long nextID; - std::map qwidgets; + std::map qwidgets; std::map widgets; static KWidgetRepo *instance; @@ -44,9 +44,9 @@ protected: public: - long add(Arts::KWidget_impl *widget, QWidget *qwidget); + long add(Arts::KWidget_impl *widget, TQWidget *qwidget); Arts::Widget lookupWidget(long ID); - QWidget *lookupQWidget(long ID); + TQWidget *lookupQWidget(long ID); void remove(long ID); static KWidgetRepo *the(); diff --git a/arts/modules/common/env_mixeritem_impl.cc b/arts/modules/common/env_mixeritem_impl.cc index 632d8187..0f4db5e8 100644 --- a/arts/modules/common/env_mixeritem_impl.cc +++ b/arts/modules/common/env_mixeritem_impl.cc @@ -49,7 +49,7 @@ public: if(newName != _name) { _name = newName; - amClient.title(i18n("Mixer (\"%1\")").arg(QString::fromUtf8(_name.c_str())).utf8().data()); + amClient.title(i18n("Mixer (\"%1\")").arg(TQString::fromUtf8(_name.c_str())).utf8().data()); amClient.autoRestoreID("mixer_"+_name); for(unsigned int i = 0; i < _inputs.size(); i++) _inputs[i].busname(channelName(i)); diff --git a/arts/modules/effects/kstereovolumecontrolgui_impl.cpp b/arts/modules/effects/kstereovolumecontrolgui_impl.cpp index 3dca494c..b4db259a 100644 --- a/arts/modules/effects/kstereovolumecontrolgui_impl.cpp +++ b/arts/modules/effects/kstereovolumecontrolgui_impl.cpp @@ -21,15 +21,15 @@ #include "kstereovolumecontrolgui_impl.h" -#include +#include #include #include using namespace Arts; -KStereoVolumeControlGui_impl::KStereoVolumeControlGui_impl( QFrame* w ) : KLayoutBox_impl( w ? w : new QFrame( 0 ) ) +KStereoVolumeControlGui_impl::KStereoVolumeControlGui_impl( TQFrame* w ) : KLayoutBox_impl( w ? w : new TQFrame( 0 ) ) { - //kdDebug()<<"KStereoVolumeControlGui_impl::KStereoVolumeControlGui_impl( QFrame* "<addWidget( _label, -100 ); _label.bottom( Arts::East ); diff --git a/arts/modules/effects/kstereovolumecontrolgui_impl.h b/arts/modules/effects/kstereovolumecontrolgui_impl.h index 1681b07c..8729232f 100644 --- a/arts/modules/effects/kstereovolumecontrolgui_impl.h +++ b/arts/modules/effects/kstereovolumecontrolgui_impl.h @@ -46,7 +46,7 @@ protected: float _dbmin, _dbmax; Arts::Direction _dir; public: - KStereoVolumeControlGui_impl( QFrame* =0 ); + KStereoVolumeControlGui_impl( TQFrame* =0 ); void constructor( Arts::StereoVolumeControl ); @@ -76,18 +76,18 @@ private: } // namespace Arts -#include -#include +#include +#include -class KStereoVolumeControlGui_EventMapper : public QObject { +class KStereoVolumeControlGui_EventMapper : public TQObject { Q_OBJECT public: - QTimer* _timer; + TQTimer* _timer; Arts::KStereoVolumeControlGui_impl* _impl; public: - KStereoVolumeControlGui_EventMapper( Arts::KStereoVolumeControlGui_impl* impl, QObject* parent, const char* name=0 ) : QObject( parent,name ), _impl( impl ) { - _timer = new QTimer( this ); - connect( _timer, SIGNAL( timeout() ), this, SLOT( slotTimerSignal() ) ); + KStereoVolumeControlGui_EventMapper( Arts::KStereoVolumeControlGui_impl* impl, TQObject* parent, const char* name=0 ) : TQObject( parent,name ), _impl( impl ) { + _timer = new TQTimer( this ); + connect( _timer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotTimerSignal() ) ); } public slots: void slotTimerSignal() { _impl->updateValues(); } diff --git a/arts/modules/synth/c_filter_stuff.h b/arts/modules/synth/c_filter_stuff.h index 1729cf08..edd7a4af 100644 --- a/arts/modules/synth/c_filter_stuff.h +++ b/arts/modules/synth/c_filter_stuff.h @@ -150,12 +150,12 @@ typedef struct { int buflen; } ty_afmethod; -#define C_FLOWOUTMETHOD 0 -#define C_RBMETHOD 1 -#define C_SWAPROMETHOD 2 -#define C_SWAPRWMETHOD 3 -#define C_AIMROMETHOD 4 -#define C_AIMRWMETHOD 5 +#define C_FLOWOUQT_METHOD 0 +#define C_RBQT_METHOD 1 +#define C_SWAPROQT_METHOD 2 +#define C_SWAPRWQT_METHOD 3 +#define C_AIMROQT_METHOD 4 +#define C_AIMRWQT_METHOD 5 typedef struct { char *filename; diff --git a/arts/tools/artsactions.cpp b/arts/tools/artsactions.cpp index 213c81bb..c483beb0 100644 --- a/arts/tools/artsactions.cpp +++ b/arts/tools/artsactions.cpp @@ -36,8 +36,8 @@ #include "environmentview.h" #include "mediatypesview.h" -ArtsActions::ArtsActions( KArtsServer* server, KActionCollection* col, QWidget* parent, const char* name ) - : QObject( parent,name ) +ArtsActions::ArtsActions( KArtsServer* server, KActionCollection* col, TQWidget* parent, const char* name ) + : TQObject( parent,name ) , _kartsserver( server ) , _actioncollection( col ) , _a_sv( 0 ), _a_am( 0 ), _a_asv( 0 ), _a_mmv( 0 ), _a_ev( 0 ), _a_mtv( 0 ) @@ -62,52 +62,52 @@ ArtsActions::~ArtsActions() { } KAction* ArtsActions::actionScopeView() { - if ( !_a_sv ) _a_sv = new KAction( i18n( "&FFT Scope" ), "artsfftscope", KShortcut(), this, SLOT( viewScopeView() ), _actioncollection, "artssupport_view_scopeview" ); + if ( !_a_sv ) _a_sv = new KAction( i18n( "&FFT Scope" ), "artsfftscope", KShortcut(), this, TQT_SLOT( viewScopeView() ), _actioncollection, "artssupport_view_scopeview" ); return _a_sv; } KAction* ArtsActions::actionAudioManager() { - if ( !_a_am ) _a_am = new KAction( i18n( "&Audio Manager" ), "artsaudiomanager", KShortcut(), this, SLOT( viewAudioManager() ), _actioncollection, "artssupport_view_audiomanager" ); + if ( !_a_am ) _a_am = new KAction( i18n( "&Audio Manager" ), "artsaudiomanager", KShortcut(), this, TQT_SLOT( viewAudioManager() ), _actioncollection, "artssupport_view_audiomanager" ); return _a_am; } KAction* ArtsActions::actionArtsStatusView() { - if ( !_a_asv ) _a_asv = new KAction( i18n( "aRts &Status" ), "artscontrol", KShortcut(), this, SLOT( viewArtsStatusView() ), _actioncollection, "artssupport_view_artsstatus" ); + if ( !_a_asv ) _a_asv = new KAction( i18n( "aRts &Status" ), "artscontrol", KShortcut(), this, TQT_SLOT( viewArtsStatusView() ), _actioncollection, "artssupport_view_artsstatus" ); return _a_asv; } KAction* ArtsActions::actionMidiManagerView() { - if ( !_a_mmv ) _a_mmv = new KAction( i18n( "&MIDI Manager" ), "artsmidimanager", KShortcut(), this, SLOT( viewMidiManagerView() ), _actioncollection, "artssupport_view_midimanager" ); + if ( !_a_mmv ) _a_mmv = new KAction( i18n( "&MIDI Manager" ), "artsmidimanager", KShortcut(), this, TQT_SLOT( viewMidiManagerView() ), _actioncollection, "artssupport_view_midimanager" ); return _a_mmv; } KAction* ArtsActions::actionEnvironmentView() { - if ( !_a_ev ) _a_ev = new KAction( i18n( "&Environment" ), "artsenvironment", KShortcut(), this, SLOT( viewEnvironmentView() ), _actioncollection, "artssupport_view_environment" ); + if ( !_a_ev ) _a_ev = new KAction( i18n( "&Environment" ), "artsenvironment", KShortcut(), this, TQT_SLOT( viewEnvironmentView() ), _actioncollection, "artssupport_view_environment" ); return _a_ev; } KAction* ArtsActions::actionMediaTypesView() { - if ( !_a_mtv ) _a_mtv = new KAction( i18n( "Available Media &Types" ), "artsmediatypes", KShortcut(), this, SLOT( viewMediaTypesView() ), _actioncollection, "artssupport_view_mediatypes" ); + if ( !_a_mtv ) _a_mtv = new KAction( i18n( "Available Media &Types" ), "artsmediatypes", KShortcut(), this, TQT_SLOT( viewMediaTypesView() ), _actioncollection, "artssupport_view_mediatypes" ); return _a_mtv; } KAction* ArtsActions::actionStyleNormal() { - if ( !_a_style_normal ) _a_style_normal = new KAction( i18n( "Style: NormalBars" ), "", KShortcut(), this, SLOT( _p_style_normal() ), _actioncollection, "artssupport_style_normal" ); + if ( !_a_style_normal ) _a_style_normal = new KAction( i18n( "Style: NormalBars" ), "", KShortcut(), this, TQT_SLOT( _p_style_normal() ), _actioncollection, "artssupport_style_normal" ); return _a_style_normal; } KAction* ArtsActions::actionStyleFire() { - if ( !_a_style_fire ) _a_style_fire = new KAction( i18n( "Style: FireBars" ), "", KShortcut(), this, SLOT( _p_style_fire() ), _actioncollection, "artssupport_style_fire" ); + if ( !_a_style_fire ) _a_style_fire = new KAction( i18n( "Style: FireBars" ), "", KShortcut(), this, TQT_SLOT( _p_style_fire() ), _actioncollection, "artssupport_style_fire" ); return _a_style_fire; } KAction* ArtsActions::actionStyleLine() { - if ( !_a_style_line ) _a_style_line = new KAction( i18n( "Style: LineBars" ), "", KShortcut(), this, SLOT( _p_style_line() ), _actioncollection, "artssupport_style_line" ); + if ( !_a_style_line ) _a_style_line = new KAction( i18n( "Style: LineBars" ), "", KShortcut(), this, TQT_SLOT( _p_style_line() ), _actioncollection, "artssupport_style_line" ); return _a_style_line; } KAction* ArtsActions::actionStyleLED() { - if ( !_a_style_led ) _a_style_led = new KAction( i18n( "Style: LEDs" ), "", KShortcut(), this, SLOT( _p_style_led() ), _actioncollection, "artssupport_style_led" ); + if ( !_a_style_led ) _a_style_led = new KAction( i18n( "Style: LEDs" ), "", KShortcut(), this, TQT_SLOT( _p_style_led() ), _actioncollection, "artssupport_style_led" ); return _a_style_led; } KAction* ArtsActions::actionStyleAnalog() { - if ( !_a_style_analog ) _a_style_analog = new KAction( i18n( "Style: Analog" ), "", KShortcut(), this, SLOT( _p_style_analog() ), _actioncollection, "artssupport_style_analog" ); + if ( !_a_style_analog ) _a_style_analog = new KAction( i18n( "Style: Analog" ), "", KShortcut(), this, TQT_SLOT( _p_style_analog() ), _actioncollection, "artssupport_style_analog" ); return _a_style_analog; } KAction* ArtsActions::actionStyleSmall() { - if ( !_a_style_small ) _a_style_small = new KAction( i18n( "Style: Small" ), "", KShortcut(), this, SLOT( _p_style_small() ), _actioncollection, "artssupport_style_small" ); + if ( !_a_style_small ) _a_style_small = new KAction( i18n( "Style: Small" ), "", KShortcut(), this, TQT_SLOT( _p_style_small() ), _actioncollection, "artssupport_style_small" ); return _a_style_small; } KPopupMenu* ArtsActions::stylemenu() { @@ -124,11 +124,11 @@ KPopupMenu* ArtsActions::stylemenu() { return _stylemenu; } -KAction* ArtsActions::actionMoreBars( const QObject* receiver, const char* slot, KActionCollection *actioncollection ) { +KAction* ArtsActions::actionMoreBars( const TQObject* receiver, const char* slot, KActionCollection *actioncollection ) { static KAction *_a_morebars = new KAction( i18n( "More Bars in VU-Meters" ), "up", KShortcut(), receiver, slot, actioncollection, "artssupport_morebars" ); return _a_morebars; } -KAction* ArtsActions::actionLessBars( const QObject* receiver, const char* slot, KActionCollection *actioncollection ) { +KAction* ArtsActions::actionLessBars( const TQObject* receiver, const char* slot, KActionCollection *actioncollection ) { static KAction *_a_lessbars = new KAction( i18n( "Less Bars in VU-Meters" ), "down", KShortcut(), receiver, slot, actioncollection, "artssupport_lessbars" ); return _a_lessbars; } @@ -136,7 +136,7 @@ KAction* ArtsActions::actionLessBars( const QObject* receiver, const char* slot, void ArtsActions::viewScopeView() { if ( !_sv ) { _sv = new FFTScopeView( _kartsserver->server() ); - connect( _sv, SIGNAL( closed() ), this, SLOT( viewScopeView() ) ); + connect( _sv, TQT_SIGNAL( closed() ), this, TQT_SLOT( viewScopeView() ) ); } else { delete _sv; _sv = 0; @@ -145,7 +145,7 @@ void ArtsActions::viewScopeView() { void ArtsActions::viewAudioManager() { if ( !_am ) { _am = new Gui_AUDIO_MANAGER(); - connect( _am, SIGNAL( closed() ), this, SLOT( viewAudioManager() ) ); + connect( _am, TQT_SIGNAL( closed() ), this, TQT_SLOT( viewAudioManager() ) ); } else { delete _am; _am = 0; @@ -154,7 +154,7 @@ void ArtsActions::viewAudioManager() { void ArtsActions::viewArtsStatusView() { if ( !_asv ) { _asv = new ArtsStatusView( _kartsserver->server() ); - connect( _asv, SIGNAL( closed() ), this, SLOT( viewArtsStatusView() ) ); + connect( _asv, TQT_SIGNAL( closed() ), this, TQT_SLOT( viewArtsStatusView() ) ); } else { delete _asv; _asv = 0; @@ -163,7 +163,7 @@ void ArtsActions::viewArtsStatusView() { void ArtsActions::viewMidiManagerView() { if ( !_mmv ) { _mmv = new MidiManagerView(); - connect( _mmv, SIGNAL( closed() ), this, SLOT( viewMidiManagerView() ) ); + connect( _mmv, TQT_SIGNAL( closed() ), this, TQT_SLOT( viewMidiManagerView() ) ); } else { delete _mmv; _mmv = 0; @@ -172,7 +172,7 @@ void ArtsActions::viewMidiManagerView() { void ArtsActions::viewEnvironmentView() { if ( !_ev ) { _ev = new EnvironmentView( defaultEnvironment() ); - connect( _ev, SIGNAL( closed() ), this, SLOT( viewEnvironmentView() ) ); + connect( _ev, TQT_SIGNAL( closed() ), this, TQT_SLOT( viewEnvironmentView() ) ); } else { delete _ev; _ev = 0; @@ -181,7 +181,7 @@ void ArtsActions::viewEnvironmentView() { void ArtsActions::viewMediaTypesView() { if ( !_mtv ) { _mtv = new MediaTypesView(); - connect( _mtv, SIGNAL( closed() ), this, SLOT( viewMediaTypesView() ) ); + connect( _mtv, TQT_SIGNAL( closed() ), this, TQT_SLOT( viewMediaTypesView() ) ); } else { delete _mtv; _mtv = 0; diff --git a/arts/tools/artsactions.h b/arts/tools/artsactions.h index 15a19f64..441d7373 100644 --- a/arts/tools/artsactions.h +++ b/arts/tools/artsactions.h @@ -21,7 +21,7 @@ #ifndef ARTS_ACTIONS_H #define ARTS_ACTIONS_H -#include +#include #include class KArtsServer; class KAction; @@ -50,7 +50,7 @@ public: @param qwidget the parent QWidget @param name the name of the object */ - ArtsActions( KArtsServer* artsserver, KActionCollection* actioncollection, QWidget* qwidget, const char* name=0 ); + ArtsActions( KArtsServer* artsserver, KActionCollection* actioncollection, TQWidget* qwidget, const char* name=0 ); /** Destructor */ ~ArtsActions(); @@ -75,8 +75,8 @@ public: KAction* actionStyleSmall(); KPopupMenu* stylemenu(); - static KAction* actionMoreBars( const QObject*, const char*, KActionCollection* ); - static KAction* actionLessBars( const QObject*, const char*, KActionCollection* ); + static KAction* actionMoreBars( const TQObject*, const char*, KActionCollection* ); + static KAction* actionLessBars( const TQObject*, const char*, KActionCollection* ); public slots: void viewScopeView(); diff --git a/arts/tools/artscontrolapplet.cpp b/arts/tools/artscontrolapplet.cpp index a178c2d3..e4a7e16a 100644 --- a/arts/tools/artscontrolapplet.cpp +++ b/arts/tools/artscontrolapplet.cpp @@ -21,15 +21,15 @@ #include #include #include -#include -#include +#include +#include #include "artscontrolapplet.h" #include "artscontrolapplet_private.h" extern "C" { - KDE_EXPORT KPanelApplet* init( QWidget *parent, const QString configFile) + KDE_EXPORT KPanelApplet* init( TQWidget *parent, const TQString configFile) { KGlobal::locale()->insertCatalogue("artscontrol"); return new ArtsControlApplet(configFile, KPanelApplet::Normal, @@ -38,9 +38,9 @@ extern "C" } } -ArtsControlApplet::ArtsControlApplet(const QString& configFile, Type type, int actions, QWidget *parent, const char *name) : KPanelApplet(configFile, type, actions, parent, name) +ArtsControlApplet::ArtsControlApplet(const TQString& configFile, Type type, int actions, TQWidget *parent, const char *name) : KPanelApplet(configFile, type, actions, parent, name) { - //kdDebug()<<"ArtsControlApplet::ArtsControlApplet( const QString& "<barts ) KMessageBox::information(0, i18n("Something with the ArtsServer went wrong. You probably need to restart aRts and then reload this applet.")); setCustomMenu(p->menu); - p->layout = new QBoxLayout( this, QBoxLayout::LeftToRight ); + p->layout = new TQBoxLayout( this, TQBoxLayout::LeftToRight ); p->layout->setSpacing( 2 ); if( p->barts ) { @@ -61,7 +61,7 @@ ArtsControlApplet::ArtsControlApplet(const QString& configFile, Type type, int a p->layout->activate(); - QTimer::singleShot( 100, this, SLOT( supdatelayout() ) ); + TQTimer::singleShot( 100, this, TQT_SLOT( supdatelayout() ) ); kdDebug()<<"ArtsControlApplet::ArtsControlApplet() finished."<layout->sizeHint().height(); } -void ArtsControlApplet::resizeEvent( QResizeEvent * /*_Event*/ ) { - kdDebug()<<"ArtsControlApplet::resizeEvent( QResizeEvent * )"<button() /*|| Qt::LeftButton == ev->button()*/ ) - p->menu->exec( QCursor::pos() ); + p->menu->exec( TQCursor::pos() ); } void ArtsControlApplet::positionChange( Position ) { @@ -122,12 +122,12 @@ kdDebug()< +#include -#include -#include -#include -#include +#include +#include +#include +#include #include #include -#include +#include #include #include @@ -45,13 +45,13 @@ class VolumeSlider; -class KDE_EXPORT ArtsControlAppletPrivate : public QObject { +class KDE_EXPORT ArtsControlAppletPrivate : public TQObject { Q_OBJECT private: ArtsControlApplet *_parent; ArtsActions* _artsactions; public: - QBoxLayout *layout; + TQBoxLayout *layout; KArtsServer *arts; KArtsDispatcher *dispatcher; Arts::StereoVolumeControl volume; @@ -66,7 +66,7 @@ public: KAction *_styleNormalBars, *_styleFireBars, *_styleLineBars, *_styleLEDs, *_styleAnalog, *_styleSmall; ArtsControlAppletPrivate( ArtsControlApplet *parent ) - : QObject(parent) + : TQObject(parent) , _parent( parent ) , barts( false ) , bInUpdate( false ) @@ -82,7 +82,7 @@ public: menu = new KPopupMenu( 0 ); _showSV = _artsactions->actionScopeView(); _showSV->plug( menu ); - _showSVinline = new KAction( i18n( "Toggle &Inline FFT Scope" ), "artscontrol", KShortcut(), this, SLOT( SVinline() ), this ); + _showSVinline = new KAction( i18n( "Toggle &Inline FFT Scope" ), "artscontrol", KShortcut(), this, TQT_SLOT( SVinline() ), this ); _showSVinline->plug( menu ); _showAM = _artsactions->actionAudioManager(); _showAM->plug( menu ); @@ -96,12 +96,12 @@ public: _showMediaTypes->plug( menu ); menu->insertSeparator(); menu->insertItem( i18n( "VU-Style" ), _artsactions->stylemenu() ); - connect( _artsactions, SIGNAL( styleNormal() ), this, SLOT( styleNormalBars() ) ); - connect( _artsactions, SIGNAL( styleFire() ), this, SLOT( styleFireBars() ) ); - connect( _artsactions, SIGNAL( styleLine() ), this, SLOT( styleLineBars() ) ); - connect( _artsactions, SIGNAL( styleLED() ), this, SLOT( styleLEDs() ) ); - connect( _artsactions, SIGNAL( styleAnalog() ), this, SLOT( styleAnalog() ) ); - connect( _artsactions, SIGNAL( styleSmall() ), this, SLOT( styleSmall() ) ); + connect( _artsactions, TQT_SIGNAL( styleNormal() ), this, TQT_SLOT( styleNormalBars() ) ); + connect( _artsactions, TQT_SIGNAL( styleFire() ), this, TQT_SLOT( styleFireBars() ) ); + connect( _artsactions, TQT_SIGNAL( styleLine() ), this, TQT_SLOT( styleLineBars() ) ); + connect( _artsactions, TQT_SIGNAL( styleLED() ), this, TQT_SLOT( styleLEDs() ) ); + connect( _artsactions, TQT_SIGNAL( styleAnalog() ), this, TQT_SLOT( styleAnalog() ) ); + connect( _artsactions, TQT_SIGNAL( styleSmall() ), this, TQT_SLOT( styleSmall() ) ); } ~ArtsControlAppletPrivate() { if ( svinline ) SVinline(); diff --git a/arts/tools/audiomanager.cpp b/arts/tools/audiomanager.cpp index 1216e192..3e3789ae 100644 --- a/arts/tools/audiomanager.cpp +++ b/arts/tools/audiomanager.cpp @@ -24,8 +24,8 @@ #include "audiomanager.h" #include "choosebusdlg.h" -#include -#include +#include +#include #include #include @@ -37,7 +37,7 @@ using namespace std; * as this is an 1:1 port of an old arts-0.3.4.1 artsbuilable visual widget, * you'll see some porting artefacts, and it's not elegance itself ;) */ -Gui_AUDIO_MANAGER::Gui_AUDIO_MANAGER( QWidget* parent, const char* name ) : Template_ArtsView( parent,name ) +Gui_AUDIO_MANAGER::Gui_AUDIO_MANAGER( TQWidget* parent, const char* name ) : Template_ArtsView( parent,name ) { this->setCaption( i18n( "Audio Manager" ) ); this->setIcon( MainBarIcon( "artsaudiomanager", 32 ) ); @@ -53,9 +53,9 @@ Gui_AUDIO_MANAGER::Gui_AUDIO_MANAGER( QWidget* parent, const char* name ) : Temp tick(); show(); - QTimer *updatetimer = new QTimer(this); + TQTimer *updatetimer = new TQTimer(this); updatetimer->start(500); - QObject::connect(updatetimer,SIGNAL(timeout()),this,SLOT(tick())); + TQObject::connect(updatetimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(tick())); } Gui_AUDIO_MANAGER::~Gui_AUDIO_MANAGER() @@ -65,14 +65,14 @@ Gui_AUDIO_MANAGER::~Gui_AUDIO_MANAGER() } #if 0 -void Gui_AUDIO_MANAGER::widgetDestroyed(QWidget *widget) +void Gui_AUDIO_MANAGER::widgetDestroyed(TQWidget *widget) { assert(widget == listview); listview = 0; } #endif -void Gui_AUDIO_MANAGER::setParent(QWidget *parent, QBoxLayout * /*layout*/) +void Gui_AUDIO_MANAGER::setParent(TQWidget *parent, TQBoxLayout * /*layout*/) { /************************************************************************ * From Gui_INSTRUMENT_MAPPER: @@ -90,8 +90,8 @@ void Gui_AUDIO_MANAGER::setParent(QWidget *parent, QBoxLayout * /*layout*/) * else would be appropriate. Check that. FIXME ************************************************************************/ - QVBoxLayout *mainlayout = new QVBoxLayout(parent); - /*QHBoxLayout *contentslayout = new QHBoxLayout;*/ + TQVBoxLayout *mainlayout = new TQVBoxLayout(parent); + /*TQHBoxLayout *contentslayout = new QHBoxLayout;*/ // list @@ -103,8 +103,8 @@ void Gui_AUDIO_MANAGER::setParent(QWidget *parent, QBoxLayout * /*layout*/) listview->setMinimumSize(300,100); - QObject::connect(listview,SIGNAL(executed(QListViewItem *)),proxy, - SLOT(edit(QListViewItem *))); + TQObject::connect(listview,TQT_SIGNAL(executed(TQListViewItem *)),proxy, + TQT_SLOT(edit(TQListViewItem *))); mainlayout->addWidget(listview); @@ -128,13 +128,13 @@ void Gui_AUDIO_MANAGER::tick() for(c=0;csize();c++) { //char status[2][10] = {"init","running"}; - QString description = QString::fromUtf8( (*acs)[c].title.c_str() ); - QString type; + TQString description = TQString::fromUtf8( (*acs)[c].title.c_str() ); + TQString type; if((*acs)[c].direction == Arts::amPlay) type = i18n("play"); else type = i18n("record"); - QString destination = QString::fromUtf8( (*acs)[c].destination.c_str() ); + TQString destination = TQString::fromUtf8( (*acs)[c].destination.c_str() ); long ID = (*acs)[c].ID; (void)new AudioManagerItem(listview, description, type, destination, ID); @@ -143,7 +143,7 @@ void Gui_AUDIO_MANAGER::tick() //Widget->show(); } -void Gui_AUDIO_MANAGER::edit(QListViewItem *item) +void Gui_AUDIO_MANAGER::edit(TQListViewItem *item) { AudioManagerItem *ai = (AudioManagerItem *)item; ChooseBusDlg *cd = new ChooseBusDlg(0); @@ -153,9 +153,9 @@ void Gui_AUDIO_MANAGER::edit(QListViewItem *item) int accept = cd->exec(); inDialog = false; - if( accept == QDialog::Accepted ) + if( accept == TQDialog::Accepted ) { - QString result = cd->result(); + TQString result = cd->result(); if(!result.isNull()) { //lukas: I hope UTF-8 is OK here... @@ -173,13 +173,13 @@ GuiAudioManagerProxy::GuiAudioManagerProxy(Gui_AUDIO_MANAGER *gim) this->gim = gim; } -void GuiAudioManagerProxy::edit(QListViewItem *item) +void GuiAudioManagerProxy::edit(TQListViewItem *item) { gim->edit(item); } -AudioManagerItem::AudioManagerItem(QListView *parent, QString a, - QString b, QString c, long ID) :QListViewItem(parent,a,b,c) +AudioManagerItem::AudioManagerItem(TQListView *parent, TQString a, + TQString b, TQString c, long ID) :TQListViewItem(parent,a,b,c) { _ID = ID; } diff --git a/arts/tools/audiomanager.h b/arts/tools/audiomanager.h index c8e00e4e..8b08184f 100644 --- a/arts/tools/audiomanager.h +++ b/arts/tools/audiomanager.h @@ -25,8 +25,8 @@ #define _AUDIOMANAGER_H_ #include -#include -#include +#include +#include #include "templateview.h" @@ -38,7 +38,7 @@ class Gui_AUDIO_MANAGER : public Template_ArtsView { Q_OBJECT protected: - QWidget *ParentWidget; + TQWidget *ParentWidget; KListView *listview; GuiAudioManagerProxy *proxy; Arts::AudioManager AudioManager; @@ -47,30 +47,30 @@ protected: unsigned long changes; int x,y; public: - Gui_AUDIO_MANAGER( QWidget* =0, const char* =0 ); + Gui_AUDIO_MANAGER( TQWidget* =0, const char* =0 ); ~Gui_AUDIO_MANAGER(); - void setParent(QWidget *Parent,QBoxLayout *layout); + void setParent(TQWidget *Parent,TQBoxLayout *layout); - void edit(QListViewItem *item); + void edit(TQListViewItem *item); public slots: void tick(); }; -class GuiAudioManagerProxy :public QObject { +class GuiAudioManagerProxy :public TQObject { Q_OBJECT Gui_AUDIO_MANAGER *gim; public: GuiAudioManagerProxy(Gui_AUDIO_MANAGER *gim); public slots: - void edit(QListViewItem *item); + void edit(TQListViewItem *item); }; -class AudioManagerItem : public QListViewItem { +class AudioManagerItem : public TQListViewItem { long _ID; public: - AudioManagerItem(QListView *parent, QString a, QString b, - QString c, long ID); + AudioManagerItem(TQListView *parent, TQString a, TQString b, + TQString c, long ID); ~AudioManagerItem(); long ID(); diff --git a/arts/tools/choosebusdlg.cpp b/arts/tools/choosebusdlg.cpp index ad6adeb8..cb005f4c 100644 --- a/arts/tools/choosebusdlg.cpp +++ b/arts/tools/choosebusdlg.cpp @@ -23,10 +23,10 @@ #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -38,26 +38,26 @@ using namespace std; -static void min_size(QWidget *w) { +static void min_size(TQWidget *w) { w->setMinimumSize(w->sizeHint()); } -ChooseBusDlg::ChooseBusDlg(QWidget *parent) +ChooseBusDlg::ChooseBusDlg(TQWidget *parent) : KDialog(parent,"X", TRUE) , _newbusitemindex( -1 ) { setCaption(i18n("Choose Bus")); - QVBoxLayout *mainlayout = new QVBoxLayout(this); + TQVBoxLayout *mainlayout = new TQVBoxLayout(this); // caption label: "Synthesis running..." mainlayout->addSpacing(5); - QLabel *captionlabel = new QLabel(this); - QFont labelfont(captionlabel->font()); + TQLabel *captionlabel = new TQLabel(this); + TQFont labelfont(captionlabel->font()); labelfont.setPointSize(labelfont.pointSize()*3/2); captionlabel->setFont(labelfont); - captionlabel->setText(QString(" ")+i18n("Available busses:")+QString(" ")); + captionlabel->setText(TQString(" ")+i18n("Available busses:")+TQString(" ")); captionlabel->setAlignment(AlignCenter); min_size(captionlabel); mainlayout->addWidget(captionlabel); @@ -73,7 +73,7 @@ ChooseBusDlg::ChooseBusDlg(QWidget *parent) // listwidget - listbox = new QListBox(this); + listbox = new TQListBox(this); listbox->setMinimumSize(300,200); Arts::AudioManager aman = Arts::Reference("global:Arts_AudioManager"); @@ -100,12 +100,12 @@ ChooseBusDlg::ChooseBusDlg(QWidget *parent) // new bus lineedit - QBoxLayout * layout2 = new QHBoxLayout( mainlayout ); + TQBoxLayout * layout2 = new TQHBoxLayout( mainlayout ); //mainlayout->addLayout( layout2 ); - QLabel * newbuslabel = new QLabel( i18n( "New bus:" ), this ); + TQLabel * newbuslabel = new TQLabel( i18n( "New bus:" ), this ); layout2->addWidget( newbuslabel ); lineedit = new KLineEdit( this ); - connect( lineedit, SIGNAL( textChanged( const QString & ) ), SLOT( textChanged( const QString & ) ) ); + connect( lineedit, TQT_SIGNAL( textChanged( const TQString & ) ), TQT_SLOT( textChanged( const TQString & ) ) ); layout2->addWidget( lineedit ); // hruler @@ -119,22 +119,22 @@ ChooseBusDlg::ChooseBusDlg(QWidget *parent) // buttons mainlayout->addSpacing(5); - QHBoxLayout *buttonlayout = new QHBoxLayout( mainlayout ); + TQHBoxLayout *buttonlayout = new TQHBoxLayout( mainlayout ); //mainlayout->addLayout(buttonlayout); mainlayout->addSpacing(5); buttonlayout->addSpacing(5); KButtonBox *bbox = new KButtonBox(this); - bbox->addButton(KStdGuiItem::help(), this, SLOT( help() )); + bbox->addButton(KStdGuiItem::help(), this, TQT_SLOT( help() )); bbox->addStretch(1); - QPushButton * okbutton = bbox->addButton(KStdGuiItem::ok()); + TQPushButton * okbutton = bbox->addButton(KStdGuiItem::ok()); okbutton->setDefault( true ); - connect( okbutton, SIGNAL( clicked() ), SLOT(accept() ) ); + connect( okbutton, TQT_SIGNAL( clicked() ), TQT_SLOT(accept() ) ); - QButton *cancelbutton = bbox->addButton(KStdGuiItem::cancel()); - connect( cancelbutton, SIGNAL( clicked() ), SLOT(reject() ) ); + TQButton *cancelbutton = bbox->addButton(KStdGuiItem::cancel()); + connect( cancelbutton, TQT_SIGNAL( clicked() ), TQT_SLOT(reject() ) ); bbox->layout(); @@ -144,7 +144,7 @@ ChooseBusDlg::ChooseBusDlg(QWidget *parent) mainlayout->freeze(); } -QString ChooseBusDlg::result() +TQString ChooseBusDlg::result() { if(listbox->currentItem() != -1) { @@ -158,7 +158,7 @@ void ChooseBusDlg::help() KApplication::kApplication()->invokeHelp("", "artsbuilder"); } -void ChooseBusDlg::textChanged( const QString & busname ) +void ChooseBusDlg::textChanged( const TQString & busname ) { if( ! busname.isEmpty() ) { diff --git a/arts/tools/choosebusdlg.h b/arts/tools/choosebusdlg.h index 320df6e3..252226bd 100644 --- a/arts/tools/choosebusdlg.h +++ b/arts/tools/choosebusdlg.h @@ -30,19 +30,19 @@ class QPushButton; class ChooseBusDlg :public KDialog { Q_OBJECT - QListBox *listbox; + TQListBox *listbox; KLineEdit * lineedit; int _newbusitemindex; public: - ChooseBusDlg(QWidget *parent); + ChooseBusDlg(TQWidget *parent); public slots: - QString result(); + TQString result(); void help(); protected slots: - void textChanged( const QString & ); + void textChanged( const TQString & ); }; #endif diff --git a/arts/tools/environmentview.cpp b/arts/tools/environmentview.cpp index 0b8a7457..9cedfed1 100644 --- a/arts/tools/environmentview.cpp +++ b/arts/tools/environmentview.cpp @@ -22,9 +22,9 @@ */ #include "environmentview.h" -#include -#include -#include +#include +#include +#include #include #include @@ -34,7 +34,7 @@ #include #include -#include +#include #define DEFAULT_ENV_FILENAME "~/default.arts-env" @@ -42,12 +42,12 @@ using namespace Arts; using Environment::Container; using Environment::Item; -class ItemView : public QListBoxText { +class ItemView : public TQListBoxText { public: Item item; KArtsWidget *widget; - ItemView(QListBox *listBox, Item item) - : QListBoxText(listBox), item(item), widget(0) + ItemView(TQListBox *listBox, Item item) + : TQListBoxText(listBox), item(item), widget(0) { } ~ItemView() @@ -56,44 +56,44 @@ public: widget = 0; printf("~ItemView()\n"); } - QString text() const { - return QString::fromLatin1(item._interfaceName().c_str()); + TQString text() const { + return TQString::fromLatin1(item._interfaceName().c_str()); } }; -EnvironmentView::EnvironmentView( Container container, QWidget* parent, const char* name ) : Template_ArtsView( parent,name ), container(container) +EnvironmentView::EnvironmentView( Container container, TQWidget* parent, const char* name ) : Template_ArtsView( parent,name ), container(container) { this->setCaption( i18n( "Environment" ) ); this->setIcon( MainBarIcon( "artsenvironment", 32 ) ); - QVBoxLayout* _layout = new QVBoxLayout( this ); + TQVBoxLayout* _layout = new TQVBoxLayout( this ); _layout->setAutoAdd( true ); defaultEnvFileName = DEFAULT_ENV_FILENAME; - defaultEnvFileName.replace('~', QDir::homeDirPath()); + defaultEnvFileName.replace('~', TQDir::homeDirPath()); listBox = new KListBox(this); update(); - connect(listBox,SIGNAL(executed(QListBoxItem*)), - this,SLOT(view(QListBoxItem*))); + connect(listBox,TQT_SIGNAL(executed(TQListBoxItem*)), + this,TQT_SLOT(view(TQListBoxItem*))); - QPushButton *mixerButton = new QPushButton(i18n("Add Mixer"), this); - connect(mixerButton, SIGNAL(clicked()), this, SLOT(addMixer())); + TQPushButton *mixerButton = new TQPushButton(i18n("Add Mixer"), this); + connect(mixerButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(addMixer())); - QPushButton *effectRackButton = new QPushButton(i18n("Add Effect Rack"), this); - connect(effectRackButton, SIGNAL(clicked()), this, SLOT(addEffectRack())); + TQPushButton *effectRackButton = new TQPushButton(i18n("Add Effect Rack"), this); + connect(effectRackButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(addEffectRack())); - QPushButton *delButton = new QPushButton(i18n("Delete Item"), this); - connect(delButton, SIGNAL(clicked()), this, SLOT(delItem())); + TQPushButton *delButton = new TQPushButton(i18n("Delete Item"), this); + connect(delButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(delItem())); - QPushButton *loadButton = new - QPushButton(i18n("Load %1").arg(DEFAULT_ENV_FILENAME), this); - connect(loadButton, SIGNAL(clicked()), this, SLOT(load())); + TQPushButton *loadButton = new + TQPushButton(i18n("Load %1").arg(DEFAULT_ENV_FILENAME), this); + connect(loadButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(load())); - QPushButton *saveButton = new - QPushButton(i18n("Save %1").arg(DEFAULT_ENV_FILENAME), this); - connect(saveButton, SIGNAL(clicked()), this, SLOT(save())); + TQPushButton *saveButton = new + TQPushButton(i18n("Save %1").arg(DEFAULT_ENV_FILENAME), this); + connect(saveButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(save())); show(); } -void EnvironmentView::view(QListBoxItem *i) +void EnvironmentView::view(TQListBoxItem *i) { ItemView *iv = static_cast(i); @@ -148,7 +148,7 @@ void EnvironmentView::update() void EnvironmentView::load() { - std::ifstream infile(QFile::encodeName(defaultEnvFileName).data()); + std::ifstream infile(TQFile::encodeName(defaultEnvFileName).data()); std::string line; std::vector strseq; @@ -163,7 +163,7 @@ void EnvironmentView::save() std::vector *strseq; strseq = defaultEnvironment().saveToList(); - std::ofstream outfile(QFile::encodeName(defaultEnvFileName).data()); + std::ofstream outfile(TQFile::encodeName(defaultEnvFileName).data()); for(std::vector::iterator i = strseq->begin(); i != strseq->end(); i++) outfile << ( *i ) << std::endl; delete strseq; diff --git a/arts/tools/environmentview.h b/arts/tools/environmentview.h index 7da8a240..351a5df0 100644 --- a/arts/tools/environmentview.h +++ b/arts/tools/environmentview.h @@ -36,13 +36,13 @@ class EnvironmentView : public Template_ArtsView { protected: Arts::Environment::Container container; KListBox *listBox; - QString defaultEnvFileName; + TQString defaultEnvFileName; public: - EnvironmentView( Arts::Environment::Container container, QWidget* =0, const char* =0 ); + EnvironmentView( Arts::Environment::Container container, TQWidget* =0, const char* =0 ); public slots: - void view(QListBoxItem *i); + void view(TQListBoxItem *i); void addMixer(); void addEffectRack(); void delItem(); diff --git a/arts/tools/fftscopeview.cpp b/arts/tools/fftscopeview.cpp index 20d9fb70..fcaa5304 100644 --- a/arts/tools/fftscopeview.cpp +++ b/arts/tools/fftscopeview.cpp @@ -22,9 +22,9 @@ #include "fftscopeview.h" -#include -#include -#include +#include +#include +#include #include #include #include @@ -37,7 +37,7 @@ using namespace std; using namespace Arts; -FFTScopeView::FFTScopeView( SimpleSoundServer server, QWidget* parent ) +FFTScopeView::FFTScopeView( SimpleSoundServer server, TQWidget* parent ) : Template_ArtsView( parent ) , server( server ) , scopeData( 0 ) @@ -59,7 +59,7 @@ kdDebug()<setAutoAdd( TRUE ); for ( unsigned int i=0;isize();i++ ) @@ -75,25 +75,25 @@ kdDebug()<activate(); show(); - updatetimer = new QTimer( this ); + updatetimer = new TQTimer( this ); updatetimer->start( 100 ); - connect( updatetimer,SIGNAL( timeout() ),this,SLOT( updateScope() ) ); + connect( updatetimer,TQT_SIGNAL( timeout() ),this,TQT_SLOT( updateScope() ) ); _artsactions = new ArtsActions( 0, 0, this ); - _moreBars = ArtsActions::actionMoreBars( this, SLOT( moreBars() ), 0 ); - _lessBars = ArtsActions::actionLessBars( this, SLOT( lessBars() ), 0 ); + _moreBars = ArtsActions::actionMoreBars( this, TQT_SLOT( moreBars() ), 0 ); + _lessBars = ArtsActions::actionLessBars( this, TQT_SLOT( lessBars() ), 0 ); _menu = new KPopupMenu( 0 ); _moreBars->plug( _menu ); _lessBars->plug( _menu ); - _substyle = new KAction( i18n( "Substyle" ), "", KShortcut(), this, SLOT( substyle() ), this ); + _substyle = new KAction( i18n( "Substyle" ), "", KShortcut(), this, TQT_SLOT( substyle() ), this ); _substyle->plug( _menu ); _menu->insertItem( i18n("VU-Style"), _artsactions->stylemenu() ); - connect( _artsactions, SIGNAL( styleNormal() ), this, SLOT( styleNormalBars() ) ); - connect( _artsactions, SIGNAL( styleFire() ), this, SLOT( styleFireBars() ) ); - connect( _artsactions, SIGNAL( styleLine() ), this, SLOT( styleLineBars() ) ); - connect( _artsactions, SIGNAL( styleLED() ), this, SLOT( styleLEDs() ) ); - connect( _artsactions, SIGNAL( styleAnalog() ), this, SLOT( styleAnalog() ) ); - connect( _artsactions, SIGNAL( styleSmall() ), this, SLOT( styleSmall() ) ); + connect( _artsactions, TQT_SIGNAL( styleNormal() ), this, TQT_SLOT( styleNormalBars() ) ); + connect( _artsactions, TQT_SIGNAL( styleFire() ), this, TQT_SLOT( styleFireBars() ) ); + connect( _artsactions, TQT_SIGNAL( styleLine() ), this, TQT_SLOT( styleLineBars() ) ); + connect( _artsactions, TQT_SIGNAL( styleLED() ), this, TQT_SLOT( styleLEDs() ) ); + connect( _artsactions, TQT_SIGNAL( styleAnalog() ), this, TQT_SLOT( styleAnalog() ) ); + connect( _artsactions, TQT_SIGNAL( styleSmall() ), this, TQT_SLOT( styleSmall() ) ); } FFTScopeView::~FFTScopeView() { @@ -121,9 +121,9 @@ void FFTScopeView::updateScope() { } } -void FFTScopeView::mousePressEvent( QMouseEvent* ev ) { +void FFTScopeView::mousePressEvent( TQMouseEvent* ev ) { if ( Qt::RightButton == ev->button() /*|| Qt::LeftButton == ev->button()*/ ) - _menu->exec( QCursor::pos() ); + _menu->exec( TQCursor::pos() ); } void FFTScopeView::moreBars() { diff --git a/arts/tools/fftscopeview.h b/arts/tools/fftscopeview.h index 504bec88..a6e14f57 100644 --- a/arts/tools/fftscopeview.h +++ b/arts/tools/fftscopeview.h @@ -49,7 +49,7 @@ protected: std::vector scopeDraw; std::vector scopeScales; std::vector aw; - QTimer *updatetimer; + TQTimer *updatetimer; ArtsActions* _artsactions; KPopupMenu *_menu, *_stylemenu; @@ -57,10 +57,10 @@ protected: KAction *_styleNormalBars, *_styleFireBars, *_styleLineBars, *_styleLEDs, *_styleAnalog, *_styleSmall; KAction *_substyle; - void mousePressEvent( QMouseEvent* ); + void mousePressEvent( TQMouseEvent* ); public: void updateScopeData(); - FFTScopeView( Arts::SimpleSoundServer server, QWidget* =0 ); + FFTScopeView( Arts::SimpleSoundServer server, TQWidget* =0 ); ~FFTScopeView(); public slots: diff --git a/arts/tools/levelmeters.cpp b/arts/tools/levelmeters.cpp index 3b2ca1ac..1d0b080c 100644 --- a/arts/tools/levelmeters.cpp +++ b/arts/tools/levelmeters.cpp @@ -1,13 +1,13 @@ -#include -#include -#include -#include +#include +#include +#include +#include #include #include "levelmeters.h" const int PeakBar::peakMillis=1500; -PeakBar::PeakBar(QWidget *parent) +PeakBar::PeakBar(TQWidget *parent) : ACLevelMeter(parent) , maxValue( 0.0f ) , minValue( 0.0f ) @@ -19,19 +19,19 @@ PeakBar::PeakBar(QWidget *parent) lastValues.setAutoDelete( TRUE ); - setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); - setSizePolicy(QSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred)); + setFrameStyle(TQFrame::StyledPanel | TQFrame::Sunken); + setSizePolicy(TQSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::Preferred)); setBackgroundMode(NoBackground); setMinimumSize(frameWidth()+7, 70); } void PeakBar::frameChanged() { setMinimumSize(frameWidth()+7, 70); - QFrame::frameChanged(); + TQFrame::frameChanged(); } -QSize PeakBar::sizeHint() const { - return QSize(13, 250); +TQSize PeakBar::sizeHint() const { + return TQSize(13, 250); } void PeakBar::checkMinMax() { @@ -47,7 +47,7 @@ void PeakBar::checkMinMax() { maxValue= 0.f; minValue= 1.f; clipped = false; - for (QPtrListIterator it(lastValues); it.current(); ++it) { + for (TQPtrListIterator it(lastValues); it.current(); ++it) { float value= it.current()->value; if (value>maxValue) maxValue= value; @@ -59,9 +59,9 @@ void PeakBar::checkMinMax() { } } -void PeakBar::drawContents(QPainter *p) +void PeakBar::drawContents(TQPainter *p) { - QRect size= contentsRect(); + TQRect size= contentsRect(); checkMinMax(); @@ -69,7 +69,7 @@ void PeakBar::drawContents(QPainter *p) p->setPen(NoPen); p->drawRect(size); - QRect bar= size; + TQRect bar= size; p->setBrush(clipped ? red : blue); if (horizontalMode) { bar.setWidth((int)(bar.width()*currentValue)); @@ -109,10 +109,10 @@ void PeakBar::setValue(float f) { // ------------------------------------------------------------- -PeakLevelMeters::PeakLevelMeters(QWidget *parent): +PeakLevelMeters::PeakLevelMeters(TQWidget *parent): StereoLevelMeter(parent), left(this), right(this), scaleView(this) { - QBoxLayout *layout= new QHBoxLayout(this); + TQBoxLayout *layout= new TQHBoxLayout(this); layout->addWidget(&left); // layout->setStretchFactor(&left, 0); layout->addWidget(&right); @@ -122,7 +122,7 @@ PeakLevelMeters::PeakLevelMeters(QWidget *parent): left.setLineWidth(2); right.setLineWidth(2); scaleView.setScaleMargins(right.frameWidth()); - setSizePolicy(QSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred)); + setSizePolicy(TQSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::Preferred)); setDbRange(36); } @@ -142,9 +142,9 @@ void PeakLevelMeters::setValues(float leftVal, float rightVal) { right.setValue(f); } -ScaleView::ScaleView(QWidget *parent): QFrame(parent) { +ScaleView::ScaleView(TQWidget *parent): TQFrame(parent) { font.setPixelSize(10); - setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred)); + setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Preferred)); } void ScaleView::setDbRange(int db) { @@ -152,16 +152,16 @@ void ScaleView::setDbRange(int db) { repaint(); } -QSize ScaleView::sizeHint() const { - return QSize(QFontMetrics(font).width("-88")+8, 250); +TQSize ScaleView::sizeHint() const { + return TQSize(TQFontMetrics(font).width("-88")+8, 250); } -void ScaleView::drawContents(QPainter *p) { - QRect size= contentsRect(); +void ScaleView::drawContents(TQPainter *p) { + TQRect size= contentsRect(); size.rTop()+= upperMargin; size.rBottom()-= lowerMargin; - QFrame::drawContents(p); // clear background + TQFrame::drawContents(p); // clear background int step=3; while (dbRange/step*20>size.height()) @@ -173,7 +173,7 @@ void ScaleView::drawContents(QPainter *p) { p->setPen(black); p->setFont(font); - QString numStr; + TQString numStr; for (int i=0; i<=dbRange; i++) { int y= size.top()+(size.height()-1)*i/dbRange; if (i%step==0) { @@ -187,12 +187,12 @@ void ScaleView::drawContents(QPainter *p) { // ------------------------------------------------------------- -LedMeter::LedMeter(QWidget *parent, bool blueState) : ACLevelMeter(parent) { +LedMeter::LedMeter(TQWidget *parent, bool blueState) : ACLevelMeter(parent) { setBackgroundColor(black); - QBoxLayout * l = new QVBoxLayout( this ); + TQBoxLayout * l = new TQVBoxLayout( this ); l->setAutoAdd(TRUE); for(int i=0;i<12;i++) { - QColor c; + TQColor c; if(blueState) c = blue; else { @@ -202,8 +202,8 @@ LedMeter::LedMeter(QWidget *parent, bool blueState) : ACLevelMeter(parent) { } // put each led in its own frame, since it seems to be broken - QFrame *lframe = new QFrame(this); - QBoxLayout *lfl = new QVBoxLayout( lframe ); + TQFrame *lframe = new TQFrame(this); + TQBoxLayout *lfl = new TQVBoxLayout( lframe ); lfl->setAutoAdd(TRUE); leds[i] = new KLed(c,KLed::Off, KLed::Sunken, KLed::Circular,lframe); @@ -223,10 +223,10 @@ void LedMeter::setValue(float f) // ------------------------------------------------------------- -StereoLedMeters::StereoLedMeters(QWidget *parent) +StereoLedMeters::StereoLedMeters(TQWidget *parent) : StereoLevelMeter(parent), left(this), right(this) { - QBoxLayout *layout= new QHBoxLayout(this); + TQBoxLayout *layout= new TQHBoxLayout(this); layout->addWidget(&left); layout->addWidget(&right); } diff --git a/arts/tools/levelmeters.h b/arts/tools/levelmeters.h index 14f8a1ff..638d0d9a 100644 --- a/arts/tools/levelmeters.h +++ b/arts/tools/levelmeters.h @@ -22,10 +22,10 @@ #ifndef ARTS_TOOLS_LEVELMETERS_H #define ARTS_TOOLS_LEVELMETERS_H -#include -#include -#include -#include +#include +#include +#include +#include #include // helper functions @@ -42,10 +42,10 @@ inline float DBToLevel(float db) { /** * Base class for a single volume / value bar. */ -class ACLevelMeter : public QFrame { +class ACLevelMeter : public TQFrame { Q_OBJECT public: - ACLevelMeter(QWidget *parent): QFrame(parent) {} + ACLevelMeter(TQWidget *parent): TQFrame(parent) {} public slots: virtual void setValue(float f) = 0; }; @@ -53,10 +53,10 @@ public slots: /** * Base class for a pair of volume / value bars. */ -class StereoLevelMeter : public QFrame { +class StereoLevelMeter : public TQFrame { Q_OBJECT public: - StereoLevelMeter(QWidget *parent): QFrame(parent) {} + StereoLevelMeter(TQWidget *parent): TQFrame(parent) {} public slots: virtual void setValues(float left, float right) = 0; }; @@ -74,11 +74,11 @@ protected: class Observation { public: - QTime time; + TQTime time; float value; Observation(float aValue): value(aValue) { time.start(); } }; - QPtrList lastValues; + TQPtrList lastValues; float currentValue, maxValue, minValue; void checkMinMax(); @@ -89,29 +89,29 @@ protected: void frameChanged(); public: - PeakBar(QWidget *parent); + PeakBar(TQWidget *parent); - QSize sizeHint() const; + TQSize sizeHint() const; - void drawContents(QPainter *p); + void drawContents(TQPainter *p); virtual void setValue(float f); }; /** * Special class which draws the Db scale with ticks, numbers and so on. */ -class ScaleView : public QFrame { +class ScaleView : public TQFrame { Q_OBJECT protected: - QFont font; + TQFont font; int dbRange; int upperMargin, lowerMargin; public: - ScaleView(QWidget *parent); + ScaleView(TQWidget *parent); void setDbRange(int db); void setScaleMargins(int margins) { upperMargin= margins; lowerMargin=margins; } - QSize sizeHint() const; - void drawContents(QPainter *p); + TQSize sizeHint() const; + void drawContents(TQPainter *p); }; /** @@ -127,7 +127,7 @@ protected: ScaleView scaleView; public: - PeakLevelMeters(QWidget *parent); + PeakLevelMeters(TQWidget *parent); public slots: void setValues(float leftVal, float rightVal); @@ -147,7 +147,7 @@ protected: KLed *leds[12]; public: - LedMeter(QWidget *parent, bool blueState = false); + LedMeter(TQWidget *parent, bool blueState = false); void setValue(float f); }; @@ -160,7 +160,7 @@ protected: LedMeter left, right; public: - StereoLedMeters(QWidget *parent); + StereoLedMeters(TQWidget *parent); public slots: void setValues(float left, float right); }; diff --git a/arts/tools/main.cpp b/arts/tools/main.cpp index 90674b30..60df8f1d 100644 --- a/arts/tools/main.cpp +++ b/arts/tools/main.cpp @@ -35,9 +35,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include #include @@ -51,7 +51,7 @@ using namespace std; using namespace Arts; -void FreeVerbView::closeEvent(QCloseEvent *e) { +void FreeVerbView::closeEvent(TQCloseEvent *e) { e->accept(); emit closed(); } @@ -67,11 +67,11 @@ FreeVerbView::FreeVerbView(SimpleSoundServer server) : server(server) { GenericGuiFactory factory; Widget gui = factory.createGui(freeverb); - QBoxLayout * l = new QHBoxLayout( this ); + TQBoxLayout * l = new TQHBoxLayout( this ); if(!gui.isNull()) l->add(new KArtsWidget(gui, this)); else - l->add(new QLabel(i18n("No GUI found for this effect."), this)); + l->add(new TQLabel(i18n("No GUI found for this effect."), this)); l->freeze(); show(); } @@ -82,18 +82,18 @@ FreeVerbView::~FreeVerbView() { } -VControl::VControl( KArtsServer* artsserver, QWidget *parent) : QFrame(parent) +VControl::VControl( KArtsServer* artsserver, TQWidget *parent) : TQFrame(parent) , freeVerbView(0) , server( artsserver ) { - connect( server, SIGNAL( restartedServer() ), this, SLOT( initaRtsConnections() ) ); + connect( server, TQT_SIGNAL( restartedServer() ), this, TQT_SLOT( initaRtsConnections() ) ); /* if(server.isNull()) { KMessageBox::error( 0, i18n("Connection to the soundserver failed - make sure that artsd is really running and that your kdelibs version is not older than kdemultimedia.")); exit(1); }*/ - boxLayout = new QHBoxLayout( this ); + boxLayout = new TQHBoxLayout( this ); // 0 => 4.0 // 200 => 2.0 @@ -136,7 +136,7 @@ void VControl::useOldVolumeBar(int old) { void VControl::showFreeVerbView() { if(!freeVerbView) { freeVerbView = new FreeVerbView(server->server()); - connect(freeVerbView,SIGNAL(closed()),this,SLOT(showFreeVerbView())); + connect(freeVerbView,TQT_SIGNAL(closed()),this,TQT_SLOT(showFreeVerbView())); } else { delete freeVerbView; freeVerbView = 0; @@ -160,7 +160,7 @@ void MainWindow::toggleVolumeBar() { MainWindow::MainWindow() : KMainWindow(0), kartsserver( new KArtsServer( this ) ) { kdDebug() << k_funcinfo << endl; - connect( kartsserver, SIGNAL( restartedServer() ), this, SLOT( serverRestarted() ) ); + connect( kartsserver, TQT_SIGNAL( restartedServer() ), this, TQT_SLOT( serverRestarted() ) ); vc = new VControl( kartsserver, this ); setCentralWidget( vc ); @@ -172,11 +172,11 @@ kdDebug() << k_funcinfo << endl; ( void ) artsactions->actionMidiManagerView(); ( void ) artsactions->actionEnvironmentView(); ( void ) artsactions->actionMediaTypesView(); - ( void ) new KAction( i18n("Toggle Free&Verb"), 0, vc, SLOT( showFreeVerbView() ), actionCollection(), "view_freeverb" ); + ( void ) new KAction( i18n("Toggle Free&Verb"), 0, vc, TQT_SLOT( showFreeVerbView() ), actionCollection(), "view_freeverb" ); showOldVolumeDisplay= new KToggleAction( i18n( "Old aRts-Control-Style for VU-Meter" /*"&LED-Style Volume Display"*/ ), 0, this, - SLOT( toggleVolumeBar() ), actionCollection(), "old_volume_display" ); - ( void ) KStdAction::quit( this, SLOT( close() ), actionCollection(), "quit_artscontrol" ); + TQT_SLOT( toggleVolumeBar() ), actionCollection(), "old_volume_display" ); + ( void ) KStdAction::quit( this, TQT_SLOT( close() ), actionCollection(), "quit_artscontrol" ); createGUI("artscontrol.rc"); resize(20,300); diff --git a/arts/tools/main.h b/arts/tools/main.h index 4e74d4af..2770b054 100644 --- a/arts/tools/main.h +++ b/arts/tools/main.h @@ -24,19 +24,19 @@ #define MAIN_H #include #include -#include +#include #include -#include +#include #include #include #include #include #include -#include -#include +#include +#include #include #include -#include +#include #include #include #include @@ -47,14 +47,14 @@ class PeakBar; class PeakLevelMeter; class VScale; -class FreeVerbView : public QWidget { +class FreeVerbView : public TQWidget { Q_OBJECT protected: Arts::Synth_FREEVERB freeverb; Arts::SimpleSoundServer server; long effectID; - void closeEvent(QCloseEvent *e); + void closeEvent(TQCloseEvent *e); public: FreeVerbView(Arts::SimpleSoundServer server); ~FreeVerbView(); @@ -64,7 +64,7 @@ signals: class KArtsWidget; -class VControl : public QFrame { +class VControl : public TQFrame { Q_OBJECT protected: class StereoLevelMeter *stereoMeter; @@ -74,10 +74,10 @@ protected: KArtsWidget *svcguiw; KArtsServer *server; - QBoxLayout *boxLayout; + TQBoxLayout *boxLayout; public: - VControl( KArtsServer*, QWidget *parent); + VControl( KArtsServer*, TQWidget *parent); ~VControl(); public slots: diff --git a/arts/tools/mediatypesview.cpp b/arts/tools/mediatypesview.cpp index 40d7984b..9353cda6 100644 --- a/arts/tools/mediatypesview.cpp +++ b/arts/tools/mediatypesview.cpp @@ -21,7 +21,7 @@ */ -#include +#include #include #include #include @@ -33,11 +33,11 @@ using namespace std; using namespace Arts; -MediaTypesView::MediaTypesView( QWidget* parent, const char* name ) : Template_ArtsView( parent,name ) +MediaTypesView::MediaTypesView( TQWidget* parent, const char* name ) : Template_ArtsView( parent,name ) { this->setCaption( i18n( "Available Media Types" ) ); this->setIcon( MainBarIcon( "artsmediatypes", 32 ) ); - QBoxLayout *l= new QHBoxLayout(this); + TQBoxLayout *l= new TQHBoxLayout(this); l->setAutoAdd(true); KListView *listView = new KListView(this); @@ -46,7 +46,7 @@ MediaTypesView::MediaTypesView( QWidget* parent, const char* name ) : Template_A Arts::TraderQuery q; std::vector *results = q.query(); std::map done; - QString str; + TQString str; for(std::vector::iterator i = results->begin(); i != results->end(); i++) { @@ -58,7 +58,7 @@ MediaTypesView::MediaTypesView( QWidget* parent, const char* name ) : Template_A continue; done[*it] = true; - (void) new QListViewItem(listView, (*it).c_str()); + (void) new TQListViewItem(listView, (*it).c_str()); } delete ext; } diff --git a/arts/tools/mediatypesview.h b/arts/tools/mediatypesview.h index 1e2500b3..e61338c6 100644 --- a/arts/tools/mediatypesview.h +++ b/arts/tools/mediatypesview.h @@ -29,7 +29,7 @@ class MediaTypesView : public Template_ArtsView { Q_OBJECT public: - MediaTypesView( QWidget* =0, const char* =0 ); + MediaTypesView( TQWidget* =0, const char* =0 ); ~MediaTypesView(); }; diff --git a/arts/tools/midiinstdlg.cpp b/arts/tools/midiinstdlg.cpp index 519d6b85..f606bbae 100644 --- a/arts/tools/midiinstdlg.cpp +++ b/arts/tools/midiinstdlg.cpp @@ -24,36 +24,36 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include -#include -#include +#include +#include #include -static QStringList getArtsPath() +static TQStringList getArtsPath() { - QStringList artsPath; - QString dir = locate("data", "artsbuilder/examples/"); + TQStringList artsPath; + TQString dir = locate("data", "artsbuilder/examples/"); artsPath += dir; - QString home = QDir::homeDirPath() + "/arts/structures/"; + TQString home = TQDir::homeDirPath() + "/arts/structures/"; artsPath += home; return artsPath; } -static QStringList listFiles(QString directory, QString extension) +static TQStringList listFiles(TQString directory, TQString extension) { - QStringList result; - QStringList artsPath = getArtsPath(); + TQStringList result; + TQStringList artsPath = getArtsPath(); - QStringList::Iterator it; + TQStringList::Iterator it; for ( it = artsPath.begin(); it != artsPath.end(); it++ ) { - QString pathname = *it + "/" + directory; - QDir dir(pathname, extension); + TQString pathname = *it + "/" + directory; + TQDir dir(pathname, extension); if (dir.exists()) { //kdDebug() << "found dir " << dir.absPath() << endl; result += dir.entryList(); @@ -63,19 +63,19 @@ static QStringList listFiles(QString directory, QString extension) return result; } -MidiInstDlg::MidiInstDlg(QWidget *parent) - :QDialog(parent,"instrument",TRUE) +MidiInstDlg::MidiInstDlg(TQWidget *parent) + :TQDialog(parent,"instrument",TRUE) { - QVBoxLayout *mainlayout = new QVBoxLayout(this); + TQVBoxLayout *mainlayout = new TQVBoxLayout(this); // caption label: title mainlayout->addSpacing(5); - QLabel *captionlabel = new QLabel(this); - QFont labelfont(captionlabel->font()); + TQLabel *captionlabel = new TQLabel(this); + TQFont labelfont(captionlabel->font()); labelfont.setPointSize(labelfont.pointSize()*3/2); captionlabel->setFont(labelfont); - captionlabel->setText(QString(" ")+i18n("Instrument")+QString(" ")); + captionlabel->setText(TQString(" ")+i18n("Instrument")+TQString(" ")); captionlabel->setAlignment(AlignCenter); //min_size(captionlabel); mainlayout->addWidget(captionlabel); @@ -89,13 +89,13 @@ MidiInstDlg::MidiInstDlg(QWidget *parent) // combobox - box = new QComboBox(this); + box = new TQComboBox(this); - QStringList instruments = listFiles(".","*.arts"); - QStringList::Iterator it; + TQStringList instruments = listFiles(".","*.arts"); + TQStringList::Iterator it; for ( it = instruments.begin(); it != instruments.end(); it++ ) { - QString modname = *it; - QString prefix = QString::fromLatin1("instrument_"); + TQString modname = *it; + TQString prefix = TQString::fromLatin1("instrument_"); if (modname.length() > 5) modname.truncate(modname.length()-5); // kill .arts extension if ( (modname.startsWith(prefix)) && (!modname.contains("_GUI")) ) @@ -104,11 +104,11 @@ MidiInstDlg::MidiInstDlg(QWidget *parent) } - QStringList maps = listFiles(".","*.arts-map"); + TQStringList maps = listFiles(".","*.arts-map"); for ( it = maps.begin(); it != maps.end(); it++ ) { - QString modname = *it; - QString prefix = QString::fromLatin1("instrument_"); + TQString modname = *it; + TQString prefix = TQString::fromLatin1("instrument_"); if (modname.length() > 9) modname.truncate(modname.length()-9); // kill .arts-map extension if (modname.startsWith(prefix)) @@ -127,7 +127,7 @@ MidiInstDlg::MidiInstDlg(QWidget *parent) // buttons - QHBoxLayout *buttonlayout = new QHBoxLayout; + TQHBoxLayout *buttonlayout = new QHBoxLayout; mainlayout->addSpacing(5); mainlayout->addLayout(buttonlayout); mainlayout->addSpacing(5); @@ -135,11 +135,11 @@ MidiInstDlg::MidiInstDlg(QWidget *parent) buttonlayout->addSpacing(5); KButtonBox *bbox = new KButtonBox(this); - bbox->addButton(KStdGuiItem::help(), this, SLOT( help() )); + bbox->addButton(KStdGuiItem::help(), this, TQT_SLOT( help() )); bbox->addStretch(1); - QButton *okbutton = bbox->addButton(KStdGuiItem::ok()); - connect( okbutton, SIGNAL( clicked() ), SLOT(accept() ) ); + TQButton *okbutton = bbox->addButton(KStdGuiItem::ok()); + connect( okbutton, TQT_SIGNAL( clicked() ), TQT_SLOT(accept() ) ); bbox->layout(); @@ -149,23 +149,23 @@ MidiInstDlg::MidiInstDlg(QWidget *parent) mainlayout->freeze(); } -QCString MidiInstDlg::filename() +TQCString MidiInstDlg::filename() { - QStringList artsPath = getArtsPath(); - QString instrument = box->currentText(); + TQStringList artsPath = getArtsPath(); + TQString instrument = box->currentText(); - QStringList::Iterator it; + TQStringList::Iterator it; for ( it = artsPath.begin(); it != artsPath.end(); it++ ) { - QString pathname = *it + QString::fromLatin1("/instrument_") + instrument + QString::fromLatin1(".arts"); - QFileInfo fi(pathname); + TQString pathname = *it + TQString::fromLatin1("/instrument_") + instrument + TQString::fromLatin1(".arts"); + TQFileInfo fi(pathname); if (fi.exists() && fi.isReadable()) - return QFile::encodeName(pathname); + return TQFile::encodeName(pathname); - pathname = *it + QString::fromLatin1("/instrument_") + instrument + QString::fromLatin1(".arts-map"); + pathname = *it + TQString::fromLatin1("/instrument_") + instrument + TQString::fromLatin1(".arts-map"); fi.setFile(pathname); if (fi.exists() && fi.isReadable()) - return QFile::encodeName(pathname); + return TQFile::encodeName(pathname); } return ""; diff --git a/arts/tools/midiinstdlg.h b/arts/tools/midiinstdlg.h index 45bf6b93..57735513 100644 --- a/arts/tools/midiinstdlg.h +++ b/arts/tools/midiinstdlg.h @@ -22,16 +22,16 @@ #ifndef ARTS_TOOLS_MIDIINSTDLG_H #define ARTS_TOOLS_MIDIINSTDLG_H -#include -#include -#include +#include +#include +#include -class MidiInstDlg :public QDialog { +class MidiInstDlg :public TQDialog { Q_OBJECT - QComboBox *box; + TQComboBox *box; public: - MidiInstDlg(QWidget *parent); - QCString filename(); + MidiInstDlg(TQWidget *parent); + TQCString filename(); public slots: void help(); }; diff --git a/arts/tools/midimanagerview.cpp b/arts/tools/midimanagerview.cpp index 6b40aad4..4849af78 100644 --- a/arts/tools/midimanagerview.cpp +++ b/arts/tools/midimanagerview.cpp @@ -27,10 +27,10 @@ #define protected public #include "midimanagerwidget.h" #undef protected -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include @@ -62,28 +62,28 @@ Arts::Environment::Container defaultEnvironment() return d; } -class MidiManagerItem : public QListBoxText { +class MidiManagerItem : public TQListBoxText { public: MidiClientInfo info; MidiManagerItem(const MidiClientInfo &info) :info(info) { } - QString text () const { - return QString::fromUtf8(info.title.c_str()); + TQString text () const { + return TQString::fromUtf8(info.title.c_str()); } }; -class ConnectionWidget : public QWidget { +class ConnectionWidget : public TQWidget { public: MidiManagerView *v; - ConnectionWidget(MidiManagerView *v, QWidget *parent) : QWidget(parent), v(v) + ConnectionWidget(MidiManagerView *v, TQWidget *parent) : TQWidget(parent), v(v) { } - void paintEvent(QPaintEvent * /*event*/) + void paintEvent(TQPaintEvent * /*event*/) { - QPainter painter; + TQPainter painter; painter.begin(this); // painter.fillRect(event->rect(),white); @@ -96,8 +96,8 @@ public: conn != item->info.connections.end(); conn++) { MidiManagerItem *outitem = v->itemMap[*conn]; - QRect r1 = v->widget->inputsListBox->itemRect(item); - QRect r2 = v->widget->outputsListBox->itemRect(outitem); + TQRect r1 = v->widget->inputsListBox->itemRect(item); + TQRect r2 = v->widget->outputsListBox->itemRect(outitem); if(r1.height() > 0 && r2.height() > 0) { @@ -113,23 +113,23 @@ public: MidiManagerView::MidiManagerView() : manager(Reference("global:Arts_MidiManager")) { - QTimer *updatetimer = new QTimer(this); + TQTimer *updatetimer = new TQTimer(this); updatetimer->start(5000); - connect(updatetimer,SIGNAL(timeout()),this,SLOT(updateLists())); + connect(updatetimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(updateLists())); widget = new MidiManagerWidget(this); setCentralWidget(widget); setCaption(i18n("MIDI Manager")); setIcon( MainBarIcon( "artsfftscope", 32 ) ); - (void)new KAction(i18n("&System MIDI Port (OSS)"), 0, this, SLOT(addOSSMidiPort()), + (void)new KAction(i18n("&System MIDI Port (OSS)"), 0, this, TQT_SLOT(addOSSMidiPort()), actionCollection(), "add_oss_midi_port"); (void)new KAction(i18n("&aRts Synthesis MIDI Output"), 0, this, - SLOT(addArtsMidiOutput()), actionCollection(), "add_arts_midi_output"); + TQT_SLOT(addArtsMidiOutput()), actionCollection(), "add_arts_midi_output"); - (void) KStdAction::quit( this, SLOT(close()), actionCollection()); - connect(widget->connectButton,SIGNAL(clicked()), this, SLOT(slotConnect())); - connect(widget->disconnectButton,SIGNAL(clicked()), this, SLOT(slotDisconnect())); + (void) KStdAction::quit( this, TQT_SLOT(close()), actionCollection()); + connect(widget->connectButton,TQT_SIGNAL(clicked()), this, TQT_SLOT(slotConnect())); + connect(widget->disconnectButton,TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDisconnect())); connectionWidget = new ConnectionWidget(this, widget->connectionFrame); connectionWidget->setMinimumSize(60,10); @@ -142,7 +142,7 @@ MidiManagerView::MidiManagerView() setIcon( MainBarIcon( "artsfftscope", 32 ) ); } -void MidiManagerView::closeEvent(QCloseEvent *e) +void MidiManagerView::closeEvent(TQCloseEvent *e) { e->accept(); emit closed(); @@ -168,7 +168,7 @@ void MidiManagerView::updateLists() widget->outputsListBox->clear(); for(i = clients->begin(); i != clients->end(); i++) { - QListBox *box; + TQListBox *box; if(i->direction == mcdPlay) box = widget->inputsListBox; else diff --git a/arts/tools/midimanagerview.h b/arts/tools/midimanagerview.h index 9a7b773e..546e1cef 100644 --- a/arts/tools/midimanagerview.h +++ b/arts/tools/midimanagerview.h @@ -46,7 +46,7 @@ protected: public: MidiManagerView(); - void closeEvent(QCloseEvent *e); + void closeEvent(TQCloseEvent *e); public slots: void updateLists(); void slotConnect(); diff --git a/arts/tools/midiportdlg.cpp b/arts/tools/midiportdlg.cpp index 2819d00a..8dd71d2b 100644 --- a/arts/tools/midiportdlg.cpp +++ b/arts/tools/midiportdlg.cpp @@ -23,24 +23,24 @@ #include #include -#include -#include +#include +#include #include #include -#include -#include -#include +#include +#include +#include #include -MidiPortDlg::MidiPortDlg(QWidget *parent, const char *oldname, const char *title) :QDialog(parent,title,TRUE) +MidiPortDlg::MidiPortDlg(TQWidget *parent, const char *oldname, const char *title) :TQDialog(parent,title,TRUE) { - QVBoxLayout *mainlayout = new QVBoxLayout(this); + TQVBoxLayout *mainlayout = new TQVBoxLayout(this); // caption label: title mainlayout->addSpacing(5); - QLabel *captionlabel = new QLabel(this); - QFont labelfont(captionlabel->font()); + TQLabel *captionlabel = new TQLabel(this); + TQFont labelfont(captionlabel->font()); labelfont.setPointSize(labelfont.pointSize()*3/2); captionlabel->setFont(labelfont); captionlabel->setText(i18n("OSS MIDI Port")); @@ -57,7 +57,7 @@ MidiPortDlg::MidiPortDlg(QWidget *parent, const char *oldname, const char *title // editwidget - edit = new QLineEdit(this); + edit = new TQLineEdit(this); edit->setText(oldname); //min_size(edit); @@ -72,7 +72,7 @@ MidiPortDlg::MidiPortDlg(QWidget *parent, const char *oldname, const char *title // buttons - QHBoxLayout *buttonlayout = new QHBoxLayout; + TQHBoxLayout *buttonlayout = new QHBoxLayout; mainlayout->addSpacing(5); mainlayout->addLayout(buttonlayout); mainlayout->addSpacing(5); @@ -80,13 +80,13 @@ MidiPortDlg::MidiPortDlg(QWidget *parent, const char *oldname, const char *title buttonlayout->addSpacing(5); KButtonBox *bbox = new KButtonBox(this); - QPushButton *helpbutton = bbox->addButton(KStdGuiItem::help(), this, SLOT( help() )); + TQPushButton *helpbutton = bbox->addButton(KStdGuiItem::help(), this, TQT_SLOT( help() )); bbox->addStretch(1); helpbutton->setAutoDefault( true ); helpbutton->setDefault( true ); - QPushButton *okbutton = bbox->addButton(KStdGuiItem::ok()); - connect( okbutton, SIGNAL( clicked() ), SLOT(accept() ) ); + TQPushButton *okbutton = bbox->addButton(KStdGuiItem::ok()); + connect( okbutton, TQT_SIGNAL( clicked() ), TQT_SLOT(accept() ) ); okbutton->setAutoDefault( true ); okbutton->setDefault( true ); diff --git a/arts/tools/midiportdlg.h b/arts/tools/midiportdlg.h index ac616f84..8992776b 100644 --- a/arts/tools/midiportdlg.h +++ b/arts/tools/midiportdlg.h @@ -22,18 +22,18 @@ #ifndef ARTS_TOOLS_MIDIPORTDLG_H #define ARTS_TOOLS_MIDIPORTDLG_H -#include -#include -#include -#include -#include -#include - -class MidiPortDlg :public QDialog { +#include +#include +#include +#include +#include +#include + +class MidiPortDlg :public TQDialog { Q_OBJECT - QLineEdit *edit; + TQLineEdit *edit; public: - MidiPortDlg(QWidget *parent, const char *device, const char *title); + MidiPortDlg(TQWidget *parent, const char *device, const char *title); const char *device(); public slots: diff --git a/arts/tools/statusview.cpp b/arts/tools/statusview.cpp index 7c1454e1..c29cf4ed 100644 --- a/arts/tools/statusview.cpp +++ b/arts/tools/statusview.cpp @@ -21,28 +21,28 @@ */ -#include +#include #include -#include -#include -#include -#include +#include +#include +#include +#include #include "statusview.h" using namespace std; using namespace Arts; -ArtsStatusView::ArtsStatusView(Arts::SoundServer a_server, QWidget* parent, const char* name ) +ArtsStatusView::ArtsStatusView(Arts::SoundServer a_server, TQWidget* parent, const char* name ) : Template_ArtsView( parent,name ) , server(a_server) { this->setCaption( i18n( "aRts Status" ) ); - QBoxLayout *l= new QVBoxLayout(this); + TQBoxLayout *l= new TQVBoxLayout(this); //l->setAutoAdd(TRUE); RealtimeStatus rs= server.realtimeStatus(); - l->addWidget(new QLabel(rs==rtRealtime? + l->addWidget(new TQLabel(rs==rtRealtime? i18n("Artsd is running with realtime scheduling."): rs==rtNoSupport? i18n("Your system does not support realtime scheduling."): @@ -54,19 +54,19 @@ ArtsStatusView::ArtsStatusView(Arts::SoundServer a_server, QWidget* parent, cons this, "realtimeLabel")); l->addSpacing(10); - suspendLabel= new QLabel(i18n("Determining suspend status..."), + suspendLabel= new TQLabel(i18n("Determining suspend status..."), this, "suspendLabel"); l->addWidget(suspendLabel); l->addSpacing(6); l->setMargin(6); - suspendButton= new QPushButton(this, "suspendButton"); + suspendButton= new TQPushButton(this, "suspendButton"); suspendButton->setText(i18n("&Suspend Now")); l->addWidget(suspendButton); - connect(suspendButton, SIGNAL(clicked()), this, SLOT(suspendButtonClicked())); + connect(suspendButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(suspendButtonClicked())); - artsPollStatusTimer= new QTimer(this); - connect(artsPollStatusTimer, SIGNAL(timeout()), this, SLOT(updateStatus())); + artsPollStatusTimer= new TQTimer(this); + connect(artsPollStatusTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(updateStatus())); artsPollStatusTimer->start(1000); //l->activate(); show(); diff --git a/arts/tools/statusview.h b/arts/tools/statusview.h index 7fa17357..e1f167ab 100644 --- a/arts/tools/statusview.h +++ b/arts/tools/statusview.h @@ -24,7 +24,7 @@ #ifndef STATUSVIEW_H #define STATUSVIEW_H -#include +#include #include #include "templateview.h" @@ -36,17 +36,17 @@ class QLabel; class ArtsStatusView : public Template_ArtsView { Q_OBJECT public: - ArtsStatusView(Arts::SoundServer server, QWidget* =0, const char* =0 ); + ArtsStatusView(Arts::SoundServer server, TQWidget* =0, const char* =0 ); public slots: void updateStatus(); void suspendButtonClicked(); protected: - QTimer *artsPollStatusTimer; + TQTimer *artsPollStatusTimer; Arts::SoundServer server; - QLabel *suspendLabel; - QButton *suspendButton; + TQLabel *suspendLabel; + TQButton *suspendButton; }; #endif diff --git a/arts/tools/templateview.cpp b/arts/tools/templateview.cpp index 6f5a5fd6..a589ff46 100644 --- a/arts/tools/templateview.cpp +++ b/arts/tools/templateview.cpp @@ -22,7 +22,7 @@ //#include -Template_ArtsView::Template_ArtsView( QWidget* parent, const char* name ) : QFrame( parent,name ){ +Template_ArtsView::Template_ArtsView( TQWidget* parent, const char* name ) : TQFrame( parent,name ){ //kdDebug()<accept(); emit closed(); diff --git a/arts/tools/templateview.h b/arts/tools/templateview.h index a3badea8..efdd35f4 100644 --- a/arts/tools/templateview.h +++ b/arts/tools/templateview.h @@ -22,16 +22,16 @@ #define ARTS_TEMPLATEVIEW_H //#include -#include +#include class Template_ArtsView : public QFrame { Q_OBJECT public: - Template_ArtsView( QWidget* =0, const char* =0 ); + Template_ArtsView( TQWidget* =0, const char* =0 ); ~Template_ArtsView(); - void closeEvent( QCloseEvent* ); + void closeEvent( TQCloseEvent* ); signals: void closed(); }; diff --git a/juk/actioncollection.cpp b/juk/actioncollection.cpp index 2ba64474..6290d6ee 100644 --- a/juk/actioncollection.cpp +++ b/juk/actioncollection.cpp @@ -23,7 +23,7 @@ namespace ActionCollection KActionCollection *actions() { static KActionCollection *a = - new KActionCollection(static_cast(0), "JuK Action Collection"); + new KActionCollection(static_cast(0), "JuK Action Collection"); return a; } diff --git a/juk/advancedsearchdialog.cpp b/juk/advancedsearchdialog.cpp index 4b5f2dbb..711c1275 100644 --- a/juk/advancedsearchdialog.cpp +++ b/juk/advancedsearchdialog.cpp @@ -18,13 +18,13 @@ #include #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include "collectionlist.h" #include "advancedsearchdialog.h" @@ -34,28 +34,28 @@ // public methods //////////////////////////////////////////////////////////////////////////////// -AdvancedSearchDialog::AdvancedSearchDialog(const QString &defaultName, +AdvancedSearchDialog::AdvancedSearchDialog(const TQString &defaultName, const PlaylistSearch &defaultSearch, - QWidget *parent, + TQWidget *parent, const char *name) : KDialogBase(parent, name, true, i18n("Create Search Playlist"), Ok|Cancel) { makeVBoxMainWidget(); - QHBox *box = new QHBox(mainWidget()); + TQHBox *box = new TQHBox(mainWidget()); box->setSpacing(5); - new QLabel(i18n("Playlist name:"), box); + new TQLabel(i18n("Playlist name:"), box); m_playlistNameLineEdit = new KLineEdit(defaultName, box); - QVGroupBox *criteriaGroupBox = new QVGroupBox(i18n("Search Criteria"), mainWidget()); - static_cast(mainWidget())->setStretchFactor(criteriaGroupBox, 1); + TQVGroupBox *criteriaGroupBox = new TQVGroupBox(i18n("Search Criteria"), mainWidget()); + static_cast(mainWidget())->setStretchFactor(criteriaGroupBox, 1); - QHButtonGroup *group = new QHButtonGroup(criteriaGroupBox); - m_matchAnyButton = new QRadioButton(i18n("Match any of the following"), group); - m_matchAllButton = new QRadioButton(i18n("Match all of the following"), group); + TQHButtonGroup *group = new TQHButtonGroup(criteriaGroupBox); + m_matchAnyButton = new TQRadioButton(i18n("Match any of the following"), group); + m_matchAllButton = new TQRadioButton(i18n("Match all of the following"), group); - m_criteria = new QVBox(criteriaGroupBox); + m_criteria = new TQVBox(criteriaGroupBox); if(defaultSearch.isNull()) { m_searchLines.append(new SearchLine(m_criteria)); @@ -78,21 +78,21 @@ AdvancedSearchDialog::AdvancedSearchDialog(const QString &defaultName, m_matchAllButton->setChecked(true); } - QWidget *buttons = new QWidget(criteriaGroupBox); - QBoxLayout *l = new QHBoxLayout(buttons, 0, 5); + TQWidget *buttons = new TQWidget(criteriaGroupBox); + TQBoxLayout *l = new TQHBoxLayout(buttons, 0, 5); KPushButton *clearButton = new KPushButton(KStdGuiItem::clear(), buttons); - connect(clearButton, SIGNAL(clicked()), SLOT(clear())); + connect(clearButton, TQT_SIGNAL(clicked()), TQT_SLOT(clear())); l->addWidget(clearButton); l->addStretch(1); m_moreButton = new KPushButton(i18n("More"), buttons); - connect(m_moreButton, SIGNAL(clicked()), SLOT(more())); + connect(m_moreButton, TQT_SIGNAL(clicked()), TQT_SLOT(more())); l->addWidget(m_moreButton); m_fewerButton = new KPushButton(i18n("Fewer"), buttons); - connect(m_fewerButton, SIGNAL(clicked()), SLOT(fewer())); + connect(m_fewerButton, TQT_SIGNAL(clicked()), TQT_SLOT(fewer())); l->addWidget(m_fewerButton); m_playlistNameLineEdit->setFocus(); @@ -127,7 +127,7 @@ void AdvancedSearchDialog::accept() m_search.addPlaylist(CollectionList::instance()); - QValueListConstIterator it = m_searchLines.begin(); + TQValueListConstIterator it = m_searchLines.begin(); for(; it != m_searchLines.end(); ++it) m_search.addComponent((*it)->searchComponent()); @@ -141,7 +141,7 @@ void AdvancedSearchDialog::accept() void AdvancedSearchDialog::clear() { - QValueListConstIterator it = m_searchLines.begin(); + TQValueListConstIterator it = m_searchLines.begin(); for(; it != m_searchLines.end(); ++it) (*it)->clear(); } diff --git a/juk/advancedsearchdialog.h b/juk/advancedsearchdialog.h index 03280d19..3cfb7163 100644 --- a/juk/advancedsearchdialog.h +++ b/juk/advancedsearchdialog.h @@ -33,12 +33,12 @@ public: { DialogCode result; PlaylistSearch search; - QString playlistName; + TQString playlistName; }; - AdvancedSearchDialog(const QString &defaultName, + AdvancedSearchDialog(const TQString &defaultName, const PlaylistSearch &defaultSearch = PlaylistSearch(), - QWidget *parent = 0, + TQWidget *parent = 0, const char *name = 0); virtual ~AdvancedSearchDialog(); @@ -55,13 +55,13 @@ protected slots: private: void updateButtons(); - QWidget *m_criteria; + TQWidget *m_criteria; PlaylistSearch m_search; - QString m_playlistName; - QValueList m_searchLines; + TQString m_playlistName; + TQValueList m_searchLines; KLineEdit *m_playlistNameLineEdit; - QRadioButton *m_matchAnyButton; - QRadioButton *m_matchAllButton; + TQRadioButton *m_matchAnyButton; + TQRadioButton *m_matchAllButton; KPushButton *m_moreButton; KPushButton *m_fewerButton; }; diff --git a/juk/akodeplayer.cpp b/juk/akodeplayer.cpp index 0d75d830..89b0c094 100644 --- a/juk/akodeplayer.cpp +++ b/juk/akodeplayer.cpp @@ -18,7 +18,7 @@ #include -#include +#include #include #include @@ -53,7 +53,7 @@ void aKodePlayer::play(const FileHandle &file) return; } - QString filename = file.absFilePath(); + TQString filename = file.absFilePath(); kdDebug( 65432 ) << "Opening: " << filename << endl; diff --git a/juk/akodeplayer.h b/juk/akodeplayer.h index 6b44f2fd..07181ba5 100644 --- a/juk/akodeplayer.h +++ b/juk/akodeplayer.h @@ -20,7 +20,7 @@ #ifdef HAVE_AKODE -#include +#include #include "player.h" #include diff --git a/juk/artsplayer.cpp b/juk/artsplayer.cpp index 410a6356..4022b0f1 100644 --- a/juk/artsplayer.cpp +++ b/juk/artsplayer.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include @@ -84,7 +84,7 @@ void ArtsPlayer::play(const FileHandle &file) m_playobject = m_factory->createPlayObject(m_currentURL, false); if(m_playobject->object().isNull()) - connect(m_playobject, SIGNAL(playObjectCreated()), SLOT(playObjectCreated())); + connect(m_playobject, TQT_SIGNAL(playObjectCreated()), TQT_SLOT(playObjectCreated())); else playObjectCreated(); } @@ -251,7 +251,7 @@ void ArtsPlayer::setupPlayer() m_dispatcher = new KArtsDispatcher; m_server = new KArtsServer; setupArtsObjects(); - connect(m_server, SIGNAL(restartedServer()), SLOT(setupArtsObjects())); + connect(m_server, TQT_SIGNAL(restartedServer()), TQT_SLOT(setupArtsObjects())); } void ArtsPlayer::setupVolumeControl() diff --git a/juk/artsplayer.h b/juk/artsplayer.h index 2c1306e1..73601b33 100644 --- a/juk/artsplayer.h +++ b/juk/artsplayer.h @@ -27,8 +27,8 @@ #include -#include -#include +#include +#include #include class KArtsDispatcher; diff --git a/juk/cache.cpp b/juk/cache.cpp index 3f37ee4a..ada9334b 100644 --- a/juk/cache.cpp +++ b/juk/cache.cpp @@ -20,8 +20,8 @@ #include #include -#include -#include +#include +#include #include "cache.h" #include "tag.h" @@ -66,23 +66,23 @@ Cache *Cache::instance() void Cache::save() { - QString dirName = KGlobal::dirs()->saveLocation("appdata"); - QString cacheFileName = dirName + "cache.new"; + TQString dirName = KGlobal::dirs()->saveLocation("appdata"); + TQString cacheFileName = dirName + "cache.new"; - QFile f(cacheFileName); + TQFile f(cacheFileName); if(!f.open(IO_WriteOnly)) return; - QByteArray data; - QDataStream s(data, IO_WriteOnly); + TQByteArray data; + TQDataStream s(data, IO_WriteOnly); for(Iterator it = begin(); it != end(); ++it) { s << (*it).absFilePath(); s << *it; } - QDataStream fs(&f); + TQDataStream fs(&f); Q_INT32 checksum = qChecksum(data.data(), data.size()); @@ -92,19 +92,19 @@ void Cache::save() f.close(); - QDir(dirName).rename("cache.new", "cache"); + TQDir(dirName).rename("cache.new", "cache"); } void Cache::loadPlaylists(PlaylistCollection *collection) // static { - QString playlistsFile = KGlobal::dirs()->saveLocation("appdata") + "playlists"; + TQString playlistsFile = KGlobal::dirs()->saveLocation("appdata") + "playlists"; - QFile f(playlistsFile); + TQFile f(playlistsFile); if(!f.open(IO_ReadOnly)) return; - QDataStream fs(&f); + TQDataStream fs(&f); Q_INT32 version; fs >> version; @@ -116,7 +116,7 @@ void Cache::loadPlaylists(PlaylistCollection *collection) // static // Our checksum is only for the values after the version and checksum so // we want to get a byte array with just the checksummed data. - QByteArray data; + TQByteArray data; Q_UINT16 checksum; fs >> checksum >> data; @@ -125,7 +125,7 @@ void Cache::loadPlaylists(PlaylistCollection *collection) // static // Create a new stream just based on the data. - QDataStream s(data, IO_ReadOnly); + TQDataStream s(data, IO_ReadOnly); while(!s.atEnd()) { @@ -204,15 +204,15 @@ void Cache::loadPlaylists(PlaylistCollection *collection) // static void Cache::savePlaylists(const PlaylistList &playlists) { - QString dirName = KGlobal::dirs()->saveLocation("appdata"); - QString playlistsFile = dirName + "playlists.new"; - QFile f(playlistsFile); + TQString dirName = KGlobal::dirs()->saveLocation("appdata"); + TQString playlistsFile = dirName + "playlists.new"; + TQFile f(playlistsFile); if(!f.open(IO_WriteOnly)) return; - QByteArray data; - QDataStream s(data, IO_WriteOnly); + TQByteArray data; + TQDataStream s(data, IO_WriteOnly); for(PlaylistList::ConstIterator it = playlists.begin(); it != playlists.end(); ++it) { if(*it) { @@ -242,19 +242,19 @@ void Cache::savePlaylists(const PlaylistList &playlists) } } - QDataStream fs(&f); + TQDataStream fs(&f); fs << Q_INT32(playlistCacheVersion); fs << qChecksum(data.data(), data.size()); fs << data; f.close(); - QDir(dirName).rename("playlists.new", "playlists"); + TQDir(dirName).rename("playlists.new", "playlists"); } bool Cache::cacheFileExists() // static { - return QFile::exists(KGlobal::dirs()->saveLocation("appdata") + "cache"); + return TQFile::exists(KGlobal::dirs()->saveLocation("appdata") + "cache"); } //////////////////////////////////////////////////////////////////////////////// @@ -268,9 +268,9 @@ Cache::Cache() : FileHandleHash() void Cache::load() { - QString cacheFileName = KGlobal::dirs()->saveLocation("appdata") + "cache"; + TQString cacheFileName = KGlobal::dirs()->saveLocation("appdata") + "cache"; - QFile f(cacheFileName); + TQFile f(cacheFileName); if(!f.open(IO_ReadOnly)) return; @@ -280,7 +280,7 @@ void Cache::load() Q_INT32 version; s >> version; - QBuffer buffer; + TQBuffer buffer; // Do the version specific stuff. @@ -289,7 +289,7 @@ void Cache::load() s.setCacheVersion(1); Q_INT32 checksum; - QByteArray data; + TQByteArray data; s >> checksum >> data; @@ -314,7 +314,7 @@ void Cache::load() // Read the cached tags. while(!s.atEnd()) { - QString fileName; + TQString fileName; s >> fileName; fileName.squeeze(); diff --git a/juk/cache.h b/juk/cache.h index 09f6906d..6d67f1fd 100644 --- a/juk/cache.h +++ b/juk/cache.h @@ -23,7 +23,7 @@ class Tag; class Playlist; class PlaylistCollection; -typedef QValueList PlaylistList; +typedef TQValueList PlaylistList; class Cache : public FileHandleHash { @@ -45,15 +45,15 @@ private: }; /** - * A simple QDataStream subclass that has an extra field to indicate the cache + * A simple TQDataStream subclass that has an extra field to indicate the cache * version. */ class CacheDataStream : public QDataStream { public: - CacheDataStream(QIODevice *d) : QDataStream(d), m_cacheVersion(0) {} - CacheDataStream(QByteArray a, int mode) : QDataStream(a, mode), m_cacheVersion(0) {} + CacheDataStream(TQIODevice *d) : TQDataStream(d), m_cacheVersion(0) {} + CacheDataStream(TQByteArray a, int mode) : TQDataStream(a, mode), m_cacheVersion(0) {} virtual ~CacheDataStream() {} diff --git a/juk/categoryreaderinterface.cpp b/juk/categoryreaderinterface.cpp index f9f73103..3844fc21 100644 --- a/juk/categoryreaderinterface.cpp +++ b/juk/categoryreaderinterface.cpp @@ -13,14 +13,14 @@ * * ***************************************************************************/ -#include +#include #include "filerenameroptions.h" #include "categoryreaderinterface.h" -QString CategoryReaderInterface::value(const CategoryID &category) const +TQString CategoryReaderInterface::value(const CategoryID &category) const { - QString value = categoryValue(category.category).stripWhiteSpace(); + TQString value = categoryValue(category.category).stripWhiteSpace(); if(category.category == Track) value = fixupTrack(value, category.categoryNumber).stripWhiteSpace(); @@ -41,22 +41,22 @@ bool CategoryReaderInterface::isEmpty(TagType category) const return categoryValue(category).isEmpty(); } -QString CategoryReaderInterface::fixupTrack(const QString &track, unsigned categoryNum) const +TQString CategoryReaderInterface::fixupTrack(const TQString &track, unsigned categoryNum) const { - QString str(track); + TQString str(track); CategoryID trackId(Track, categoryNum); if(track == "0") { if(emptyAction(trackId) == TagRenamerOptions::UseReplacementValue) str = emptyText(trackId); else - return QString::null; + return TQString::null; } unsigned minimumWidth = trackWidth(categoryNum); if(str.length() < minimumWidth) { - QString prefix; + TQString prefix; prefix.fill('0', minimumWidth - str.length()); return prefix + str; } diff --git a/juk/categoryreaderinterface.h b/juk/categoryreaderinterface.h index 5d2dfd0f..2b037c1a 100644 --- a/juk/categoryreaderinterface.h +++ b/juk/categoryreaderinterface.h @@ -43,7 +43,7 @@ public: * @param type, The category to retrieve the value of. * @return textual representation of that category's value. */ - virtual QString categoryValue(TagType type) const = 0; + virtual TQString categoryValue(TagType type) const = 0; /** * Returns the user-specified prefix string for \p category. @@ -51,7 +51,7 @@ public: * @param category the category to retrieve the value for. * @return user-specified prefix string for \p category. */ - virtual QString prefix(const CategoryID &category) const = 0; + virtual TQString prefix(const CategoryID &category) const = 0; /** * Returns the user-specified suffix string for \p category. @@ -59,7 +59,7 @@ public: * @param category the category to retrieve the value for. * @return user-specified suffix string for \p category. */ - virtual QString suffix(const CategoryID &category) const = 0; + virtual TQString suffix(const CategoryID &category) const = 0; /** * Returns the user-specified empty action for \p category. @@ -76,14 +76,14 @@ public: * @param category the category to retrieve the value for. * @return the user-specified empty text for \p category. */ - virtual QString emptyText(const CategoryID &category) const = 0; + virtual TQString emptyText(const CategoryID &category) const = 0; /** * @return the categories in the order the user has chosen. Categories may * be repeated (which is why CategoryID has the categoryNumber value to * disambiguate duplicates). */ - virtual QValueList categoryOrder() const = 0; + virtual TQValueList categoryOrder() const = 0; /** * @return track width for the Track item identified by categoryNum. @@ -91,11 +91,11 @@ public: virtual int trackWidth(unsigned categoryNum) const = 0; // You probably shouldn't reimplement this - virtual QString value(const CategoryID &category) const; + virtual TQString value(const CategoryID &category) const; - virtual QString separator() const = 0; + virtual TQString separator() const = 0; - virtual QString musicFolder() const = 0; + virtual TQString musicFolder() const = 0; /** * @param index the zero-based index of the item just before the @@ -114,7 +114,7 @@ public: virtual bool isEmpty(TagType category) const; // You probably shouldn't reimplement this - virtual QString fixupTrack(const QString &track, unsigned categoryNum) const; + virtual TQString fixupTrack(const TQString &track, unsigned categoryNum) const; }; #endif /* JUK_CATEGORYREADERINTERFACE_H */ diff --git a/juk/collectionlist.cpp b/juk/collectionlist.cpp index 9540be85..5c06049a 100644 --- a/juk/collectionlist.cpp +++ b/juk/collectionlist.cpp @@ -85,7 +85,7 @@ void CollectionList::initialize(PlaylistCollection *collection) // public methods //////////////////////////////////////////////////////////////////////////////// -PlaylistItem *CollectionList::createItem(const FileHandle &file, QListViewItem *, bool) +PlaylistItem *CollectionList::createItem(const FileHandle &file, TQListViewItem *, bool) { // It's probably possible to optimize the line below away, but, well, right // now it's more important to not load duplicate items. @@ -125,13 +125,13 @@ void CollectionList::setupTreeViewEntries(ViewMode *viewMode) const return; } - QValueList columnList; + TQValueList columnList; columnList << PlaylistItem::ArtistColumn; columnList << PlaylistItem::GenreColumn; columnList << PlaylistItem::AlbumColumn; - QStringList items; - for(QValueList::Iterator colIt = columnList.begin(); colIt != columnList.end(); ++colIt) { + TQStringList items; + for(TQValueList::Iterator colIt = columnList.begin(); colIt != columnList.end(); ++colIt) { items.clear(); for(TagCountDictIterator it(*m_columnTags[*colIt]); it.current(); ++it) items << it.currentKey(); @@ -142,7 +142,7 @@ void CollectionList::setupTreeViewEntries(ViewMode *viewMode) const void CollectionList::slotNewItems(const KFileItemList &items) { - QStringList files; + TQStringList files; for(KFileItemListIterator it(items); it.current(); ++it) files.append((*it)->url().path()); @@ -200,7 +200,7 @@ void CollectionList::slotCheckCache() { PlaylistItemList invalidItems; - for(QDictIteratorit(m_itemsDict); it.current(); ++it) { + for(TQDictIteratorit(m_itemsDict); it.current(); ++it) { if(!it.current()->checkCurrent()) invalidItems.append(*it); processEvents(); @@ -209,12 +209,12 @@ void CollectionList::slotCheckCache() clearItems(invalidItems); } -void CollectionList::slotRemoveItem(const QString &file) +void CollectionList::slotRemoveItem(const TQString &file) { clearItem(m_itemsDict[file]); } -void CollectionList::slotRefreshItem(const QString &file) +void CollectionList::slotRefreshItem(const TQString &file) { m_itemsDict[file]->refresh(); } @@ -230,12 +230,12 @@ CollectionList::CollectionList(PlaylistCollection *collection) : { new KAction(i18n("Show Playing"), KShortcut(), actions(), "showPlaying"); - connect(action("showPlaying"), SIGNAL(activated()), this, SLOT(slotShowPlaying())); + connect(action("showPlaying"), TQT_SIGNAL(activated()), this, TQT_SLOT(slotShowPlaying())); - connect(action("back")->popupMenu(), SIGNAL(aboutToShow()), - this, SLOT(slotPopulateBackMenu())); - connect(action("back")->popupMenu(), SIGNAL(activated(int)), - this, SLOT(slotPlayFromBackMenu(int))); + connect(action("back")->popupMenu(), TQT_SIGNAL(aboutToShow()), + this, TQT_SLOT(slotPopulateBackMenu())); + connect(action("back")->popupMenu(), TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotPlayFromBackMenu(int))); setSorting(-1); // Temporarily disable sorting to add items faster. m_columnTags[PlaylistItem::ArtistColumn] = new TagCountDict(5001, false); @@ -265,7 +265,7 @@ CollectionList::~CollectionList() delete *it; } -void CollectionList::contentsDropEvent(QDropEvent *e) +void CollectionList::contentsDropEvent(TQDropEvent *e) { if(e->source() == this) return; // Don't rearrange in the CollectionList. @@ -273,7 +273,7 @@ void CollectionList::contentsDropEvent(QDropEvent *e) Playlist::contentsDropEvent(e); } -void CollectionList::contentsDragMoveEvent(QDragMoveEvent *e) +void CollectionList::contentsDragMoveEvent(TQDragMoveEvent *e) { if(canDecode(e) && e->source() != this) e->accept(true); @@ -281,10 +281,10 @@ void CollectionList::contentsDragMoveEvent(QDragMoveEvent *e) e->accept(false); } -QString CollectionList::addStringToDict(const QString &value, unsigned column) +TQString CollectionList::addStringToDict(const TQString &value, unsigned column) { if(column > m_columnTags.count() || value.stripWhiteSpace().isEmpty()) - return QString::null; + return TQString::null; int *refCountPtr = m_columnTags[column]->find(value); if(refCountPtr) @@ -297,7 +297,7 @@ QString CollectionList::addStringToDict(const QString &value, unsigned column) return value; } -QStringList CollectionList::uniqueSet(UniqueSetType t) const +TQStringList CollectionList::uniqueSet(UniqueSetType t) const { int column; @@ -316,14 +316,14 @@ QStringList CollectionList::uniqueSet(UniqueSetType t) const break; default: - return QStringList(); + return TQStringList(); } if((unsigned) column >= m_columnTags.count()) - return QStringList(); + return TQStringList(); TagCountDictIterator it(*m_columnTags[column]); - QStringList list; + TQStringList list; for(; it.current(); ++it) list += it.currentKey(); @@ -331,7 +331,7 @@ QStringList CollectionList::uniqueSet(UniqueSetType t) const return list; } -void CollectionList::removeStringFromDict(const QString &value, unsigned column) +void CollectionList::removeStringFromDict(const TQString &value, unsigned column) { if(column > m_columnTags.count() || value.isEmpty()) return; @@ -363,7 +363,7 @@ void CollectionListItem::refresh() if(id != TrackNumberColumn && id != LengthColumn) { // All columns other than track num and length need local-encoded data for sorting - QCString lower = text(i).lower().local8Bit(); + TQCString lower = text(i).lower().local8Bit(); // For some columns, we may be able to share some strings @@ -417,7 +417,7 @@ PlaylistItem *CollectionListItem::itemForPlaylist(const Playlist *playlist) return 0; } -void CollectionListItem::updateCollectionDict(const QString &oldPath, const QString &newPath) +void CollectionListItem::updateCollectionDict(const TQString &oldPath, const TQString &newPath) { CollectionList *collection = CollectionList::instance(); @@ -430,7 +430,7 @@ void CollectionListItem::updateCollectionDict(const QString &oldPath, const QStr void CollectionListItem::repaint() const { - QListViewItem::repaint(); + TQListViewItem::repaint(); for(PlaylistItemList::ConstIterator it = m_children.begin(); it != m_children.end(); ++it) (*it)->repaint(); } diff --git a/juk/collectionlist.h b/juk/collectionlist.h index c5cafca2..4143889c 100644 --- a/juk/collectionlist.h +++ b/juk/collectionlist.h @@ -20,9 +20,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include "playlist.h" #include "playlistitem.h" @@ -32,21 +32,21 @@ class CollectionListItem; class ViewMode; /** - * This type is for mapping QString track attributes like the album, artist + * This type is for mapping TQString track attributes like the album, artist * and track to an integer count representing the number of outstanding items * that hold the string. */ -typedef QDict TagCountDict; -typedef QDictIterator TagCountDictIterator; +typedef TQDict TagCountDict; +typedef TQDictIterator TagCountDictIterator; /** * We then have an array of dicts, one for each column in the list view. We - * use pointers to TagCountDicts because QDict has a broken copy ctor, which + * use pointers to TagCountDicts because TQDict has a broken copy ctor, which * doesn't copy the case sensitivity setting. */ -typedef QValueVector TagCountDicts; +typedef TQValueVector TagCountDicts; /** * This is the "collection", or all of the music files that have been opened @@ -78,12 +78,12 @@ public: /** * Returns a unique set of values associated with the type specified. */ - QStringList uniqueSet(UniqueSetType t) const; + TQStringList uniqueSet(UniqueSetType t) const; - CollectionListItem *lookup(const QString &file) { return m_itemsDict.find(file); } + CollectionListItem *lookup(const TQString &file) { return m_itemsDict.find(file); } virtual PlaylistItem *createItem(const FileHandle &file, - QListViewItem * = 0, + TQListViewItem * = 0, bool = false); void emitVisibleColumnsChanged() { emit signalVisibleColumnsChanged(); } @@ -99,8 +99,8 @@ public slots: virtual void clear(); void slotCheckCache(); - void slotRemoveItem(const QString &file); - void slotRefreshItem(const QString &file); + void slotRemoveItem(const TQString &file); + void slotRefreshItem(const TQString &file); void slotNewItems(const KFileItemList &items); void slotRefreshItems(const KFileItemList &items); @@ -110,24 +110,24 @@ protected: CollectionList(PlaylistCollection *collection); virtual ~CollectionList(); - virtual void contentsDropEvent(QDropEvent *e); - virtual void contentsDragMoveEvent(QDragMoveEvent *e); + virtual void contentsDropEvent(TQDropEvent *e); + virtual void contentsDragMoveEvent(TQDragMoveEvent *e); // These methods are used by CollectionListItem, which is a friend class. - void addToDict(const QString &file, CollectionListItem *item) { m_itemsDict.replace(file, item); } - void removeFromDict(const QString &file) { m_itemsDict.remove(file); } + void addToDict(const TQString &file, CollectionListItem *item) { m_itemsDict.replace(file, item); } + void removeFromDict(const TQString &file) { m_itemsDict.remove(file); } // These methods are also used by CollectionListItem, to manage the // strings used in generating the unique sets and tree view mode playlists. - QString addStringToDict(const QString &value, unsigned column); - void removeStringFromDict(const QString &value, unsigned column); + TQString addStringToDict(const TQString &value, unsigned column); + void removeStringFromDict(const TQString &value, unsigned column); - void addWatched(const QString &file) { m_dirWatch->addFile(file); } - void removeWatched(const QString &file) { m_dirWatch->removeFile(file); } + void addWatched(const TQString &file) { m_dirWatch->addFile(file); } + void removeWatched(const TQString &file) { m_dirWatch->removeFile(file); } - virtual bool hasItem(const QString &file) const { return m_itemsDict.find(file); } + virtual bool hasItem(const TQString &file) const { return m_itemsDict.find(file); } signals: void signalCollectionChanged(); @@ -140,8 +140,8 @@ signals: * \see Playlsit::isColumnVisible() */ void signalVisibleColumnsChanged(); - void signalNewTag(const QString &, unsigned); - void signalRemovedTag(const QString &, unsigned); + void signalNewTag(const TQString &, unsigned); + void signalRemovedTag(const TQString &, unsigned); private: /** @@ -151,7 +151,7 @@ private: static const int m_uniqueSetCount = 3; static CollectionList *m_list; - QDict m_itemsDict; + TQDict m_itemsDict; KDirWatch *m_dirWatch; TagCountDicts m_columnTags; }; @@ -163,14 +163,14 @@ class CollectionListItem : public PlaylistItem friend class PlaylistItem; /** - * Needs access to the destructor, even though the destructor isn't used by QDict. + * Needs access to the destructor, even though the destructor isn't used by TQDict. */ - friend class QDict; + friend class TQDict; public: virtual void refresh(); PlaylistItem *itemForPlaylist(const Playlist *playlist); - void updateCollectionDict(const QString &oldPath, const QString &newPath); + void updateCollectionDict(const TQString &oldPath, const TQString &newPath); void repaint() const; PlaylistItemList children() const { return m_children; } diff --git a/juk/coverdialog.cpp b/juk/coverdialog.cpp index cdb9853a..509f0695 100644 --- a/juk/coverdialog.cpp +++ b/juk/coverdialog.cpp @@ -21,8 +21,8 @@ #include #include -#include -#include +#include +#include #include "coverdialog.h" #include "covericonview.h" @@ -34,12 +34,12 @@ using CoverUtility::CoverIconViewItem; class AllArtistsListViewItem : public KListViewItem { public: - AllArtistsListViewItem(QListView *parent) : + AllArtistsListViewItem(TQListView *parent) : KListViewItem(parent, i18n("")) { } - int compare(QListViewItem *, int, bool) const + int compare(TQListViewItem *, int, bool) const { return -1; // Always be at the top. } @@ -48,22 +48,22 @@ public: class CaseInsensitiveItem : public KListViewItem { public: - CaseInsensitiveItem(QListView *parent, const QString &text) : + CaseInsensitiveItem(TQListView *parent, const TQString &text) : KListViewItem(parent, text) { } - int compare(QListViewItem *item, int column, bool ascending) const + int compare(TQListViewItem *item, int column, bool ascending) const { Q_UNUSED(ascending); return text(column).lower().localeAwareCompare(item->text(column).lower()); } }; -CoverDialog::CoverDialog(QWidget *parent) : +CoverDialog::CoverDialog(TQWidget *parent) : CoverDialogBase(parent, "juk_cover_dialog", WType_Dialog) { - m_covers->setResizeMode(QIconView::Adjust); + m_covers->setResizeMode(TQIconView::Adjust); m_covers->setGridX(140); m_covers->setGridY(150); @@ -80,16 +80,16 @@ void CoverDialog::show() m_artists->clear(); m_covers->clear(); - QStringList artists = CollectionList::instance()->uniqueSet(CollectionList::Artists); + TQStringList artists = CollectionList::instance()->uniqueSet(CollectionList::Artists); m_artists->setSorting(-1); new AllArtistsListViewItem(m_artists); - for(QStringList::ConstIterator it = artists.begin(); it != artists.end(); ++it) + for(TQStringList::ConstIterator it = artists.begin(); it != artists.end(); ++it) new CaseInsensitiveItem(m_artists, *it); m_artists->setSorting(0); - QTimer::singleShot(0, this, SLOT(loadCovers())); + TQTimer::singleShot(0, this, TQT_SLOT(loadCovers())); CoverDialogBase::show(); } @@ -97,8 +97,8 @@ void CoverDialog::show() // covers. void CoverDialog::loadCovers() { - QValueList keys = CoverManager::keys(); - QValueList::ConstIterator it; + TQValueList keys = CoverManager::keys(); + TQValueList::ConstIterator it; int i = 0; for(it = keys.begin(); it != keys.end(); ++it) { @@ -112,7 +112,7 @@ void CoverDialog::loadCovers() } // TODO: Add a way to show cover art for tracks with no artist. -void CoverDialog::slotArtistClicked(QListViewItem *item) +void CoverDialog::slotArtistClicked(TQListViewItem *item) { m_covers->clear(); @@ -121,9 +121,9 @@ void CoverDialog::slotArtistClicked(QListViewItem *item) loadCovers(); } else { - QString artist = item->text(0).lower(); - QValueList keys = CoverManager::keys(); - QValueList::ConstIterator it; + TQString artist = item->text(0).lower(); + TQValueList keys = CoverManager::keys(); + TQValueList::ConstIterator it; for(it = keys.begin(); it != keys.end(); ++it) { CoverDataPtr data = CoverManager::coverInfo(*it); @@ -133,7 +133,7 @@ void CoverDialog::slotArtistClicked(QListViewItem *item) } } -void CoverDialog::slotContextRequested(QIconViewItem *item, const QPoint &pt) +void CoverDialog::slotContextRequested(TQIconViewItem *item, const TQPoint &pt) { static KPopupMenu *menu = 0; @@ -142,7 +142,7 @@ void CoverDialog::slotContextRequested(QIconViewItem *item, const QPoint &pt) if(!menu) { menu = new KPopupMenu(this); - menu->insertItem(i18n("Remove Cover"), this, SLOT(removeSelectedCover())); + menu->insertItem(i18n("Remove Cover"), this, TQT_SLOT(removeSelectedCover())); } menu->popup(pt); diff --git a/juk/coverdialog.h b/juk/coverdialog.h index 3ced0d75..751f77c2 100644 --- a/juk/coverdialog.h +++ b/juk/coverdialog.h @@ -22,14 +22,14 @@ class CoverDialog : public CoverDialogBase { Q_OBJECT public: - CoverDialog(QWidget *parent); + CoverDialog(TQWidget *parent); ~CoverDialog(); virtual void show(); public slots: - void slotArtistClicked(QListViewItem *item); - void slotContextRequested(QIconViewItem *item, const QPoint &pt); + void slotArtistClicked(TQListViewItem *item); + void slotContextRequested(TQIconViewItem *item, const TQPoint &pt); private slots: void loadCovers(); diff --git a/juk/covericonview.cpp b/juk/covericonview.cpp index 88defcab..fc400e78 100644 --- a/juk/covericonview.cpp +++ b/juk/covericonview.cpp @@ -18,15 +18,15 @@ using CoverUtility::CoverIconViewItem; -CoverIconViewItem::CoverIconViewItem(coverKey id, QIconView *parent) : +CoverIconViewItem::CoverIconViewItem(coverKey id, TQIconView *parent) : KIconViewItem(parent), m_id(id) { CoverDataPtr data = CoverManager::coverInfo(id); - setText(QString("%1 - %2").arg(data->artist, data->album)); + setText(TQString("%1 - %2").arg(data->artist, data->album)); setPixmap(data->thumbnail()); } -CoverIconView::CoverIconView(QWidget *parent, const char *name) : KIconView(parent, name) +CoverIconView::CoverIconView(TQWidget *parent, const char *name) : KIconView(parent, name) { setResizeMode(Adjust); } @@ -36,7 +36,7 @@ CoverIconViewItem *CoverIconView::currentItem() const return static_cast(KIconView::currentItem()); } -QDragObject *CoverIconView::dragObject() +TQDragObject *CoverIconView::dragObject() { CoverIconViewItem *item = currentItem(); if(item) diff --git a/juk/covericonview.h b/juk/covericonview.h index 4126cb3f..42e44d66 100644 --- a/juk/covericonview.h +++ b/juk/covericonview.h @@ -29,7 +29,7 @@ namespace CoverUtility class CoverIconViewItem : public KIconViewItem { public: - CoverIconViewItem(coverKey id, QIconView *parent); + CoverIconViewItem(coverKey id, TQIconView *parent); coverKey id() const { return m_id; } @@ -49,12 +49,12 @@ using CoverUtility::CoverIconViewItem; class CoverIconView : public KIconView { public: - CoverIconView(QWidget *parent, const char *name); + CoverIconView(TQWidget *parent, const char *name); CoverIconViewItem *currentItem() const; protected: - virtual QDragObject *dragObject(); + virtual TQDragObject *dragObject(); }; #endif /* JUK_COVERICONVIEW_H */ diff --git a/juk/coverinfo.cpp b/juk/coverinfo.cpp index 243bc429..67e8514a 100644 --- a/juk/coverinfo.cpp +++ b/juk/coverinfo.cpp @@ -18,10 +18,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include "collectionlist.h" #include "playlistsearch.h" @@ -31,22 +31,22 @@ struct CoverPopup : public QWidget { - CoverPopup(const QPixmap &image, const QPoint &p) : - QWidget(0, 0, WDestructiveClose | WX11BypassWM) + CoverPopup(const TQPixmap &image, const TQPoint &p) : + TQWidget(0, 0, WDestructiveClose | WX11BypassWM) { - QHBoxLayout *layout = new QHBoxLayout(this); - QLabel *label = new QLabel(this); + TQHBoxLayout *layout = new TQHBoxLayout(this); + TQLabel *label = new TQLabel(this); layout->addWidget(label); - label->setFrameStyle(QFrame::Box | QFrame::Raised); + label->setFrameStyle(TQFrame::Box | TQFrame::Raised); label->setLineWidth(1); label->setPixmap(image); setGeometry(p.x(), p.y(), label->width(), label->height()); show(); } - virtual void leaveEvent(QEvent *) { close(); } - virtual void mouseReleaseEvent(QMouseEvent *) { close(); } + virtual void leaveEvent(TQEvent *) { close(); } + virtual void mouseReleaseEvent(TQMouseEvent *) { close(); } }; //////////////////////////////////////////////////////////////////////////////// @@ -85,7 +85,7 @@ bool CoverInfo::hasCover() // We *still* don't have it? Check the old-style covers then. if(!m_hasCover) { - m_hasCover = QFile(coverLocation(FullSize)).exists(); + m_hasCover = TQFile(coverLocation(FullSize)).exists(); if(m_hasCover) m_needsConverting = true; @@ -109,7 +109,7 @@ void CoverInfo::clearCover() m_coverKey = CoverManager::NoMatch; } -void CoverInfo::setCover(const QImage &image) +void CoverInfo::setCover(const TQImage &image) { if(image.isNull()) return; @@ -118,7 +118,7 @@ void CoverInfo::setCover(const QImage &image) m_needsConverting = false; m_hasCover = true; - QPixmap cover; + TQPixmap cover; cover.convertFromImage(image); // If we use replaceCover we'll change the cover for every other track @@ -142,8 +142,8 @@ void CoverInfo::setCoverId(coverKey id) void CoverInfo::applyCoverToWholeAlbum(bool overwriteExistingCovers) const { - QString artist = m_file.tag()->artist(); - QString album = m_file.tag()->album(); + TQString artist = m_file.tag()->artist(); + TQString album = m_file.tag()->album(); PlaylistSearch::ComponentList components; ColumnList columns; @@ -175,13 +175,13 @@ void CoverInfo::applyCoverToWholeAlbum(bool overwriteExistingCovers) const } } -QPixmap CoverInfo::pixmap(CoverSize size) const +TQPixmap CoverInfo::pixmap(CoverSize size) const { if(m_needsConverting) convertOldStyleCover(); if(m_coverKey == CoverManager::NoMatch) - return QPixmap(); + return TQPixmap(); if(size == Thumbnail) return CoverManager::coverFromId(m_coverKey, CoverManager::Thumbnail); @@ -191,9 +191,9 @@ QPixmap CoverInfo::pixmap(CoverSize size) const void CoverInfo::popup() const { - QPixmap image = pixmap(FullSize); - QPoint mouse = QCursor::pos(); - QRect desktop = KApplication::desktop()->screenGeometry(mouse); + TQPixmap image = pixmap(FullSize); + TQPoint mouse = TQCursor::pos(); + TQRect desktop = KApplication::desktop()->screenGeometry(mouse); int x = mouse.x(); int y = mouse.y(); @@ -216,22 +216,22 @@ void CoverInfo::popup() const else y = (y - desktop.y() > desktop.height() - 10) ? desktop.height() - height + desktop.y() : (y - height + 10); - new CoverPopup(image, QPoint(x, y)); + new CoverPopup(image, TQPoint(x, y)); } /** * DEPRECATED */ -QString CoverInfo::coverLocation(CoverSize size) const +TQString CoverInfo::coverLocation(CoverSize size) const { - QString fileName(QFile::encodeName(m_file.tag()->artist() + " - " + m_file.tag()->album())); - QRegExp maskedFileNameChars("[ /?:\"]"); + TQString fileName(TQFile::encodeName(m_file.tag()->artist() + " - " + m_file.tag()->album())); + TQRegExp maskedFileNameChars("[ /?:\"]"); fileName.replace(maskedFileNameChars, "_"); fileName.append(".png"); - QString dataDir = KGlobal::dirs()->saveLocation("appdata"); - QString subDir; + TQString dataDir = KGlobal::dirs()->saveLocation("appdata"); + TQString subDir; switch (size) { case FullSize: @@ -240,7 +240,7 @@ QString CoverInfo::coverLocation(CoverSize size) const default: break; } - QString fileLocation = dataDir + "covers/" + subDir + fileName.lower(); + TQString fileLocation = dataDir + "covers/" + subDir + fileName.lower(); return fileLocation; } @@ -250,9 +250,9 @@ bool CoverInfo::convertOldStyleCover() const // Ah, old-style cover. Let's transfer it to the new system. kdDebug() << "Found old style cover for " << m_file.absFilePath() << endl; - QString artist = m_file.tag()->artist(); - QString album = m_file.tag()->album(); - QString oldLocation = coverLocation(FullSize); + TQString artist = m_file.tag()->artist(); + TQString album = m_file.tag()->album(); + TQString oldLocation = coverLocation(FullSize); m_coverKey = CoverManager::addCover(oldLocation, artist, album); m_needsConverting = false; @@ -269,7 +269,7 @@ bool CoverInfo::convertOldStyleCover() const // If we convert we need to remove the old cover otherwise we'll find // it later if the user un-sets the new cover. - if(!QFile::remove(oldLocation)) + if(!TQFile::remove(oldLocation)) kdError(65432) << "Unable to remove converted cover at " << oldLocation << endl; return true; diff --git a/juk/coverinfo.h b/juk/coverinfo.h index 1caae8d0..8c1bdcfc 100644 --- a/juk/coverinfo.h +++ b/juk/coverinfo.h @@ -15,7 +15,7 @@ #ifndef COVERINFO_H #define COVERINFO_H -#include +#include #include "filehandle.h" #include "covermanager.h" @@ -32,7 +32,7 @@ public: bool hasCover(); void clearCover(); - void setCover(const QImage &image = QImage()); + void setCover(const TQImage &image = TQImage()); // Use this to assign to a specific cover id. void setCoverId(coverKey id); @@ -50,11 +50,11 @@ public: coverKey coverId() const { return m_coverKey; } - QPixmap pixmap(CoverSize size) const; + TQPixmap pixmap(CoverSize size) const; void popup() const; private: - QString coverLocation(CoverSize size) const; + TQString coverLocation(CoverSize size) const; bool convertOldStyleCover() const; FileHandle m_file; diff --git a/juk/covermanager.cpp b/juk/covermanager.cpp index 1fe36cc4..f7530daa 100644 --- a/juk/covermanager.cpp +++ b/juk/covermanager.cpp @@ -13,17 +13,17 @@ * * ***************************************************************************/ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -35,7 +35,7 @@ // This is a dictionary to map the track path to their ID. Otherwise we'd have // to store this info with each CollectionListItem, which would break the cache // of users who upgrade, and would just generally be a big mess. -typedef QDict TrackLookupMap; +typedef TQDict TrackLookupMap; // This is responsible for making sure that the CoverManagerPrivate class // gets properly destructed on shutdown. @@ -44,24 +44,24 @@ static KStaticDeleter sd; const char *CoverDrag::mimetype = "application/x-juk-coverid"; // Caches the QPixmaps for the covers so that the covers are not all kept in // memory for no reason. -typedef QCache CoverPixmapCache; +typedef TQCache CoverPixmapCache; CoverManagerPrivate *CoverManager::m_data = 0; // Used to save and load CoverData from a QDataStream -QDataStream &operator<<(QDataStream &out, const CoverData &data); -QDataStream &operator>>(QDataStream &in, CoverData &data); +TQDataStream &operator<<(TQDataStream &out, const CoverData &data); +TQDataStream &operator>>(TQDataStream &in, CoverData &data); // // Implementation of CoverData struct // -QPixmap CoverData::pixmap() const +TQPixmap CoverData::pixmap() const { return CoverManager::coverFromData(*this, CoverManager::FullSize); } -QPixmap CoverData::thumbnail() const +TQPixmap CoverData::thumbnail() const { return CoverManager::coverFromData(*this, CoverManager::Thumbnail); } @@ -123,7 +123,7 @@ public: * @return the full path and filename of the file storing the cover * lookup map and the translations between pathnames and ids. */ - QString coverLocation() const; + TQString coverLocation() const; }; // @@ -131,8 +131,8 @@ public: // void CoverManagerPrivate::createDataDir() const { - QDir dir; - QString dirPath(QDir::cleanDirPath(coverLocation() + "/..")); + TQDir dir; + TQString dirPath(TQDir::cleanDirPath(coverLocation() + "/..")); if(!dir.exists(dirPath)) KStandardDirs::makeDir(dirPath); } @@ -144,7 +144,7 @@ void CoverManagerPrivate::saveCovers() const // Make sure the directory exists first. createDataDir(); - QFile file(coverLocation()); + TQFile file(coverLocation()); kdDebug() << "Opening covers db: " << coverLocation() << endl; @@ -153,7 +153,7 @@ void CoverManagerPrivate::saveCovers() const return; } - QDataStream out(&file); + TQDataStream out(&file); // Write out the version and count out << Q_UINT32(0) << Q_UINT32(covers.count()); @@ -167,7 +167,7 @@ void CoverManagerPrivate::saveCovers() const // Now write out the track mapping. out << Q_UINT32(tracks.count()); - QDictIterator trackMapIt(tracks); + TQDictIterator trackMapIt(tracks); while(trackMapIt.current()) { out << trackMapIt.currentKey() << Q_UINT32(*trackMapIt.current()); ++trackMapIt; @@ -178,14 +178,14 @@ void CoverManagerPrivate::loadCovers() { kdDebug() << k_funcinfo << endl; - QFile file(coverLocation()); + TQFile file(coverLocation()); if(!file.open(IO_ReadOnly)) { // Guess we don't have any covers yet. return; } - QDataStream in(&file); + TQDataStream in(&file); Q_UINT32 count, version; // First thing we'll read in will be the version. @@ -214,7 +214,7 @@ void CoverManagerPrivate::loadCovers() in >> count; for(Q_UINT32 i = 0; i < count; ++i) { - QString path; + TQString path; Q_UINT32 id; in >> path >> id; @@ -230,7 +230,7 @@ void CoverManagerPrivate::loadCovers() } } -QString CoverManagerPrivate::coverLocation() const +TQString CoverManagerPrivate::coverLocation() const { return KGlobal::dirs()->saveLocation("appdata") + "coverdb/covers"; } @@ -251,10 +251,10 @@ coverKey CoverManagerPrivate::nextId() const // // Implementation of CoverDrag // -CoverDrag::CoverDrag(coverKey id, QWidget *src) : QDragObject(src, "coverDrag"), +CoverDrag::CoverDrag(coverKey id, TQWidget *src) : TQDragObject(src, "coverDrag"), m_id(id) { - QPixmap cover = CoverManager::coverFromId(id); + TQPixmap cover = CoverManager::coverFromId(id); if(!cover.isNull()) setPixmap(cover); } @@ -269,20 +269,20 @@ const char *CoverDrag::format(int i) const return 0; } -QByteArray CoverDrag::encodedData(const char *mimetype) const +TQByteArray CoverDrag::encodedData(const char *mimetype) const { if(qstrcmp(CoverDrag::mimetype, mimetype) == 0) { - QByteArray data; - QDataStream ds(data, IO_WriteOnly); + TQByteArray data; + TQDataStream ds(data, IO_WriteOnly); ds << Q_UINT32(m_id); return data; } else if(qstrcmp(mimetype, "image/png") == 0) { - QPixmap large = CoverManager::coverFromId(m_id, CoverManager::FullSize); - QImage img = large.convertToImage(); - QByteArray data; - QBuffer buffer(data); + TQPixmap large = CoverManager::coverFromId(m_id, CoverManager::FullSize); + TQImage img = large.convertToImage(); + TQByteArray data; + TQBuffer buffer(data); buffer.open(IO_WriteOnly); img.save(&buffer, "PNG"); // Write in PNG format. @@ -290,21 +290,21 @@ QByteArray CoverDrag::encodedData(const char *mimetype) const return data; } - return QByteArray(); + return TQByteArray(); } -bool CoverDrag::canDecode(const QMimeSource *e) +bool CoverDrag::canDecode(const TQMimeSource *e) { return e->provides(mimetype); } -bool CoverDrag::decode(const QMimeSource *e, coverKey &id) +bool CoverDrag::decode(const TQMimeSource *e, coverKey &id) { if(!canDecode(e)) return false; - QByteArray data = e->encodedData(mimetype); - QDataStream ds(data, IO_ReadOnly); + TQByteArray data = e->encodedData(mimetype); + TQDataStream ds(data, IO_ReadOnly); Q_UINT32 i; ds >> i; @@ -316,10 +316,10 @@ bool CoverDrag::decode(const QMimeSource *e, coverKey &id) // // Implementation of CoverManager methods. // -coverKey CoverManager::idFromMetadata(const QString &artist, const QString &album) +coverKey CoverManager::idFromMetadata(const TQString &artist, const TQString &album) { // Search for the string, yay! It might make sense to use a cache here, - // if so it's not hard to add a QCache. + // if so it's not hard to add a TQCache. CoverDataMap::ConstIterator it = begin(); CoverDataMap::ConstIterator endIt = end(); @@ -331,12 +331,12 @@ coverKey CoverManager::idFromMetadata(const QString &artist, const QString &albu return NoMatch; } -QPixmap CoverManager::coverFromId(coverKey id, Size size) +TQPixmap CoverManager::coverFromId(coverKey id, Size size) { CoverDataPtr info = coverInfo(id); if(!info) - return QPixmap(); + return TQPixmap(); if(size == Thumbnail) return info->thumbnail(); @@ -344,9 +344,9 @@ QPixmap CoverManager::coverFromId(coverKey id, Size size) return info->pixmap(); } -QPixmap CoverManager::coverFromData(const CoverData &coverData, Size size) +TQPixmap CoverManager::coverFromData(const CoverData &coverData, Size size) { - QString path = coverData.path; + TQString path = coverData.path; // Prepend a tag to the path to separate in the cache between full size // and thumbnail pixmaps. If we add a different kind of pixmap in the @@ -357,31 +357,31 @@ QPixmap CoverManager::coverFromData(const CoverData &coverData, Size size) path.prepend('t'); // Check in cache for the pixmap. - QPixmap *pix = data()->pixmapCache[path]; + TQPixmap *pix = data()->pixmapCache[path]; if(pix) { kdDebug(65432) << "Found pixmap in cover cache.\n"; return *pix; } // Not in cache, load it and add it. - pix = new QPixmap(coverData.path); + pix = new TQPixmap(coverData.path); if(pix->isNull()) - return QPixmap(); + return TQPixmap(); if(size == Thumbnail) { // Convert to image for smoothScale() - QImage image = pix->convertToImage(); - pix->convertFromImage(image.smoothScale(80, 80, QImage::ScaleMin)); + TQImage image = pix->convertToImage(); + pix->convertFromImage(image.smoothScale(80, 80, TQImage::ScaleMin)); } - QPixmap returnValue = *pix; // Save it early. + TQPixmap returnValue = *pix; // Save it early. if(!data()->pixmapCache.insert(path, pix, pix->height() * pix->width())) delete pix; return returnValue; } -coverKey CoverManager::addCover(const QPixmap &large, const QString &artist, const QString &album) +coverKey CoverManager::addCover(const TQPixmap &large, const TQString &artist, const TQString &album) { kdDebug() << k_funcinfo << endl; @@ -395,7 +395,7 @@ coverKey CoverManager::addCover(const QPixmap &large, const QString &artist, con // Save it to file first! - QString ext = QString("/coverdb/coverID-%1.png").arg(id); + TQString ext = TQString("/coverdb/coverID-%1.png").arg(id); coverData->path = KGlobal::dirs()->saveLocation("appdata") + ext; kdDebug() << "Saving pixmap to " << coverData->path << endl; @@ -413,15 +413,15 @@ coverKey CoverManager::addCover(const QPixmap &large, const QString &artist, con data()->covers[id] = coverData; // Make sure the new cover isn't inadvertently cached. - data()->pixmapCache.remove(QString("f%1").arg(coverData->path)); - data()->pixmapCache.remove(QString("t%1").arg(coverData->path)); + data()->pixmapCache.remove(TQString("f%1").arg(coverData->path)); + data()->pixmapCache.remove(TQString("t%1").arg(coverData->path)); return id; } -coverKey CoverManager::addCover(const QString &path, const QString &artist, const QString &album) +coverKey CoverManager::addCover(const TQString &path, const TQString &artist, const TQString &album) { - return addCover(QPixmap(path), artist, album); + return addCover(TQPixmap(path), artist, album); } bool CoverManager::hasCover(coverKey id) @@ -436,17 +436,17 @@ bool CoverManager::removeCover(coverKey id) // Remove cover from cache. CoverDataPtr coverData = coverInfo(id); - data()->pixmapCache.remove(QString("f%1").arg(coverData->path)); - data()->pixmapCache.remove(QString("t%1").arg(coverData->path)); + data()->pixmapCache.remove(TQString("f%1").arg(coverData->path)); + data()->pixmapCache.remove(TQString("t%1").arg(coverData->path)); // Remove references to files that had that track ID. - QDictIterator it(data()->tracks); + TQDictIterator it(data()->tracks); for(; it.current(); ++it) if(*it.current() == id) data()->tracks.remove(it.currentKey()); // Remove covers from disk. - QFile::remove(coverData->path); + TQFile::remove(coverData->path); // Finally, forget that we ever knew about this cover. data()->covers.remove(id); @@ -454,7 +454,7 @@ bool CoverManager::removeCover(coverKey id) return true; } -bool CoverManager::replaceCover(coverKey id, const QPixmap &large) +bool CoverManager::replaceCover(coverKey id, const TQPixmap &large) { if(!hasCover(id)) return false; @@ -462,8 +462,8 @@ bool CoverManager::replaceCover(coverKey id, const QPixmap &large) CoverDataPtr coverData = coverInfo(id); // Empty old pixmaps from cache. - data()->pixmapCache.remove(QString("%1%2").arg("t", coverData->path)); - data()->pixmapCache.remove(QString("%1%2").arg("f", coverData->path)); + data()->pixmapCache.remove(TQString("%1%2").arg("t", coverData->path)); + data()->pixmapCache.remove(TQString("%1%2").arg("f", coverData->path)); large.save(coverData->path, "PNG"); return true; @@ -497,12 +497,12 @@ CoverDataMap::ConstIterator CoverManager::end() return data()->covers.constEnd(); } -QValueList CoverManager::keys() +TQValueList CoverManager::keys() { return data()->covers.keys(); } -void CoverManager::setIdForTrack(const QString &path, coverKey id) +void CoverManager::setIdForTrack(const TQString &path, coverKey id) { coverKey *oldId = data()->tracks.find(path); if(oldId && (id == *oldId)) @@ -524,7 +524,7 @@ void CoverManager::setIdForTrack(const QString &path, coverKey id) } } -coverKey CoverManager::idForTrack(const QString &path) +coverKey CoverManager::idForTrack(const TQString &path) { coverKey *coverPtr = data()->tracks.find(path); @@ -549,7 +549,7 @@ CoverDataPtr CoverManager::coverInfo(coverKey id) * @param data the CoverData to write out. * @return the data stream that the data was written to. */ -QDataStream &operator<<(QDataStream &out, const CoverData &data) +TQDataStream &operator<<(TQDataStream &out, const CoverData &data) { out << data.artist; out << data.album; @@ -565,7 +565,7 @@ QDataStream &operator<<(QDataStream &out, const CoverData &data) * @param data the CoverData to read into. * @return the data stream read from. */ -QDataStream &operator>>(QDataStream &in, CoverData &data) +TQDataStream &operator>>(TQDataStream &in, CoverData &data) { in >> data.artist; in >> data.album; diff --git a/juk/covermanager.h b/juk/covermanager.h index 9a95d991..a935b810 100644 --- a/juk/covermanager.h +++ b/juk/covermanager.h @@ -18,8 +18,8 @@ #include -#include -#include +#include +#include class CoverManagerPrivate; class QString; @@ -39,19 +39,19 @@ class QDataStream; class CoverData : public KShared { public: - QPixmap pixmap() const; - QPixmap thumbnail() const; + TQPixmap pixmap() const; + TQPixmap thumbnail() const; - QString artist; - QString album; - QString path; + TQString artist; + TQString album; + TQString path; unsigned refCount; // Refers to number of tracks using this. }; typedef KSharedPtr CoverDataPtr; typedef unsigned long coverKey; ///< Type of the id for a cover. -typedef QMap CoverDataMap; +typedef TQMap CoverDataMap; /** * This class is used to drag covers in JuK. It adds a special mimetype that @@ -65,10 +65,10 @@ typedef QMap CoverDataMap; class CoverDrag : public QDragObject { public: - CoverDrag(coverKey id, QWidget *src); + CoverDrag(coverKey id, TQWidget *src); virtual const char *format(int i) const; - virtual QByteArray encodedData(const char *mimetype) const; + virtual TQByteArray encodedData(const char *mimetype) const; void setId(coverKey id) { m_id = id; } @@ -77,8 +77,8 @@ public: * true is returned only if \p e contains a cover id, even though * CoverDrag can convert it to an image. */ - static bool canDecode(const QMimeSource *e); - static bool decode(const QMimeSource *e, coverKey &id); + static bool canDecode(const TQMimeSource *e); + static bool decode(const TQMimeSource *e, coverKey &id); static const char* mimetype; @@ -114,7 +114,7 @@ public: * @return NoMatch if no match could be found, otherwise the id of the * cover art that matches the given metadata. */ - static coverKey idFromMetadata(const QString &artist, const QString &album); + static coverKey idFromMetadata(const TQString &artist, const TQString &album); /** * Returns the cover art for @p id. @@ -123,10 +123,10 @@ public: * @param size The size to return it as. Note that FullSize doesn't * necessarily mean the pixmap is large, so you may need to * scale it up. - * @return QPixmap::null if there is no cover art for @p id, otherwise the + * @return TQPixmap::null if there is no cover art for @p id, otherwise the * cover art. */ - static QPixmap coverFromId(coverKey id, Size size = Thumbnail); + static TQPixmap coverFromId(coverKey id, Size size = Thumbnail); /** * Returns the cover art for @p ptr. This function is intended for use @@ -137,7 +137,7 @@ public: * @param size The size to return it as. * @see CoverData */ - static QPixmap coverFromData(const CoverData &coverData, Size size = Thumbnail); + static TQPixmap coverFromData(const CoverData &coverData, Size size = Thumbnail); /** * Returns the full suite of information known about the cover given by @@ -157,7 +157,7 @@ public: * @param artist The artist of the new cover. * @param album The album of the new cover. */ - static coverKey addCover(const QPixmap &large, const QString &artist = "", const QString &album = ""); + static coverKey addCover(const TQPixmap &large, const TQString &artist = "", const TQString &album = ""); /** * Adds the file pointed to by the local path @p path to the database, @@ -167,7 +167,7 @@ public: * @param artist The artist of the new cover. * @param album The album of the new cover. */ - static coverKey addCover(const QString &path, const QString &artist = "", const QString &album = ""); + static coverKey addCover(const TQString &path, const TQString &artist = "", const TQString &album = ""); /** * Function to determine if @p id matches any covers in the database. @@ -194,7 +194,7 @@ public: * @param id The id of the cover to replace. * @param large The full size cover art for the new cover. */ - static bool replaceCover(coverKey id, const QPixmap &large); + static bool replaceCover(coverKey id, const TQPixmap &large); /** * Saves the current CoverManager information to disk. Changes are not @@ -224,7 +224,7 @@ public: /** * @return A list of all of the id's listed in the database. */ - static QValueList keys(); + static TQValueList keys(); /** * Associates @p path with the cover identified by @id. No comparison of @@ -233,7 +233,7 @@ public: * @param path The absolute file path to the track. * @param id The identifier of the cover to use with @p path. */ - static void setIdForTrack(const QString &path, coverKey id); + static void setIdForTrack(const TQString &path, coverKey id); /** * Returns the identifier of the cover for the track at @p path. @@ -242,7 +242,7 @@ public: * @return NoMatch if @p path doesn't have a cover, otherwise the id of * its cover. */ - static coverKey idForTrack(const QString &path); + static coverKey idForTrack(const TQString &path); /** * This identifier is used to indicate that no cover was found in the @@ -254,7 +254,7 @@ public: static CoverManagerPrivate *m_data; static CoverManagerPrivate *data(); - static QPixmap createThumbnail(const QPixmap &base); + static TQPixmap createThumbnail(const TQPixmap &base); }; #endif /* JUK_COVERMANAGER_H */ diff --git a/juk/deletedialog.cpp b/juk/deletedialog.cpp index cafd7849..e780eec0 100644 --- a/juk/deletedialog.cpp +++ b/juk/deletedialog.cpp @@ -20,12 +20,12 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include "deletedialog.h" @@ -33,7 +33,7 @@ // DeleteWidget implementation ////////////////////////////////////////////////////////////////////////////// -DeleteWidget::DeleteWidget(QWidget *parent, const char *name) +DeleteWidget::DeleteWidget(TQWidget *parent, const char *name) : DeleteDialogBase(parent, name) { KConfigGroup messageGroup(KGlobal::config(), "FileRemover"); @@ -43,7 +43,7 @@ DeleteWidget::DeleteWidget(QWidget *parent, const char *name) ddShouldDelete->setChecked(deleteInstead); } -void DeleteWidget::setFiles(const QStringList &files) +void DeleteWidget::setFiles(const TQStringList &files) { ddFileList->clear(); ddFileList->insertStringList(files); @@ -69,7 +69,7 @@ void DeleteWidget::slotShouldDelete(bool shouldDelete) // DeleteDialog implementation ////////////////////////////////////////////////////////////////////////////// -DeleteDialog::DeleteDialog(QWidget *parent, const char *name) : +DeleteDialog::DeleteDialog(TQWidget *parent, const char *name) : KDialogBase(Swallow, WStyle_DialogBorder, parent, name, true /* modal */, i18n("About to delete selected files"), Ok | Cancel, Cancel /* Default */, true /* separator */), @@ -84,17 +84,17 @@ DeleteDialog::DeleteDialog(QWidget *parent, const char *name) : slotShouldDelete(shouldDelete()); - connect(m_widget->ddShouldDelete, SIGNAL(toggled(bool)), SLOT(slotShouldDelete(bool))); + connect(m_widget->ddShouldDelete, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotShouldDelete(bool))); } -bool DeleteDialog::confirmDeleteList(const QStringList &condemnedFiles) +bool DeleteDialog::confirmDeleteList(const TQStringList &condemnedFiles) { m_widget->setFiles(condemnedFiles); - return exec() == QDialog::Accepted; + return exec() == TQDialog::Accepted; } -void DeleteDialog::setFiles(const QStringList &files) +void DeleteDialog::setFiles(const TQStringList &files) { m_widget->setFiles(files); } diff --git a/juk/deletedialog.h b/juk/deletedialog.h index 9fd45838..4a442b23 100644 --- a/juk/deletedialog.h +++ b/juk/deletedialog.h @@ -17,7 +17,7 @@ #define _DELETEDIALOG_H -#include +#include #include "deletedialogbase.h" @@ -31,9 +31,9 @@ class DeleteWidget : public DeleteDialogBase Q_OBJECT public: - DeleteWidget(QWidget *parent = 0, const char *name = 0); + DeleteWidget(TQWidget *parent = 0, const char *name = 0); - void setFiles(const QStringList &files); + void setFiles(const TQStringList &files); protected slots: virtual void slotShouldDelete(bool shouldDelete); @@ -44,10 +44,10 @@ class DeleteDialog : public KDialogBase Q_OBJECT public: - DeleteDialog(QWidget *parent, const char *name = "delete_dialog"); + DeleteDialog(TQWidget *parent, const char *name = "delete_dialog"); - bool confirmDeleteList(const QStringList &condemnedFiles); - void setFiles(const QStringList &files); + bool confirmDeleteList(const TQStringList &condemnedFiles); + void setFiles(const TQStringList &files); bool shouldDelete() const { return m_widget->ddShouldDelete->isChecked(); } protected slots: diff --git a/juk/directorylist.cpp b/juk/directorylist.cpp index 1e53cac8..43df3dda 100644 --- a/juk/directorylist.cpp +++ b/juk/directorylist.cpp @@ -18,7 +18,7 @@ #include #include -#include +#include #include "directorylistbase.h" #include "directorylist.h" @@ -27,8 +27,8 @@ // public methods //////////////////////////////////////////////////////////////////////////////// -DirectoryList::DirectoryList(const QStringList &directories, bool importPlaylists, - QWidget *parent, const char *name) : +DirectoryList::DirectoryList(const TQStringList &directories, bool importPlaylists, + TQWidget *parent, const char *name) : KDialogBase(parent, name, true, i18n("Folder List"), Ok | Cancel, Ok, true), m_dirList(directories), m_importPlaylists(importPlaylists) @@ -39,18 +39,18 @@ DirectoryList::DirectoryList(const QStringList &directories, bool importPlaylist m_base->directoryListView->setFullWidth(true); - connect(m_base->addDirectoryButton, SIGNAL(clicked()), - SLOT(slotAddDirectory())); - connect(m_base->removeDirectoryButton, SIGNAL(clicked()), - SLOT(slotRemoveDirectory())); + connect(m_base->addDirectoryButton, TQT_SIGNAL(clicked()), + TQT_SLOT(slotAddDirectory())); + connect(m_base->removeDirectoryButton, TQT_SIGNAL(clicked()), + TQT_SLOT(slotRemoveDirectory())); - QStringList::ConstIterator it = directories.begin(); + TQStringList::ConstIterator it = directories.begin(); for(; it != directories.end(); ++it) new KListViewItem(m_base->directoryListView, *it); m_base->importPlaylistsCheckBox->setChecked(importPlaylists); - QSize sz = sizeHint(); + TQSize sz = sizeHint(); setMinimumSize(kMax(350, sz.width()), kMax(250, sz.height())); resize(sizeHint()); } @@ -77,7 +77,7 @@ DirectoryList::Result DirectoryList::exec() void DirectoryList::slotAddDirectory() { - QString dir = KFileDialog::getExistingDirectory(); + TQString dir = KFileDialog::getExistingDirectory(); if(!dir.isEmpty() && m_dirList.find(dir) == m_dirList.end()) { m_dirList.append(dir); new KListViewItem(m_base->directoryListView, dir); @@ -90,7 +90,7 @@ void DirectoryList::slotRemoveDirectory() if(!m_base->directoryListView->selectedItem()) return; - QString dir = m_base->directoryListView->selectedItem()->text(0); + TQString dir = m_base->directoryListView->selectedItem()->text(0); m_dirList.remove(dir); m_result.removedDirs.append(dir); delete m_base->directoryListView->selectedItem(); diff --git a/juk/directorylist.h b/juk/directorylist.h index fef730a2..d9b2a080 100644 --- a/juk/directorylist.h +++ b/juk/directorylist.h @@ -26,29 +26,29 @@ class DirectoryList : public KDialogBase public: struct Result { - QStringList addedDirs; - QStringList removedDirs; + TQStringList addedDirs; + TQStringList removedDirs; DialogCode status; bool addPlaylists; }; - DirectoryList(const QStringList &directories, bool importPlaylists, - QWidget *parent = 0, const char *name = 0); + DirectoryList(const TQStringList &directories, bool importPlaylists, + TQWidget *parent = 0, const char *name = 0); virtual ~DirectoryList(); public slots: Result exec(); signals: - void signalDirectoryAdded(const QString &directory); - void signalDirectoryRemoved(const QString &directory); + void signalDirectoryAdded(const TQString &directory); + void signalDirectoryRemoved(const TQString &directory); private slots: void slotAddDirectory(); void slotRemoveDirectory(); private: - QStringList m_dirList; + TQStringList m_dirList; bool m_importPlaylists; DirectoryListBase *m_base; Result m_result; diff --git a/juk/dynamicplaylist.cpp b/juk/dynamicplaylist.cpp index 69d0a4ae..336d1e3e 100644 --- a/juk/dynamicplaylist.cpp +++ b/juk/dynamicplaylist.cpp @@ -42,8 +42,8 @@ private: DynamicPlaylist::DynamicPlaylist(const PlaylistList &playlists, PlaylistCollection *collection, - const QString &name, - const QString &iconName, + const TQString &name, + const TQString &iconName, bool setupPlaylist, bool synchronizePlaying) : Playlist(collection, true), @@ -60,14 +60,14 @@ DynamicPlaylist::DynamicPlaylist(const PlaylistList &playlists, for(PlaylistList::ConstIterator it = playlists.begin(); it != playlists.end(); ++it) m_observers.append(new PlaylistDirtyObserver(this, *it)); - connect(CollectionList::instance(), SIGNAL(signalCollectionChanged()), this, SLOT(slotSetDirty())); + connect(CollectionList::instance(), TQT_SIGNAL(signalCollectionChanged()), this, TQT_SLOT(slotSetDirty())); } DynamicPlaylist::~DynamicPlaylist() { lower(); - for(QValueList::ConstIterator it = m_observers.begin(); + for(TQValueList::ConstIterator it = m_observers.begin(); it != m_observers.end(); ++it) { @@ -93,7 +93,7 @@ void DynamicPlaylist::slotReload() checkUpdateItems(); } -void DynamicPlaylist::lower(QWidget *top) +void DynamicPlaylist::lower(TQWidget *top) { if(top == this) return; @@ -130,13 +130,13 @@ PlaylistItemList DynamicPlaylist::items() return Playlist::items(); } -void DynamicPlaylist::showEvent(QShowEvent *e) +void DynamicPlaylist::showEvent(TQShowEvent *e) { checkUpdateItems(); Playlist::showEvent(e); } -void DynamicPlaylist::paintEvent(QPaintEvent *e) +void DynamicPlaylist::paintEvent(TQPaintEvent *e) { checkUpdateItems(); Playlist::paintEvent(e); @@ -153,7 +153,7 @@ void DynamicPlaylist::updateItems() PlaylistItemList newSiblings = siblings; if(m_siblings != newSiblings) { m_siblings = newSiblings; - QTimer::singleShot(0, this, SLOT(slotUpdateItems())); + TQTimer::singleShot(0, this, TQT_SLOT(slotUpdateItems())); } } diff --git a/juk/dynamicplaylist.h b/juk/dynamicplaylist.h index 3e6e2c4b..20e496d0 100644 --- a/juk/dynamicplaylist.h +++ b/juk/dynamicplaylist.h @@ -31,8 +31,8 @@ public: */ DynamicPlaylist(const PlaylistList &lists, PlaylistCollection *collection, - const QString &name = QString::null, - const QString &iconName = "midi", + const TQString &name = TQString::null, + const TQString &iconName = "midi", bool setupPlaylist = true, bool synchronizePlaying = false); @@ -55,7 +55,7 @@ public slots: * it can synchronize the playing item with the one that playlist it was * create from. */ - void lower(QWidget *top = 0); + void lower(TQWidget *top = 0); protected: /** @@ -72,12 +72,12 @@ protected: virtual PlaylistItemList items(); /** - * Reimplemented from QWidget. Here it updates the list of items (when + * Reimplemented from TQWidget. Here it updates the list of items (when * appropriate) as the widget is shown. */ - virtual void showEvent(QShowEvent *e); + virtual void showEvent(TQShowEvent *e); - virtual void paintEvent(QPaintEvent *e); + virtual void paintEvent(TQPaintEvent *e); /** * Updates the items (unconditionally). This should be reimplemented in @@ -100,7 +100,7 @@ private slots: void slotUpdateItems(); private: - QValueList m_observers; + TQValueList m_observers; PlaylistItemList m_siblings; PlaylistList m_playlists; bool m_dirty; diff --git a/juk/exampleoptions.cpp b/juk/exampleoptions.cpp index 68e2bc0f..e365546a 100644 --- a/juk/exampleoptions.cpp +++ b/juk/exampleoptions.cpp @@ -16,12 +16,12 @@ #include #include -#include -#include +#include +#include #include "exampleoptions.h" -ExampleOptions::ExampleOptions(QWidget *parent) : +ExampleOptions::ExampleOptions(TQWidget *parent) : ExampleOptionsBase(parent, "example options widget") { } @@ -44,31 +44,31 @@ void ExampleOptions::exampleFileChanged() emit fileChanged(); } -ExampleOptionsDialog::ExampleOptionsDialog(QWidget *parent) : - QDialog(parent, "example options dialog") +ExampleOptionsDialog::ExampleOptionsDialog(TQWidget *parent) : + TQDialog(parent, "example options dialog") { setCaption(i18n("JuK")); - QVBoxLayout *l = new QVBoxLayout(this); + TQVBoxLayout *l = new TQVBoxLayout(this); m_options = new ExampleOptions(this); l->addWidget(m_options); // Forward signals - connect(m_options, SIGNAL(fileChanged()), SLOT(fileModeSelected())); - connect(m_options, SIGNAL(dataChanged()), SIGNAL(dataChanged())); - connect(m_options->m_exampleFile, SIGNAL(urlSelected(const QString &)), - this, SIGNAL(fileChanged(const QString &))); - connect(m_options->m_exampleFile, SIGNAL(returnPressed(const QString &)), - this, SIGNAL(fileChanged(const QString &))); + connect(m_options, TQT_SIGNAL(fileChanged()), TQT_SLOT(fileModeSelected())); + connect(m_options, TQT_SIGNAL(dataChanged()), TQT_SIGNAL(dataChanged())); + connect(m_options->m_exampleFile, TQT_SIGNAL(urlSelected(const TQString &)), + this, TQT_SIGNAL(fileChanged(const TQString &))); + connect(m_options->m_exampleFile, TQT_SIGNAL(returnPressed(const TQString &)), + this, TQT_SIGNAL(fileChanged(const TQString &))); } -void ExampleOptionsDialog::hideEvent(QHideEvent *) +void ExampleOptionsDialog::hideEvent(TQHideEvent *) { emit signalHidden(); } -void ExampleOptionsDialog::showEvent(QShowEvent *) +void ExampleOptionsDialog::showEvent(TQShowEvent *) { emit signalShown(); } diff --git a/juk/exampleoptions.h b/juk/exampleoptions.h index 26ee23c1..dca7a465 100644 --- a/juk/exampleoptions.h +++ b/juk/exampleoptions.h @@ -16,14 +16,14 @@ #ifndef JUK_EXAMPLEOPTIONS_H #define JUK_EXAMPLEOPTIONS_H -#include +#include #include "exampleoptionsbase.h" class ExampleOptions : public ExampleOptionsBase { Q_OBJECT public: - ExampleOptions(QWidget *parent); + ExampleOptions(TQWidget *parent); protected slots: virtual void exampleSelectionChanged(); @@ -37,19 +37,19 @@ class ExampleOptionsDialog : public QDialog { Q_OBJECT public: - ExampleOptionsDialog(QWidget *parent); + ExampleOptionsDialog(TQWidget *parent); const ExampleOptions *widget() const { return m_options; } protected: - virtual void hideEvent(QHideEvent *); - virtual void showEvent(QShowEvent *); + virtual void hideEvent(TQHideEvent *); + virtual void showEvent(TQShowEvent *); protected slots: void fileModeSelected(); signals: - void fileChanged(const QString &); + void fileChanged(const TQString &); void dataChanged(); void signalHidden(); void signalShown(); diff --git a/juk/filehandle.cpp b/juk/filehandle.cpp index 583cfc0d..70932063 100644 --- a/juk/filehandle.cpp +++ b/juk/filehandle.cpp @@ -18,7 +18,7 @@ #include -#include +#include #include "filehandle.h" #include "filehandleproperties.h" @@ -39,12 +39,12 @@ AddProperty(Path, absFilePath()) AddNumberProperty(Size, fileInfo().size()) AddProperty(Extension, fileInfo().extension(false)) -static QString resolveSymLinks(const QFileInfo &file) // static +static TQString resolveSymLinks(const TQFileInfo &file) // static { char real[PATH_MAX]; - if(file.exists() && realpath(QFile::encodeName(file.absFilePath()).data(), real)) - return QFile::decodeName(real); + if(file.exists() && realpath(TQFile::encodeName(file.absFilePath()).data(), real)) + return TQFile::decodeName(real); else return file.filePath(); } @@ -79,10 +79,10 @@ public: mutable Tag *tag; mutable CoverInfo *coverInfo; - mutable QString absFilePath; - QFileInfo fileInfo; - QDateTime modificationTime; - QDateTime lastModified; + mutable TQString absFilePath; + TQFileInfo fileInfo; + TQDateTime modificationTime; + TQDateTime lastModified; }; //////////////////////////////////////////////////////////////////////////////// @@ -106,22 +106,22 @@ FileHandle::FileHandle(const FileHandle &f) : d->ref(); } -FileHandle::FileHandle(const QFileInfo &info, const QString &path) : +FileHandle::FileHandle(const TQFileInfo &info, const TQString &path) : d(0) { setup(info, path); } -FileHandle::FileHandle(const QString &path) : +FileHandle::FileHandle(const TQString &path) : d(0) { - setup(QFileInfo(path), path); + setup(TQFileInfo(path), path); } -FileHandle::FileHandle(const QString &path, CacheDataStream &s) +FileHandle::FileHandle(const TQString &path, CacheDataStream &s) { d = new FileHandlePrivate; - d->fileInfo = QFileInfo(path); + d->fileInfo = TQFileInfo(path); d->absFilePath = path; read(s); Cache::instance()->insert(*this); @@ -140,10 +140,10 @@ void FileHandle::refresh() d->tag = new Tag(d->absFilePath); } -void FileHandle::setFile(const QString &path) +void FileHandle::setFile(const TQString &path) { if(!d || isNull()) - setup(QFileInfo(path), path); + setup(TQFileInfo(path), path); else { d->absFilePath = resolveSymLinks(path); d->fileInfo.setFile(path); @@ -167,14 +167,14 @@ CoverInfo *FileHandle::coverInfo() const return d->coverInfo; } -QString FileHandle::absFilePath() const +TQString FileHandle::absFilePath() const { if(d->absFilePath.isNull()) d->absFilePath = resolveSymLinks(d->fileInfo.absFilePath()); return d->absFilePath; } -const QFileInfo &FileHandle::fileInfo() const +const TQFileInfo &FileHandle::fileInfo() const { return d->fileInfo; } @@ -191,7 +191,7 @@ bool FileHandle::current() const d->modificationTime >= lastModified()); } -const QDateTime &FileHandle::lastModified() const +const TQDateTime &FileHandle::lastModified() const { if(d->lastModified.isNull()) d->lastModified = d->fileInfo.lastModified(); @@ -237,12 +237,12 @@ bool FileHandle::operator!=(const FileHandle &f) const return d != f.d; } -QStringList FileHandle::properties() // static +TQStringList FileHandle::properties() // static { return FileHandleProperties::properties(); } -QString FileHandle::property(const QString &name) const +TQString FileHandle::property(const TQString &name) const { return FileHandleProperties::property(*this, name.latin1()); } @@ -257,12 +257,12 @@ const FileHandle &FileHandle::null() // static // private methods //////////////////////////////////////////////////////////////////////////////// -void FileHandle::setup(const QFileInfo &info, const QString &path) +void FileHandle::setup(const TQFileInfo &info, const TQString &path) { if(d && !isNull()) return; - QString fileName = path.isNull() ? info.absFilePath() : path; + TQString fileName = path.isNull() ? info.absFilePath() : path; FileHandle cached = Cache::instance()->value(resolveSymLinks(fileName)); @@ -283,7 +283,7 @@ void FileHandle::setup(const QFileInfo &info, const QString &path) // related functions //////////////////////////////////////////////////////////////////////////////// -QDataStream &operator<<(QDataStream &s, const FileHandle &f) +TQDataStream &operator<<(TQDataStream &s, const FileHandle &f) { s << *(f.tag()) << f.lastModified(); diff --git a/juk/filehandle.h b/juk/filehandle.h index 6c12a344..846e3320 100644 --- a/juk/filehandle.h +++ b/juk/filehandle.h @@ -16,7 +16,7 @@ #ifndef JUK_FILEHANDLE_H #define JUK_FILEHANDLE_H -#include +#include class QFileInfo; class QDateTime; @@ -36,25 +36,25 @@ class FileHandle public: FileHandle(); FileHandle(const FileHandle &f); - explicit FileHandle(const QFileInfo &info, const QString &path = QString::null); - explicit FileHandle(const QString &path); - FileHandle(const QString &path, CacheDataStream &s); + explicit FileHandle(const TQFileInfo &info, const TQString &path = TQString::null); + explicit FileHandle(const TQString &path); + FileHandle(const TQString &path, CacheDataStream &s); ~FileHandle(); /** * Forces the FileHandle to reread its information from the disk. */ void refresh(); - void setFile(const QString &path); + void setFile(const TQString &path); Tag *tag() const; CoverInfo *coverInfo() const; - QString absFilePath() const; - const QFileInfo &fileInfo() const; + TQString absFilePath() const; + const TQFileInfo &fileInfo() const; bool isNull() const; bool current() const; - const QDateTime &lastModified() const; + const TQDateTime &lastModified() const; void read(CacheDataStream &s); @@ -62,8 +62,8 @@ public: bool operator==(const FileHandle &f) const; bool operator!=(const FileHandle &f) const; - static QStringList properties(); - QString property(const QString &name) const; + static TQStringList properties(); + TQString property(const TQString &name) const; static const FileHandle &null(); @@ -71,12 +71,12 @@ private: class FileHandlePrivate; FileHandlePrivate *d; - void setup(const QFileInfo &info, const QString &path); + void setup(const TQFileInfo &info, const TQString &path); }; -typedef QValueList FileHandleList; +typedef TQValueList FileHandleList; -QDataStream &operator<<(QDataStream &s, const FileHandle &f); +TQDataStream &operator<<(TQDataStream &s, const FileHandle &f); CacheDataStream &operator>>(CacheDataStream &s, FileHandle &f); #endif diff --git a/juk/filehandleproperties.h b/juk/filehandleproperties.h index b0b708bc..4fc31f92 100644 --- a/juk/filehandleproperties.h +++ b/juk/filehandleproperties.h @@ -14,7 +14,7 @@ #ifndef FILEHANDLEPROPERTIES_H #define FILEHANDLEPROPERTIES_H -#include +#include /* * These ugly macros make possible a property registration system that makes it @@ -30,7 +30,7 @@ { \ struct name##Property : public Property \ { \ - virtual QString value(const FileHandle &f) const \ + virtual TQString value(const FileHandle &f) const \ { \ return f.method; \ } \ @@ -45,9 +45,9 @@ { \ struct name##Property : public Property \ { \ - virtual QString value(const FileHandle &f) const \ + virtual TQString value(const FileHandle &f) const \ { \ - return QString::number(f.method); \ + return TQString::number(f.method); \ } \ static const int dummy; \ }; \ @@ -59,33 +59,33 @@ namespace FileHandleProperties { struct Property { - virtual QString value(const FileHandle &) const + virtual TQString value(const FileHandle &) const { - return QString::null; + return TQString::null; } }; - static QMap propertyMap; + static TQMap propertyMap; - static int addToPropertyMap(const QCString &name, Property *property) + static int addToPropertyMap(const TQCString &name, Property *property) { propertyMap[name] = property; return 0; } - static QString property(const FileHandle &file, const QCString &key) + static TQString property(const FileHandle &file, const TQCString &key) { - return propertyMap.contains(key) ? propertyMap[key]->value(file) : QString::null; + return propertyMap.contains(key) ? propertyMap[key]->value(file) : TQString::null; } - static QStringList properties() + static TQStringList properties() { - static QStringList l; + static TQStringList l; if(l.isEmpty()) { - QMap::ConstIterator it = propertyMap.begin(); + TQMap::ConstIterator it = propertyMap.begin(); for(; it != propertyMap.end(); ++it) - l.append(QString(it.key())); + l.append(TQString(it.key())); } return l; } diff --git a/juk/filerenamer.cpp b/juk/filerenamer.cpp index ec45a268..c1acb2ce 100644 --- a/juk/filerenamer.cpp +++ b/juk/filerenamer.cpp @@ -34,19 +34,19 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include "tag.h" #include "filehandle.h" @@ -59,17 +59,17 @@ class ConfirmationDialog : public KDialogBase { public: - ConfirmationDialog(const QMap &files, - QWidget *parent = 0, const char *name = 0) + ConfirmationDialog(const TQMap &files, + TQWidget *parent = 0, const char *name = 0) : KDialogBase(parent, name, true, i18n("Warning"), Ok | Cancel) { - QVBox *vbox = makeVBoxMainWidget(); - QHBox *hbox = new QHBox(vbox); + TQVBox *vbox = makeVBoxMainWidget(); + TQHBox *hbox = new TQHBox(vbox); - QLabel *l = new QLabel(hbox); + TQLabel *l = new TQLabel(hbox); l->setPixmap(SmallIcon("messagebox_warning", 32)); - l = new QLabel(i18n("You are about to rename the following files. " + l = new TQLabel(i18n("You are about to rename the following files. " "Are you sure you want to continue?"), hbox); hbox->setStretchFactor(l, 1); @@ -80,7 +80,7 @@ public: int lvHeight = 0; - QMap::ConstIterator it = files.begin(); + TQMap::ConstIterator it = files.begin(); for(; it != files.end(); ++it) { KListViewItem *i = it.key() != it.data() ? new KListViewItem(lv, it.key(), it.data()) @@ -103,7 +103,7 @@ ConfigCategoryReader::ConfigCategoryReader() : CategoryReaderInterface(), { KConfigGroup config(KGlobal::config(), "FileRenamer"); - QValueList categoryOrder = config.readIntListEntry("CategoryOrder"); + TQValueList categoryOrder = config.readIntListEntry("CategoryOrder"); unsigned categoryCount[NumTypes] = { 0 }; // Keep track of each category encountered. // Set a default: @@ -111,7 +111,7 @@ ConfigCategoryReader::ConfigCategoryReader() : CategoryReaderInterface(), if(categoryOrder.isEmpty()) categoryOrder << Artist << Album << Title << Track; - QValueList::ConstIterator catIt = categoryOrder.constBegin(); + TQValueList::ConstIterator catIt = categoryOrder.constBegin(); for(; catIt != categoryOrder.constEnd(); ++catIt) { unsigned catCount = categoryCount[*catIt]++; @@ -124,9 +124,9 @@ ConfigCategoryReader::ConfigCategoryReader() : CategoryReaderInterface(), m_folderSeparators.resize(m_categoryOrder.count() - 1, false); - QValueList checkedSeparators = config.readIntListEntry("CheckedDirSeparators"); + TQValueList checkedSeparators = config.readIntListEntry("CheckedDirSeparators"); - QValueList::ConstIterator it = checkedSeparators.constBegin(); + TQValueList::ConstIterator it = checkedSeparators.constBegin(); for(; it != checkedSeparators.constEnd(); ++it) { unsigned index = static_cast(*it); if(index < m_folderSeparators.count()) @@ -137,19 +137,19 @@ ConfigCategoryReader::ConfigCategoryReader() : CategoryReaderInterface(), m_separator = config.readEntry("Separator", " - "); } -QString ConfigCategoryReader::categoryValue(TagType type) const +TQString ConfigCategoryReader::categoryValue(TagType type) const { if(!m_currentItem) - return QString::null; + return TQString::null; Tag *tag = m_currentItem->file().tag(); switch(type) { case Track: - return QString::number(tag->track()); + return TQString::number(tag->track()); case Year: - return QString::number(tag->year()); + return TQString::number(tag->year()); case Title: return tag->title(); @@ -164,16 +164,16 @@ QString ConfigCategoryReader::categoryValue(TagType type) const return tag->genre(); default: - return QString::null; + return TQString::null; } } -QString ConfigCategoryReader::prefix(const CategoryID &category) const +TQString ConfigCategoryReader::prefix(const CategoryID &category) const { return m_options[category].prefix(); } -QString ConfigCategoryReader::suffix(const CategoryID &category) const +TQString ConfigCategoryReader::suffix(const CategoryID &category) const { return m_options[category].suffix(); } @@ -183,22 +183,22 @@ TagRenamerOptions::EmptyActions ConfigCategoryReader::emptyAction(const Category return m_options[category].emptyAction(); } -QString ConfigCategoryReader::emptyText(const CategoryID &category) const +TQString ConfigCategoryReader::emptyText(const CategoryID &category) const { return m_options[category].emptyText(); } -QValueList ConfigCategoryReader::categoryOrder() const +TQValueList ConfigCategoryReader::categoryOrder() const { return m_categoryOrder; } -QString ConfigCategoryReader::separator() const +TQString ConfigCategoryReader::separator() const { return m_separator; } -QString ConfigCategoryReader::musicFolder() const +TQString ConfigCategoryReader::musicFolder() const { return m_musicFolder; } @@ -224,11 +224,11 @@ bool ConfigCategoryReader::isDisabled(const CategoryID &category) const // Implementation of FileRenamerWidget // -FileRenamerWidget::FileRenamerWidget(QWidget *parent) : +FileRenamerWidget::FileRenamerWidget(TQWidget *parent) : FileRenamerBase(parent), CategoryReaderInterface(), m_exampleFromFile(false) { - QLabel *temp = new QLabel(0); + TQLabel *temp = new TQLabel(0); m_exampleText->setPaletteBackgroundColor(temp->paletteBackgroundColor()); delete temp; @@ -244,22 +244,22 @@ FileRenamerWidget::FileRenamerWidget(QWidget *parent) : // Add correct text to combo box. m_category->clear(); for(unsigned i = StartTag; i < NumTypes; ++i) { - QString category = TagRenamerOptions::tagTypeText(static_cast(i)); + TQString category = TagRenamerOptions::tagTypeText(static_cast(i)); m_category->insertItem(category); } - connect(m_exampleDialog, SIGNAL(signalShown()), SLOT(exampleDialogShown())); - connect(m_exampleDialog, SIGNAL(signalHidden()), SLOT(exampleDialogHidden())); - connect(m_exampleDialog, SIGNAL(dataChanged()), SLOT(dataSelected())); - connect(m_exampleDialog, SIGNAL(fileChanged(const QString &)), - this, SLOT(fileSelected(const QString &))); + connect(m_exampleDialog, TQT_SIGNAL(signalShown()), TQT_SLOT(exampleDialogShown())); + connect(m_exampleDialog, TQT_SIGNAL(signalHidden()), TQT_SLOT(exampleDialogHidden())); + connect(m_exampleDialog, TQT_SIGNAL(dataChanged()), TQT_SLOT(dataSelected())); + connect(m_exampleDialog, TQT_SIGNAL(fileChanged(const TQString &)), + this, TQT_SLOT(fileSelected(const TQString &))); exampleTextChanged(); } void FileRenamerWidget::loadConfig() { - QValueList checkedSeparators; + TQValueList checkedSeparators; KConfigGroup config(KGlobal::config(), "FileRenamer"); for(unsigned i = 0; i < m_rows.count(); ++i) @@ -267,14 +267,14 @@ void FileRenamerWidget::loadConfig() checkedSeparators = config.readIntListEntry("CheckedDirSeparators"); - QValueList::ConstIterator it = checkedSeparators.begin(); + TQValueList::ConstIterator it = checkedSeparators.begin(); for(; it != checkedSeparators.end(); ++it) { unsigned separator = static_cast(*it); if(separator < m_folderSwitches.count()) m_folderSwitches[separator]->setChecked(true); } - QString url = config.readPathEntry("MusicFolder", "${HOME}/music"); + TQString url = config.readPathEntry("MusicFolder", "${HOME}/music"); m_musicFolder->setURL(url); m_separator->setCurrentText(config.readEntry("Separator", " - ")); @@ -283,8 +283,8 @@ void FileRenamerWidget::loadConfig() void FileRenamerWidget::saveConfig() { KConfigGroup config(KGlobal::config(), "FileRenamer"); - QValueList checkedSeparators; - QValueList categoryOrder; + TQValueList checkedSeparators; + TQValueList categoryOrder; for(unsigned i = 0; i < m_rows.count(); ++i) { unsigned rowId = idOfPosition(i); // Write out in GUI order, not m_rows order @@ -310,8 +310,8 @@ FileRenamerWidget::~FileRenamerWidget() unsigned FileRenamerWidget::addRowCategory(TagType category) { - static QPixmap up = SmallIcon("up"); - static QPixmap down = SmallIcon("down"); + static TQPixmap up = SmallIcon("up"); + static TQPixmap down = SmallIcon("down"); // Find number of categories already of this type. unsigned categoryCount = 0; @@ -325,18 +325,18 @@ unsigned FileRenamerWidget::addRowCategory(TagType category) row.position = m_rows.count(); unsigned id = row.position; - QHBox *frame = new QHBox(m_mainFrame); + TQHBox *frame = new TQHBox(m_mainFrame); frame->setPaletteBackgroundColor(frame->paletteBackgroundColor().dark(110)); row.widget = frame; - frame->setFrameShape(QFrame::Box); + frame->setFrameShape(TQFrame::Box); frame->setLineWidth(1); frame->setMargin(3); m_mainFrame->setStretchFactor(frame, 1); - QVBox *buttons = new QVBox(frame); - buttons->setFrameStyle(QFrame::Plain | QFrame::Box); + TQVBox *buttons = new TQVBox(frame); + buttons->setFrameStyle(TQFrame::Plain | TQFrame::Box); buttons->setLineWidth(1); row.upButton = new KPushButton(buttons); @@ -347,23 +347,23 @@ unsigned FileRenamerWidget::addRowCategory(TagType category) row.upButton->setFlat(true); row.downButton->setFlat(true); - upMapper->connect(row.upButton, SIGNAL(clicked()), SLOT(map())); + upMapper->connect(row.upButton, TQT_SIGNAL(clicked()), TQT_SLOT(map())); upMapper->setMapping(row.upButton, id); - downMapper->connect(row.downButton, SIGNAL(clicked()), SLOT(map())); + downMapper->connect(row.downButton, TQT_SIGNAL(clicked()), TQT_SLOT(map())); downMapper->setMapping(row.downButton, id); - QString labelText = QString("%1").arg(TagRenamerOptions::tagTypeText(category)); - QLabel *label = new QLabel(labelText, frame); + TQString labelText = TQString("%1").arg(TagRenamerOptions::tagTypeText(category)); + TQLabel *label = new TQLabel(labelText, frame); frame->setStretchFactor(label, 1); label->setAlignment(AlignCenter); - QVBox *options = new QVBox(frame); + TQVBox *options = new TQVBox(frame); row.enableButton = new KPushButton(i18n("Remove"), options); - toggleMapper->connect(row.enableButton, SIGNAL(clicked()), SLOT(map())); + toggleMapper->connect(row.enableButton, TQT_SIGNAL(clicked()), TQT_SLOT(map())); toggleMapper->setMapping(row.enableButton, id); row.optionsButton = new KPushButton(i18n("Options"), options); - mapper->connect(row.optionsButton, SIGNAL(clicked()), SLOT(map())); + mapper->connect(row.optionsButton, TQT_SIGNAL(clicked()), TQT_SLOT(map())); mapper->setMapping(row.optionsButton, id); row.widget->show(); @@ -396,7 +396,7 @@ bool FileRenamerWidget::removeRow(unsigned id) return false; } - // Remove widget. Don't delete it since it appears QSignalMapper may still need it. + // Remove widget. Don't delete it since it appears TQSignalMapper may still need it. m_rows[id].widget->deleteLater(); m_rows[id].widget = 0; m_rows[id].enableButton = 0; @@ -448,22 +448,22 @@ bool FileRenamerWidget::removeRow(unsigned id) // We can insert another row now, make sure GUI is updated to match. m_insertCategory->setEnabled(true); - QTimer::singleShot(0, this, SLOT(exampleTextChanged())); + TQTimer::singleShot(0, this, TQT_SLOT(exampleTextChanged())); return true; } void FileRenamerWidget::addFolderSeparatorCheckbox() { - QWidget *temp = new QWidget(m_mainFrame); - QHBoxLayout *l = new QHBoxLayout(temp); + TQWidget *temp = new TQWidget(m_mainFrame); + TQHBoxLayout *l = new TQHBoxLayout(temp); - QCheckBox *cb = new QCheckBox(i18n("Insert folder separator"), temp); + TQCheckBox *cb = new TQCheckBox(i18n("Insert folder separator"), temp); m_folderSwitches.append(cb); l->addWidget(cb, 0, AlignCenter); cb->setChecked(false); - connect(cb, SIGNAL(toggled(bool)), - SLOT(exampleTextChanged())); + connect(cb, TQT_SIGNAL(toggled(bool)), + TQT_SLOT(exampleTextChanged())); temp->show(); } @@ -471,7 +471,7 @@ void FileRenamerWidget::addFolderSeparatorCheckbox() void FileRenamerWidget::createTagRows() { KConfigGroup config(KGlobal::config(), "FileRenamer"); - QValueList categoryOrder = config.readIntListEntry("CategoryOrder"); + TQValueList categoryOrder = config.readIntListEntry("CategoryOrder"); if(categoryOrder.isEmpty()) categoryOrder << Artist << Album << Artist << Title << Track; @@ -480,22 +480,22 @@ void FileRenamerWidget::createTagRows() m_rows.reserve(categoryOrder.count()); m_folderSwitches.reserve(categoryOrder.count() - 1); - mapper = new QSignalMapper(this, "signal mapper"); - toggleMapper = new QSignalMapper(this, "toggle mapper"); - upMapper = new QSignalMapper(this, "up button mapper"); - downMapper = new QSignalMapper(this, "down button mapper"); + mapper = new TQSignalMapper(this, "signal mapper"); + toggleMapper = new TQSignalMapper(this, "toggle mapper"); + upMapper = new TQSignalMapper(this, "up button mapper"); + downMapper = new TQSignalMapper(this, "down button mapper"); - connect(mapper, SIGNAL(mapped(int)), SLOT(showCategoryOption(int))); - connect(toggleMapper, SIGNAL(mapped(int)), SLOT(slotRemoveRow(int))); - connect(upMapper, SIGNAL(mapped(int)), SLOT(moveItemUp(int))); - connect(downMapper, SIGNAL(mapped(int)), SLOT(moveItemDown(int))); + connect(mapper, TQT_SIGNAL(mapped(int)), TQT_SLOT(showCategoryOption(int))); + connect(toggleMapper, TQT_SIGNAL(mapped(int)), TQT_SLOT(slotRemoveRow(int))); + connect(upMapper, TQT_SIGNAL(mapped(int)), TQT_SLOT(moveItemUp(int))); + connect(downMapper, TQT_SIGNAL(mapped(int)), TQT_SLOT(moveItemDown(int))); - m_mainFrame = new QVBox(m_mainView->viewport()); + m_mainFrame = new TQVBox(m_mainView->viewport()); m_mainFrame->setMargin(10); m_mainFrame->setSpacing(5); m_mainView->addChild(m_mainFrame); - m_mainView->setResizePolicy(QScrollView::AutoOneFit); + m_mainView->setResizePolicy(TQScrollView::AutoOneFit); // OK, the deal with the categoryOrder variable is that we need to create // the rows in the order that they were saved in (the order given by categoryOrder). @@ -503,7 +503,7 @@ void FileRenamerWidget::createTagRows() // a row given the identifier, use m_rows[id].position. To find the id of a given // position, use idOfPosition(position). - QValueList::ConstIterator it = categoryOrder.constBegin(); + TQValueList::ConstIterator it = categoryOrder.constBegin(); for(; it != categoryOrder.constEnd(); ++it) { if(*it < StartTag || *it >= NumTypes) { @@ -523,7 +523,7 @@ void FileRenamerWidget::createTagRows() // Insert the directory separator checkbox if this isn't the last // item. - QValueList::ConstIterator dup(it); + TQValueList::ConstIterator dup(it); // Check for last item if(++dup != categoryOrder.constEnd()) @@ -553,17 +553,17 @@ void FileRenamerWidget::exampleTextChanged() m_exampleText->setText(FileRenamer::fileName(*this) + ".mp3"); } -QString FileRenamerWidget::fileCategoryValue(TagType category) const +TQString FileRenamerWidget::fileCategoryValue(TagType category) const { FileHandle file(m_exampleFile); Tag *tag = file.tag(); switch(category) { case Track: - return QString::number(tag->track()); + return TQString::number(tag->track()); case Year: - return QString::number(tag->year()); + return TQString::number(tag->year()); case Title: return tag->title(); @@ -578,11 +578,11 @@ QString FileRenamerWidget::fileCategoryValue(TagType category) const return tag->genre(); default: - return QString::null; + return TQString::null; } } -QString FileRenamerWidget::categoryValue(TagType category) const +TQString FileRenamerWidget::categoryValue(TagType category) const { if(m_exampleFromFile) return fileCategoryValue(category); @@ -609,13 +609,13 @@ QString FileRenamerWidget::categoryValue(TagType category) const return example->m_exampleGenre->text(); default: - return QString::null; + return TQString::null; } } -QValueList FileRenamerWidget::categoryOrder() const +TQValueList FileRenamerWidget::categoryOrder() const { - QValueList list; + TQValueList list; // Iterate in GUI row order. for(unsigned i = 0; i < m_rows.count(); ++i) { @@ -636,7 +636,7 @@ bool FileRenamerWidget::hasFolderSeparator(unsigned index) const void FileRenamerWidget::moveItem(unsigned id, MovementDirection direction) { - QWidget *l = m_rows[id].widget; + TQWidget *l = m_rows[id].widget; unsigned bottom = m_rows.count() - 1; unsigned pos = m_rows[id].position; unsigned newPos = (direction == MoveUp) ? pos - 1 : pos + 1; @@ -666,7 +666,7 @@ void FileRenamerWidget::moveItem(unsigned id, MovementDirection direction) // This is the item we're swapping with. unsigned idSwitchWith = idOfPosition(newPos); - QWidget *w = m_rows[idSwitchWith].widget; + TQWidget *w = m_rows[idSwitchWith].widget; // Update the table of widget rows. @@ -675,7 +675,7 @@ void FileRenamerWidget::moveItem(unsigned id, MovementDirection direction) // Move the item two spaces above/below its previous position. It has to // be 2 spaces because of the checkbox. - QBoxLayout *layout = dynamic_cast(m_mainFrame->layout()); + TQBoxLayout *layout = dynamic_cast(m_mainFrame->layout()); layout->remove(l); layout->insertWidget(2 * newPos, l); @@ -687,7 +687,7 @@ void FileRenamerWidget::moveItem(unsigned id, MovementDirection direction) layout->insertWidget(2 * pos, w); layout->invalidate(); - QTimer::singleShot(0, this, SLOT(exampleTextChanged())); + TQTimer::singleShot(0, this, TQT_SLOT(exampleTextChanged())); } unsigned FileRenamerWidget::idOfPosition(unsigned position) const @@ -734,7 +734,7 @@ void FileRenamerWidget::showCategoryOption(int id) { TagOptionsDialog *dialog = new TagOptionsDialog(this, m_rows[id].options, m_rows[id].category.categoryNumber); - if(dialog->exec() == QDialog::Accepted) { + if(dialog->exec() == TQDialog::Accepted) { m_rows[id].options = dialog->options(); exampleTextChanged(); } @@ -796,7 +796,7 @@ void FileRenamerWidget::exampleDialogHidden() m_showExample->setText(i18n("Show Renamer Test Dialog")); } -void FileRenamerWidget::fileSelected(const QString &file) +void FileRenamerWidget::fileSelected(const TQString &file) { m_exampleFromFile = true; m_exampleFile = file; @@ -809,12 +809,12 @@ void FileRenamerWidget::dataSelected() exampleTextChanged(); } -QString FileRenamerWidget::separator() const +TQString FileRenamerWidget::separator() const { return m_separator->currentText(); } -QString FileRenamerWidget::musicFolder() const +TQString FileRenamerWidget::musicFolder() const { return m_musicFolder->url(); } @@ -845,15 +845,15 @@ void FileRenamer::rename(PlaylistItem *item) void FileRenamer::rename(const PlaylistItemList &items) { ConfigCategoryReader reader; - QStringList errorFiles; - QMap map; - QMap itemMap; + TQStringList errorFiles; + TQMap map; + TQMap itemMap; for(PlaylistItemList::ConstIterator it = items.begin(); it != items.end(); ++it) { reader.setPlaylistItem(*it); - QString oldFile = (*it)->file().absFilePath(); - QString extension = (*it)->file().fileInfo().extension(false); - QString newFile = fileName(reader) + "." + extension; + TQString oldFile = (*it)->file().absFilePath(); + TQString extension = (*it)->file().fileInfo().extension(false); + TQString newFile = fileName(reader) + "." + extension; if(oldFile != newFile) { map[oldFile] = newFile; @@ -861,11 +861,11 @@ void FileRenamer::rename(const PlaylistItemList &items) } } - if(itemMap.isEmpty() || ConfirmationDialog(map).exec() != QDialog::Accepted) + if(itemMap.isEmpty() || ConfirmationDialog(map).exec() != TQDialog::Accepted) return; KApplication::setOverrideCursor(Qt::waitCursor); - for(QMap::ConstIterator it = map.begin(); + for(TQMap::ConstIterator it = map.begin(); it != map.end(); ++it) { if(moveFile(it.key(), it.data())) { @@ -885,7 +885,7 @@ void FileRenamer::rename(const PlaylistItemList &items) KMessageBox::errorList(0, i18n("The following rename operations failed:\n"), errorFiles); } -bool FileRenamer::moveFile(const QString &src, const QString &dest) +bool FileRenamer::moveFile(const TQString &src, const TQString &dest) { kdDebug(65432) << "Moving file " << src << " to " << dest << endl; @@ -906,7 +906,7 @@ bool FileRenamer::moveFile(const QString &src, const QString &dest) // Get just the directory. KURL dir = dstURL; - dir.setFileName(QString::null); + dir.setFileName(TQString::null); // Create the directory. if(!KStandardDirs::exists(dir.path())) @@ -932,27 +932,27 @@ void FileRenamer::setFolderIcon(const KURL &dst, const PlaylistItem *item) // Split path, and go through each path element. If a path element has // the album information, set its folder icon. - QStringList elements = QStringList::split("/", dstURL.directory()); - QString path; + TQStringList elements = TQStringList::split("/", dstURL.directory()); + TQString path; - for(QStringList::ConstIterator it = elements.begin(); it != elements.end(); ++it) { + for(TQStringList::ConstIterator it = elements.begin(); it != elements.end(); ++it) { path.append("/" + (*it)); kdDebug() << "Checking path: " << path << endl; if((*it).find(item->file().tag()->album()) != -1 && - !QFile::exists(path + "/.directory")) + !TQFile::exists(path + "/.directory")) { // Seems to be a match, let's set the folder icon for the current // path. First we should write out the file. - QPixmap thumb = item->file().coverInfo()->pixmap(CoverInfo::Thumbnail); + TQPixmap thumb = item->file().coverInfo()->pixmap(CoverInfo::Thumbnail); thumb.save(path + "/.juk-thumbnail.png", "PNG"); KSimpleConfig config(path + "/.directory"); config.setGroup("Desktop Entry"); if(!config.hasKey("Icon")) { - config.writeEntry("Icon", QString("%1/.juk-thumbnail.png").arg(path)); + config.writeEntry("Icon", TQString("%1/.juk-thumbnail.png").arg(path)); config.sync(); } @@ -965,11 +965,11 @@ void FileRenamer::setFolderIcon(const KURL &dst, const PlaylistItem *item) * Returns iterator pointing to the last item enabled in the given list with * a non-empty value (or is required to be included). */ -QValueList::ConstIterator lastEnabledItem(const QValueList &list, +TQValueList::ConstIterator lastEnabledItem(const TQValueList &list, const CategoryReaderInterface &interface) { - QValueList::ConstIterator it = list.constBegin(); - QValueList::ConstIterator last = list.constEnd(); + TQValueList::ConstIterator it = list.constBegin(); + TQValueList::ConstIterator last = list.constEnd(); for(; it != list.constEnd(); ++it) { if(interface.isRequired(*it) || (!interface.isDisabled(*it) && @@ -982,21 +982,21 @@ QValueList::ConstIterator lastEnabledItem(const QValueList categoryOrder = interface.categoryOrder(); - const QString separator = interface.separator(); - const QString folder = interface.musicFolder(); - QValueList::ConstIterator lastEnabled; + const TQValueList categoryOrder = interface.categoryOrder(); + const TQString separator = interface.separator(); + const TQString folder = interface.musicFolder(); + TQValueList::ConstIterator lastEnabled; unsigned i = 0; - QStringList list; - QChar dirSeparator = QChar(QDir::separator()); + TQStringList list; + TQChar dirSeparator = TQChar(TQDir::separator()); // Use lastEnabled to properly handle folder separators. lastEnabled = lastEnabledItem(categoryOrder, interface); bool pastLast = false; // Toggles to true once we've passed lastEnabled. - for(QValueList::ConstIterator it = categoryOrder.begin(); + for(TQValueList::ConstIterator it = categoryOrder.begin(); it != categoryOrder.end(); ++it, ++i) { @@ -1006,7 +1006,7 @@ QString FileRenamer::fileName(const CategoryReaderInterface &interface) if(interface.isDisabled(*it)) continue; - QString value = interface.value(*it); + TQString value = interface.value(*it); // The user can use the folder separator checkbox to add folders, so don't allow // slashes that slip in to accidentally create new folders. Should we filter this @@ -1023,9 +1023,9 @@ QString FileRenamer::fileName(const CategoryReaderInterface &interface) // Construct a single string representation, handling strings ending in // '/' specially - QString result; + TQString result; - for(QStringList::ConstIterator it = list.constBegin(); it != list.constEnd(); /* Empty */) { + for(TQStringList::ConstIterator it = list.constBegin(); it != list.constEnd(); /* Empty */) { result += *it; ++it; // Manually advance iterator to check for end-of-list. @@ -1039,7 +1039,7 @@ QString FileRenamer::fileName(const CategoryReaderInterface &interface) } } - return QString(folder + dirSeparator + result); + return TQString(folder + dirSeparator + result); } #include "filerenamer.moc" diff --git a/juk/filerenamer.h b/juk/filerenamer.h index 0097ed86..66548039 100644 --- a/juk/filerenamer.h +++ b/juk/filerenamer.h @@ -17,9 +17,9 @@ #ifndef JUK_FILERENAMER_H #define JUK_FILERENAMER_H -#include -#include -#include +#include +#include +#include #include "filerenamerbase.h" #include "filerenameroptions.h" @@ -41,21 +41,21 @@ enum MovementDirection { MoveUp, MoveDown }; /** * This is used by FileRenamerWidget to store information about a particular - * tag type, including its position, the QFrame holding the information, + * tag type, including its position, the TQFrame holding the information, * the up, down, and enable buttons, and the user-selected renaming options. */ struct Row { Row() : widget(0), upButton(0), downButton(0), enableButton(0) {} - QWidget *widget; + TQWidget *widget; - QPushButton *upButton, *downButton, *optionsButton, *enableButton; + TQPushButton *upButton, *downButton, *optionsButton, *enableButton; TagRenamerOptions options; CategoryID category; // Includes category and a disambiguation id. unsigned position; ///< Position in the GUI (0 == top) - QString name; + TQString name; }; /** @@ -65,7 +65,7 @@ struct Row * takes up. The index into the vector is known as the row identifier (which is unique but * not necessarily constant). */ -typedef QValueVector Rows; +typedef TQValueVector Rows; /** * Holds a list directory separator checkboxes which separate a row. There @@ -73,14 +73,14 @@ typedef QValueVector Rows; * * Used for ConfigCategoryReader. */ -typedef QValueVector DirSeparatorCheckBoxes; +typedef TQValueVector DirSeparatorCheckBoxes; /** * Associates a CategoryID combination with a set of options. * * Used for ConfigCategoryReader */ -typedef QMap CategoryOptionsMap; +typedef TQMap CategoryOptionsMap; /** * An implementation of CategoryReaderInterface that reads the user's settings @@ -102,14 +102,14 @@ public: // CategoryReaderInterface reimplementations - virtual QString categoryValue(TagType type) const; - virtual QString prefix(const CategoryID &category) const; - virtual QString suffix(const CategoryID &category) const; + virtual TQString categoryValue(TagType type) const; + virtual TQString prefix(const CategoryID &category) const; + virtual TQString suffix(const CategoryID &category) const; virtual TagRenamerOptions::EmptyActions emptyAction(const CategoryID &category) const; - virtual QString emptyText(const CategoryID &category) const; - virtual QValueList categoryOrder() const; - virtual QString separator() const; - virtual QString musicFolder() const; + virtual TQString emptyText(const CategoryID &category) const; + virtual TQValueList categoryOrder() const; + virtual TQString separator() const; + virtual TQString musicFolder() const; virtual int trackWidth(unsigned categoryNum) const; virtual bool hasFolderSeparator(unsigned index) const; virtual bool isDisabled(const CategoryID &category) const; @@ -117,10 +117,10 @@ public: private: const PlaylistItem *m_currentItem; CategoryOptionsMap m_options; - QValueList m_categoryOrder; - QString m_separator; - QString m_musicFolder; - QValueVector m_folderSeparators; + TQValueList m_categoryOrder; + TQString m_separator; + TQString m_musicFolder; + TQValueVector m_folderSeparators; }; /** @@ -142,7 +142,7 @@ class FileRenamerWidget : public FileRenamerBase, public CategoryReaderInterface Q_OBJECT public: - FileRenamerWidget(QWidget *parent); + FileRenamerWidget(TQWidget *parent); ~FileRenamerWidget(); /// Maximum number of total categories the widget will allow. @@ -232,7 +232,7 @@ private: * @param category the category to retrieve the value for. * @return the string representation of the value for \p category. */ - QString fileCategoryValue(TagType category) const; + TQString fileCategoryValue(TagType category) const; /** * Returns the value for \p category by reading the user entry for that @@ -242,7 +242,7 @@ private: * @param category the category to retrieve the value for. * @return the string representation of the value for \p category. */ - virtual QString categoryValue(TagType category) const; + virtual TQString categoryValue(TagType category) const; /** * Returns the user-specified prefix string for \p category. @@ -250,7 +250,7 @@ private: * @param category the category to retrieve the value for. * @return user-specified prefix string for \p category. */ - virtual QString prefix(const CategoryID &category) const + virtual TQString prefix(const CategoryID &category) const { return m_rows[findIdentifier(category)].options.prefix(); } @@ -261,7 +261,7 @@ private: * @param category the category to retrieve the value for. * @return user-specified suffix string for \p category. */ - virtual QString suffix(const CategoryID &category) const + virtual TQString suffix(const CategoryID &category) const { return m_rows[findIdentifier(category)].options.suffix(); } @@ -284,7 +284,7 @@ private: * @param category the category to retrieve the value for. * @return the user-specified empty text for \p category. */ - virtual QString emptyText(const CategoryID &category) const + virtual TQString emptyText(const CategoryID &category) const { return m_rows[findIdentifier(category)].options.emptyText(); } @@ -292,17 +292,17 @@ private: /** * @return list of CategoryIDs corresponding to the user-specified category order. */ - virtual QValueList categoryOrder() const; + virtual TQValueList categoryOrder() const; /** * @return string that separates the tag values in the file name. */ - virtual QString separator() const; + virtual TQString separator() const; /** * @return local path to the music folder used to store renamed files. */ - virtual QString musicFolder() const; + virtual TQString musicFolder() const; /** * @param categoryNum Zero-based number of category to get results for (if more than one). @@ -399,7 +399,7 @@ private slots: * * @param file the path to the local file to read. */ - virtual void fileSelected(const QString &file); + virtual void fileSelected(const TQString &file); /** * This function reads the tags from the user-supplied examples and ensures @@ -419,7 +419,7 @@ private slots: /** * This function removes the row identified by id and updates the internal data to be * consistent again, by forwarding the call to removeRow(). - * This roundabout way is done due to QSignalMapper. + * This roundabout way is done due to TQSignalMapper. * * @param id The unique id to update */ @@ -451,7 +451,7 @@ private slots: private: /// This is the frame that holds all of the category widgets and checkboxes. - QVBox *m_mainFrame; + TQVBox *m_mainFrame; /** * This is the meat of the widget, it holds the rows for the user configuration. It is @@ -475,13 +475,13 @@ private: /// This is true if we're reading example tags from m_exampleFile. bool m_exampleFromFile; - QString m_exampleFile; + TQString m_exampleFile; // Used to map signals from rows to the correct widget. - QSignalMapper *mapper; - QSignalMapper *toggleMapper; - QSignalMapper *upMapper; - QSignalMapper *downMapper; + TQSignalMapper *mapper; + TQSignalMapper *toggleMapper; + TQSignalMapper *upMapper; + TQSignalMapper *downMapper; }; /** @@ -521,7 +521,7 @@ public: * * @param interface object to read options/data from. */ - static QString fileName(const CategoryReaderInterface &interface); + static TQString fileName(const CategoryReaderInterface &interface); private: /** @@ -535,7 +535,7 @@ private: * Attempts to rename the file from \a src to \a dest. Returns true if the * operation succeeded. */ - bool moveFile(const QString &src, const QString &dest); + bool moveFile(const TQString &src, const TQString &dest); }; #endif /* JUK_FILERENAMER_H */ diff --git a/juk/filerenamerconfigdlg.cpp b/juk/filerenamerconfigdlg.cpp index 74038dc6..8a741d03 100644 --- a/juk/filerenamerconfigdlg.cpp +++ b/juk/filerenamerconfigdlg.cpp @@ -19,7 +19,7 @@ #include "filerenamer.h" #include "filerenamerconfigdlg.h" -FileRenamerConfigDlg::FileRenamerConfigDlg(QWidget *parent) : +FileRenamerConfigDlg::FileRenamerConfigDlg(TQWidget *parent) : KDialogBase(parent, "file renamer dialog", true, i18n("File Renamer Options"), Ok | Cancel), m_renamerWidget(new FileRenamerWidget(this)) diff --git a/juk/filerenamerconfigdlg.h b/juk/filerenamerconfigdlg.h index 0678f52b..0c42ab54 100644 --- a/juk/filerenamerconfigdlg.h +++ b/juk/filerenamerconfigdlg.h @@ -24,7 +24,7 @@ class FileRenamerConfigDlg : public KDialogBase { Q_OBJECT public: - FileRenamerConfigDlg(QWidget *parent); + FileRenamerConfigDlg(TQWidget *parent); protected slots: virtual void accept(); diff --git a/juk/filerenameroptions.cpp b/juk/filerenameroptions.cpp index 2813be4b..d40fd81c 100644 --- a/juk/filerenameroptions.cpp +++ b/juk/filerenameroptions.cpp @@ -17,15 +17,15 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "filerenameroptions.h" -FileRenamerTagOptions::FileRenamerTagOptions(QWidget *parent, +FileRenamerTagOptions::FileRenamerTagOptions(TQWidget *parent, const TagRenamerOptions &options) : FileRenamerTagOptionsBase(parent), m_options(options) { @@ -44,7 +44,7 @@ FileRenamerTagOptions::FileRenamerTagOptions(QWidget *parent, if(m_options.category() != Track) m_trackGroup->hide(); - QString tagText = m_options.tagTypeText(); + TQString tagText = m_options.tagTypeText(); setCaption(caption().arg(tagText)); m_tagFormatGroup->setTitle(m_tagFormatGroup->title().arg(tagText)); @@ -68,7 +68,7 @@ FileRenamerTagOptions::FileRenamerTagOptions(QWidget *parent, void FileRenamerTagOptions::slotBracketsChanged() { - QString tag = m_options.tagTypeText(); + TQString tag = m_options.tagTypeText(); m_options.setPrefix(m_prefixText->text()); m_options.setSuffix(m_suffixText->text()); @@ -82,19 +82,19 @@ void FileRenamerTagOptions::slotTrackWidthChanged() m_options.setTrackWidth(width); - QString singleDigitText = m_singleDigit->text(); + TQString singleDigitText = m_singleDigit->text(); singleDigitText.remove(" ->"); - QString doubleDigitText = m_doubleDigit->text(); + TQString doubleDigitText = m_doubleDigit->text(); doubleDigitText.remove(" ->"); if(singleDigitText.length() < width) { - QString p; + TQString p; p.fill('0', width - singleDigitText.length()); singleDigitText.prepend(p); } if(doubleDigitText.length() < width) { - QString p; + TQString p; p.fill('0', width - doubleDigitText.length()); doubleDigitText.prepend(p); } @@ -115,7 +115,7 @@ void FileRenamerTagOptions::slotEmptyActionChanged() m_options.setEmptyAction(TagRenamerOptions::ForceEmptyInclude); } -TagOptionsDialog::TagOptionsDialog(QWidget *parent, +TagOptionsDialog::TagOptionsDialog(TQWidget *parent, const TagRenamerOptions &options, unsigned categoryNumber) : KDialogBase(parent, 0, true, i18n("File Renamer"), Ok | Cancel), diff --git a/juk/filerenameroptions.h b/juk/filerenameroptions.h index 0711fbf7..07408827 100644 --- a/juk/filerenameroptions.h +++ b/juk/filerenameroptions.h @@ -30,7 +30,7 @@ class FileRenamerTagOptions : public FileRenamerTagOptionsBase Q_OBJECT public: - FileRenamerTagOptions(QWidget *parent, const TagRenamerOptions &options); + FileRenamerTagOptions(TQWidget *parent, const TagRenamerOptions &options); const TagRenamerOptions &options() const { return m_options; } @@ -53,7 +53,7 @@ class TagOptionsDialog : public KDialogBase Q_OBJECT public: - TagOptionsDialog(QWidget *parent, const TagRenamerOptions &options, unsigned categoryNumber); + TagOptionsDialog(TQWidget *parent, const TagRenamerOptions &options, unsigned categoryNumber); const TagRenamerOptions &options() const { return m_options; } diff --git a/juk/folderplaylist.cpp b/juk/folderplaylist.cpp index ecde8f77..71934359 100644 --- a/juk/folderplaylist.cpp +++ b/juk/folderplaylist.cpp @@ -15,18 +15,18 @@ #include "folderplaylist.h" #include "playlistcollection.h" -#include +#include //////////////////////////////////////////////////////////////////////////////// // public methods //////////////////////////////////////////////////////////////////////////////// -FolderPlaylist::FolderPlaylist(PlaylistCollection *collection, const QString &folder, - const QString &name) : +FolderPlaylist::FolderPlaylist(PlaylistCollection *collection, const TQString &folder, + const TQString &name) : Playlist(collection, name, "folder"), m_folder(folder) { - QTimer::singleShot(0, this, SLOT(slotReload())); + TQTimer::singleShot(0, this, TQT_SLOT(slotReload())); } FolderPlaylist::~FolderPlaylist() @@ -34,15 +34,15 @@ FolderPlaylist::~FolderPlaylist() } -QString FolderPlaylist::folder() const +TQString FolderPlaylist::folder() const { return m_folder; } -void FolderPlaylist::setFolder(const QString &s) +void FolderPlaylist::setFolder(const TQString &s) { m_folder = s; - QTimer::singleShot(0, this, SLOT(slotReload())); + TQTimer::singleShot(0, this, TQT_SLOT(slotReload())); } //////////////////////////////////////////////////////////////////////////////// @@ -59,17 +59,17 @@ void FolderPlaylist::slotReload() // helper functions //////////////////////////////////////////////////////////////////////////////// -QDataStream &operator<<(QDataStream &s, const FolderPlaylist &p) +TQDataStream &operator<<(TQDataStream &s, const FolderPlaylist &p) { s << p.name() << p.folder(); return s; } -QDataStream &operator>>(QDataStream &s, FolderPlaylist &p) +TQDataStream &operator>>(TQDataStream &s, FolderPlaylist &p) { - QString name; - QString folder; + TQString name; + TQString folder; s >> name >> folder; diff --git a/juk/folderplaylist.h b/juk/folderplaylist.h index 0635a131..4369a6fb 100644 --- a/juk/folderplaylist.h +++ b/juk/folderplaylist.h @@ -22,12 +22,12 @@ class FolderPlaylist : public Playlist Q_OBJECT public: - FolderPlaylist(PlaylistCollection *collection, const QString &folder = QString::null, - const QString &name = QString::null); + FolderPlaylist(PlaylistCollection *collection, const TQString &folder = TQString::null, + const TQString &name = TQString::null); virtual ~FolderPlaylist(); - QString folder() const; - void setFolder(const QString &s); + TQString folder() const; + void setFolder(const TQString &s); virtual bool canReload() const { return true; } @@ -35,10 +35,10 @@ public slots: virtual void slotReload(); private: - QString m_folder; + TQString m_folder; }; -QDataStream &operator<<(QDataStream &s, const FolderPlaylist &p); -QDataStream &operator>>(QDataStream &s, FolderPlaylist &p); +TQDataStream &operator<<(TQDataStream &s, const FolderPlaylist &p); +TQDataStream &operator>>(TQDataStream &s, FolderPlaylist &p); #endif diff --git a/juk/gstreamerplayer.cpp b/juk/gstreamerplayer.cpp index c538d9ff..39f371a3 100644 --- a/juk/gstreamerplayer.cpp +++ b/juk/gstreamerplayer.cpp @@ -21,8 +21,8 @@ #include #include -#include -#include +#include +#include // Defined because recent versions of glib add support for having gcc check // whether the sentinel used on g_object_{set,get} is correct. Although 0 @@ -142,7 +142,7 @@ void GStreamerPlayer::seekPosition(int position) void GStreamerPlayer::readConfig() { KConfigGroup config(KGlobal::config(), "GStreamerPlayer"); - m_sinkName = config.readEntry("SinkName", QString::null); + m_sinkName = config.readEntry("SinkName", TQString::null); } void GStreamerPlayer::setupPipeline() @@ -193,7 +193,7 @@ static GstBusSyncReply messageHandler(GstBus *, GstMessage *message, gpointer da { if(GST_MESSAGE_TYPE(message) == GST_MESSAGE_EOS) { GStreamerPlayer *player = static_cast(data); - QTimer::singleShot(0, player, SLOT(stop())); + TQTimer::singleShot(0, player, TQT_SLOT(stop())); } gst_message_unref(message); diff --git a/juk/gstreamerplayer.h b/juk/gstreamerplayer.h index 1d15562b..6cc8ebfd 100644 --- a/juk/gstreamerplayer.h +++ b/juk/gstreamerplayer.h @@ -21,7 +21,7 @@ #if HAVE_GSTREAMER #include -#include +#include #include "player.h" class GStreamerPlayer : public Player @@ -59,7 +59,7 @@ private: void readConfig(); long long time(GstQueryType type) const; - QString m_sinkName; + TQString m_sinkName; GstElement *m_pipeline; GstElement *m_source; GstElement *m_decoder; diff --git a/juk/historyplaylist.cpp b/juk/historyplaylist.cpp index 6ebd4643..26758fd6 100644 --- a/juk/historyplaylist.cpp +++ b/juk/historyplaylist.cpp @@ -29,10 +29,10 @@ HistoryPlaylist::HistoryPlaylist(PlaylistCollection *collection) : Playlist(collection, true), m_timer(0) { setAllowDuplicates(true); - m_timer = new QTimer(this); + m_timer = new TQTimer(this); - connect(PlayerManager::instance(), SIGNAL(signalPlay()), this, SLOT(slotAddPlaying())); - connect(m_timer, SIGNAL(timeout()), this, SLOT(slotCreateNewItem())); + connect(PlayerManager::instance(), TQT_SIGNAL(signalPlay()), this, TQT_SLOT(slotAddPlaying())); + connect(m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotCreateNewItem())); } HistoryPlaylist::~HistoryPlaylist() @@ -41,7 +41,7 @@ HistoryPlaylist::~HistoryPlaylist() } HistoryPlaylistItem *HistoryPlaylist::createItem(const FileHandle &file, - QListViewItem *after, bool emitChanged) + TQListViewItem *after, bool emitChanged) { if(!after) after = lastItem(); @@ -90,16 +90,16 @@ void HistoryPlaylist::slotCreateNewItem() // HistoryPlaylistItem public members //////////////////////////////////////////////////////////////////////////////// -HistoryPlaylistItem::HistoryPlaylistItem(CollectionListItem *item, Playlist *parent, QListViewItem *after) : +HistoryPlaylistItem::HistoryPlaylistItem(CollectionListItem *item, Playlist *parent, TQListViewItem *after) : PlaylistItem(item, parent, after), - m_dateTime(QDateTime::currentDateTime()) + m_dateTime(TQDateTime::currentDateTime()) { setText(0, KGlobal::locale()->formatDateTime(m_dateTime)); } HistoryPlaylistItem::HistoryPlaylistItem(CollectionListItem *item, Playlist *parent) : PlaylistItem(item, parent), - m_dateTime(QDateTime::currentDateTime()) + m_dateTime(TQDateTime::currentDateTime()) { setText(0, KGlobal::locale()->formatDateTime(m_dateTime)); } @@ -109,7 +109,7 @@ HistoryPlaylistItem::~HistoryPlaylistItem() } -void HistoryPlaylistItem::setDateTime(const QDateTime &dt) +void HistoryPlaylistItem::setDateTime(const TQDateTime &dt) { m_dateTime = dt; setText(0, KGlobal::locale()->formatDateTime(m_dateTime)); @@ -119,7 +119,7 @@ void HistoryPlaylistItem::setDateTime(const QDateTime &dt) // helper functions //////////////////////////////////////////////////////////////////////////////// -QDataStream &operator<<(QDataStream &s, const HistoryPlaylist &p) +TQDataStream &operator<<(TQDataStream &s, const HistoryPlaylist &p) { PlaylistItemList l = const_cast(&p)->items(); @@ -134,15 +134,15 @@ QDataStream &operator<<(QDataStream &s, const HistoryPlaylist &p) return s; } -QDataStream &operator>>(QDataStream &s, HistoryPlaylist &p) +TQDataStream &operator>>(TQDataStream &s, HistoryPlaylist &p) { Q_INT32 count; s >> count; HistoryPlaylistItem *after = 0; - QString fileName; - QDateTime dateTime; + TQString fileName; + TQDateTime dateTime; for(int i = 0; i < count; i++) { s >> fileName; diff --git a/juk/historyplaylist.h b/juk/historyplaylist.h index 144ec11c..5f2776d5 100644 --- a/juk/historyplaylist.h +++ b/juk/historyplaylist.h @@ -23,15 +23,15 @@ class HistoryPlaylistItem : public PlaylistItem { public: - HistoryPlaylistItem(CollectionListItem *item, Playlist *parent, QListViewItem *after); + HistoryPlaylistItem(CollectionListItem *item, Playlist *parent, TQListViewItem *after); HistoryPlaylistItem(CollectionListItem *item, Playlist *parent); virtual ~HistoryPlaylistItem(); - QDateTime dateTime() const { return m_dateTime; } - void setDateTime(const QDateTime &dt); + TQDateTime dateTime() const { return m_dateTime; } + void setDateTime(const TQDateTime &dt); private: - QDateTime m_dateTime; + TQDateTime m_dateTime; }; class HistoryPlaylist : public Playlist @@ -42,7 +42,7 @@ public: HistoryPlaylist(PlaylistCollection *collection); virtual ~HistoryPlaylist(); - virtual HistoryPlaylistItem *createItem(const FileHandle &file, QListViewItem *after = 0, + virtual HistoryPlaylistItem *createItem(const FileHandle &file, TQListViewItem *after = 0, bool emitChanged = true); virtual void createItems(const PlaylistItemList &siblings); virtual int columnOffset() const { return 1; } @@ -63,10 +63,10 @@ private slots: private: FileHandle m_file; - QTimer *m_timer; + TQTimer *m_timer; }; -QDataStream &operator<<(QDataStream &s, const HistoryPlaylist &p); -QDataStream &operator>>(QDataStream &s, HistoryPlaylist &p); +TQDataStream &operator<<(TQDataStream &s, const HistoryPlaylist &p); +TQDataStream &operator>>(TQDataStream &s, HistoryPlaylist &p); #endif diff --git a/juk/juk.cpp b/juk/juk.cpp index a3e0988c..35c08dff 100644 --- a/juk/juk.cpp +++ b/juk/juk.cpp @@ -43,7 +43,7 @@ using namespace ActionCollection; // public members //////////////////////////////////////////////////////////////////////////////// -JuK::JuK(QWidget *parent, const char *name) : +JuK::JuK(TQWidget *parent, const char *name) : KMainWindow(parent, name, WDestructiveClose), m_player(PlayerManager::instance()), m_shuttingDown(false) @@ -60,7 +60,7 @@ JuK::JuK(QWidget *parent, const char *name) : setupActions(); setupLayout(); - if(QApplication::reverseLayout()) + if(TQApplication::reverseLayout()) setupGUI(ToolBar | Save | Create, "jukui-rtl.rc"); else setupGUI(ToolBar | Save | Create); @@ -71,8 +71,8 @@ JuK::JuK(QWidget *parent, const char *name) : createDirs(); SplashScreen::finishedLoading(); - QTimer::singleShot(0, CollectionList::instance(), SLOT(slotCheckCache())); - QTimer::singleShot(0, this, SLOT(slotProcessArgs())); + TQTimer::singleShot(0, CollectionList::instance(), TQT_SLOT(slotCheckCache())); + TQTimer::singleShot(0, this, TQT_SLOT(slotProcessArgs())); m_sliderAction->slotUpdateOrientation(); } @@ -99,8 +99,8 @@ void JuK::setupLayout() setCentralWidget(m_splitter); m_statusLabel = new StatusLabel(m_splitter->playlist(), statusBar()); - connect(CollectionList::instance(), SIGNAL(signalCollectionChanged()), - m_statusLabel, SLOT(updateData())); + connect(CollectionList::instance(), TQT_SIGNAL(signalCollectionChanged()), + m_statusLabel, TQT_SLOT(updateData())); statusBar()->addWidget(m_statusLabel, 1); PlayerManager::instance()->setStatusLabel(m_statusLabel); @@ -112,15 +112,15 @@ void JuK::setupActions() { ActionCollection::actions()->setWidget(this); - KStdAction::quit(this, SLOT(slotQuit()), actions()); - KStdAction::undo(this, SLOT(slotUndo()), actions()); - KStdAction::cut(kapp, SLOT(cut()), actions()); - KStdAction::copy(kapp, SLOT(copy()), actions()); - KStdAction::paste(kapp, SLOT(paste()), actions()); - KStdAction::clear(kapp, SLOT(clear()), actions()); - KStdAction::selectAll(kapp, SLOT(selectAll()), actions()); + KStdAction::quit(this, TQT_SLOT(slotQuit()), actions()); + KStdAction::undo(this, TQT_SLOT(slotUndo()), actions()); + KStdAction::cut(kapp, TQT_SLOT(cut()), actions()); + KStdAction::copy(kapp, TQT_SLOT(copy()), actions()); + KStdAction::paste(kapp, TQT_SLOT(paste()), actions()); + KStdAction::clear(kapp, TQT_SLOT(clear()), actions()); + KStdAction::selectAll(kapp, TQT_SLOT(selectAll()), actions()); - new KAction(i18n("Remove From Playlist"), "edit_remove", 0, kapp, SLOT(clear()), actions(), "removeFromPlaylist"); + new KAction(i18n("Remove From Playlist"), "edit_remove", 0, kapp, TQT_SLOT(clear()), actions(), "removeFromPlaylist"); KActionMenu *actionMenu = new KActionMenu(i18n("&Random Play"), "roll", actions(), "actionMenu"); actionMenu->setDelayed(false); @@ -135,15 +135,15 @@ void JuK::setupActions() ka = new KRadioAction(i18n("Use &Album Random Play"), "roll", 0, actions(), "albumRandomPlay"); ka->setExclusiveGroup("randomPlayGroup"); - connect(ka, SIGNAL(toggled(bool)), SLOT(slotCheckAlbumNextAction(bool))); + connect(ka, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotCheckAlbumNextAction(bool))); actionMenu->insert(ka); - new KAction(i18n("&Play"), "player_play", 0, m_player, SLOT(play()), actions(), "play"); - new KAction(i18n("P&ause"), "player_pause", 0, m_player, SLOT(pause()), actions(), "pause"); - new KAction(i18n("&Stop"), "player_stop", 0, m_player, SLOT(stop()), actions(), "stop"); + new KAction(i18n("&Play"), "player_play", 0, m_player, TQT_SLOT(play()), actions(), "play"); + new KAction(i18n("P&ause"), "player_pause", 0, m_player, TQT_SLOT(pause()), actions(), "pause"); + new KAction(i18n("&Stop"), "player_stop", 0, m_player, TQT_SLOT(stop()), actions(), "stop"); - new KToolBarPopupAction(i18n("previous track", "Previous"), "player_start", KShortcut(), m_player, SLOT(back()), actions(), "back"); - new KAction(i18n("next track", "&Next"), "player_end", KShortcut(), m_player, SLOT(forward()), actions(), "forward"); + new KToolBarPopupAction(i18n("previous track", "Previous"), "player_start", KShortcut(), m_player, TQT_SLOT(back()), actions(), "back"); + new KAction(i18n("next track", "&Next"), "player_end", KShortcut(), m_player, TQT_SLOT(forward()), actions(), "forward"); new KToggleAction(i18n("&Loop Playlist"), 0, KShortcut(), actions(), "loopPlaylist"); KToggleAction *resizeColumnAction = new KToggleAction(i18n("&Resize Playlist Columns Manually"), @@ -152,12 +152,12 @@ void JuK::setupActions() // the following are not visible by default - new KAction(i18n("Mute"), "mute", 0, m_player, SLOT(mute()), actions(), "mute"); - new KAction(i18n("Volume Up"), "volumeUp", 0, m_player, SLOT(volumeUp()), actions(), "volumeUp"); - new KAction(i18n("Volume Down"), "volumeDown", 0, m_player, SLOT(volumeDown()), actions(), "volumeDown"); - new KAction(i18n("Play / Pause"), "playPause", 0, m_player, SLOT(playPause()), actions(), "playPause"); - new KAction(i18n("Seek Forward"), "seekForward", 0, m_player, SLOT(seekForward()), actions(), "seekForward"); - new KAction(i18n("Seek Back"), "seekBack", 0, m_player, SLOT(seekBack()), actions(), "seekBack"); + new KAction(i18n("Mute"), "mute", 0, m_player, TQT_SLOT(mute()), actions(), "mute"); + new KAction(i18n("Volume Up"), "volumeUp", 0, m_player, TQT_SLOT(volumeUp()), actions(), "volumeUp"); + new KAction(i18n("Volume Down"), "volumeDown", 0, m_player, TQT_SLOT(volumeDown()), actions(), "volumeDown"); + new KAction(i18n("Play / Pause"), "playPause", 0, m_player, TQT_SLOT(playPause()), actions(), "playPause"); + new KAction(i18n("Seek Forward"), "seekForward", 0, m_player, TQT_SLOT(seekForward()), actions(), "seekForward"); + new KAction(i18n("Seek Back"), "seekBack", 0, m_player, TQT_SLOT(seekBack()), actions(), "seekBack"); ////////////////////////////////////////////////// // settings menu @@ -179,8 +179,8 @@ void JuK::setupActions() new KToggleAction(i18n("Save &Play Queue on Exit"), KShortcut(), this, 0, actions(), "saveUpcomingTracks"); - connect(m_toggleSystemTrayAction, SIGNAL(toggled(bool)), - this, SLOT(slotToggleSystemTray(bool))); + connect(m_toggleSystemTrayAction, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotToggleSystemTray(bool))); m_outputSelectAction = PlayerManager::playerSelectAction(actions()); @@ -188,13 +188,13 @@ void JuK::setupActions() if(m_outputSelectAction) m_outputSelectAction->setCurrentItem(0); - new KAction(i18n("&Tag Guesser..."), 0, 0, this, SLOT(slotConfigureTagGuesser()), + new KAction(i18n("&Tag Guesser..."), 0, 0, this, TQT_SLOT(slotConfigureTagGuesser()), actions(), "tagGuesserConfig"); - new KAction(i18n("&File Renamer..."), 0, 0, this, SLOT(slotConfigureFileRenamer()), + new KAction(i18n("&File Renamer..."), 0, 0, this, TQT_SLOT(slotConfigureFileRenamer()), actions(), "fileRenamerConfig"); - KStdAction::keyBindings(this, SLOT(slotEditKeys()), actions()); + KStdAction::keyBindings(this, TQT_SLOT(slotEditKeys()), actions()); ////////////////////////////////////////////////// // just in the toolbar @@ -213,7 +213,7 @@ void JuK::setupSystemTray() m_toggleDockOnCloseAction->setEnabled(true); m_togglePopupsAction->setEnabled(true); - connect(m_systemTray, SIGNAL(quitSelected()), this, SLOT(slotAboutToQuit())); + connect(m_systemTray, TQT_SIGNAL(quitSelected()), this, TQT_SLOT(slotAboutToQuit())); } else { m_systemTray = 0; @@ -226,18 +226,18 @@ void JuK::setupGlobalAccels() { m_accel = new KGlobalAccel(this); - KeyDialog::insert(m_accel, "Play", i18n("Play"), action("play"), SLOT(activate())); - KeyDialog::insert(m_accel, "PlayPause", i18n("Play / Pause"), action("playPause"), SLOT(activate())); - KeyDialog::insert(m_accel, "Stop", i18n("Stop Playing"), action("stop"), SLOT(activate())); - KeyDialog::insert(m_accel, "Back", i18n("Back"), action("back"), SLOT(activate())); - KeyDialog::insert(m_accel, "Forward", i18n("Forward"), action("forward"), SLOT(activate())); - KeyDialog::insert(m_accel, "SeekBack", i18n("Seek Back"), action("seekBack"), SLOT(activate())); - KeyDialog::insert(m_accel, "SeekForward", i18n("Seek Forward"), action("seekForward"), SLOT(activate())); - KeyDialog::insert(m_accel, "VolumeUp", i18n("Volume Up"), action("volumeUp"), SLOT(activate())); - KeyDialog::insert(m_accel, "VolumeDown", i18n("Volume Down"), action("volumeDown"), SLOT(activate())); - KeyDialog::insert(m_accel, "Mute", i18n("Mute"), action("mute"), SLOT(activate())); - KeyDialog::insert(m_accel, "ShowHide", i18n("Show / Hide"), this, SLOT(slotShowHide())); - KeyDialog::insert(m_accel, "ForwardAlbum", i18n("Play Next Album"), action("forwardAlbum"), SLOT(activate())); + KeyDialog::insert(m_accel, "Play", i18n("Play"), action("play"), TQT_SLOT(activate())); + KeyDialog::insert(m_accel, "PlayPause", i18n("Play / Pause"), action("playPause"), TQT_SLOT(activate())); + KeyDialog::insert(m_accel, "Stop", i18n("Stop Playing"), action("stop"), TQT_SLOT(activate())); + KeyDialog::insert(m_accel, "Back", i18n("Back"), action("back"), TQT_SLOT(activate())); + KeyDialog::insert(m_accel, "Forward", i18n("Forward"), action("forward"), TQT_SLOT(activate())); + KeyDialog::insert(m_accel, "SeekBack", i18n("Seek Back"), action("seekBack"), TQT_SLOT(activate())); + KeyDialog::insert(m_accel, "SeekForward", i18n("Seek Forward"), action("seekForward"), TQT_SLOT(activate())); + KeyDialog::insert(m_accel, "VolumeUp", i18n("Volume Up"), action("volumeUp"), TQT_SLOT(activate())); + KeyDialog::insert(m_accel, "VolumeDown", i18n("Volume Down"), action("volumeDown"), TQT_SLOT(activate())); + KeyDialog::insert(m_accel, "Mute", i18n("Mute"), action("mute"), TQT_SLOT(activate())); + KeyDialog::insert(m_accel, "ShowHide", i18n("Show / Hide"), this, TQT_SLOT(slotShowHide())); + KeyDialog::insert(m_accel, "ForwardAlbum", i18n("Play Next Album"), action("forwardAlbum"), TQT_SLOT(activate())); m_accel->setConfigGroup("Shortcuts"); m_accel->readSettings(); @@ -247,7 +247,7 @@ void JuK::setupGlobalAccels() void JuK::slotProcessArgs() { KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); - QStringList files; + TQStringList files; for(int i = 0; i < args->count(); i++) files.append(args->arg(i)); @@ -257,7 +257,7 @@ void JuK::slotProcessArgs() void JuK::createDirs() { - QDir dir(KGlobal::dirs()->saveLocation("data", kapp->instanceName() + '/')); + TQDir dir(KGlobal::dirs()->saveLocation("data", kapp->instanceName() + '/')); if (!dir.exists("covers", false)) dir.mkdir("covers", false); dir.cd("covers"); @@ -265,7 +265,7 @@ void JuK::createDirs() dir.mkdir("large", false); } -void JuK::keyPressEvent(QKeyEvent *e) +void JuK::keyPressEvent(TQKeyEvent *e) { if (e->key() >= Qt::Key_Back && e->key() <= Qt::Key_MediaLast) e->accept(); @@ -299,7 +299,7 @@ void JuK::readConfig() ActionCollection::action("disableRandomPlay")->setChecked(true); - QString randomPlayMode = playerConfig.readEntry("RandomPlay", "Disabled"); + TQString randomPlayMode = playerConfig.readEntry("RandomPlay", "Disabled"); if(randomPlayMode == "true" || randomPlayMode == "Normal") m_randomPlayAction->setChecked(true); else if(randomPlayMode == "AlbumRandomPlay") diff --git a/juk/juk.h b/juk/juk.h index 41f3150a..0c4ce27a 100644 --- a/juk/juk.h +++ b/juk/juk.h @@ -39,7 +39,7 @@ class JuK : public KMainWindow Q_OBJECT public: - JuK(QWidget* parent = 0, const char *name = 0); + JuK(TQWidget* parent = 0, const char *name = 0); virtual ~JuK(); virtual KActionCollection *actionCollection() const; @@ -50,7 +50,7 @@ private: void setupGlobalAccels(); void createDirs(); - void keyPressEvent(QKeyEvent *); + void keyPressEvent(TQKeyEvent *); /** * readSettings() is separate from readConfig() in that it contains settings diff --git a/juk/jukIface.h b/juk/jukIface.h index b431ea90..575bb63d 100644 --- a/juk/jukIface.h +++ b/juk/jukIface.h @@ -2,38 +2,38 @@ #define JUKIFACE_H #include -#include -#include +#include +#include class CollectionIface : public DCOPObject { K_DCOP k_dcop: - void openFile(const QString &file) { open(file); } - void openFile(const QStringList &files) { open(files); } - void openFile(const QString &playlist, const QString &file) { open(playlist, file); } - void openFile(const QString &playlist, const QStringList &files) { open(playlist, files); } + void openFile(const TQString &file) { open(file); } + void openFile(const TQStringList &files) { open(files); } + void openFile(const TQString &playlist, const TQString &file) { open(playlist, file); } + void openFile(const TQString &playlist, const TQStringList &files) { open(playlist, files); } - virtual QStringList playlists() const = 0; - virtual void createPlaylist(const QString &) = 0; + virtual TQStringList playlists() const = 0; + virtual void createPlaylist(const TQString &) = 0; virtual void remove() = 0; - virtual void removeTrack(const QString &playlist, const QString &file) { removeTrack(playlist, QStringList(file)); } - virtual void removeTrack(const QString &playlist, const QStringList &files) = 0; + virtual void removeTrack(const TQString &playlist, const TQString &file) { removeTrack(playlist, TQStringList(file)); } + virtual void removeTrack(const TQString &playlist, const TQStringList &files) = 0; - virtual QString playlist() const = 0; - virtual QString playingPlaylist() const = 0; - virtual void setPlaylist(const QString &playlist) = 0; + virtual TQString playlist() const = 0; + virtual TQString playingPlaylist() const = 0; + virtual void setPlaylist(const TQString &playlist) = 0; - virtual QStringList playlistTracks(const QString &playlist) const = 0; - virtual QString trackProperty(const QString &file, const QString &property) const = 0; + virtual TQStringList playlistTracks(const TQString &playlist) const = 0; + virtual TQString trackProperty(const TQString &file, const TQString &property) const = 0; - virtual QPixmap trackCover(const QString &file, const QString &size = "Small") const = 0; + virtual TQPixmap trackCover(const TQString &file, const TQString &size = "Small") const = 0; protected: CollectionIface() : DCOPObject("Collection") {} - virtual void open(const QStringList &files) = 0; - virtual void open(const QString &playlist, const QStringList &files) = 0; + virtual void open(const TQStringList &files) = 0; + virtual void open(const TQString &playlist, const TQStringList &files) = 0; }; class PlayerIface : public DCOPObject @@ -45,17 +45,17 @@ k_dcop: virtual float volume() const = 0; virtual int status() const = 0; - virtual QStringList trackProperties() = 0; - virtual QString trackProperty(const QString &property) const = 0; - virtual QPixmap trackCover(const QString &size = "Small") const = 0; + virtual TQStringList trackProperties() = 0; + virtual TQString trackProperty(const TQString &property) const = 0; + virtual TQPixmap trackCover(const TQString &size = "Small") const = 0; - virtual QString currentFile() const + virtual TQString currentFile() const { return trackProperty("Path"); } virtual void play() = 0; - virtual void play(const QString &file) = 0; + virtual void play(const TQString &file) = 0; virtual void pause() = 0; virtual void stop() = 0; virtual void playPause() = 0; @@ -72,7 +72,7 @@ k_dcop: virtual void setVolume(float volume) = 0; virtual void seek(int time) = 0; - virtual QString playingString() const = 0; + virtual TQString playingString() const = 0; virtual int currentTime() const = 0; virtual int totalTime() const = 0; @@ -80,7 +80,7 @@ k_dcop: * @return The current player mode. * @see setRandomPlayMode() */ - virtual QString randomPlayMode() const = 0; + virtual TQString randomPlayMode() const = 0; /** * Sets the player mode to one of normal, random play, or album @@ -89,7 +89,7 @@ k_dcop: * "Random" -> Random * "AlbumRandom" -> Album Random */ - virtual void setRandomPlayMode(const QString &randomMode) = 0; + virtual void setRandomPlayMode(const TQString &randomMode) = 0; protected: PlayerIface() : DCOPObject("Player") {} @@ -99,8 +99,8 @@ class SearchIface : public DCOPObject { K_DCOP k_dcop: - virtual QString searchText() const = 0; - virtual void setSearchText(const QString &text) = 0; + virtual TQString searchText() const = 0; + virtual void setSearchText(const TQString &text) = 0; protected: SearchIface() : DCOPObject("Search") {} diff --git a/juk/k3bexporter.cpp b/juk/k3bexporter.cpp index a08ddcfe..d19021e6 100644 --- a/juk/k3bexporter.cpp +++ b/juk/k3bexporter.cpp @@ -23,8 +23,8 @@ #include #include -#include -#include +#include +#include #include #include @@ -50,8 +50,8 @@ class PlaylistAction : public KAction { public: PlaylistAction(const char *name, - const QString &userText, - const QIconSet &pix, + const TQString &userText, + const TQIconSet &pix, const char *slot, const KShortcut &cut = 0) : KAction(userText, pix, cut, 0 /* receiver */, 0 /* slot */, actions(), name), @@ -59,13 +59,13 @@ class PlaylistAction : public KAction { } - typedef QMap PlaylistRecipientMap; + typedef TQMap PlaylistRecipientMap; /** - * Defines a QObject to call (using the m_slot SLOT) when an action is + * Defines a TQObject to call (using the m_slot SLOT) when an action is * emitted from a Playlist. */ - void addCallMapping(const Playlist *p, QObject *obj) + void addCallMapping(const Playlist *p, TQObject *obj) { m_playlistRecipient[p] = obj; } @@ -81,19 +81,19 @@ class PlaylistAction : public KAction return; // Make sure we're supposed to notify someone about this playlist. - QObject *recipient = m_playlistRecipient[p]; + TQObject *recipient = m_playlistRecipient[p]; if(!recipient) return; // Invoke the slot using some trickery. - // XXX: Use the QMetaObject to do this in Qt 4. - connect(this, SIGNAL(activated()), recipient, m_slot); + // XXX: Use the TQMetaObject to do this in Qt 4. + connect(this, TQT_SIGNAL(activated()), recipient, m_slot); emit(activated()); - disconnect(this, SIGNAL(activated()), recipient, m_slot); + disconnect(this, TQT_SIGNAL(activated()), recipient, m_slot); } private: - QCString m_slot; + TQCString m_slot; PlaylistRecipientMap m_playlistRecipient; }; @@ -108,7 +108,7 @@ KAction *K3bExporter::action() "export_to_k3b", i18n("Add Selected Items to Audio or Data CD"), SmallIconSet("k3b"), - SLOT(slotExport()) + TQT_SLOT(slotExport()) ); m_action->setShortcutConfigurable(false); @@ -129,8 +129,8 @@ void K3bExporter::exportPlaylistItems(const PlaylistItemList &items) return; DCOPClient *client = DCOPClient::mainClient(); - QCString appId, appObj; - QByteArray data; + TQCString appId, appObj; + TQByteArray data; if(!client->findObject("k3b-*", "K3bInterface", "", data, appId, appObj)) exportViaCmdLine(items); @@ -149,7 +149,7 @@ void K3bExporter::slotExport() void K3bExporter::exportViaCmdLine(const PlaylistItemList &items) { K3bOpenMode mode = openMode(); - QCString cmdOption; + TQCString cmdOption; switch(mode) { case AudioCD: @@ -179,10 +179,10 @@ void K3bExporter::exportViaCmdLine(const PlaylistItemList &items) void K3bExporter::exportViaDCOP(const PlaylistItemList &items, DCOPRef &ref) { - QValueList projectList; + TQValueList projectList; DCOPReply projectListReply = ref.call("projects()"); - if(!projectListReply.get >(projectList, "QValueList")) { + if(!projectListReply.get >(projectList, "TQValueList")) { DCOPErrorMessage(); return; } @@ -213,7 +213,7 @@ void K3bExporter::DCOPErrorMessage() bool K3bExporter::startNewK3bProject(DCOPRef &ref) { - QCString request; + TQCString request; K3bOpenMode mode = openMode(); switch(mode) { @@ -276,7 +276,7 @@ KAction *K3bPlaylistExporter::action() SmallIconSet("k3b"), 0, this, - SLOT(slotExport()), + TQT_SLOT(slotExport()), actions(), "export_playlist_to_k3b" ); diff --git a/juk/keydialog.cpp b/juk/keydialog.cpp index 2fe429c1..c8d24a5a 100644 --- a/juk/keydialog.cpp +++ b/juk/keydialog.cpp @@ -18,9 +18,9 @@ #include #include -#include -#include -#include +#include +#include +#include // Table of shortcut keys for each action, key group and three or four button modifier @@ -75,7 +75,7 @@ const KeyDialog::KeyInfo KeyDialog::keyInfo[] = { const uint KeyDialog::keyInfoCount = sizeof(KeyDialog::keyInfo) / sizeof(KeyDialog::keyInfo[0]); KeyDialog::KeyDialog(KGlobalAccel *keys, KActionCollection *actionCollection, - QWidget *parent, const char *name) + TQWidget *parent, const char *name) : KDialogBase(parent, name, true, i18n("Configure Shortcuts"), Default | Ok | Cancel, Ok) { // Read key group from configuration @@ -87,20 +87,20 @@ KeyDialog::KeyDialog(KGlobalAccel *keys, KActionCollection *actionCollection, // Create widgets for key chooser - widget stack used to replace key chooser - QVBox *vbox = new QVBox(this); + TQVBox *vbox = new TQVBox(this); vbox->setSpacing(KDialog::spacingHint()); - m_widgetStack = new QWidgetStack(vbox); + m_widgetStack = new TQWidgetStack(vbox); vbox->setStretchFactor(m_widgetStack, 1); // Create buttons to select key group - m_group = new QHButtonGroup(i18n("Global Shortcuts"), vbox); - new QRadioButton(i18n("&No keys"), m_group); - new QRadioButton(i18n("&Standard keys"), m_group); - new QRadioButton(i18n("&Multimedia keys"), m_group); - connect(m_group, SIGNAL(clicked(int)), this, SLOT(slotKeys(int))); - QWhatsThis::add(m_group, + m_group = new TQHButtonGroup(i18n("Global Shortcuts"), vbox); + new TQRadioButton(i18n("&No keys"), m_group); + new TQRadioButton(i18n("&Standard keys"), m_group); + new TQRadioButton(i18n("&Multimedia keys"), m_group); + connect(m_group, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(slotKeys(int))); + TQWhatsThis::add(m_group, i18n("Here you can select the keys used as global shortcuts to control the player")); // Create the key chooser @@ -127,7 +127,7 @@ void KeyDialog::newDialog(KGlobalAccel *keys, KActionCollection *actionCollectio m_widgetStack->raiseWidget(m_pKeyChooser); m_group->setButton(selectedButton); - connect(this, SIGNAL(defaultClicked()), this, SLOT(slotDefault())); + connect(this, TQT_SIGNAL(defaultClicked()), this, TQT_SLOT(slotDefault())); } int KeyDialog::configure() @@ -157,7 +157,7 @@ void KeyDialog::slotKeys(int group) // Create a new key chooser to show the keys, and delete the old one - QWidget *w = m_widgetStack->visibleWidget(); + TQWidget *w = m_widgetStack->visibleWidget(); newDialog(m_keys, m_actionCollection, group); m_widgetStack->removeWidget(w); delete w; @@ -172,7 +172,7 @@ void KeyDialog::slotDefault() } int KeyDialog::configure(KGlobalAccel *keys, KActionCollection *actionCollection, - QWidget *parent) + TQWidget *parent) { // Create and show dialog - update connections if accepted @@ -183,8 +183,8 @@ int KeyDialog::configure(KGlobalAccel *keys, KActionCollection *actionCollection return retcode; } -void KeyDialog::insert(KGlobalAccel *keys, const QString &action, const QString &label, - const QObject *objSlot, const char *methodSlot) +void KeyDialog::insert(KGlobalAccel *keys, const TQString &action, const TQString &label, + const TQObject *objSlot, const char *methodSlot) { KShortcut def3 = KShortcut::null(); KShortcut def4 = KShortcut::null(); @@ -198,7 +198,7 @@ void KeyDialog::insert(KGlobalAccel *keys, const QString &action, const QString break; } } - keys->insert(action, label, QString::null, def3, def4, objSlot, methodSlot); + keys->insert(action, label, TQString::null, def3, def4, objSlot, methodSlot); } #include "keydialog.moc" diff --git a/juk/keydialog.h b/juk/keydialog.h index 13d76d4f..13801ee1 100644 --- a/juk/keydialog.h +++ b/juk/keydialog.h @@ -20,8 +20,8 @@ #include #include -#include -#include +#include +#include class KeyDialog : public KDialogBase { @@ -31,7 +31,7 @@ public: /** * Constructs a KeyDialog called @p name as a child of @p parent. */ - KeyDialog(KGlobalAccel *keys, KActionCollection *actionCollection, QWidget *parent = 0, const char* name = 0); + KeyDialog(KGlobalAccel *keys, KActionCollection *actionCollection, TQWidget *parent = 0, const char* name = 0); /** * Destructor. Deletes all resources used by a KeyDialog object. @@ -43,14 +43,14 @@ public: * accelerators and actions. It behaves essentially like the functions * in KKeyDialog. */ - static int configure(KGlobalAccel *keys, KActionCollection *actionCollection, QWidget *parent = 0); + static int configure(KGlobalAccel *keys, KActionCollection *actionCollection, TQWidget *parent = 0); /** * This is a member function, provided to create a global accelerator with * standard keys. It behaves like the function in KGlobalAccel. */ - static void insert(KGlobalAccel *keys, const QString &action, const QString &label, - const QObject *objSlot, const char *methodSlot); + static void insert(KGlobalAccel *keys, const TQString &action, const TQString &label, + const TQObject *objSlot, const char *methodSlot); private: @@ -60,7 +60,7 @@ private: enum KeyGroup { NoKeys = 0, StandardKeys = 1, MultimediaKeys = 2 }; struct KeyInfo { - QString action; + TQString action; KShortcut shortcut[3][2]; }; @@ -75,8 +75,8 @@ private: KActionCollection *m_actionCollection; KGlobalAccel *m_keys; KKeyChooser *m_pKeyChooser; - QHButtonGroup *m_group; - QWidgetStack *m_widgetStack; + TQHButtonGroup *m_group; + TQWidgetStack *m_widgetStack; static const KeyInfo keyInfo[]; static const uint keyInfoCount; diff --git a/juk/ktrm.cpp b/juk/ktrm.cpp index 38fd4ef5..cb45c685 100644 --- a/juk/ktrm.cpp +++ b/juk/ktrm.cpp @@ -29,11 +29,11 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -58,7 +58,7 @@ class KTRMRequestHandler public: static KTRMRequestHandler *instance() { - static QMutex mutex; + static TQMutex mutex; mutex.lock(); static KTRMRequestHandler handler; mutex.unlock(); @@ -71,9 +71,9 @@ public: if(!m_fileMap.contains(lookup->file())) { #if HAVE_MUSICBRAINZ >= 4 - id = tp_AddFile(m_pimp, QFile::encodeName(lookup->file()), 0); + id = tp_AddFile(m_pimp, TQFile::encodeName(lookup->file()), 0); #else - id = tp_AddFile(m_pimp, QFile::encodeName(lookup->file())); + id = tp_AddFile(m_pimp, TQFile::encodeName(lookup->file())); #endif m_fileMap.insert(lookup->file(), id); } @@ -141,18 +141,18 @@ protected: if(KProtocolManager::useProxy()) { // split code copied from kcm_kio. - QString noProxiesFor = KProtocolManager::noProxyFor(); - QStringList noProxies = QStringList::split(QRegExp("[',''\t'' ']"), noProxiesFor); + TQString noProxiesFor = KProtocolManager::noProxyFor(); + TQStringList noProxies = TQStringList::split(TQRegExp("[',''\t'' ']"), noProxiesFor); bool useProxy = true; // Host that libtunepimp will contact. - QString tunepimpHost = "www.musicbrainz.org"; - QString tunepimpHostWithPort = "www.musicbrainz.org:80"; + TQString tunepimpHost = "www.musicbrainz.org"; + TQString tunepimpHostWithPort = "www.musicbrainz.org:80"; // Check what hosts are allowed to proceed without being proxied, // or is using reversed proxy, what hosts must be proxied. - for(QStringList::ConstIterator it = noProxies.constBegin(); it != noProxies.constEnd(); ++it) { - QString normalizedHost = KNetwork::KResolver::normalizeDomain(*it); + for(TQStringList::ConstIterator it = noProxies.constBegin(); it != noProxies.constEnd(); ++it) { + TQString normalizedHost = KNetwork::KResolver::normalizeDomain(*it); if(normalizedHost == tunepimpHost || tunepimpHost.endsWith("." + normalizedHost)) @@ -177,7 +177,7 @@ protected: if(useProxy) { KURL proxy = KProtocolManager::proxyFor("http"); - QString proxyHost = proxy.host(); + TQString proxyHost = proxy.host(); kdDebug(65432) << "Using proxy server " << proxyHost << " for www.musicbrainz.org.\n"; tp_SetProxy(m_pimp, proxyHost.latin1(), short(proxy.port())); @@ -192,9 +192,9 @@ protected: private: tunepimp_t m_pimp; - QMap m_lookupMap; - QMap m_fileMap; - mutable QMutex m_lookupMapMutex; + TQMap m_lookupMap; + TQMap m_fileMap; + mutable TQMutex m_lookupMapMutex; }; @@ -213,7 +213,7 @@ public: }; KTRMEvent(int fileId, Status status) : - QCustomEvent(id), + TQCustomEvent(id), m_fileId(fileId), m_status(status) {} @@ -248,25 +248,25 @@ public: } protected: - KTRMEventHandler() : QObject() {} + KTRMEventHandler() : TQObject() {} static KTRMEventHandler *instance() { - static QMutex mutex; + static TQMutex mutex; mutex.lock(); static KTRMEventHandler handler; mutex.unlock(); return &handler; } - virtual void customEvent(QCustomEvent *event) + virtual void customEvent(TQCustomEvent *event) { if(!event->type() == KTRMEvent::id) return; KTRMEvent *e = static_cast(event); - static QMutex mutex; + static TQMutex mutex; mutex.lock(); if(!KTRMRequestHandler::instance()->lookupMapContains(e->fileId())) { @@ -348,9 +348,9 @@ class KTRMResult::KTRMResultPrivate { public: KTRMResultPrivate() : track(0), year(0), relevance(0) {} - QString title; - QString artist; - QString album; + TQString title; + TQString artist; + TQString album; int track; int year; int relevance; @@ -375,17 +375,17 @@ KTRMResult::~KTRMResult() delete d; } -QString KTRMResult::title() const +TQString KTRMResult::title() const { return d->title; } -QString KTRMResult::artist() const +TQString KTRMResult::artist() const { return d->artist; } -QString KTRMResult::album() const +TQString KTRMResult::album() const { return d->album; } @@ -425,7 +425,7 @@ class KTRMLookup::KTRMLookupPrivate public: KTRMLookupPrivate() : fileId(-1) {} - QString file; + TQString file; KTRMResultList results; int fileId; bool autoDelete; @@ -435,7 +435,7 @@ public: // KTRMLookup public methods //////////////////////////////////////////////////////////////////////////////// -KTRMLookup::KTRMLookup(const QString &file, bool autoDelete) +KTRMLookup::KTRMLookup(const TQString &file, bool autoDelete) { d = new KTRMLookupPrivate; d->file = file; @@ -449,7 +449,7 @@ KTRMLookup::~KTRMLookup() delete d; } -QString KTRMLookup::file() const +TQString KTRMLookup::file() const { return d->file; } @@ -472,9 +472,9 @@ void KTRMLookup::recognized() KTRMResult result; - result.d->title = QString::fromUtf8(metaData->track); - result.d->artist = QString::fromUtf8(metaData->artist); - result.d->album = QString::fromUtf8(metaData->album); + result.d->title = TQString::fromUtf8(metaData->track); + result.d->artist = TQString::fromUtf8(metaData->artist); + result.d->album = TQString::fromUtf8(metaData->album); result.d->track = metaData->trackNum; result.d->year = metaData->releaseYear; @@ -548,14 +548,14 @@ void KTRMLookup::collision() for(int i = 0; i < resultCount; i++) { KTRMResult result; - result.d->title = QString::fromUtf8(tracks[i]->name); + result.d->title = TQString::fromUtf8(tracks[i]->name); #if HAVE_MUSICBRAINZ >= 4 - result.d->artist = QString::fromUtf8(tracks[i]->artist.name); - result.d->album = QString::fromUtf8(tracks[i]->album.name); + result.d->artist = TQString::fromUtf8(tracks[i]->artist.name); + result.d->album = TQString::fromUtf8(tracks[i]->album.name); result.d->year = tracks[i]->album.releaseYear; #else - result.d->artist = QString::fromUtf8(tracks[i]->artist->name); - result.d->album = QString::fromUtf8(tracks[i]->album->name); + result.d->artist = TQString::fromUtf8(tracks[i]->artist->name); + result.d->album = TQString::fromUtf8(tracks[i]->album->name); result.d->year = tracks[i]->album->releaseYear; #endif result.d->track = tracks[i]->trackNum; diff --git a/juk/ktrm.h b/juk/ktrm.h index 3dfa9e47..d99cf9b3 100644 --- a/juk/ktrm.h +++ b/juk/ktrm.h @@ -31,9 +31,9 @@ #if HAVE_MUSICBRAINZ -#include -#include -#include +#include +#include +#include /** * This represents a potential match for a TRM lookup. KTRMResultList is @@ -53,17 +53,17 @@ public: /** * Returns the title of the track for the potential match. */ - QString title() const; + TQString title() const; /** * Returns the artist name of the track for the potential match. */ - QString artist() const; + TQString artist() const; /** * Returns the album name of the track for the potential match. */ - QString album() const; + TQString album() const; /** * Returns the track number of the track for the potential match. @@ -97,7 +97,7 @@ private: KTRMResultPrivate *d; }; -typedef QValueList KTRMResultList; +typedef TQValueList KTRMResultList; /** * An abstraction for libtunepimp's TRM based lookup and file recognition. @@ -117,14 +117,14 @@ public: * Creates and starts a lookup for \a file. If \a autoDelete is set to * true the lookup will delete itself when it has finished. */ - KTRMLookup(const QString &file, bool autoDelete = false); + KTRMLookup(const TQString &file, bool autoDelete = false); virtual ~KTRMLookup(); /** * Returns the file name that was specified in the constructor. */ - QString file() const; + TQString file() const; /** * Returns the TunePimp file ID for the file. This is of no use to the diff --git a/juk/mediafiles.cpp b/juk/mediafiles.cpp index b52c4be3..3752ec06 100644 --- a/juk/mediafiles.cpp +++ b/juk/mediafiles.cpp @@ -31,7 +31,7 @@ #endif namespace MediaFiles { - QStringList mimeTypes(); + TQStringList mimeTypes(); static const char mp3Type[] = "audio/mpeg"; static const char oggType[] = "application/ogg"; @@ -45,9 +45,9 @@ namespace MediaFiles { static const char playlistExtension[] = ".m3u"; } -QStringList MediaFiles::openDialog(QWidget *parent) +TQStringList MediaFiles::openDialog(TQWidget *parent) { - KFileDialog dialog(QString::null, QString::null, parent, "filedialog", true); + KFileDialog dialog(TQString::null, TQString::null, parent, "filedialog", true); dialog.setOperationMode(KFileDialog::Opening); dialog.setCaption(i18n("Open")); @@ -60,10 +60,10 @@ QStringList MediaFiles::openDialog(QWidget *parent) return convertURLsToLocal(dialog.selectedFiles()); } -QString MediaFiles::savePlaylistDialog(const QString &playlistName, QWidget *parent) +TQString MediaFiles::savePlaylistDialog(const TQString &playlistName, TQWidget *parent) { - QString fileName = KFileDialog::getSaveFileName(playlistName + playlistExtension, - QString("*").append(playlistExtension), + TQString fileName = KFileDialog::getSaveFileName(playlistName + playlistExtension, + TQString("*").append(playlistExtension), parent, i18n("Playlists")); if(!fileName.isEmpty() && !fileName.endsWith(playlistExtension)) @@ -72,7 +72,7 @@ QString MediaFiles::savePlaylistDialog(const QString &playlistName, QWidget *par return fileName; } -bool MediaFiles::isMediaFile(const QString &fileName) +bool MediaFiles::isMediaFile(const TQString &fileName) { KMimeType::Ptr result = KMimeType::findByPath(fileName, 0, true); @@ -83,51 +83,51 @@ bool MediaFiles::isMediaFile(const QString &fileName) ; } -bool MediaFiles::isPlaylistFile(const QString &fileName) +bool MediaFiles::isPlaylistFile(const TQString &fileName) { KMimeType::Ptr result = KMimeType::findByPath(fileName, 0, true); return result->is(m3uType); } -bool MediaFiles::isMP3(const QString &fileName) +bool MediaFiles::isMP3(const TQString &fileName) { KMimeType::Ptr result = KMimeType::findByPath(fileName, 0, true); return result->is(mp3Type); } -bool MediaFiles::isOgg(const QString &fileName) +bool MediaFiles::isOgg(const TQString &fileName) { KMimeType::Ptr result = KMimeType::findByPath(fileName, 0, true); return result->is(oggType); } -bool MediaFiles::isFLAC(const QString &fileName) +bool MediaFiles::isFLAC(const TQString &fileName) { KMimeType::Ptr result = KMimeType::findByPath(fileName, 0, true); return result->is(flacType); } -bool MediaFiles::isMPC(const QString &fileName) +bool MediaFiles::isMPC(const TQString &fileName) { KMimeType::Ptr result = KMimeType::findByPath(fileName, 0, true); return result->is(mpcType); } -bool MediaFiles::isVorbis(const QString &fileName) +bool MediaFiles::isVorbis(const TQString &fileName) { KMimeType::Ptr result = KMimeType::findByPath(fileName, 0, false); return result->is(vorbisType); } -bool MediaFiles::isOggFLAC(const QString &fileName) +bool MediaFiles::isOggFLAC(const TQString &fileName) { KMimeType::Ptr result = KMimeType::findByPath(fileName, 0, false); return result->is(oggflacType); } -QStringList MediaFiles::mimeTypes() +TQStringList MediaFiles::mimeTypes() { - QStringList l; + TQStringList l; l << mp3Type << oggType << flacType << m3uType << vorbisType #ifdef TAGLIB_1_2 @@ -140,12 +140,12 @@ QStringList MediaFiles::mimeTypes() return l; } -QStringList MediaFiles::convertURLsToLocal(const QStringList &urlList, QWidget *w) +TQStringList MediaFiles::convertURLsToLocal(const TQStringList &urlList, TQWidget *w) { - QStringList result; + TQStringList result; KURL localUrl; - for(QStringList::ConstIterator it = urlList.constBegin(); it != urlList.constEnd(); ++it) { + for(TQStringList::ConstIterator it = urlList.constBegin(); it != urlList.constEnd(); ++it) { localUrl = KIO::NetAccess::mostLocalURL(KURL::fromPathOrURL(*it), w); if(!localUrl.isLocalFile()) diff --git a/juk/mediafiles.h b/juk/mediafiles.h index e0cc8458..342739e7 100644 --- a/juk/mediafiles.h +++ b/juk/mediafiles.h @@ -26,53 +26,53 @@ namespace MediaFiles /** * Creates a JuK specific KFileDialog with the specified parent. */ - QStringList openDialog(QWidget *parent = 0); + TQStringList openDialog(TQWidget *parent = 0); /** * Creates a JuK specific KFileDialog for saving a playlist with the name * playlistName and the specified parent and returns the file name. */ - QString savePlaylistDialog(const QString &playlistName, QWidget *parent = 0); + TQString savePlaylistDialog(const TQString &playlistName, TQWidget *parent = 0); /** * Returns true if fileName is a supported media file. */ - bool isMediaFile(const QString &fileName); + bool isMediaFile(const TQString &fileName); /** * Returns true if fileName is a supported playlist file. */ - bool isPlaylistFile(const QString &fileName); + bool isPlaylistFile(const TQString &fileName); /** * Returns true if fileName is a mp3 file. */ - bool isMP3(const QString &fileName); + bool isMP3(const TQString &fileName); /** * Returns true if fileName is a mpc (aka musepack) file. */ - bool isMPC(const QString &fileName); + bool isMPC(const TQString &fileName); /** * Returns true if fileName is an Ogg file. */ - bool isOgg(const QString &fileName); + bool isOgg(const TQString &fileName); /** * Returns true if fileName is a FLAC file. */ - bool isFLAC(const QString &fileName); + bool isFLAC(const TQString &fileName); /** * Returns true if fileName is an Ogg/Vorbis file. */ - bool isVorbis(const QString &fileName); + bool isVorbis(const TQString &fileName); /** * Returns true if fileName is an Ogg/FLAC file. */ - bool isOggFLAC(const QString &fileName); + bool isOggFLAC(const TQString &fileName); /** * Returns a list of absolute local filenames, mapped from \p urlList. @@ -83,7 +83,7 @@ namespace MediaFiles * @param w KIO may need the widget to handle user interaction. * @return list of all local files in urlList, converted to absolute paths. */ - QStringList convertURLsToLocal(const QStringList &urlList, QWidget *w = 0); + TQStringList convertURLsToLocal(const TQStringList &urlList, TQWidget *w = 0); } #endif diff --git a/juk/musicbrainzquery.cpp b/juk/musicbrainzquery.cpp index 84bb38d7..577e240f 100644 --- a/juk/musicbrainzquery.cpp +++ b/juk/musicbrainzquery.cpp @@ -28,7 +28,7 @@ #include #include -#include +#include MusicBrainzLookup::MusicBrainzLookup(const FileHandle &file) : KTRMLookup(file.absFilePath()), @@ -65,10 +65,10 @@ void MusicBrainzLookup::error() delete this; } -void MusicBrainzLookup::message(const QString &s) const +void MusicBrainzLookup::message(const TQString &s) const { KMainWindow *w = static_cast(kapp->mainWidget()); - w->statusBar()->message(QString("%1 (%2)").arg(s).arg(m_file.fileInfo().fileName()), 3000); + w->statusBar()->message(TQString("%1 (%2)").arg(s).arg(m_file.fileInfo().fileName()), 3000); } void MusicBrainzLookup::confirmation() @@ -76,7 +76,7 @@ void MusicBrainzLookup::confirmation() // Here we do a bit of queuing to make sure that we don't pop up multiple // instances of the confirmation dialog at once. - static QValueList< QPair > queue; + static TQValueList< QPair > queue; if(results().isEmpty()) return; @@ -94,7 +94,7 @@ void MusicBrainzLookup::confirmation() KTRMResultList results = item.second; TrackPickerDialog dialog(file.fileInfo().fileName(), results); - if(dialog.exec() == QDialog::Accepted && !dialog.result().isEmpty()) { + if(dialog.exec() == TQDialog::Accepted && !dialog.result().isEmpty()) { KTRMResult result = dialog.result(); Tag *tag = TagTransactionManager::duplicateTag(file.tag()); diff --git a/juk/musicbrainzquery.h b/juk/musicbrainzquery.h index 6bf51278..d88b166f 100644 --- a/juk/musicbrainzquery.h +++ b/juk/musicbrainzquery.h @@ -33,7 +33,7 @@ public: virtual void error(); private: - void message(const QString &s) const; + void message(const TQString &s) const; void confirmation(); FileHandle m_file; diff --git a/juk/nowplaying.cpp b/juk/nowplaying.cpp index 2336faac..4256ecff 100644 --- a/juk/nowplaying.cpp +++ b/juk/nowplaying.cpp @@ -19,13 +19,13 @@ #include #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include "nowplaying.h" #include "playlistcollection.h" @@ -41,15 +41,15 @@ static const int imageSize = 64; struct Line : public QFrame { - Line(QWidget *parent) : QFrame(parent) { setFrameShape(VLine); } + Line(TQWidget *parent) : TQFrame(parent) { setFrameShape(VLine); } }; //////////////////////////////////////////////////////////////////////////////// // NowPlaying //////////////////////////////////////////////////////////////////////////////// -NowPlaying::NowPlaying(QWidget *parent, PlaylistCollection *collection, const char *name) : - QHBox(parent, name), +NowPlaying::NowPlaying(TQWidget *parent, PlaylistCollection *collection, const char *name) : + TQHBox(parent, name), m_observer(this, collection), m_collection(collection) { @@ -67,8 +67,8 @@ NowPlaying::NowPlaying(QWidget *parent, PlaylistCollection *collection, const ch setStretchFactor(new Line(this), 0); setStretchFactor(new HistoryItem(this), 1); - connect(PlayerManager::instance(), SIGNAL(signalPlay()), this, SLOT(slotUpdate())); - connect(PlayerManager::instance(), SIGNAL(signalStop()), this, SLOT(slotUpdate())); + connect(PlayerManager::instance(), TQT_SIGNAL(signalPlay()), this, TQT_SLOT(slotUpdate())); + connect(PlayerManager::instance(), TQT_SIGNAL(signalStop()), this, TQT_SLOT(slotUpdate())); hide(); } @@ -94,7 +94,7 @@ void NowPlaying::slotUpdate() else show(); - for(QValueList::Iterator it = m_items.begin(); + for(TQValueList::Iterator it = m_items.begin(); it != m_items.end(); ++it) { (*it)->update(file); @@ -106,7 +106,7 @@ void NowPlaying::slotUpdate() //////////////////////////////////////////////////////////////////////////////// CoverItem::CoverItem(NowPlaying *parent) : - QLabel(parent, "CoverItem"), + TQLabel(parent, "CoverItem"), NowPlayingItem(parent) { setFixedHeight(parent->height() - parent->layout()->margin() * 2); @@ -122,14 +122,14 @@ void CoverItem::update(const FileHandle &file) if(file.coverInfo()->hasCover()) { show(); - QImage image = file.coverInfo()->pixmap(CoverInfo::Thumbnail).convertToImage(); - setPixmap(image.smoothScale(imageSize, imageSize, QImage::ScaleMin)); + TQImage image = file.coverInfo()->pixmap(CoverInfo::Thumbnail).convertToImage(); + setPixmap(image.smoothScale(imageSize, imageSize, TQImage::ScaleMin)); } else hide(); } -void CoverItem::mouseReleaseEvent(QMouseEvent *event) +void CoverItem::mouseReleaseEvent(TQMouseEvent *event) { if(m_dragging) { m_dragging = false; @@ -144,21 +144,21 @@ void CoverItem::mouseReleaseEvent(QMouseEvent *event) m_file.coverInfo()->popup(); } - QLabel::mousePressEvent(event); + TQLabel::mousePressEvent(event); } -void CoverItem::mousePressEvent(QMouseEvent *e) +void CoverItem::mousePressEvent(TQMouseEvent *e) { m_dragging = false; m_dragStart = e->globalPos(); } -void CoverItem::mouseMoveEvent(QMouseEvent *e) +void CoverItem::mouseMoveEvent(TQMouseEvent *e) { if(m_dragging) return; - QPoint diff = m_dragStart - e->globalPos(); + TQPoint diff = m_dragStart - e->globalPos(); if(QABS(diff.x()) > 1 || QABS(diff.y()) > 1) { // Start a drag. @@ -170,21 +170,21 @@ void CoverItem::mouseMoveEvent(QMouseEvent *e) } } -void CoverItem::dragEnterEvent(QDragEnterEvent *e) +void CoverItem::dragEnterEvent(TQDragEnterEvent *e) { - e->accept(QImageDrag::canDecode(e) || KURLDrag::canDecode(e) || CoverDrag::canDecode(e)); + e->accept(TQImageDrag::canDecode(e) || KURLDrag::canDecode(e) || CoverDrag::canDecode(e)); } -void CoverItem::dropEvent(QDropEvent *e) +void CoverItem::dropEvent(TQDropEvent *e) { - QImage image; + TQImage image; KURL::List urls; coverKey key; if(e->source() == this) return; - if(QImageDrag::decode(e, image)) { + if(TQImageDrag::decode(e, image)) { m_file.coverInfo()->setCover(image); update(m_file); } @@ -193,7 +193,7 @@ void CoverItem::dropEvent(QDropEvent *e) update(m_file); } else if(KURLDrag::decode(e, urls)) { - QString fileName; + TQString fileName; if(KIO::NetAccess::download(urls.front(), fileName, this)) { if(image.load(fileName)) { @@ -215,13 +215,13 @@ void CoverItem::dropEvent(QDropEvent *e) //////////////////////////////////////////////////////////////////////////////// TrackItem::TrackItem(NowPlaying *parent) : - QWidget(parent, "TrackItem"), + TQWidget(parent, "TrackItem"), NowPlayingItem(parent) { setFixedHeight(parent->height() - parent->layout()->margin() * 2); - setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); + setSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed); - QVBoxLayout *layout = new QVBoxLayout(this); + TQVBoxLayout *layout = new TQVBoxLayout(this); m_label = new LinkLabel(this); m_label->setLinkUnderline(false); @@ -230,17 +230,17 @@ TrackItem::TrackItem(NowPlaying *parent) : layout->addWidget(m_label); layout->addStretch(); - connect(m_label, SIGNAL(linkClicked(const QString &)), this, - SLOT(slotOpenLink(const QString &))); + connect(m_label, TQT_SIGNAL(linkClicked(const TQString &)), this, + TQT_SLOT(slotOpenLink(const TQString &))); } void TrackItem::update(const FileHandle &file) { m_file = file; - QTimer::singleShot(0, this, SLOT(slotUpdate())); + TQTimer::singleShot(0, this, TQT_SLOT(slotUpdate())); } -void TrackItem::slotOpenLink(const QString &link) +void TrackItem::slotOpenLink(const TQString &link) { PlaylistCollection *collection = NowPlayingItem::parent()->collection(); @@ -256,21 +256,21 @@ void TrackItem::slotOpenLink(const QString &link) void TrackItem::slotUpdate() { - QString title = QStyleSheet::escape(m_file.tag()->title()); - QString artist = QStyleSheet::escape(m_file.tag()->artist()); - QString album = QStyleSheet::escape(m_file.tag()->album()); - QString separator = (artist.isNull() || album.isNull()) ? QString::null : QString(" - "); + TQString title = TQStyleSheet::escape(m_file.tag()->title()); + TQString artist = TQStyleSheet::escape(m_file.tag()->artist()); + TQString album = TQStyleSheet::escape(m_file.tag()->album()); + TQString separator = (artist.isNull() || album.isNull()) ? TQString::null : TQString(" - "); // This block-o-nastiness makes the font smaller and smaller until it actually fits. int size = 4; - QString format = + TQString format = "%2" "
" "%4%5%6"; if(NowPlayingItem::parent()->collection()->showMoreActive()) - format.append(QString(" (%1)").arg(i18n("back to playlist"))); + format.append(TQString(" (%1)").arg(i18n("back to playlist"))); format.append(""); @@ -292,12 +292,12 @@ HistoryItem::HistoryItem(NowPlaying *parent) : NowPlayingItem(parent) { setFixedHeight(parent->height() - parent->layout()->margin() * 2); - setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); + setSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed); setLinkUnderline(false); - setText(QString("%1").arg(i18n("History"))); + setText(TQString("%1").arg(i18n("History"))); - m_timer = new QTimer(this); - connect(m_timer, SIGNAL(timeout()), this, SLOT(slotAddPlaying())); + m_timer = new TQTimer(this); + connect(m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotAddPlaying())); } void HistoryItem::update(const FileHandle &file) @@ -308,15 +308,15 @@ void HistoryItem::update(const FileHandle &file) if(m_history.count() >= 10) m_history.remove(m_history.fromLast()); - QString format = "
%2"; - QString current = QString("%1").arg(i18n("History")); - QString previous; + TQString format = "
%2"; + TQString current = TQString("%1").arg(i18n("History")); + TQString previous; - for(QValueList::ConstIterator it = m_history.begin(); + for(TQValueList::ConstIterator it = m_history.begin(); it != m_history.end(); ++it) { previous = current; - current.append(format.arg((*it).anchor).arg(QStyleSheet::escape((*it).file.tag()->title()))); + current.append(format.arg((*it).anchor).arg(TQStyleSheet::escape((*it).file.tag()->title()))); setText(current); if(heightForWidth(width()) > imageSize) { setText(previous); @@ -329,9 +329,9 @@ void HistoryItem::update(const FileHandle &file) m_timer->start(HistoryPlaylist::delay(), true); } -void HistoryItem::openLink(const QString &link) +void HistoryItem::openLink(const TQString &link) { - for(QValueList::ConstIterator it = m_history.begin(); + for(TQValueList::ConstIterator it = m_history.begin(); it != m_history.end(); ++it) { if((*it).anchor == link) { diff --git a/juk/nowplaying.h b/juk/nowplaying.h index 208eabc4..fb12197d 100644 --- a/juk/nowplaying.h +++ b/juk/nowplaying.h @@ -18,9 +18,9 @@ #include -#include -#include -#include +#include +#include +#include #include "filehandle.h" #include "playlist.h" @@ -42,7 +42,7 @@ class NowPlaying : public QHBox Q_OBJECT public: - NowPlaying(QWidget *parent, PlaylistCollection *collection, + NowPlaying(TQWidget *parent, PlaylistCollection *collection, const char *name = 0); void addItem(NowPlayingItem *item); PlaylistCollection *collection() const; @@ -64,7 +64,7 @@ private: Observer m_observer; PlaylistCollection *m_collection; - QValueList m_items; + TQValueList m_items; }; /** @@ -87,24 +87,24 @@ private: * itself if not. */ -class CoverItem : public QLabel, public NowPlayingItem +class CoverItem : public TQLabel, public NowPlayingItem { public: CoverItem(NowPlaying *parent); virtual void update(const FileHandle &file); - virtual void mouseReleaseEvent(QMouseEvent *event); + virtual void mouseReleaseEvent(TQMouseEvent *event); protected: - virtual void dragEnterEvent(QDragEnterEvent *e); - virtual void dropEvent(QDropEvent *e); + virtual void dragEnterEvent(TQDragEnterEvent *e); + virtual void dropEvent(TQDropEvent *e); - virtual void mousePressEvent(QMouseEvent *e); - virtual void mouseMoveEvent(QMouseEvent *e); + virtual void mousePressEvent(TQMouseEvent *e); + virtual void mouseMoveEvent(TQMouseEvent *e); private: FileHandle m_file; bool m_dragging; - QPoint m_dragStart; + TQPoint m_dragStart; }; /** @@ -114,8 +114,8 @@ private: class LinkLabel : public KActiveLabel { public: - LinkLabel(QWidget *parent, const char *name = 0) : KActiveLabel(parent, name) {} - virtual void openLink(const QString &) {} + LinkLabel(TQWidget *parent, const char *name = 0) : KActiveLabel(parent, name) {} + virtual void openLink(const TQString &) {} }; /** @@ -123,7 +123,7 @@ public: * album and artist of the currently playing item. */ -class TrackItem : public QWidget, public NowPlayingItem +class TrackItem : public TQWidget, public NowPlayingItem { Q_OBJECT @@ -132,7 +132,7 @@ public: virtual void update(const FileHandle &file); private slots: - void slotOpenLink(const QString &link); + void slotOpenLink(const TQString &link); void slotUpdate(); private: @@ -151,7 +151,7 @@ class HistoryItem : public LinkLabel, public NowPlayingItem public: HistoryItem(NowPlaying *parent); virtual void update(const FileHandle &file); - virtual void openLink(const QString &link); + virtual void openLink(const TQString &link); private slots: void slotAddPlaying(); @@ -160,17 +160,17 @@ private: struct Item { Item() {} - Item(const QString &a, const FileHandle &f, Playlist *p) + Item(const TQString &a, const FileHandle &f, Playlist *p) : anchor(a), file(f), playlist(p) {} - QString anchor; + TQString anchor; FileHandle file; - QGuardedPtr playlist; + TQGuardedPtr playlist; }; - QValueList m_history; + TQValueList m_history; LinkLabel *m_label; - QTimer *m_timer; + TQTimer *m_timer; FileHandle m_file; }; diff --git a/juk/player.h b/juk/player.h index a3bd471a..600e3db6 100644 --- a/juk/player.h +++ b/juk/player.h @@ -16,7 +16,7 @@ #ifndef PLAYER_H #define PLAYER_H -#include +#include #include "filehandle.h" @@ -43,7 +43,7 @@ public: virtual void seekPosition(int position) = 0; protected: - Player() : QObject() {} + Player() : TQObject() {} }; diff --git a/juk/playermanager.cpp b/juk/playermanager.cpp index 9f784822..19647278 100644 --- a/juk/playermanager.cpp +++ b/juk/playermanager.cpp @@ -25,8 +25,8 @@ #include #include -#include -#include +#include +#include #include @@ -186,30 +186,30 @@ int PlayerManager::position() const return player()->position(); } -QStringList PlayerManager::trackProperties() +TQStringList PlayerManager::trackProperties() { return FileHandle::properties(); } -QString PlayerManager::trackProperty(const QString &property) const +TQString PlayerManager::trackProperty(const TQString &property) const { if(!playing() && !paused()) - return QString::null; + return TQString::null; return m_file.property(property); } -QPixmap PlayerManager::trackCover(const QString &size) const +TQPixmap PlayerManager::trackCover(const TQString &size) const { if(!playing() && !paused()) - return QPixmap(); + return TQPixmap(); if(size.lower() == "small") return m_file.coverInfo()->pixmap(CoverInfo::Thumbnail); if(size.lower() == "large") return m_file.coverInfo()->pixmap(CoverInfo::FullSize); - return QPixmap(); + return TQPixmap(); } FileHandle PlayerManager::playingFile() const @@ -217,12 +217,12 @@ FileHandle PlayerManager::playingFile() const return m_file; } -QString PlayerManager::playingString() const +TQString PlayerManager::playingString() const { if(!playing()) - return QString::null; + return TQString::null; - QString str = m_file.tag()->artist() + " - " + m_file.tag()->title(); + TQString str = m_file.tag()->artist() + " - " + m_file.tag()->title(); if(m_file.tag()->artist().isEmpty()) str = m_file.tag()->title(); @@ -239,11 +239,11 @@ void PlayerManager::setStatusLabel(StatusLabel *label) m_statusLabel = label; } -KSelectAction *PlayerManager::playerSelectAction(QObject *parent) // static +KSelectAction *PlayerManager::playerSelectAction(TQObject *parent) // static { KSelectAction *action = 0; action = new KSelectAction(i18n("&Output To"), 0, parent, "outputSelect"); - QStringList l; + TQStringList l; #if HAVE_ARTS l << i18n("aRts"); @@ -317,7 +317,7 @@ void PlayerManager::play(const FileHandle &file) emit signalPlay(); } -void PlayerManager::play(const QString &file) +void PlayerManager::play(const TQString &file) { CollectionListItem *item = CollectionList::instance()->lookup(file); if(item) { @@ -550,14 +550,14 @@ void PlayerManager::slotPollPlay() m_noSeek = false; } -void PlayerManager::slotSetOutput(const QString &system) +void PlayerManager::slotSetOutput(const TQString &system) { stop(); setOutput(system); setup(); } -void PlayerManager::setOutput(const QString &system) +void PlayerManager::setOutput(const TQString &system) { delete m_player; if(system == i18n("aRts")) @@ -642,12 +642,12 @@ void PlayerManager::setup() m_sliderAction = action("trackPositionAction"); - connect(m_sliderAction, SIGNAL(signalPositionChanged(int)), - this, SLOT(seekPosition(int))); - connect(m_sliderAction->trackPositionSlider(), SIGNAL(valueChanged(int)), - this, SLOT(slotUpdateTime(int))); - connect(m_sliderAction, SIGNAL(signalVolumeChanged(int)), - this, SLOT(slotSetVolume(int))); + connect(m_sliderAction, TQT_SIGNAL(signalPositionChanged(int)), + this, TQT_SLOT(seekPosition(int))); + connect(m_sliderAction->trackPositionSlider(), TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotUpdateTime(int))); + connect(m_sliderAction, TQT_SIGNAL(signalVolumeChanged(int)), + this, TQT_SLOT(slotSetVolume(int))); // Call this method manually to avoid warnings. @@ -655,7 +655,7 @@ void PlayerManager::setup() if(outputAction) { setOutput(static_cast(outputAction)->currentText()); - connect(outputAction, SIGNAL(activated(const QString &)), this, SLOT(slotSetOutput(const QString &))); + connect(outputAction, TQT_SIGNAL(activated(const TQString &)), this, TQT_SLOT(slotSetOutput(const TQString &))); } else m_player = createPlayer(); @@ -672,11 +672,11 @@ void PlayerManager::setup() m_player->setVolume(volume); - m_timer = new QTimer(this, "play timer"); - connect(m_timer, SIGNAL(timeout()), this, SLOT(slotPollPlay())); + m_timer = new TQTimer(this, "play timer"); + connect(m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotPollPlay())); } -QString PlayerManager::randomPlayMode() const +TQString PlayerManager::randomPlayMode() const { if(action("randomPlay")->isChecked()) return "Random"; @@ -685,7 +685,7 @@ QString PlayerManager::randomPlayMode() const return "NoRandom"; } -void PlayerManager::setRandomPlayMode(const QString &randomMode) +void PlayerManager::setRandomPlayMode(const TQString &randomMode) { if(randomMode.lower() == "random") action("randomPlay")->setChecked(true); diff --git a/juk/playermanager.h b/juk/playermanager.h index 7d72d2d6..fecb6995 100644 --- a/juk/playermanager.h +++ b/juk/playermanager.h @@ -49,24 +49,24 @@ public: int currentTime() const; int position() const; - QStringList trackProperties(); - QString trackProperty(const QString &property) const; - QPixmap trackCover(const QString &size) const; + TQStringList trackProperties(); + TQString trackProperty(const TQString &property) const; + TQPixmap trackCover(const TQString &size) const; FileHandle playingFile() const; - QString playingString() const; + TQString playingString() const; void setPlaylistInterface(PlaylistInterface *interface); void setStatusLabel(StatusLabel *label); - QString randomPlayMode() const; + TQString randomPlayMode() const; - static KSelectAction *playerSelectAction(QObject *parent); + static KSelectAction *playerSelectAction(TQObject *parent); public slots: void play(const FileHandle &file); - void play(const QString &file); + void play(const TQString &file); void play(); void pause(); void stop(); @@ -83,7 +83,7 @@ public slots: void volumeDown(); void mute(); - void setRandomPlayMode(const QString &randomMode); + void setRandomPlayMode(const TQString &randomMode); signals: void signalPlay(); @@ -93,12 +93,12 @@ signals: private: Player *player() const; void setup(); - void setOutput(const QString &); + void setOutput(const TQString &); private slots: void slotPollPlay(); void slotUpdateTime(int position); - void slotSetOutput(const QString &); + void slotSetOutput(const TQString &); void slotSetVolume(int volume); private: @@ -107,7 +107,7 @@ private: PlaylistInterface *m_playlistInterface; StatusLabel *m_statusLabel; Player *m_player; - QTimer *m_timer; + TQTimer *m_timer; bool m_noSeek; bool m_muted; bool m_setup; diff --git a/juk/playlist.cpp b/juk/playlist.cpp index b090dca2..fb218881 100644 --- a/juk/playlist.cpp +++ b/juk/playlist.cpp @@ -30,14 +30,14 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include @@ -83,17 +83,17 @@ static bool manualResize() class PlaylistToolTip : public QToolTip { public: - PlaylistToolTip(QWidget *parent, Playlist *playlist) : - QToolTip(parent), m_playlist(playlist) {} + PlaylistToolTip(TQWidget *parent, Playlist *playlist) : + TQToolTip(parent), m_playlist(playlist) {} - virtual void maybeTip(const QPoint &p) + virtual void maybeTip(const TQPoint &p) { PlaylistItem *item = static_cast(m_playlist->itemAt(p)); if(!item) return; - QPoint contentsPosition = m_playlist->viewportToContents(p); + TQPoint contentsPosition = m_playlist->viewportToContents(p); int column = m_playlist->header()->sectionAt(contentsPosition.x()); @@ -102,7 +102,7 @@ public: (column == m_playlist->columnOffset() + PlaylistItem::CoverColumn && item->file().coverInfo()->hasCover())) { - QRect r = m_playlist->itemRect(item); + TQRect r = m_playlist->itemRect(item); int headerPosition = m_playlist->header()->sectionPos(column); r.setLeft(headerPosition); r.setRight(headerPosition + m_playlist->header()->sectionSize(column)); @@ -110,9 +110,9 @@ public: if(column == m_playlist->columnOffset() + PlaylistItem::FileNameColumn) tip(r, item->file().absFilePath()); else if(column == m_playlist->columnOffset() + PlaylistItem::CoverColumn) { - QMimeSourceFactory *f = QMimeSourceFactory::defaultFactory(); + TQMimeSourceFactory *f = TQMimeSourceFactory::defaultFactory(); f->setImage("coverThumb", - QImage(item->file().coverInfo()->pixmap(CoverInfo::Thumbnail).convertToImage())); + TQImage(item->file().coverInfo()->pixmap(CoverInfo::Thumbnail).convertToImage())); tip(r, "
"); } else @@ -160,8 +160,8 @@ private: void writeConfig(); static SharedSettings *m_instance; - QValueList m_columnOrder; - QValueVector m_columnsVisible; + TQValueList m_columnOrder; + TQValueVector m_columnsVisible; KGlobalSettings::Completion m_inlineCompletion; }; @@ -214,7 +214,7 @@ void Playlist::SharedSettings::apply(Playlist *l) const int offset = l->columnOffset(); int i = 0; - for(QValueListConstIterator it = m_columnOrder.begin(); it != m_columnOrder.end(); ++it) + for(TQValueListConstIterator it = m_columnOrder.begin(); it != m_columnOrder.end(); ++it) l->header()->moveSection(i++ + offset, *it + offset); for(uint i = 0; i < m_columnsVisible.size(); i++) { @@ -243,7 +243,7 @@ Playlist::SharedSettings::SharedSettings() // save column order m_columnOrder = config.readIntListEntry("ColumnOrder"); - QValueList l = config.readIntListEntry("VisibleColumns"); + TQValueList l = config.readIntListEntry("VisibleColumns"); if(l.isEmpty()) { @@ -268,7 +268,7 @@ Playlist::SharedSettings::SharedSettings() m_columnsVisible.resize(l.size(), true); uint i = 0; - for(QValueList::Iterator it = l.begin(); it != l.end(); ++it) { + for(TQValueList::Iterator it = l.begin(); it != l.end(); ++it) { if(! bool(*it)) m_columnsVisible[i] = bool(*it); i++; @@ -288,7 +288,7 @@ void Playlist::SharedSettings::writeConfig() KConfigGroup config(KGlobal::config(), "PlaylistShared"); config.writeEntry("ColumnOrder", m_columnOrder); - QValueList l; + TQValueList l; for(uint i = 0; i < m_columnsVisible.size(); i++) l.append(int(m_columnsVisible[i])); @@ -305,11 +305,11 @@ void Playlist::SharedSettings::writeConfig() //////////////////////////////////////////////////////////////////////////////// PlaylistItemList Playlist::m_history; -QMap Playlist::m_backMenuItems; +TQMap Playlist::m_backMenuItems; int Playlist::m_leftColumn = 0; -Playlist::Playlist(PlaylistCollection *collection, const QString &name, - const QString &iconName) : +Playlist::Playlist(PlaylistCollection *collection, const TQString &name, + const TQString &iconName) : KListView(collection->playlistStack(), name.latin1()), m_collection(collection), m_fetcher(new WebImageFetcher(this)), @@ -333,7 +333,7 @@ Playlist::Playlist(PlaylistCollection *collection, const QString &name, } Playlist::Playlist(PlaylistCollection *collection, const PlaylistItemList &items, - const QString &name, const QString &iconName) : + const TQString &name, const TQString &iconName) : KListView(collection->playlistStack(), name.latin1()), m_collection(collection), m_fetcher(new WebImageFetcher(this)), @@ -357,8 +357,8 @@ Playlist::Playlist(PlaylistCollection *collection, const PlaylistItemList &items createItems(items); } -Playlist::Playlist(PlaylistCollection *collection, const QFileInfo &playlistFile, - const QString &iconName) : +Playlist::Playlist(PlaylistCollection *collection, const TQFileInfo &playlistFile, + const TQString &iconName) : KListView(collection->playlistStack()), m_collection(collection), m_fetcher(new WebImageFetcher(this)), @@ -424,10 +424,10 @@ Playlist::~Playlist() m_collection->removePlaylist(this); } -QString Playlist::name() const +TQString Playlist::name() const { if(m_playlistName.isNull()) - return m_fileName.section(QDir::separator(), -1).section('.', 0, -2); + return m_fileName.section(TQDir::separator(), -1).section('.', 0, -2); else return m_playlistName; } @@ -469,7 +469,7 @@ int Playlist::time() const void Playlist::playFirst() { TrackSequenceManager::instance()->setNextItem(static_cast( - QListViewItemIterator(const_cast(this), QListViewItemIterator::Visible).current())); + TQListViewItemIterator(const_cast(this), TQListViewItemIterator::Visible).current())); action("forward")->activate(); } @@ -479,7 +479,7 @@ void Playlist::playNextAlbum() if(!current) return; // No next album if we're not already playing. - QString currentAlbum = current->file().tag()->album(); + TQString currentAlbum = current->file().tag()->album(); current = TrackSequenceManager::instance()->nextItem(); while(current && current->file().tag()->album() == currentAlbum) @@ -526,7 +526,7 @@ void Playlist::playPrevious() setPlaying(previous, false); } -void Playlist::setName(const QString &n) +void Playlist::setName(const TQString &n) { m_collection->addNameToDict(n); m_collection->removeNameFromDict(m_playlistName); @@ -540,16 +540,16 @@ void Playlist::save() if(m_fileName.isEmpty()) return saveAs(); - QFile file(m_fileName); + TQFile file(m_fileName); if(!file.open(IO_WriteOnly)) return KMessageBox::error(this, i18n("Could not save to file %1.").arg(m_fileName)); - QTextStream stream(&file); + TQTextStream stream(&file); - QStringList fileList = files(); + TQStringList fileList = files(); - for(QStringList::Iterator it = fileList.begin(); it != fileList.end(); ++it) + for(TQStringList::Iterator it = fileList.begin(); it != fileList.end(); ++it) stream << *it << endl; file.close(); @@ -603,11 +603,11 @@ PlaylistItem *Playlist::playingItem() // static return PlaylistItem::playingItems().isEmpty() ? 0 : PlaylistItem::playingItems().front(); } -QStringList Playlist::files() const +TQStringList Playlist::files() const { - QStringList list; + TQStringList list; - for(QListViewItemIterator it(const_cast(this)); it.current(); ++it) + for(TQListViewItemIterator it(const_cast(this)); it.current(); ++it) list.append(static_cast(*it)->file().absFilePath()); return list; @@ -615,12 +615,12 @@ QStringList Playlist::files() const PlaylistItemList Playlist::items() { - return items(QListViewItemIterator::IteratorFlag(0)); + return items(TQListViewItemIterator::IteratorFlag(0)); } PlaylistItemList Playlist::visibleItems() { - return items(QListViewItemIterator::Visible); + return items(TQListViewItemIterator::Visible); } PlaylistItemList Playlist::selectedItems() @@ -634,8 +634,8 @@ PlaylistItemList Playlist::selectedItems() // list.append(m_lastSelected); // break; default: - list = items(QListViewItemIterator::IteratorFlag(QListViewItemIterator::Selected | - QListViewItemIterator::Visible)); + list = items(TQListViewItemIterator::IteratorFlag(TQListViewItemIterator::Selected | + TQListViewItemIterator::Visible)); break; } @@ -707,7 +707,7 @@ void Playlist::synchronizePlayingItems(const PlaylistList &sources, bool setMast for(PlaylistList::ConstIterator it = sources.begin(); it != sources.end(); ++it) { if((*it)->playing()) { CollectionListItem *base = playingItem()->collectionItem(); - for(QListViewItemIterator itemIt(this); itemIt.current(); ++itemIt) { + for(TQListViewItemIterator itemIt(this); itemIt.current(); ++itemIt) { PlaylistItem *item = static_cast(itemIt.current()); if(base == item->collectionItem()) { item->setPlaying(true, setMaster); @@ -800,7 +800,7 @@ void Playlist::slotRemoveCover() return; int button = KMessageBox::warningContinueCancel(this, i18n("Are you sure you want to delete these covers?"), - QString::null, + TQString::null, i18n("&Delete Covers")); if(button == KMessageBox::Continue) refreshAlbums(items); @@ -845,12 +845,12 @@ void Playlist::slotAddCover(bool retrieveLocal) return; } - QPixmap newCover; + TQPixmap newCover; if(retrieveLocal) { KURL file = KFileDialog::getImageOpenURL( ":homedir", this, i18n("Select Cover Image File")); - newCover = QPixmap(file.directory() + "/" + file.fileName()); + newCover = TQPixmap(file.directory() + "/" + file.fileName()); } else { m_fetcher->setFile((*items.begin())->file()); @@ -861,8 +861,8 @@ void Playlist::slotAddCover(bool retrieveLocal) if(newCover.isNull()) return; - QString artist = items.front()->file().tag()->artist(); - QString album = items.front()->file().tag()->album(); + TQString artist = items.front()->file().tag()->artist(); + TQString album = items.front()->file().tag()->album(); coverKey newId = CoverManager::addCover(newCover, artist, album); refreshAlbums(items, newId); @@ -903,7 +903,7 @@ void Playlist::slotGuessTagInfo(TagGuesser::Type type) void Playlist::slotReload() { - QFileInfo fileInfo(m_fileName); + TQFileInfo fileInfo(m_fileName); if(!fileInfo.exists() || !fileInfo.isFile() || !fileInfo.isReadable()) return; @@ -975,7 +975,7 @@ void Playlist::removeFromDisk(const PlaylistItemList &items) { if(isVisible() && !items.isEmpty()) { - QStringList files; + TQStringList files; for(PlaylistItemList::ConstIterator it = items.begin(); it != items.end(); ++it) files.append((*it)->file().absFilePath()); @@ -985,15 +985,15 @@ void Playlist::removeFromDisk(const PlaylistItemList &items) if(dialog.confirmDeleteList(files)) { bool shouldDelete = dialog.shouldDelete(); - QStringList errorFiles; + TQStringList errorFiles; for(PlaylistItemList::ConstIterator it = items.begin(); it != items.end(); ++it) { if(playingItem() == *it) action("forward")->activate(); - QString removePath = (*it)->file().absFilePath(); + TQString removePath = (*it)->file().absFilePath(); if((!shouldDelete && KIO::NetAccess::synchronousRun(KIO::trash(removePath), this)) || - (shouldDelete && QFile::remove(removePath))) + (shouldDelete && TQFile::remove(removePath))) { CollectionList::instance()->clearItem((*it)->collectionItem()); } @@ -1002,7 +1002,7 @@ void Playlist::removeFromDisk(const PlaylistItemList &items) } if(!errorFiles.isEmpty()) { - QString errorMsg = shouldDelete ? + TQString errorMsg = shouldDelete ? i18n("Could not delete these files") : i18n("Could not move these files to the Trash"); KMessageBox::errorList(this, errorMsg, errorFiles); @@ -1015,7 +1015,7 @@ void Playlist::removeFromDisk(const PlaylistItemList &items) } } -QDragObject *Playlist::dragObject(QWidget *parent) +TQDragObject *Playlist::dragObject(TQWidget *parent) { PlaylistItemList items = selectedItems(); KURL::List urls; @@ -1031,7 +1031,7 @@ QDragObject *Playlist::dragObject(QWidget *parent) return drag; } -void Playlist::contentsDragEnterEvent(QDragEnterEvent *e) +void Playlist::contentsDragEnterEvent(TQDragEnterEvent *e) { KListView::contentsDragEnterEvent(e); @@ -1056,12 +1056,12 @@ void Playlist::contentsDragEnterEvent(QDragEnterEvent *e) return; } -bool Playlist::acceptDrag(QDropEvent *e) const +bool Playlist::acceptDrag(TQDropEvent *e) const { return CoverDrag::canDecode(e) || KURLDrag::canDecode(e); } -bool Playlist::canDecode(QMimeSource *s) +bool Playlist::canDecode(TQMimeSource *s) { KURL::List urls; @@ -1071,7 +1071,7 @@ bool Playlist::canDecode(QMimeSource *s) return KURLDrag::decode(s, urls) && !urls.isEmpty(); } -void Playlist::decode(QMimeSource *s, PlaylistItem *item) +void Playlist::decode(TQMimeSource *s, PlaylistItem *item) { KURL::List urls; @@ -1082,7 +1082,7 @@ void Playlist::decode(QMimeSource *s, PlaylistItem *item) if(!MediaFiles::isMediaFile(urls.front().path())) { - QString file; + TQString file; if(urls.front().isLocalFile()) file = urls.front().path(); @@ -1092,7 +1092,7 @@ void Playlist::decode(QMimeSource *s, PlaylistItem *item) KMimeType::Ptr mimeType = KMimeType::findByPath(file); if(item && mimeType->name().startsWith("image/")) { - item->file().coverInfo()->setCover(QImage(file)); + item->file().coverInfo()->setCover(TQImage(file)); refreshAlbum(item->file().tag()->artist(), item->file().tag()->album()); } @@ -1100,7 +1100,7 @@ void Playlist::decode(QMimeSource *s, PlaylistItem *item) KIO::NetAccess::removeTempFile(file); } - QStringList fileList; + TQStringList fileList; for(KURL::List::Iterator it = urls.begin(); it != urls.end(); ++it) fileList += MediaFiles::convertURLsToLocal((*it).path(), this); @@ -1108,13 +1108,13 @@ void Playlist::decode(QMimeSource *s, PlaylistItem *item) addFiles(fileList, item); } -bool Playlist::eventFilter(QObject *watched, QEvent *e) +bool Playlist::eventFilter(TQObject *watched, TQEvent *e) { if(watched == header()) { switch(e->type()) { - case QEvent::MouseMove: + case TQEvent::MouseMove: { - if((static_cast(e)->state() & LeftButton) == LeftButton && + if((static_cast(e)->state() & LeftButton) == LeftButton && !action("resizeColumnsManually")->isChecked()) { m_columnWidthModeChanged = true; @@ -1125,14 +1125,14 @@ bool Playlist::eventFilter(QObject *watched, QEvent *e) break; } - case QEvent::MouseButtonPress: + case TQEvent::MouseButtonPress: { - if(static_cast(e)->button() == RightButton) - m_headerMenu->popup(QCursor::pos()); + if(static_cast(e)->button() == RightButton) + m_headerMenu->popup(TQCursor::pos()); break; } - case QEvent::MouseButtonRelease: + case TQEvent::MouseButtonRelease: { if(m_columnWidthModeChanged) { m_columnWidthModeChanged = false; @@ -1140,7 +1140,7 @@ bool Playlist::eventFilter(QObject *watched, QEvent *e) } if(!manualResize() && m_widthsDirty) - QTimer::singleShot(0, this, SLOT(slotUpdateColumnWidths())); + TQTimer::singleShot(0, this, TQT_SLOT(slotUpdateColumnWidths())); break; } default: @@ -1151,15 +1151,15 @@ bool Playlist::eventFilter(QObject *watched, QEvent *e) return KListView::eventFilter(watched, e); } -void Playlist::keyPressEvent(QKeyEvent *event) +void Playlist::keyPressEvent(TQKeyEvent *event) { if(event->key() == Key_Up) { - QListViewItemIterator selected(this, QListViewItemIterator::IteratorFlag( - QListViewItemIterator::Selected | - QListViewItemIterator::Visible)); + TQListViewItemIterator selected(this, TQListViewItemIterator::IteratorFlag( + TQListViewItemIterator::Selected | + TQListViewItemIterator::Visible)); if(selected.current()) { - QListViewItemIterator visible(this, QListViewItemIterator::IteratorFlag( - QListViewItemIterator::Visible)); + TQListViewItemIterator visible(this, TQListViewItemIterator::IteratorFlag( + TQListViewItemIterator::Visible)); if(selected.current() == visible.current()) KApplication::postEvent(parent(), new FocusUpEvent); } @@ -1169,9 +1169,9 @@ void Playlist::keyPressEvent(QKeyEvent *event) KListView::keyPressEvent(event); } -void Playlist::contentsDropEvent(QDropEvent *e) +void Playlist::contentsDropEvent(TQDropEvent *e) { - QPoint vp = contentsToViewport(e->pos()); + TQPoint vp = contentsToViewport(e->pos()); PlaylistItem *item = static_cast(itemAt(vp)); // First see if we're dropping a cover, if so we can get it out of the @@ -1215,9 +1215,9 @@ void Playlist::contentsDropEvent(QDropEvent *e) setSorting(columns() + 1); - QPtrList items = KListView::selectedItems(); + TQPtrList items = KListView::selectedItems(); - for(QPtrListIterator it(items); it.current(); ++it) { + for(TQPtrListIterator it(items); it.current(); ++it) { if(!item) { // Insert the item at the top of the list. This is a bit ugly, @@ -1242,7 +1242,7 @@ void Playlist::contentsDropEvent(QDropEvent *e) KListView::contentsDropEvent(e); } -void Playlist::contentsMouseDoubleClickEvent(QMouseEvent *e) +void Playlist::contentsMouseDoubleClickEvent(TQMouseEvent *e) { // Filter out non left button double clicks, that way users don't have the // weird experience of switching songs from a double right-click. @@ -1251,7 +1251,7 @@ void Playlist::contentsMouseDoubleClickEvent(QMouseEvent *e) KListView::contentsMouseDoubleClickEvent(e); } -void Playlist::showEvent(QShowEvent *e) +void Playlist::showEvent(TQShowEvent *e) { if(m_applySharedSettings) { SharedSettings::instance()->apply(this); @@ -1265,21 +1265,21 @@ void Playlist::applySharedSettings() m_applySharedSettings = true; } -void Playlist::read(QDataStream &s) +void Playlist::read(TQDataStream &s) { - QString buffer; + TQString buffer; s >> m_playlistName >> m_fileName; - QStringList files; + TQStringList files; s >> files; - QListViewItem *after = 0; + TQListViewItem *after = 0; m_blockDataChanged = true; - for(QStringList::ConstIterator it = files.begin(); it != files.end(); ++it) + for(TQStringList::ConstIterator it = files.begin(); it != files.end(); ++it) after = createItem(FileHandle(*it), after, false); m_blockDataChanged = false; @@ -1288,7 +1288,7 @@ void Playlist::read(QDataStream &s) m_collection->setupPlaylist(this, "midi"); } -void Playlist::viewportPaintEvent(QPaintEvent *pe) +void Playlist::viewportPaintEvent(TQPaintEvent *pe) { // If there are columns that need to be updated, well, update them. @@ -1301,7 +1301,7 @@ void Playlist::viewportPaintEvent(QPaintEvent *pe) KListView::viewportPaintEvent(pe); } -void Playlist::viewportResizeEvent(QResizeEvent *re) +void Playlist::viewportResizeEvent(TQResizeEvent *re) { // If the width of the view has changed, manually update the column // widths. @@ -1312,10 +1312,10 @@ void Playlist::viewportResizeEvent(QResizeEvent *re) KListView::viewportResizeEvent(re); } -void Playlist::insertItem(QListViewItem *item) +void Playlist::insertItem(TQListViewItem *item) { // Because we're called from the PlaylistItem ctor, item may not be a - // PlaylistItem yet (it would be QListViewItem when being inserted. But, + // PlaylistItem yet (it would be TQListViewItem when being inserted. But, // it will be a PlaylistItem by the time it matters, but be careful if // you need to use the PlaylistItem from here. @@ -1323,7 +1323,7 @@ void Playlist::insertItem(QListViewItem *item) KListView::insertItem(item); } -void Playlist::takeItem(QListViewItem *item) +void Playlist::takeItem(TQListViewItem *item) { // See the warning in Playlist::insertItem. @@ -1331,14 +1331,14 @@ void Playlist::takeItem(QListViewItem *item) KListView::takeItem(item); } -void Playlist::addColumn(const QString &label) +void Playlist::addColumn(const TQString &label) { slotWeightDirty(columns()); KListView::addColumn(label, 30); } PlaylistItem *Playlist::createItem(const FileHandle &file, - QListViewItem *after, bool emitChanged) + TQListViewItem *after, bool emitChanged) { return createItem(file, after, emitChanged); } @@ -1348,7 +1348,7 @@ void Playlist::createItems(const PlaylistItemList &siblings, PlaylistItem *after createItems(siblings, after); } -void Playlist::addFiles(const QStringList &files, PlaylistItem *after) +void Playlist::addFiles(const TQStringList &files, PlaylistItem *after) { if(!after) after = static_cast(lastItem()); @@ -1359,8 +1359,8 @@ void Playlist::addFiles(const QStringList &files, PlaylistItem *after) FileHandleList queue; - const QStringList::ConstIterator filesEnd = files.end(); - for(QStringList::ConstIterator it = files.begin(); it != filesEnd; ++it) + const TQStringList::ConstIterator filesEnd = files.end(); + for(TQStringList::ConstIterator it = files.begin(); it != filesEnd; ++it) addFile(*it, queue, true, &after); addFileHelper(queue, &after, true); @@ -1375,12 +1375,12 @@ void Playlist::addFiles(const QStringList &files, PlaylistItem *after) void Playlist::refreshAlbums(const PlaylistItemList &items, coverKey id) { - QValueList< QPair > albums; + TQValueList< QPair > albums; bool setAlbumCovers = items.count() == 1; for(PlaylistItemList::ConstIterator it = items.begin(); it != items.end(); ++it) { - QString artist = (*it)->file().tag()->artist(); - QString album = (*it)->file().tag()->album(); + TQString artist = (*it)->file().tag()->artist(); + TQString album = (*it)->file().tag()->album(); if(albums.find(qMakePair(artist, album)) == albums.end()) albums.append(qMakePair(artist, album)); @@ -1390,7 +1390,7 @@ void Playlist::refreshAlbums(const PlaylistItemList &items, coverKey id) (*it)->file().coverInfo()->applyCoverToWholeAlbum(true); } - for(QValueList< QPair >::ConstIterator it = albums.begin(); + for(TQValueList< QPair >::ConstIterator it = albums.begin(); it != albums.end(); ++it) { refreshAlbum((*it).first, (*it).second); @@ -1406,7 +1406,7 @@ void Playlist::updatePlaying() const } } -void Playlist::refreshAlbum(const QString &artist, const QString &album) +void Playlist::refreshAlbum(const TQString &artist, const TQString &album) { ColumnList columns; columns.append(PlaylistItem::ArtistColumn); @@ -1535,7 +1535,7 @@ void Playlist::polish() setRenameable(PlaylistItem::YearColumn, true); setAllColumnsShowFocus(true); - setSelectionMode(QListView::Extended); + setSelectionMode(TQListView::Extended); setShowSortIndicator(true); setDropVisualizer(true); @@ -1559,25 +1559,25 @@ void Playlist::polish() adjustColumn(i); } - connect(m_headerMenu, SIGNAL(activated(int)), this, SLOT(slotToggleColumnVisible(int))); + connect(m_headerMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotToggleColumnVisible(int))); - connect(this, SIGNAL(contextMenuRequested(QListViewItem *, const QPoint &, int)), - this, SLOT(slotShowRMBMenu(QListViewItem *, const QPoint &, int))); - connect(this, SIGNAL(itemRenamed(QListViewItem *, const QString &, int)), - this, SLOT(slotInlineEditDone(QListViewItem *, const QString &, int))); - connect(this, SIGNAL(doubleClicked(QListViewItem *)), - this, SLOT(slotPlayCurrent())); - connect(this, SIGNAL(returnPressed(QListViewItem *)), - this, SLOT(slotPlayCurrent())); + connect(this, TQT_SIGNAL(contextMenuRequested(TQListViewItem *, const TQPoint &, int)), + this, TQT_SLOT(slotShowRMBMenu(TQListViewItem *, const TQPoint &, int))); + connect(this, TQT_SIGNAL(itemRenamed(TQListViewItem *, const TQString &, int)), + this, TQT_SLOT(slotInlineEditDone(TQListViewItem *, const TQString &, int))); + connect(this, TQT_SIGNAL(doubleClicked(TQListViewItem *)), + this, TQT_SLOT(slotPlayCurrent())); + connect(this, TQT_SIGNAL(returnPressed(TQListViewItem *)), + this, TQT_SLOT(slotPlayCurrent())); - connect(header(), SIGNAL(sizeChange(int, int, int)), - this, SLOT(slotColumnSizeChanged(int, int, int))); + connect(header(), TQT_SIGNAL(sizeChange(int, int, int)), + this, TQT_SLOT(slotColumnSizeChanged(int, int, int))); - connect(renameLineEdit(), SIGNAL(completionModeChanged(KGlobalSettings::Completion)), - this, SLOT(slotInlineCompletionModeChanged(KGlobalSettings::Completion))); + connect(renameLineEdit(), TQT_SIGNAL(completionModeChanged(KGlobalSettings::Completion)), + this, TQT_SLOT(slotInlineCompletionModeChanged(KGlobalSettings::Completion))); - connect(action("resizeColumnsManually"), SIGNAL(activated()), - this, SLOT(slotColumnResizeModeChanged())); + connect(action("resizeColumnsManually"), TQT_SIGNAL(activated()), + this, TQT_SLOT(slotColumnResizeModeChanged())); if(action("resizeColumnsManually")->isChecked()) setHScrollBarMode(Auto); @@ -1651,24 +1651,24 @@ void Playlist::setup() { setItemMargin(3); - connect(header(), SIGNAL(indexChange(int, int, int)), this, SLOT(slotColumnOrderChanged(int, int, int))); + connect(header(), TQT_SIGNAL(indexChange(int, int, int)), this, TQT_SLOT(slotColumnOrderChanged(int, int, int))); - connect(m_fetcher, SIGNAL(signalCoverChanged(int)), this, SLOT(slotCoverChanged(int))); + connect(m_fetcher, TQT_SIGNAL(signalCoverChanged(int)), this, TQT_SLOT(slotCoverChanged(int))); // Prevent list of selected items from changing while internet search is in // progress. - connect(this, SIGNAL(selectionChanged()), m_fetcher, SLOT(abortSearch())); + connect(this, TQT_SIGNAL(selectionChanged()), m_fetcher, TQT_SLOT(abortSearch())); setSorting(1); } -void Playlist::loadFile(const QString &fileName, const QFileInfo &fileInfo) +void Playlist::loadFile(const TQString &fileName, const TQFileInfo &fileInfo) { - QFile file(fileName); + TQFile file(fileName); if(!file.open(IO_ReadOnly)) return; - QTextStream stream(&file); + TQTextStream stream(&file); // Turn off non-explicit sorting. @@ -1681,12 +1681,12 @@ void Playlist::loadFile(const QString &fileName, const QFileInfo &fileInfo) m_blockDataChanged = true; while(!stream.atEnd()) { - QString itemName = stream.readLine().stripWhiteSpace(); + TQString itemName = stream.readLine().stripWhiteSpace(); - QFileInfo item(itemName); + TQFileInfo item(itemName); if(item.isRelative()) - item.setFile(QDir::cleanDirPath(fileInfo.dirPath(true) + "/" + itemName)); + item.setFile(TQDir::cleanDirPath(fileInfo.dirPath(true) + "/" + itemName)); if(item.exists() && item.isFile() && item.isReadable() && MediaFiles::isMediaFile(item.fileName())) @@ -1724,7 +1724,7 @@ void Playlist::setPlaying(PlaylistItem *item, bool addToHistory) } TrackSequenceManager::instance()->setCurrent(item); - QByteArray data; + TQByteArray data; kapp->dcopClient()->emitDCOPSignal("Player", "trackChanged()", data); if(!item) @@ -1750,11 +1750,11 @@ int Playlist::leftMostVisibleColumn() const return header()->mapToSection(i); } -PlaylistItemList Playlist::items(QListViewItemIterator::IteratorFlag flags) +PlaylistItemList Playlist::items(TQListViewItemIterator::IteratorFlag flags) { PlaylistItemList list; - for(QListViewItemIterator it(this, flags); it.current(); ++it) + for(TQListViewItemIterator it(this, flags); it.current(); ++it) list.append(static_cast(it.current())); return list; @@ -1766,12 +1766,12 @@ void Playlist::calculateColumnWeights() return; PlaylistItemList l = items(); - QValueListConstIterator columnIt; + TQValueListConstIterator columnIt; - QValueVector averageWidth(columns(), 0); + TQValueVector averageWidth(columns(), 0); double itemCount = l.size(); - QValueVector cachedWidth; + TQValueVector cachedWidth; // Here we're not using a real average, but averaging the squares of the // column widths and then using the square root of that value. This gives @@ -1796,7 +1796,7 @@ void Playlist::calculateColumnWeights() m_weightDirty.clear(); } -void Playlist::addFile(const QString &file, FileHandleList &files, bool importPlaylists, +void Playlist::addFile(const TQString &file, FileHandleList &files, bool importPlaylists, PlaylistItem **after) { if(hasItem(file) && !m_allowDuplicates) @@ -1817,7 +1817,7 @@ void Playlist::addFile(const QString &file, FileHandleList &files, bool importPl } - const QFileInfo fileInfo = QDir::cleanDirPath(file); + const TQFileInfo fileInfo = TQDir::cleanDirPath(file); if(!fileInfo.exists()) return; @@ -1838,10 +1838,10 @@ void Playlist::addFile(const QString &file, FileHandleList &files, bool importPl if(fileInfo.isDir()) { - // Resorting to the POSIX API because QDir::listEntries() stats every + // Resorting to the POSIX API because TQDir::listEntries() stats every // file and blocks while it's doing so. - DIR *dir = ::opendir(QFile::encodeName(fileInfo.filePath())); + DIR *dir = ::opendir(TQFile::encodeName(fileInfo.filePath())); if(dir) { struct dirent *dirEntry; @@ -1854,7 +1854,7 @@ void Playlist::addFile(const QString &file, FileHandleList &files, bool importPl // explicitly asked for, but not those that we find in lower // directories. - addFile(fileInfo.filePath() + QDir::separator() + QFile::decodeName(dirEntry->d_name), + addFile(fileInfo.filePath() + TQDir::separator() + TQFile::decodeName(dirEntry->d_name), files, m_collection->importPlaylists(), after); } } @@ -1870,7 +1870,7 @@ void Playlist::addFile(const QString &file, FileHandleList &files, bool importPl void Playlist::addFileHelper(FileHandleList &files, PlaylistItem **after, bool ignoreTimer) { - static QTime time = QTime::currentTime(); + static TQTime time = TQTime::currentTime(); // Process new items every 10 seconds, when we've loaded 1000 items, or when // it's been requested in the API. @@ -1912,13 +1912,13 @@ void Playlist::slotUpdateColumnWidths() // Make sure that the column weights have been initialized before trying to // update the columns. - QValueList visibleColumns; + TQValueList visibleColumns; for(int i = 0; i < columns(); i++) { if(isColumnVisible(i)) visibleColumns.append(i); } - QValueListConstIterator it; + TQValueListConstIterator it; if(count() == 0) { for(it = visibleColumns.begin(); it != visibleColumns.end(); ++it) @@ -1933,13 +1933,13 @@ void Playlist::slotUpdateColumnWidths() // First build a list of minimum widths based on the strings in the listview // header. We won't let the width of the column go below this width. - QValueVector minimumWidth(columns(), 0); + TQValueVector minimumWidth(columns(), 0); int minimumWidthTotal = 0; // Also build a list of either the minimum *or* the fixed width -- whichever is // greater. - QValueVector minimumFixedWidth(columns(), 0); + TQValueVector minimumFixedWidth(columns(), 0); int minimumFixedWidthTotal = 0; for(it = visibleColumns.begin(); it != visibleColumns.end(); ++it) { @@ -1976,7 +1976,7 @@ void Playlist::slotUpdateColumnWidths() // Computed a "weighted width" for each visible column. This would be the // width if we didn't have to handle the cases of minimum and maximum widths. - QValueVector weightedWidth(columns(), 0); + TQValueVector weightedWidth(columns(), 0); for(it = visibleColumns.begin(); it != visibleColumns.end(); ++it) weightedWidth[*it] = int(double(m_columnWeights[*it]) / totalWeight * visibleWidth() + 0.5); @@ -1984,7 +1984,7 @@ void Playlist::slotUpdateColumnWidths() // minimum width or zero if the minimum width is greater than the weighted // width. - QValueVector extraWidth(columns(), 0); + TQValueVector extraWidth(columns(), 0); // This is used as an indicator if we have any columns where the weighted // width is less than the minimum width. If this is false then we can @@ -2061,7 +2061,7 @@ void Playlist::slotAddToUpcoming() m_collection->upcomingPlaylist()->appendItems(selectedItems()); } -void Playlist::slotShowRMBMenu(QListViewItem *item, const QPoint &point, int column) +void Playlist::slotShowRMBMenu(TQListViewItem *item, const TQPoint &point, int column) { if(!item) return; @@ -2076,7 +2076,7 @@ void Playlist::slotShowRMBMenu(QListViewItem *item, const QPoint &point, int col m_rmbMenu = new KPopupMenu(this); m_rmbUpcomingID = m_rmbMenu->insertItem(SmallIcon("today"), - i18n("Add to Play Queue"), this, SLOT(slotAddToUpcoming())); + i18n("Add to Play Queue"), this, TQT_SLOT(slotAddToUpcoming())); m_rmbMenu->insertSeparator(); if(!readOnly()) { @@ -2090,7 +2090,7 @@ void Playlist::slotShowRMBMenu(QListViewItem *item, const QPoint &point, int col action("edit_copy")->plug(m_rmbMenu); m_rmbEditID = m_rmbMenu->insertItem( - i18n("Edit"), this, SLOT(slotRenameTag())); + i18n("Edit"), this, TQT_SLOT(slotRenameTag())); action("refresh")->plug(m_rmbMenu); action("removeItem")->plug(m_rmbMenu); @@ -2105,7 +2105,7 @@ void Playlist::slotShowRMBMenu(QListViewItem *item, const QPoint &point, int col m_rmbMenu->insertSeparator(); m_rmbMenu->insertItem( - SmallIcon("folder_new"), i18n("Create Playlist From Selected Items..."), this, SLOT(slotCreateGroup())); + SmallIcon("folder_new"), i18n("Create Playlist From Selected Items..."), this, TQT_SLOT(slotCreateGroup())); K3bExporter *exporter = new K3bExporter(this); KAction *k3bAction = exporter->action(); @@ -2165,7 +2165,7 @@ void Playlist::slotRenameTag() break; case PlaylistItem::GenreColumn: { - QStringList genreList; + TQStringList genreList; TagLib::StringList genres = TagLib::ID3v1::genreList(); for(TagLib::StringList::ConstIterator it = genres.begin(); it != genres.end(); ++it) genreList.append(TStringToQString((*it))); @@ -2182,7 +2182,7 @@ void Playlist::slotRenameTag() rename(currentItem(), m_currentColumn); } -bool Playlist::editTag(PlaylistItem *item, const QString &text, int column) +bool Playlist::editTag(PlaylistItem *item, const TQString &text, int column) { Tag *newTag = TagTransactionManager::duplicateTag(item->file().tag()); @@ -2222,9 +2222,9 @@ bool Playlist::editTag(PlaylistItem *item, const QString &text, int column) return true; } -void Playlist::slotInlineEditDone(QListViewItem *, const QString &, int column) +void Playlist::slotInlineEditDone(TQListViewItem *, const TQString &, int column) { - QString text = renameLineEdit()->text(); + TQString text = renameLineEdit()->text(); bool changed = false; PlaylistItemList l = selectedItems(); @@ -2239,7 +2239,7 @@ void Playlist::slotInlineEditDone(QListViewItem *, const QString &, int column) (l.count() > 1 && KMessageBox::warningContinueCancel( 0, i18n("This will edit multiple files. Are you sure?"), - QString::null, + TQString::null, i18n("Edit"), "DontWarnMultipleTags") == KMessageBox::Cancel)) { @@ -2292,7 +2292,7 @@ void Playlist::slotToggleColumnVisible(int column) void Playlist::slotCreateGroup() { - QString name = m_collection->playlistNameDialog(i18n("Create New Playlist")); + TQString name = m_collection->playlistNameDialog(i18n("Create New Playlist")); if(!name.isEmpty()) new Playlist(m_collection, selectedItems(), name); @@ -2321,7 +2321,7 @@ void Playlist::slotInlineCompletionModeChanged(KGlobalSettings::Completion mode) void Playlist::slotPlayCurrent() { - QListViewItemIterator it(this, QListViewItemIterator::Selected); + TQListViewItemIterator it(this, TQListViewItemIterator::Selected); PlaylistItem *next = static_cast(it.current()); TrackSequenceManager::instance()->setNextItem(next); action("forward")->activate(); @@ -2331,7 +2331,7 @@ void Playlist::slotPlayCurrent() // helper functions //////////////////////////////////////////////////////////////////////////////// -QDataStream &operator<<(QDataStream &s, const Playlist &p) +TQDataStream &operator<<(TQDataStream &s, const Playlist &p) { s << p.name(); s << p.fileName(); @@ -2340,7 +2340,7 @@ QDataStream &operator<<(QDataStream &s, const Playlist &p) return s; } -QDataStream &operator>>(QDataStream &s, Playlist &p) +TQDataStream &operator>>(TQDataStream &s, Playlist &p) { p.read(s); return s; @@ -2348,7 +2348,7 @@ QDataStream &operator>>(QDataStream &s, Playlist &p) bool processEvents() { - static QTime time = QTime::currentTime(); + static TQTime time = TQTime::currentTime(); if(time.elapsed() > 100) { time.restart(); diff --git a/juk/playlist.h b/juk/playlist.h index 26c11ff9..a221d20e 100644 --- a/juk/playlist.h +++ b/juk/playlist.h @@ -21,8 +21,8 @@ #include #include -#include -#include +#include +#include #include "covermanager.h" #include "stringhash.h" @@ -41,7 +41,7 @@ class WebImageFetcher; class PlaylistToolTip; class UpcomingPlaylist; -typedef QValueList PlaylistItemList; +typedef TQValueList PlaylistItemList; class Playlist : public KListView, public PlaylistInterface { @@ -49,12 +49,12 @@ class Playlist : public KListView, public PlaylistInterface public: - Playlist(PlaylistCollection *collection, const QString &name = QString::null, - const QString &iconName = "midi"); + Playlist(PlaylistCollection *collection, const TQString &name = TQString::null, + const TQString &iconName = "midi"); Playlist(PlaylistCollection *collection, const PlaylistItemList &items, - const QString &name = QString::null, const QString &iconName = "midi"); - Playlist(PlaylistCollection *collection, const QFileInfo &playlistFile, - const QString &iconName = "midi"); + const TQString &name = TQString::null, const TQString &iconName = "midi"); + Playlist(PlaylistCollection *collection, const TQFileInfo &playlistFile, + const TQString &iconName = "midi"); /** * This constructor should generally only be used either by the cache @@ -68,7 +68,7 @@ public: // The following group of functions implement the PlaylistInterface API. - virtual QString name() const; + virtual TQString name() const; virtual FileHandle currentFile() const; virtual int count() const { return childCount(); } virtual int time() const; @@ -129,7 +129,7 @@ public: /** * All of the (media) files in the list. */ - QStringList files() const; + TQStringList files() const; /** * Returns a list of all of the items in the playlist. @@ -162,7 +162,7 @@ public: * both PlaylistItems and CollectionListItems. */ virtual PlaylistItem *createItem(const FileHandle &file, - QListViewItem *after = 0, + TQListViewItem *after = 0, bool emitChanged = true); /** @@ -174,7 +174,7 @@ public: */ template ItemType *createItem(const FileHandle &file, - QListViewItem *after = 0, + TQListViewItem *after = 0, bool emitChanged = true); virtual void createItems(const PlaylistItemList &siblings, PlaylistItem *after = 0); @@ -188,19 +188,19 @@ public: * items since it has the overhead of checking to see if the file is a playlist * or directory first. */ - virtual void addFiles(const QStringList &files, PlaylistItem *after = 0); + virtual void addFiles(const TQStringList &files, PlaylistItem *after = 0); /** * Returns the file name associated with this playlist (an m3u file) or - * QString::null if no such file exists. + * TQString::null if no such file exists. */ - QString fileName() const { return m_fileName; } + TQString fileName() const { return m_fileName; } /** * Sets the file name to be associated with this playlist; this file should * have the "m3u" extension. */ - void setFileName(const QString &n) { m_fileName = n; } + void setFileName(const TQString &n) { m_fileName = n; } /** * Hides column \a c. If \a updateSearch is true then a signal that the @@ -220,7 +220,7 @@ public: /** * This sets a name for the playlist that is \e different from the file name. */ - void setName(const QString &n); + void setName(const TQString &n); /** * Returns the KActionMenu that allows this to be embedded in menus outside @@ -318,7 +318,7 @@ public: */ void applySharedSettings(); - void read(QDataStream &s); + void read(TQDataStream &s); static void setShuttingDown() { m_shuttingDown = true; } @@ -417,26 +417,26 @@ protected: // the following are all reimplemented from base classes - virtual bool eventFilter(QObject *watched, QEvent *e); - virtual void keyPressEvent(QKeyEvent *e); - virtual QDragObject *dragObject(QWidget *parent); - virtual QDragObject *dragObject() { return dragObject(this); } - virtual bool canDecode(QMimeSource *s); - virtual void decode(QMimeSource *s, PlaylistItem *item = 0); - virtual void contentsDropEvent(QDropEvent *e); - virtual void contentsMouseDoubleClickEvent(QMouseEvent *e); - virtual void contentsDragEnterEvent(QDragEnterEvent *e); - virtual void showEvent(QShowEvent *e); - virtual bool acceptDrag(QDropEvent *e) const; - virtual void viewportPaintEvent(QPaintEvent *pe); - virtual void viewportResizeEvent(QResizeEvent *re); + virtual bool eventFilter(TQObject *watched, TQEvent *e); + virtual void keyPressEvent(TQKeyEvent *e); + virtual TQDragObject *dragObject(TQWidget *parent); + virtual TQDragObject *dragObject() { return dragObject(this); } + virtual bool canDecode(TQMimeSource *s); + virtual void decode(TQMimeSource *s, PlaylistItem *item = 0); + virtual void contentsDropEvent(TQDropEvent *e); + virtual void contentsMouseDoubleClickEvent(TQMouseEvent *e); + virtual void contentsDragEnterEvent(TQDragEnterEvent *e); + virtual void showEvent(TQShowEvent *e); + virtual bool acceptDrag(TQDropEvent *e) const; + virtual void viewportPaintEvent(TQPaintEvent *pe); + virtual void viewportResizeEvent(TQResizeEvent *re); - virtual void insertItem(QListViewItem *item); - virtual void takeItem(QListViewItem *item); + virtual void insertItem(TQListViewItem *item); + virtual void takeItem(TQListViewItem *item); - virtual bool hasItem(const QString &file) const { return m_members.contains(file); } + virtual bool hasItem(const TQString &file) const { return m_members.contains(file); } - void addColumn(const QString &label); + void addColumn(const TQString &label); /** * Here I'm using delayed setup of some things that aren't quite intuitive. @@ -470,7 +470,7 @@ protected: * ItemType should be a PlaylistItem subclass. */ template - void createItems(const QValueList &siblings, ItemType *after = 0); + void createItems(const TQValueList &siblings, ItemType *after = 0); protected slots: void slotPopulateBackMenu() const; @@ -482,7 +482,7 @@ signals: * This is connected to the PlaylistBox::Item to let it know when the * playlist's name has changed. */ - void signalNameChanged(const QString &name); + void signalNameChanged(const TQString &name); /** * This signal is emitted just before a playlist item is removed from the @@ -513,13 +513,13 @@ private: * little awkward API-wise, but keeps us from throwing away useful * information. */ - void loadFile(const QString &fileName, const QFileInfo &fileInfo); + void loadFile(const TQString &fileName, const TQFileInfo &fileInfo); /** * Writes \a text to \a item in \a column. This is used by the inline tag * editor. Returns false if the tag update failed. */ - bool editTag(PlaylistItem *item, const QString &text, int column); + bool editTag(PlaylistItem *item, const TQString &text, int column); /** * Returns the index of the left most visible column in the playlist. @@ -536,14 +536,14 @@ private: * \see visibleItems() * \see selectedItems() */ - PlaylistItemList items(QListViewItemIterator::IteratorFlag flags); + PlaylistItemList items(TQListViewItemIterator::IteratorFlag flags); /** * Build the column "weights" for the weighted width mode. */ void calculateColumnWeights(); - void addFile(const QString &file, FileHandleList &files, bool importPlaylists, + void addFile(const TQString &file, FileHandleList &files, bool importPlaylists, PlaylistItem **after); void addFileHelper(FileHandleList &files, PlaylistItem **after, bool ignoreTimer = false); @@ -555,7 +555,7 @@ private: */ void refreshAlbums(const PlaylistItemList &items, coverKey id = CoverManager::NoMatch); - void refreshAlbum(const QString &artist, const QString &album); + void refreshAlbum(const TQString &artist, const TQString &album); /** * Returns the number of PlaylistItems in @p items that can be assigned a @@ -580,9 +580,9 @@ private slots: /** * Show the RMB menu. Matches the signature for the signal - * QListView::contextMenuRequested(). + * TQListView::contextMenuRequested(). */ - void slotShowRMBMenu(QListViewItem *item, const QPoint &point, int column); + void slotShowRMBMenu(TQListViewItem *item, const TQPoint &point, int column); /** * This slot is called when the inline tag editor has completed its editing @@ -590,7 +590,7 @@ private slots: * * \see editTag() */ - void slotInlineEditDone(QListViewItem *, const QString &, int column); + void slotInlineEditDone(TQListViewItem *, const TQString &, int column); /** * This starts the renaming process by displaying a line edit if the mouse is in @@ -606,7 +606,7 @@ private slots: /** * Moves the column \a from to the position \a to. This matches the signature - * for the signal QHeader::indexChange(). + * for the signal TQHeader::indexChange(). */ void slotColumnOrderChanged(int, int from, int to); @@ -657,7 +657,7 @@ private: bool m_applySharedSettings; bool m_columnWidthModeChanged; - QValueList m_weightDirty; + TQValueList m_weightDirty; bool m_disableColumnWidthUpdates; mutable int m_time; @@ -667,8 +667,8 @@ private: /** * The average minimum widths of columns to be used in balancing calculations. */ - QValueVector m_columnWeights; - QValueVector m_columnFixedWidths; + TQValueVector m_columnWeights; + TQValueVector m_columnFixedWidths; bool m_widthsDirty; static PlaylistItemList m_history; @@ -683,14 +683,14 @@ private: * we can know if something actually changed and as such if we need to save * the tag. */ - QString m_editText; + TQString m_editText; /** * This is only defined if the playlist name is something other than the * file name. */ - QString m_playlistName; - QString m_fileName; + TQString m_playlistName; + TQString m_fileName; KPopupMenu *m_rmbMenu; KPopupMenu *m_headerMenu; @@ -704,7 +704,7 @@ private: static bool m_visibleChanged; static bool m_shuttingDown; static int m_leftColumn; - static QMap m_backMenuItems; + static TQMap m_backMenuItems; bool m_blockDataChanged; }; @@ -714,17 +714,17 @@ bool processEvents(); class FocusUpEvent : public QCustomEvent { public: - FocusUpEvent() : QCustomEvent(id) {} + FocusUpEvent() : TQCustomEvent(id) {} static const int id = 999; }; -QDataStream &operator<<(QDataStream &s, const Playlist &p); -QDataStream &operator>>(QDataStream &s, Playlist &p); +TQDataStream &operator<<(TQDataStream &s, const Playlist &p); +TQDataStream &operator>>(TQDataStream &s, Playlist &p); // template method implementations template -ItemType *Playlist::createItem(const FileHandle &file, QListViewItem *after, +ItemType *Playlist::createItem(const FileHandle &file, TQListViewItem *after, bool emitChanged) { CollectionItemType *item = CollectionListType::instance()->lookup(file.absFilePath()); @@ -773,12 +773,12 @@ ItemType *Playlist::createItem(SiblingType *sibling, ItemType *after) } template -void Playlist::createItems(const QValueList &siblings, ItemType *after) +void Playlist::createItems(const TQValueList &siblings, ItemType *after) { if(siblings.isEmpty()) return; - QValueListConstIterator it = siblings.begin(); + TQValueListConstIterator it = siblings.begin(); for(; it != siblings.end(); ++it) after = createItem(*it, after); diff --git a/juk/playlistbox.cpp b/juk/playlistbox.cpp index 092342a3..32e874b9 100644 --- a/juk/playlistbox.cpp +++ b/juk/playlistbox.cpp @@ -20,9 +20,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include "playlistbox.h" #include "playlist.h" @@ -46,7 +46,7 @@ using namespace ActionCollection; // PlaylistBox public methods //////////////////////////////////////////////////////////////////////////////// -PlaylistBox::PlaylistBox(QWidget *parent, QWidgetStack *playlistStack, +PlaylistBox::PlaylistBox(TQWidget *parent, TQWidgetStack *playlistStack, const char *name) : KListView(parent, name), PlaylistCollection(playlistStack), @@ -98,14 +98,14 @@ PlaylistBox::PlaylistBox(QWidget *parent, QWidgetStack *playlistStack, m_viewModes.append(new TreeViewMode(this)); // m_viewModes.append(new CoverManagerMode(this)); - QStringList modeNames; + TQStringList modeNames; - for(QValueListIterator it = m_viewModes.begin(); it != m_viewModes.end(); ++it) + for(TQValueListIterator it = m_viewModes.begin(); it != m_viewModes.end(); ++it) modeNames.append((*it)->name()); viewModeAction->setItems(modeNames); - QPopupMenu *p = viewModeAction->popupMenu(); + TQPopupMenu *p = viewModeAction->popupMenu(); p->changeItem(0, SmallIconSet("view_detailed"), modeNames[0]); p->changeItem(1, SmallIconSet("view_text"), modeNames[1]); p->changeItem(2, SmallIconSet("view_tree"), modeNames[2]); @@ -120,43 +120,43 @@ PlaylistBox::PlaylistBox(QWidget *parent, QWidgetStack *playlistStack, raise(CollectionList::instance()); viewModeAction->plug(m_contextMenu); - connect(viewModeAction, SIGNAL(activated(int)), this, SLOT(slotSetViewMode(int))); + connect(viewModeAction, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotSetViewMode(int))); - connect(this, SIGNAL(selectionChanged()), - this, SLOT(slotPlaylistChanged())); + connect(this, TQT_SIGNAL(selectionChanged()), + this, TQT_SLOT(slotPlaylistChanged())); - connect(this, SIGNAL(doubleClicked(QListViewItem *)), - this, SLOT(slotDoubleClicked())); + connect(this, TQT_SIGNAL(doubleClicked(TQListViewItem *)), + this, TQT_SLOT(slotDoubleClicked())); - connect(this, SIGNAL(contextMenuRequested(QListViewItem *, const QPoint &, int)), - this, SLOT(slotShowContextMenu(QListViewItem *, const QPoint &, int))); + connect(this, TQT_SIGNAL(contextMenuRequested(TQListViewItem *, const TQPoint &, int)), + this, TQT_SLOT(slotShowContextMenu(TQListViewItem *, const TQPoint &, int))); TagTransactionManager *tagManager = TagTransactionManager::instance(); - connect(tagManager, SIGNAL(signalAboutToModifyTags()), SLOT(slotFreezePlaylists())); - connect(tagManager, SIGNAL(signalDoneModifyingTags()), SLOT(slotUnfreezePlaylists())); + connect(tagManager, TQT_SIGNAL(signalAboutToModifyTags()), TQT_SLOT(slotFreezePlaylists())); + connect(tagManager, TQT_SIGNAL(signalDoneModifyingTags()), TQT_SLOT(slotUnfreezePlaylists())); setupUpcomingPlaylist(); - connect(CollectionList::instance(), SIGNAL(signalNewTag(const QString &, unsigned)), - this, SLOT(slotAddItem(const QString &, unsigned))); - connect(CollectionList::instance(), SIGNAL(signalRemovedTag(const QString &, unsigned)), - this, SLOT(slotRemoveItem(const QString &, unsigned))); + connect(CollectionList::instance(), TQT_SIGNAL(signalNewTag(const TQString &, unsigned)), + this, TQT_SLOT(slotAddItem(const TQString &, unsigned))); + connect(CollectionList::instance(), TQT_SIGNAL(signalRemovedTag(const TQString &, unsigned)), + this, TQT_SLOT(slotRemoveItem(const TQString &, unsigned))); - QTimer::singleShot(0, object(), SLOT(slotScanFolders())); + TQTimer::singleShot(0, object(), TQT_SLOT(slotScanFolders())); enableDirWatch(true); // Auto-save playlists after 10 minutes - QTimer::singleShot(600000, this, SLOT(slotSavePlaylists())); + TQTimer::singleShot(600000, this, TQT_SLOT(slotSavePlaylists())); - m_showTimer = new QTimer(this); - connect(m_showTimer, SIGNAL(timeout()), SLOT(slotShowDropTarget())); + m_showTimer = new TQTimer(this); + connect(m_showTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotShowDropTarget())); } PlaylistBox::~PlaylistBox() { PlaylistList l; CollectionList *collection = CollectionList::instance(); - for(QListViewItem *i = firstChild(); i; i = i->nextSibling()) { + for(TQListViewItem *i = firstChild(); i; i = i->nextSibling()) { Item *item = static_cast(i); if(item->playlist() && item->playlist() != collection) l.append(item->playlist()); @@ -192,7 +192,7 @@ void PlaylistBox::duplicate() if(!item || !item->playlist()) return; - QString name = playlistNameDialog(i18n("Duplicate"), item->text(0)); + TQString name = playlistNameDialog(i18n("Duplicate"), item->text(0)); if(name.isNull()) return; @@ -225,15 +225,15 @@ void PlaylistBox::slotUnfreezePlaylists() setDynamicListsFrozen(false); } -void PlaylistBox::setupPlaylist(Playlist *playlist, const QString &iconName) +void PlaylistBox::setupPlaylist(Playlist *playlist, const TQString &iconName) { setupPlaylist(playlist, iconName, 0); } -void PlaylistBox::setupPlaylist(Playlist *playlist, const QString &iconName, Item *parentItem) +void PlaylistBox::setupPlaylist(Playlist *playlist, const TQString &iconName, Item *parentItem) { - connect(playlist, SIGNAL(signalPlaylistItemsDropped(Playlist *)), - SLOT(slotPlaylistItemsDropped(Playlist *))); + connect(playlist, TQT_SIGNAL(signalPlaylistItemsDropped(Playlist *)), + TQT_SLOT(slotPlaylistItemsDropped(Playlist *))); PlaylistCollection::setupPlaylist(playlist, iconName); @@ -274,13 +274,13 @@ void PlaylistBox::remove() if(items.isEmpty()) return; - QStringList files; - QStringList names; + TQStringList files; + TQStringList names; for(ItemList::ConstIterator it = items.begin(); it != items.end(); ++it) { if(*it && (*it)->playlist() && !(*it)->playlist()->fileName().isEmpty() && - QFileInfo((*it)->playlist()->fileName()).exists()) + TQFileInfo((*it)->playlist()->fileName()).exists()) { files.append((*it)->playlist()->fileName()); } @@ -289,12 +289,12 @@ void PlaylistBox::remove() if(!files.isEmpty()) { int remove = KMessageBox::warningYesNoCancelList( - this, i18n("Do you want to delete these files from the disk as well?"), files, QString::null, KStdGuiItem::del(), i18n("Keep")); + this, i18n("Do you want to delete these files from the disk as well?"), files, TQString::null, KStdGuiItem::del(), i18n("Keep")); if(remove == KMessageBox::Yes) { - QStringList couldNotDelete; - for(QStringList::ConstIterator it = files.begin(); it != files.end(); ++it) { - if(!QFile::remove(*it)) + TQStringList couldNotDelete; + for(TQStringList::ConstIterator it = files.begin(); it != files.end(); ++it) { + if(!TQFile::remove(*it)) couldNotDelete.append(*it); } @@ -352,7 +352,7 @@ void PlaylistBox::remove() void PlaylistBox::setDynamicListsFrozen(bool frozen) { - for(QValueList::Iterator it = m_viewModes.begin(); + for(TQValueList::Iterator it = m_viewModes.begin(); it != m_viewModes.end(); ++it) { @@ -366,7 +366,7 @@ void PlaylistBox::slotSavePlaylists() PlaylistList l; CollectionList *collection = CollectionList::instance(); - for(QListViewItem *i = firstChild(); i; i = i->nextSibling()) { + for(TQListViewItem *i = firstChild(); i; i = i->nextSibling()) { Item *item = static_cast(i); if(item->playlist() && item->playlist() != collection) l.append(item->playlist()); @@ -375,7 +375,7 @@ void PlaylistBox::slotSavePlaylists() Cache::savePlaylists(l); CoverManager::saveCovers(); - QTimer::singleShot(600000, this, SLOT(slotSavePlaylists())); + TQTimer::singleShot(600000, this, TQT_SLOT(slotSavePlaylists())); } void PlaylistBox::slotShowDropTarget() @@ -388,19 +388,19 @@ void PlaylistBox::slotShowDropTarget() raise(m_dropItem->playlist()); } -void PlaylistBox::slotAddItem(const QString &tag, unsigned column) +void PlaylistBox::slotAddItem(const TQString &tag, unsigned column) { - for(QValueListIterator it = m_viewModes.begin(); it != m_viewModes.end(); ++it) + for(TQValueListIterator it = m_viewModes.begin(); it != m_viewModes.end(); ++it) (*it)->addItems(tag, column); } -void PlaylistBox::slotRemoveItem(const QString &tag, unsigned column) +void PlaylistBox::slotRemoveItem(const TQString &tag, unsigned column) { - for(QValueListIterator it = m_viewModes.begin(); it != m_viewModes.end(); ++it) + for(TQValueListIterator it = m_viewModes.begin(); it != m_viewModes.end(); ++it) (*it)->removeItem(tag, column); } -void PlaylistBox::decode(QMimeSource *s, Item *item) +void PlaylistBox::decode(TQMimeSource *s, Item *item) { if(!s || (item && item->playlist() && item->playlist()->readOnly())) return; @@ -408,7 +408,7 @@ void PlaylistBox::decode(QMimeSource *s, Item *item) KURL::List urls; if(KURLDrag::decode(s, urls) && !urls.isEmpty()) { - QStringList files; + TQStringList files; for(KURL::List::Iterator it = urls.begin(); it != urls.end(); ++it) files.append((*it).path()); @@ -426,7 +426,7 @@ void PlaylistBox::decode(QMimeSource *s, Item *item) if(item && item->playlist()) item->playlist()->addFiles(files); else { - QString name = playlistNameDialog(); + TQString name = playlistNameDialog(); if(!name.isNull()) { Playlist *p = new Playlist(this, name); p->addFiles(files); @@ -435,7 +435,7 @@ void PlaylistBox::decode(QMimeSource *s, Item *item) } } -void PlaylistBox::contentsDropEvent(QDropEvent *e) +void PlaylistBox::contentsDropEvent(TQDropEvent *e) { m_showTimer->stop(); @@ -449,7 +449,7 @@ void PlaylistBox::contentsDropEvent(QDropEvent *e) } } -void PlaylistBox::contentsDragMoveEvent(QDragMoveEvent *e) +void PlaylistBox::contentsDragMoveEvent(TQDragMoveEvent *e) { // If we can decode the input source, there is a non-null item at the "move" // position, the playlist for that Item is non-null, is not the @@ -512,7 +512,7 @@ void PlaylistBox::contentsDragMoveEvent(QDragMoveEvent *e) } } -void PlaylistBox::contentsDragLeaveEvent(QDragLeaveEvent *e) +void PlaylistBox::contentsDragLeaveEvent(TQDragLeaveEvent *e) { if(m_dropItem) { Item *old = m_dropItem; @@ -522,14 +522,14 @@ void PlaylistBox::contentsDragLeaveEvent(QDragLeaveEvent *e) KListView::contentsDragLeaveEvent(e); } -void PlaylistBox::contentsMousePressEvent(QMouseEvent *e) +void PlaylistBox::contentsMousePressEvent(TQMouseEvent *e) { if(e->button() == LeftButton) m_doingMultiSelect = true; KListView::contentsMousePressEvent(e); } -void PlaylistBox::contentsMouseReleaseEvent(QMouseEvent *e) +void PlaylistBox::contentsMouseReleaseEvent(TQMouseEvent *e) { if(e->button() == LeftButton) { m_doingMultiSelect = false; @@ -538,14 +538,14 @@ void PlaylistBox::contentsMouseReleaseEvent(QMouseEvent *e) KListView::contentsMouseReleaseEvent(e); } -void PlaylistBox::keyPressEvent(QKeyEvent *e) +void PlaylistBox::keyPressEvent(TQKeyEvent *e) { if((e->key() == Key_Up || e->key() == Key_Down) && e->state() == ShiftButton) m_doingMultiSelect = true; KListView::keyPressEvent(e); } -void PlaylistBox::keyReleaseEvent(QKeyEvent *e) +void PlaylistBox::keyReleaseEvent(TQKeyEvent *e) { if(m_doingMultiSelect && e->key() == Key_Shift) { m_doingMultiSelect = false; @@ -558,14 +558,14 @@ PlaylistBox::ItemList PlaylistBox::selectedItems() const { ItemList l; - for(QListViewItemIterator it(const_cast(this), - QListViewItemIterator::Selected); it.current(); ++it) + for(TQListViewItemIterator it(const_cast(this), + TQListViewItemIterator::Selected); it.current(); ++it) l.append(static_cast(*it)); return l; } -void PlaylistBox::setSingleItem(QListViewItem *item) +void PlaylistBox::setSingleItem(TQListViewItem *item) { setSelectionModeExt(Single); KListView::setCurrentItem(item); @@ -644,7 +644,7 @@ void PlaylistBox::slotDoubleClicked() action("play")->activate(); } -void PlaylistBox::slotShowContextMenu(QListViewItem *, const QPoint &point, int) +void PlaylistBox::slotShowContextMenu(TQListViewItem *, const TQPoint &point, int) { m_contextMenu->popup(point); } @@ -685,15 +685,15 @@ void PlaylistBox::setupUpcomingPlaylist() PlaylistBox::Item *PlaylistBox::Item::m_collectionItem = 0; -PlaylistBox::Item::Item(PlaylistBox *listBox, const QString &icon, const QString &text, Playlist *l) - : QObject(listBox), KListViewItem(listBox, 0, text), +PlaylistBox::Item::Item(PlaylistBox *listBox, const TQString &icon, const TQString &text, Playlist *l) + : TQObject(listBox), KListViewItem(listBox, 0, text), m_playlist(l), m_text(text), m_iconName(icon), m_sortedFirst(false) { init(); } -PlaylistBox::Item::Item(Item *parent, const QString &icon, const QString &text, Playlist *l) - : QObject(parent->listView()), KListViewItem(parent, text), +PlaylistBox::Item::Item(Item *parent, const TQString &icon, const TQString &text, Playlist *l) + : TQObject(parent->listView()), KListViewItem(parent, text), m_playlist(l), m_text(text), m_iconName(icon), m_sortedFirst(false) { init(); @@ -704,7 +704,7 @@ PlaylistBox::Item::~Item() } -int PlaylistBox::Item::compare(QListViewItem *i, int col, bool) const +int PlaylistBox::Item::compare(TQListViewItem *i, int col, bool) const { Item *otherItem = static_cast(i); PlaylistBox *playlistBox = static_cast(listView()); @@ -722,13 +722,13 @@ int PlaylistBox::Item::compare(QListViewItem *i, int col, bool) const return text(col).lower().localeAwareCompare(i->text(col).lower()); } -void PlaylistBox::Item::paintCell(QPainter *painter, const QColorGroup &colorGroup, int column, int width, int align) +void PlaylistBox::Item::paintCell(TQPainter *painter, const TQColorGroup &colorGroup, int column, int width, int align) { PlaylistBox *playlistBox = static_cast(listView()); playlistBox->viewMode()->paintCell(this, painter, colorGroup, column, width, align); } -void PlaylistBox::Item::setText(int column, const QString &text) +void PlaylistBox::Item::setText(int column, const TQString &text) { m_text = text; KListViewItem::setText(column, text); @@ -743,7 +743,7 @@ void PlaylistBox::Item::setup() // PlaylistBox::Item protected slots //////////////////////////////////////////////////////////////////////////////// -void PlaylistBox::Item::slotSetName(const QString &name) +void PlaylistBox::Item::slotSetName(const TQString &name) { if(listView()) { setText(0, name); @@ -770,11 +770,11 @@ void PlaylistBox::Item::init() list->addNameToDict(m_text); if(m_playlist) { - connect(m_playlist, SIGNAL(signalNameChanged(const QString &)), - this, SLOT(slotSetName(const QString &))); - connect(m_playlist, SIGNAL(destroyed()), this, SLOT(deleteLater())); - connect(m_playlist, SIGNAL(signalEnableDirWatch(bool)), - list->object(), SLOT(slotEnableDirWatch(bool))); + connect(m_playlist, TQT_SIGNAL(signalNameChanged(const TQString &)), + this, TQT_SLOT(slotSetName(const TQString &))); + connect(m_playlist, TQT_SIGNAL(destroyed()), this, TQT_SLOT(deleteLater())); + connect(m_playlist, TQT_SIGNAL(signalEnableDirWatch(bool)), + list->object(), TQT_SLOT(slotEnableDirWatch(bool))); } if(m_playlist == CollectionList::instance()) { diff --git a/juk/playlistbox.h b/juk/playlistbox.h index 412ebb86..482f4771 100644 --- a/juk/playlistbox.h +++ b/juk/playlistbox.h @@ -20,7 +20,7 @@ #include -#include +#include class Playlist; class PlaylistItem; @@ -31,7 +31,7 @@ class SearchPlaylist; class KPopupMenu; class KSelectAction; -typedef QValueList PlaylistList; +typedef TQValueList PlaylistList; /** * This is the play list selection box that is by default on the right side of @@ -44,11 +44,11 @@ class PlaylistBox : public KListView, public PlaylistCollection public: class Item; - typedef QValueList ItemList; + typedef TQValueList ItemList; friend class Item; - PlaylistBox(QWidget *parent, QWidgetStack *playlistStack, + PlaylistBox(TQWidget *parent, TQWidgetStack *playlistStack, const char *name = 0); virtual ~PlaylistBox(); @@ -65,7 +65,7 @@ public: Item *dropItem() const { return m_dropItem; } - void setupPlaylist(Playlist *playlist, const QString &iconName, Item *parentItem = 0); + void setupPlaylist(Playlist *playlist, const TQString &iconName, Item *parentItem = 0); public slots: void paste(); @@ -75,7 +75,7 @@ public slots: void slotUnfreezePlaylists(); protected: - virtual void setupPlaylist(Playlist *playlist, const QString &iconName); + virtual void setupPlaylist(Playlist *playlist, const TQString &iconName); virtual void removePlaylist(Playlist *playlist); signals: @@ -85,17 +85,17 @@ private: void readConfig(); void saveConfig(); - virtual void decode(QMimeSource *s, Item *item); - virtual void contentsDropEvent(QDropEvent *e); - virtual void contentsDragMoveEvent(QDragMoveEvent *e); - virtual void contentsDragLeaveEvent(QDragLeaveEvent *e); - virtual void contentsMousePressEvent(QMouseEvent *e); - virtual void contentsMouseReleaseEvent(QMouseEvent *e); - virtual void keyPressEvent(QKeyEvent *e); - virtual void keyReleaseEvent(QKeyEvent *e); + virtual void decode(TQMimeSource *s, Item *item); + virtual void contentsDropEvent(TQDropEvent *e); + virtual void contentsDragMoveEvent(TQDragMoveEvent *e); + virtual void contentsDragLeaveEvent(TQDragLeaveEvent *e); + virtual void contentsMousePressEvent(TQMouseEvent *e); + virtual void contentsMouseReleaseEvent(TQMouseEvent *e); + virtual void keyPressEvent(TQKeyEvent *e); + virtual void keyReleaseEvent(TQKeyEvent *e); - QValueList selectedItems() const; - void setSingleItem(QListViewItem *item); + TQValueList selectedItems() const; + void setSingleItem(TQListViewItem *item); void setupItem(Item *item); void setupUpcomingPlaylist(); @@ -104,36 +104,36 @@ private: private slots: /** - * Catches QListBox::currentChanged(QListBoxItem *), does a cast and then re-emits + * Catches TQListBox::currentChanged(TQListBoxItem *), does a cast and then re-emits * the signal as currentChanged(Item *). */ void slotPlaylistChanged(); void slotDoubleClicked(); - void slotShowContextMenu(QListViewItem *, const QPoint &point, int); + void slotShowContextMenu(TQListViewItem *, const TQPoint &point, int); void slotSetViewMode(int index); void slotSavePlaylists(); void slotShowDropTarget(); void slotPlaylistItemsDropped(Playlist *p); - void slotAddItem(const QString &tag, unsigned column); - void slotRemoveItem(const QString &tag, unsigned column); + void slotAddItem(const TQString &tag, unsigned column); + void slotRemoveItem(const TQString &tag, unsigned column); private: KPopupMenu *m_contextMenu; - QPtrDict m_playlistDict; + TQPtrDict m_playlistDict; int m_viewModeIndex; - QValueList m_viewModes; + TQValueList m_viewModes; KAction *m_k3bAction; bool m_hasSelection; bool m_doingMultiSelect; Item *m_dropItem; - QTimer *m_showTimer; + TQTimer *m_showTimer; }; -class PlaylistBox::Item : public QObject, public KListViewItem +class PlaylistBox::Item : public TQObject, public KListViewItem { friend class PlaylistBox; friend class ViewMode; @@ -142,7 +142,7 @@ class PlaylistBox::Item : public QObject, public KListViewItem Q_OBJECT - // moc won't let me create private QObject subclasses and Qt won't let me + // moc won't let me create private TQObject subclasses and Qt won't let me // make the destructor protected, so here's the closest hack that will // compile. @@ -150,21 +150,21 @@ public: virtual ~Item(); protected: - Item(PlaylistBox *listBox, const QString &icon, const QString &text, Playlist *l = 0); - Item(Item *parent, const QString &icon, const QString &text, Playlist *l = 0); + Item(PlaylistBox *listBox, const TQString &icon, const TQString &text, Playlist *l = 0); + Item(Item *parent, const TQString &icon, const TQString &text, Playlist *l = 0); Playlist *playlist() const { return m_playlist; } PlaylistBox *listView() const { return static_cast(KListViewItem::listView()); } - QString iconName() const { return m_iconName; } - QString text() const { return m_text; } + TQString iconName() const { return m_iconName; } + TQString text() const { return m_text; } void setSortedFirst(bool first = true) { m_sortedFirst = first; } - virtual int compare(QListViewItem *i, int col, bool) const; - virtual void paintCell(QPainter *p, const QColorGroup &colorGroup, int column, int width, int align); - virtual void paintFocus(QPainter *, const QColorGroup &, const QRect &) {} - virtual void setText(int column, const QString &text); + virtual int compare(TQListViewItem *i, int col, bool) const; + virtual void paintCell(TQPainter *p, const TQColorGroup &colorGroup, int column, int width, int align); + virtual void paintFocus(TQPainter *, const TQColorGroup &, const TQRect &) {} + virtual void setText(int column, const TQString &text); - virtual QString text(int column) const { return KListViewItem::text(column); } + virtual TQString text(int column) const { return KListViewItem::text(column); } virtual void setup(); @@ -173,15 +173,15 @@ protected: protected slots: - void slotSetName(const QString &name); + void slotSetName(const TQString &name); private: // setup() was already taken. void init(); Playlist *m_playlist; - QString m_text; - QString m_iconName; + TQString m_text; + TQString m_iconName; bool m_sortedFirst; static Item *m_collectionItem; }; diff --git a/juk/playlistcollection.cpp b/juk/playlistcollection.cpp index 548734c8..2c30c692 100644 --- a/juk/playlistcollection.cpp +++ b/juk/playlistcollection.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include #include @@ -41,8 +41,8 @@ #include #include -#include -#include +#include +#include #define widget (kapp->mainWidget()) @@ -58,7 +58,7 @@ PlaylistCollection *PlaylistCollection::m_instance = 0; // public methods //////////////////////////////////////////////////////////////////////////////// -PlaylistCollection::PlaylistCollection(QWidgetStack *playlistStack) : +PlaylistCollection::PlaylistCollection(TQWidgetStack *playlistStack) : m_playlistStack(playlistStack), m_historyPlaylist(0), m_upcomingPlaylist(0), @@ -91,7 +91,7 @@ PlaylistCollection::~PlaylistCollection() Playlist::setShuttingDown(); } -QString PlaylistCollection::name() const +TQString PlaylistCollection::name() const { return currentPlaylist()->name(); } @@ -151,12 +151,12 @@ bool PlaylistCollection::playing() const return m_playing; } -QStringList PlaylistCollection::playlists() const +TQStringList PlaylistCollection::playlists() const { - QStringList l; + TQStringList l; - QObjectList *childList = m_playlistStack->queryList("Playlist"); - QObject *obj; + TQObjectList *childList = m_playlistStack->queryList("Playlist"); + TQObject *obj; for(obj = childList->first(); obj; obj = childList->next()) { Playlist *p = static_cast(obj); l.append(p->name()); @@ -166,7 +166,7 @@ QStringList PlaylistCollection::playlists() const return l; } -void PlaylistCollection::createPlaylist(const QString &name) +void PlaylistCollection::createPlaylist(const TQString &name) { raise(new Playlist(this, name)); } @@ -182,7 +182,7 @@ void PlaylistCollection::createDynamicPlaylist(const PlaylistList &playlists) PlaylistCollection::raise(m_dynamicPlaylist); } -void PlaylistCollection::showMore(const QString &artist, const QString &album) +void PlaylistCollection::showMore(const TQString &artist, const TQString &album) { PlaylistList playlists; @@ -223,20 +223,20 @@ void PlaylistCollection::showMore(const QString &artist, const QString &album) // so cache the value we want it to have now. Playlist *belowShowMore = visiblePlaylist(); - PlaylistCollection::setupPlaylist(m_showMorePlaylist, QString::null); + PlaylistCollection::setupPlaylist(m_showMorePlaylist, TQString::null); PlaylistCollection::raise(m_showMorePlaylist); m_belowShowMorePlaylist = belowShowMore; } -void PlaylistCollection::removeTrack(const QString &playlist, const QStringList &files) +void PlaylistCollection::removeTrack(const TQString &playlist, const TQStringList &files) { Playlist *p = playlistByName(playlist); PlaylistItemList itemList; if(!p) return; - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for(it = files.begin(); it != files.end(); ++it) { CollectionListItem *item = CollectionList::instance()->lookup(*it); @@ -250,50 +250,50 @@ void PlaylistCollection::removeTrack(const QString &playlist, const QStringList p->clearItems(itemList); } -QString PlaylistCollection::playlist() const +TQString PlaylistCollection::playlist() const { - return visiblePlaylist() ? visiblePlaylist()->name() : QString::null; + return visiblePlaylist() ? visiblePlaylist()->name() : TQString::null; } -QString PlaylistCollection::playingPlaylist() const +TQString PlaylistCollection::playingPlaylist() const { - return currentPlaylist() && m_playing ? currentPlaylist()->name() : QString::null; + return currentPlaylist() && m_playing ? currentPlaylist()->name() : TQString::null; } -void PlaylistCollection::setPlaylist(const QString &playlist) +void PlaylistCollection::setPlaylist(const TQString &playlist) { Playlist *p = playlistByName(playlist); if(p) raise(p); } -QStringList PlaylistCollection::playlistTracks(const QString &playlist) const +TQStringList PlaylistCollection::playlistTracks(const TQString &playlist) const { Playlist *p = playlistByName(playlist); if(p) return p->files(); - return QStringList(); + return TQStringList(); } -QString PlaylistCollection::trackProperty(const QString &file, const QString &property) const +TQString PlaylistCollection::trackProperty(const TQString &file, const TQString &property) const { CollectionList *l = CollectionList::instance(); CollectionListItem *item = l->lookup(file); - return item ? item->file().property(property) : QString::null; + return item ? item->file().property(property) : TQString::null; } -QPixmap PlaylistCollection::trackCover(const QString &file, const QString &size) const +TQPixmap PlaylistCollection::trackCover(const TQString &file, const TQString &size) const { if(size.lower() != "small" && size.lower() != "large") - return QPixmap(); + return TQPixmap(); CollectionList *l = CollectionList::instance(); CollectionListItem *item = l->lookup(file); if(!item) - return QPixmap(); + return TQPixmap(); if(size.lower() == "small") return item->file().coverInfo()->pixmap(CoverInfo::Thumbnail); @@ -301,9 +301,9 @@ QPixmap PlaylistCollection::trackCover(const QString &file, const QString &size) return item->file().coverInfo()->pixmap(CoverInfo::FullSize); } -void PlaylistCollection::open(const QStringList &l) +void PlaylistCollection::open(const TQStringList &l) { - QStringList files = l; + TQStringList files = l; if(files.isEmpty()) files = MediaFiles::openDialog(widget); @@ -313,14 +313,14 @@ void PlaylistCollection::open(const QStringList &l) bool justPlaylists = true; - for(QStringList::ConstIterator it = l.begin(); it != l.end() && justPlaylists; ++it) + for(TQStringList::ConstIterator it = l.begin(); it != l.end() && justPlaylists; ++it) justPlaylists = !MediaFiles::isPlaylistFile(*it); if(visiblePlaylist() == CollectionList::instance() || justPlaylists || KMessageBox::questionYesNo( widget, i18n("Do you want to add these items to the current list or to the collection list?"), - QString::null, + TQString::null, KGuiItem(i18n("Current")), KGuiItem(i18n("Collection"))) == KMessageBox::No) { @@ -332,7 +332,7 @@ void PlaylistCollection::open(const QStringList &l) dataChanged(); } -void PlaylistCollection::open(const QString &playlist, const QStringList &files) +void PlaylistCollection::open(const TQString &playlist, const TQStringList &files) { Playlist *p = playlistByName(playlist); @@ -346,21 +346,21 @@ void PlaylistCollection::addFolder() DirectoryList l(m_folderList, m_importPlaylists, widget, "directoryList"); DirectoryList::Result result = l.exec(); - if(result.status == QDialog::Accepted) { + if(result.status == TQDialog::Accepted) { m_dirLister.blockSignals(true); const bool reload = m_importPlaylists != result.addPlaylists; m_importPlaylists = result.addPlaylists; - for(QStringList::Iterator it = result.addedDirs.begin(); + for(TQStringList::Iterator it = result.addedDirs.begin(); it != result.addedDirs.end(); it++) { m_dirLister.openURL(*it, true); m_folderList.append(*it); } - for(QStringList::Iterator it = result.removedDirs.begin(); + for(TQStringList::Iterator it = result.removedDirs.begin(); it != result.removedDirs.end(); it++) { m_dirLister.stop(*it); @@ -380,8 +380,8 @@ void PlaylistCollection::addFolder() void PlaylistCollection::rename() { - QString old = visiblePlaylist()->name(); - QString name = playlistNameDialog(i18n("Rename"), old, false); + TQString old = visiblePlaylist()->name(); + TQString name = playlistNameDialog(i18n("Rename"), old, false); m_playlistNames.remove(old); @@ -393,7 +393,7 @@ void PlaylistCollection::rename() void PlaylistCollection::duplicate() { - QString name = playlistNameDialog(i18n("Duplicate"), visiblePlaylist()->name()); + TQString name = playlistNameDialog(i18n("Duplicate"), visiblePlaylist()->name()); if(name.isNull()) return; raise(new Playlist(this, visiblePlaylist()->items(), name)); @@ -486,14 +486,14 @@ void PlaylistCollection::scanFolders() void PlaylistCollection::createPlaylist() { - QString name = playlistNameDialog(); + TQString name = playlistNameDialog(); if(!name.isNull()) raise(new Playlist(this, name)); } void PlaylistCollection::createSearchPlaylist() { - QString name = uniquePlaylistName(i18n("Search Playlist")); + TQString name = uniquePlaylistName(i18n("Search Playlist")); AdvancedSearchDialog::Result r = AdvancedSearchDialog(name, PlaylistSearch(), widget).exec(); @@ -504,12 +504,12 @@ void PlaylistCollection::createSearchPlaylist() void PlaylistCollection::createFolderPlaylist() { - QString folder = KFileDialog::getExistingDirectory(); + TQString folder = KFileDialog::getExistingDirectory(); if(folder.isEmpty()) return; - QString name = uniquePlaylistName(folder.mid(folder.findRev('/') + 1)); + TQString name = uniquePlaylistName(folder.mid(folder.findRev('/') + 1)); name = playlistNameDialog(i18n("Create Folder Playlist"), name); if(!name.isNull()) @@ -588,7 +588,7 @@ void PlaylistCollection::setUpcomingPlaylistEnabled(bool enable) } } -QObject *PlaylistCollection::object() const +TQObject *PlaylistCollection::object() const { return m_actionHandler; } @@ -635,7 +635,7 @@ void PlaylistCollection::raiseDistraction() m_belowDistraction = currentPlaylist(); if(!m_distraction) { - m_distraction = new QHBox(m_playlistStack); + m_distraction = new TQHBox(m_playlistStack); m_playlistStack->addWidget(m_distraction); } @@ -657,12 +657,12 @@ void PlaylistCollection::lowerDistraction() // protected methods //////////////////////////////////////////////////////////////////////////////// -QWidgetStack *PlaylistCollection::playlistStack() const +TQWidgetStack *PlaylistCollection::playlistStack() const { return m_playlistStack; } -void PlaylistCollection::setupPlaylist(Playlist *playlist, const QString &) +void PlaylistCollection::setupPlaylist(Playlist *playlist, const TQString &) { if(!playlist->fileName().isNull()) m_playlistFiles.insert(playlist->fileName()); @@ -670,8 +670,8 @@ void PlaylistCollection::setupPlaylist(Playlist *playlist, const QString &) if(!playlist->name().isNull()) m_playlistNames.insert(playlist->name()); - QObject::connect(playlist, SIGNAL(selectionChanged()), - object(), SIGNAL(signalSelectedItemsChanged())); + TQObject::connect(playlist, TQT_SIGNAL(selectionChanged()), + object(), TQT_SIGNAL(signalSelectedItemsChanged())); } bool PlaylistCollection::importPlaylists() const @@ -679,7 +679,7 @@ bool PlaylistCollection::importPlaylists() const return m_importPlaylists; } -bool PlaylistCollection::containsPlaylistFile(const QString &file) const +bool PlaylistCollection::containsPlaylistFile(const TQString &file) const { return m_playlistFiles.contains(file); } @@ -706,36 +706,36 @@ void PlaylistCollection::clearShowMore(bool raisePlaylist) void PlaylistCollection::enableDirWatch(bool enable) { - QObject *collection = CollectionList::instance(); + TQObject *collection = CollectionList::instance(); m_dirLister.disconnect(object()); if(enable) { - QObject::connect(&m_dirLister, SIGNAL(newItems(const KFileItemList &)), - object(), SLOT(slotNewItems(const KFileItemList &))); - QObject::connect(&m_dirLister, SIGNAL(refreshItems(const KFileItemList &)), - collection, SLOT(slotRefreshItems(const KFileItemList &))); - QObject::connect(&m_dirLister, SIGNAL(deleteItem(KFileItem *)), - collection, SLOT(slotDeleteItem(KFileItem *))); + TQObject::connect(&m_dirLister, TQT_SIGNAL(newItems(const KFileItemList &)), + object(), TQT_SLOT(slotNewItems(const KFileItemList &))); + TQObject::connect(&m_dirLister, TQT_SIGNAL(refreshItems(const KFileItemList &)), + collection, TQT_SLOT(slotRefreshItems(const KFileItemList &))); + TQObject::connect(&m_dirLister, TQT_SIGNAL(deleteItem(KFileItem *)), + collection, TQT_SLOT(slotDeleteItem(KFileItem *))); } } -QString PlaylistCollection::playlistNameDialog(const QString &caption, - const QString &suggest, +TQString PlaylistCollection::playlistNameDialog(const TQString &caption, + const TQString &suggest, bool forceUnique) const { bool ok; - QString name = KInputDialog::getText( + TQString name = KInputDialog::getText( caption, i18n("Please enter a name for this playlist:"), forceUnique ? uniquePlaylistName(suggest) : suggest, &ok); - return ok ? uniquePlaylistName(name) : QString::null; + return ok ? uniquePlaylistName(name) : TQString::null; } -QString PlaylistCollection::uniquePlaylistName(const QString &suggest) const +TQString PlaylistCollection::uniquePlaylistName(const TQString &suggest) const { if(suggest.isEmpty()) return uniquePlaylistName(); @@ -743,50 +743,50 @@ QString PlaylistCollection::uniquePlaylistName(const QString &suggest) const if(!m_playlistNames.contains(suggest)) return suggest; - QString base = suggest; - base.remove(QRegExp("\\s\\([0-9]+\\)$")); + TQString base = suggest; + base.remove(TQRegExp("\\s\\([0-9]+\\)$")); int count = 1; - QString s = QString("%1 (%2)").arg(base).arg(count); + TQString s = TQString("%1 (%2)").arg(base).arg(count); while(m_playlistNames.contains(s)) { count++; - s = QString("%1 (%2)").arg(base).arg(count); + s = TQString("%1 (%2)").arg(base).arg(count); } return s; } -void PlaylistCollection::addNameToDict(const QString &name) +void PlaylistCollection::addNameToDict(const TQString &name) { m_playlistNames.insert(name); } -void PlaylistCollection::addFileToDict(const QString &file) +void PlaylistCollection::addFileToDict(const TQString &file) { m_playlistFiles.insert(file); } -void PlaylistCollection::removeNameFromDict(const QString &name) +void PlaylistCollection::removeNameFromDict(const TQString &name) { m_playlistNames.remove(name); } -void PlaylistCollection::removeFileFromDict(const QString &file) +void PlaylistCollection::removeFileFromDict(const TQString &file) { m_playlistFiles.remove(file); } -void PlaylistCollection::dirChanged(const QString &path) +void PlaylistCollection::dirChanged(const TQString &path) { CollectionList::instance()->addFiles(path); } -Playlist *PlaylistCollection::playlistByName(const QString &name) const +Playlist *PlaylistCollection::playlistByName(const TQString &name) const { - QObjectList *l = m_playlistStack->queryList("Playlist"); + TQObjectList *l = m_playlistStack->queryList("Playlist"); Playlist *list = 0; - QObject *obj; + TQObject *obj; for(obj = l->first(); obj; obj = l->next()) { Playlist *p = static_cast(obj); @@ -816,7 +816,7 @@ void PlaylistCollection::readConfig() m_importPlaylists = config.readBoolEntry("ImportPlaylists", true); m_folderList = config.readPathListEntry("DirectoryList"); - for(QStringList::ConstIterator it = m_folderList.begin(); it != m_folderList.end(); ++it) + for(TQStringList::ConstIterator it = m_folderList.begin(); it != m_folderList.end(); ++it) m_dirLister.openURL(*it, true); } @@ -833,7 +833,7 @@ void PlaylistCollection::saveConfig() //////////////////////////////////////////////////////////////////////////////// PlaylistCollection::ActionHandler::ActionHandler(PlaylistCollection *collection) : - QObject(0, "ActionHandler"), + TQObject(0, "ActionHandler"), m_collection(collection) { KActionMenu *menu; @@ -842,60 +842,60 @@ PlaylistCollection::ActionHandler::ActionHandler(PlaylistCollection *collection) menu = new KActionMenu(i18n("&New"), "filenew", actions(), "file_new"); - menu->insert(createAction(i18n("&Empty Playlist..."), SLOT(slotCreatePlaylist()), + menu->insert(createAction(i18n("&Empty Playlist..."), TQT_SLOT(slotCreatePlaylist()), "newPlaylist", "window_new", "CTRL+n")); - menu->insert(createAction(i18n("&Search Playlist..."), SLOT(slotCreateSearchPlaylist()), + menu->insert(createAction(i18n("&Search Playlist..."), TQT_SLOT(slotCreateSearchPlaylist()), "newSearchPlaylist", "find", "CTRL+f")); - menu->insert(createAction(i18n("Playlist From &Folder..."), SLOT(slotCreateFolderPlaylist()), + menu->insert(createAction(i18n("Playlist From &Folder..."), TQT_SLOT(slotCreateFolderPlaylist()), "newDirectoryPlaylist", "fileopen", "CTRL+d")); // Guess tag info menu #if HAVE_MUSICBRAINZ - menu = new KActionMenu(i18n("&Guess Tag Information"), QString::null, actions(), "guessTag"); + menu = new KActionMenu(i18n("&Guess Tag Information"), TQString::null, actions(), "guessTag"); menu->setIconSet(SmallIconSet("wizard")); - menu->insert(createAction(i18n("From &File Name"), SLOT(slotGuessTagFromFile()), + menu->insert(createAction(i18n("From &File Name"), TQT_SLOT(slotGuessTagFromFile()), "guessTagFile", "fileimport", "CTRL+g")); - menu->insert(createAction(i18n("From &Internet"), SLOT(slotGuessTagFromInternet()), + menu->insert(createAction(i18n("From &Internet"), TQT_SLOT(slotGuessTagFromInternet()), "guessTagInternet", "connect_established", "CTRL+i")); #else - createAction(i18n("Guess Tag Information From &File Name"), SLOT(slotGuessTagFromFile()), + createAction(i18n("Guess Tag Information From &File Name"), TQT_SLOT(slotGuessTagFromFile()), "guessTag", "fileimport", "CTRL+f"); #endif - createAction(i18n("Play First Track"),SLOT(slotPlayFirst()), "playFirst"); - createAction(i18n("Play Next Album"), SLOT(slotPlayNextAlbum()), "forwardAlbum", "next"); + createAction(i18n("Play First Track"),TQT_SLOT(slotPlayFirst()), "playFirst"); + createAction(i18n("Play Next Album"), TQT_SLOT(slotPlayNextAlbum()), "forwardAlbum", "next"); - createAction(i18n("Open..."), SLOT(slotOpen()), "file_open", "fileopen", "CTRL+o"); - createAction(i18n("Add &Folder..."), SLOT(slotAddFolder()), "openDirectory", "fileopen"); - createAction(i18n("&Rename..."), SLOT(slotRename()), "renamePlaylist", "lineedit"); - createAction(i18n("D&uplicate..."), SLOT(slotDuplicate()), "duplicatePlaylist", "editcopy"); - createAction(i18n("Save"), SLOT(slotSave()), "file_save", "filesave", "CTRL+s"); - createAction(i18n("Save As..."), SLOT(slotSaveAs()), "file_save_as", "filesaveas"); - createAction(i18n("R&emove"), SLOT(slotRemove()), "deleteItemPlaylist", "edittrash"); - createAction(i18n("Reload"), SLOT(slotReload()), "reloadPlaylist", "reload"); - createAction(i18n("Edit Search..."), SLOT(slotEditSearch()), "editSearch", "editclear"); + createAction(i18n("Open..."), TQT_SLOT(slotOpen()), "file_open", "fileopen", "CTRL+o"); + createAction(i18n("Add &Folder..."), TQT_SLOT(slotAddFolder()), "openDirectory", "fileopen"); + createAction(i18n("&Rename..."), TQT_SLOT(slotRename()), "renamePlaylist", "lineedit"); + createAction(i18n("D&uplicate..."), TQT_SLOT(slotDuplicate()), "duplicatePlaylist", "editcopy"); + createAction(i18n("Save"), TQT_SLOT(slotSave()), "file_save", "filesave", "CTRL+s"); + createAction(i18n("Save As..."), TQT_SLOT(slotSaveAs()), "file_save_as", "filesaveas"); + createAction(i18n("R&emove"), TQT_SLOT(slotRemove()), "deleteItemPlaylist", "edittrash"); + createAction(i18n("Reload"), TQT_SLOT(slotReload()), "reloadPlaylist", "reload"); + createAction(i18n("Edit Search..."), TQT_SLOT(slotEditSearch()), "editSearch", "editclear"); - createAction(i18n("&Delete"), SLOT(slotRemoveItems()), "removeItem", "editdelete"); - createAction(i18n("Refresh"), SLOT(slotRefreshItems()), "refresh", "reload"); - createAction(i18n("&Rename File"), SLOT(slotRenameItems()), "renameFile", "filesaveas", "CTRL+r"); + createAction(i18n("&Delete"), TQT_SLOT(slotRemoveItems()), "removeItem", "editdelete"); + createAction(i18n("Refresh"), TQT_SLOT(slotRefreshItems()), "refresh", "reload"); + createAction(i18n("&Rename File"), TQT_SLOT(slotRenameItems()), "renameFile", "filesaveas", "CTRL+r"); - menu = new KActionMenu(i18n("Cover Manager"), QString::null, actions(), "coverManager"); + menu = new KActionMenu(i18n("Cover Manager"), TQString::null, actions(), "coverManager"); menu->setIconSet(SmallIconSet("image")); menu->insert(createAction(i18n("&View Cover"), - SLOT(slotViewCovers()), "viewCover", "viewmag")); + TQT_SLOT(slotViewCovers()), "viewCover", "viewmag")); menu->insert(createAction(i18n("Get Cover From &File..."), - SLOT(slotAddLocalCover()), "addCover", "fileimport", "CTRL+SHIFT+f")); + TQT_SLOT(slotAddLocalCover()), "addCover", "fileimport", "CTRL+SHIFT+f")); // Do not rename googleCover for backward compatibility menu->insert(createAction(i18n("Get Cover From &Internet..."), - SLOT(slotAddInternetCover()), "googleCover", "connect_established", "CTRL+SHIFT+g")); + TQT_SLOT(slotAddInternetCover()), "googleCover", "connect_established", "CTRL+SHIFT+g")); menu->insert(createAction(i18n("&Delete Cover"), - SLOT(slotRemoveCovers()), "removeCover", "editdelete")); + TQT_SLOT(slotRemoveCovers()), "removeCover", "editdelete")); menu->insert(createAction(i18n("Show Cover &Manager"), - SLOT(slotShowCoverManager()), "showCoverManager")); + TQT_SLOT(slotShowCoverManager()), "showCoverManager")); KToggleAction *historyAction = new KToggleAction(i18n("Show &History"), "history", 0, actions(), "showHistory"); @@ -905,16 +905,16 @@ PlaylistCollection::ActionHandler::ActionHandler(PlaylistCollection *collection) new KToggleAction(i18n("Show &Play Queue"), "today", 0, actions(), "showUpcoming"); upcomingAction->setCheckedState(i18n("Hide &Play Queue")); - connect(action("showHistory"), SIGNAL(toggled(bool)), - this, SLOT(slotSetHistoryPlaylistEnabled(bool))); - connect(action("showUpcoming"), SIGNAL(toggled(bool)), - this, SLOT(slotSetUpcomingPlaylistEnabled(bool))); + connect(action("showHistory"), TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotSetHistoryPlaylistEnabled(bool))); + connect(action("showUpcoming"), TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotSetUpcomingPlaylistEnabled(bool))); } -KAction *PlaylistCollection::ActionHandler::createAction(const QString &text, +KAction *PlaylistCollection::ActionHandler::createAction(const TQString &text, const char *slot, const char *name, - const QString &icon, + const TQString &icon, const KShortcut &shortcut) { if(icon.isNull()) diff --git a/juk/playlistcollection.h b/juk/playlistcollection.h index 1ee4dea2..ab35a7dc 100644 --- a/juk/playlistcollection.h +++ b/juk/playlistcollection.h @@ -23,7 +23,7 @@ #include #include -#include +#include class QWidgetStack; class KAction; @@ -34,8 +34,8 @@ class UpcomingPlaylist; class SearchPlaylist; class DynamicPlaylist; -typedef QValueList PlaylistList; -typedef QValueList PlaylistItemList; +typedef TQValueList PlaylistList; +typedef TQValueList PlaylistItemList; class PlaylistCollection : public PlaylistInterface, CollectionIface { @@ -46,12 +46,12 @@ class PlaylistCollection : public PlaylistInterface, CollectionIface static PlaylistCollection *m_instance; public: - PlaylistCollection(QWidgetStack *playlistStack); + PlaylistCollection(TQWidgetStack *playlistStack); virtual ~PlaylistCollection(); static PlaylistCollection *instance() { return m_instance; } - virtual QString name() const; + virtual TQString name() const; virtual FileHandle currentFile() const; virtual int count() const; virtual int time() const; @@ -63,22 +63,22 @@ public: void playFirst(); void playNextAlbum(); - virtual QStringList playlists() const; - virtual void createPlaylist(const QString &name); + virtual TQStringList playlists() const; + virtual void createPlaylist(const TQString &name); virtual void createDynamicPlaylist(const PlaylistList &playlists); - virtual void showMore(const QString &artist, const QString &album = QString::null); - virtual void removeTrack(const QString &playlist, const QStringList &files); + virtual void showMore(const TQString &artist, const TQString &album = TQString::null); + virtual void removeTrack(const TQString &playlist, const TQStringList &files); - virtual QString playlist() const; - virtual QString playingPlaylist() const; - virtual void setPlaylist(const QString &playlist); + virtual TQString playlist() const; + virtual TQString playingPlaylist() const; + virtual void setPlaylist(const TQString &playlist); - virtual QStringList playlistTracks(const QString &playlist) const; - virtual QString trackProperty(const QString &file, const QString &property) const; - virtual QPixmap trackCover(const QString &file, const QString &size = "Small") const; + virtual TQStringList playlistTracks(const TQString &playlist) const; + virtual TQString trackProperty(const TQString &file, const TQString &property) const; + virtual TQPixmap trackCover(const TQString &file, const TQString &size = "Small") const; - virtual void open(const QStringList &files = QStringList()); - virtual void open(const QString &playlist, const QStringList &files); + virtual void open(const TQStringList &files = TQStringList()); + virtual void open(const TQString &playlist, const TQStringList &files); virtual void addFolder(); virtual void rename(); virtual void duplicate(); @@ -120,12 +120,12 @@ public: UpcomingPlaylist *upcomingPlaylist() const; void setUpcomingPlaylistEnabled(bool enable); - void dirChanged(const QString &path); + void dirChanged(const TQString &path); /** * Returns a pointer to the action handler. */ - QObject *object() const; + TQObject *object() const; void newItems(const KFileItemList &list) const; @@ -158,30 +158,30 @@ public: class ActionHandler; protected: - virtual QWidgetStack *playlistStack() const; - virtual void setupPlaylist(Playlist *playlist, const QString &iconName); + virtual TQWidgetStack *playlistStack() const; + virtual void setupPlaylist(Playlist *playlist, const TQString &iconName); virtual void removePlaylist(Playlist *playlist) = 0; bool importPlaylists() const; - bool containsPlaylistFile(const QString &file) const; + bool containsPlaylistFile(const TQString &file) const; - QString playlistNameDialog(const QString &caption = i18n("Create New Playlist"), - const QString &suggest = QString::null, + TQString playlistNameDialog(const TQString &caption = i18n("Create New Playlist"), + const TQString &suggest = TQString::null, bool forceUnique = true) const; - QString uniquePlaylistName(const QString &suggest = i18n("Playlist")) const; + TQString uniquePlaylistName(const TQString &suggest = i18n("Playlist")) const; - void addNameToDict(const QString &name); - void addFileToDict(const QString &file); - void removeNameFromDict(const QString &name); - void removeFileFromDict(const QString &file); + void addNameToDict(const TQString &name); + void addFileToDict(const TQString &file); + void removeNameFromDict(const TQString &name); + void removeFileFromDict(const TQString &file); - Playlist *playlistByName(const QString &name) const; + Playlist *playlistByName(const TQString &name) const; private: void readConfig(); void saveConfig(); - QWidgetStack *m_playlistStack; + TQWidgetStack *m_playlistStack; HistoryPlaylist *m_historyPlaylist; UpcomingPlaylist *m_upcomingPlaylist; ActionHandler *m_actionHandler; @@ -189,22 +189,22 @@ private: KDirLister m_dirLister; StringHash m_playlistNames; StringHash m_playlistFiles; - QStringList m_folderList; + TQStringList m_folderList; bool m_importPlaylists; bool m_searchEnabled; bool m_playing; - QGuardedPtr m_showMorePlaylist; - QGuardedPtr m_belowShowMorePlaylist; - QGuardedPtr m_dynamicPlaylist; - QGuardedPtr m_belowDistraction; + TQGuardedPtr m_showMorePlaylist; + TQGuardedPtr m_belowShowMorePlaylist; + TQGuardedPtr m_dynamicPlaylist; + TQGuardedPtr m_belowDistraction; - QWidget *m_distraction; + TQWidget *m_distraction; }; /** * This class is just used as a proxy to handle the signals coming from action - * activations without requiring PlaylistCollection to be a QObject. + * activations without requiring PlaylistCollection to be a TQObject. */ class PlaylistCollection::ActionHandler : public QObject @@ -214,10 +214,10 @@ public: ActionHandler(PlaylistCollection *collection); private: - KAction *createAction(const QString &text, + KAction *createAction(const TQString &text, const char *slot, const char *name, - const QString &icon = QString::null, + const TQString &icon = TQString::null, const KShortcut &shortcut = KShortcut()); private slots: void slotPlayFirst() { m_collection->playFirst(); } @@ -255,7 +255,7 @@ private slots: void slotSetUpcomingPlaylistEnabled(bool enable) { m_collection->setUpcomingPlaylistEnabled(enable); } void slotShowCoverManager() { m_collection->showCoverManager(); } void slotEnableDirWatch(bool enable) { m_collection->enableDirWatch(enable); } - void slotDirChanged(const QString &path) { m_collection->dirChanged(path); } + void slotDirChanged(const TQString &path) { m_collection->dirChanged(path); } void slotNewItems(const KFileItemList &list) { m_collection->newItems(list); } diff --git a/juk/playlistexporter.h b/juk/playlistexporter.h index 291648f5..de9f7fff 100644 --- a/juk/playlistexporter.h +++ b/juk/playlistexporter.h @@ -31,7 +31,7 @@ class KActionCollection; class PlaylistExporter : public QObject { public: - PlaylistExporter(QWidget *parent = 0) : QObject(parent) { } + PlaylistExporter(TQWidget *parent = 0) : TQObject(parent) { } virtual ~PlaylistExporter() { } /** diff --git a/juk/playlistinterface.cpp b/juk/playlistinterface.cpp index 9ec550a2..8c4da64a 100644 --- a/juk/playlistinterface.cpp +++ b/juk/playlistinterface.cpp @@ -20,7 +20,7 @@ void Watched::currentChanged() { - for(QValueList::ConstIterator it = m_observers.begin(); + for(TQValueList::ConstIterator it = m_observers.begin(); it != m_observers.end(); ++it) { @@ -30,7 +30,7 @@ void Watched::currentChanged() void Watched::dataChanged() { - for(QValueList::ConstIterator it = m_observers.begin(); + for(TQValueList::ConstIterator it = m_observers.begin(); it != m_observers.end(); ++it) { @@ -50,7 +50,7 @@ void Watched::removeObserver(PlaylistObserver *observer) Watched::~Watched() { - for(QValueList::Iterator it = m_observers.begin(); + for(TQValueList::Iterator it = m_observers.begin(); it != m_observers.end(); ++it) { diff --git a/juk/playlistinterface.h b/juk/playlistinterface.h index af7427ce..deaa900f 100644 --- a/juk/playlistinterface.h +++ b/juk/playlistinterface.h @@ -47,7 +47,7 @@ protected: virtual ~Watched(); private: - QValueList m_observers; + TQValueList m_observers; }; /** @@ -58,7 +58,7 @@ private: class PlaylistInterface : public Watched { public: - virtual QString name() const = 0; + virtual TQString name() const = 0; virtual FileHandle currentFile() const = 0; virtual int time() const = 0; virtual int count() const = 0; diff --git a/juk/playlistitem.cpp b/juk/playlistitem.cpp index a86737c0..bdb41395 100644 --- a/juk/playlistitem.cpp +++ b/juk/playlistitem.cpp @@ -70,9 +70,9 @@ void PlaylistItem::setFile(const FileHandle &file) refresh(); } -void PlaylistItem::setFile(const QString &file) +void PlaylistItem::setFile(const TQString &file) { - QString oldPath = d->fileHandle.absFilePath(); + TQString oldPath = d->fileHandle.absFilePath(); d->fileHandle.setFile(file); m_collectionItem->updateCollectionDict(oldPath, d->fileHandle.absFilePath()); refresh(); @@ -83,10 +83,10 @@ FileHandle PlaylistItem::file() const return d->fileHandle; } -const QPixmap *PlaylistItem::pixmap(int column) const +const TQPixmap *PlaylistItem::pixmap(int column) const { - static QPixmap image(SmallIcon("image")); - static QPixmap playing(UserIcon("playing")); + static TQPixmap image(SmallIcon("image")); + static TQPixmap playing(UserIcon("playing")); int offset = playlist()->columnOffset(); @@ -100,10 +100,10 @@ const QPixmap *PlaylistItem::pixmap(int column) const return KListViewItem::pixmap(column); } -QString PlaylistItem::text(int column) const +TQString PlaylistItem::text(int column) const { if(!d->fileHandle.tag()) - return QString::null; + return TQString::null; int offset = playlist()->columnOffset(); @@ -115,21 +115,21 @@ QString PlaylistItem::text(int column) const case AlbumColumn: return d->fileHandle.tag()->album(); case CoverColumn: - return QString::null; + return TQString::null; case TrackNumberColumn: return d->fileHandle.tag()->track() > 0 - ? QString::number(d->fileHandle.tag()->track()) - : QString::null; + ? TQString::number(d->fileHandle.tag()->track()) + : TQString::null; case GenreColumn: return d->fileHandle.tag()->genre(); case YearColumn: return d->fileHandle.tag()->year() > 0 - ? QString::number(d->fileHandle.tag()->year()) - : QString::null; + ? TQString::number(d->fileHandle.tag()->year()) + : TQString::null; case LengthColumn: return d->fileHandle.tag()->lengthString(); case BitrateColumn: - return QString::number(d->fileHandle.tag()->bitrate()); + return TQString::number(d->fileHandle.tag()->bitrate()); case CommentColumn: return d->fileHandle.tag()->comment(); case FileNameColumn: @@ -141,11 +141,11 @@ QString PlaylistItem::text(int column) const } } -void PlaylistItem::setText(int column, const QString &text) +void PlaylistItem::setText(int column, const TQString &text) { int offset = playlist()->columnOffset(); if(column - offset >= 0 && column + offset <= lastColumn()) { - KListViewItem::setText(column, QString::null); + KListViewItem::setText(column, TQString::null); return; } @@ -214,7 +214,7 @@ Playlist *PlaylistItem::playlist() const return static_cast(listView()); } -QValueVector PlaylistItem::cachedWidths() const +TQValueVector PlaylistItem::cachedWidths() const { return d->cachedWidths; } @@ -247,7 +247,7 @@ PlaylistItem::PlaylistItem(CollectionListItem *item, Playlist *parent) : setup(item); } -PlaylistItem::PlaylistItem(CollectionListItem *item, Playlist *parent, QListViewItem *after) : +PlaylistItem::PlaylistItem(CollectionListItem *item, Playlist *parent, TQListViewItem *after) : KListViewItem(parent, after), d(0), m_watched(0) @@ -267,27 +267,27 @@ PlaylistItem::PlaylistItem(CollectionList *parent) : setDragEnabled(true); } -void PlaylistItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int align) +void PlaylistItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int align) { if(!m_playingItems.contains(this)) return KListViewItem::paintCell(p, cg, column, width, align); - QColorGroup colorGroup = cg; + TQColorGroup colorGroup = cg; - QColor base = colorGroup.base(); - QColor selection = colorGroup.highlight(); + TQColor base = colorGroup.base(); + TQColor selection = colorGroup.highlight(); int r = (base.red() + selection.red()) / 2; int b = (base.blue() + selection.blue()) / 2; int g = (base.green() + selection.green()) / 2; - QColor c(r, g, b); + TQColor c(r, g, b); - colorGroup.setColor(QColorGroup::Base, c); - QListViewItem::paintCell(p, colorGroup, column, width, align); + colorGroup.setColor(TQColorGroup::Base, c); + TQListViewItem::paintCell(p, colorGroup, column, width, align); } -int PlaylistItem::compare(QListViewItem *item, int column, bool ascending) const +int PlaylistItem::compare(TQListViewItem *item, int column, bool ascending) const { // reimplemented from QListViewItem @@ -332,8 +332,8 @@ int PlaylistItem::compare(const PlaylistItem *firstItem, const PlaylistItem *sec return 0; if(column < offset) { - QString first = firstItem->text(column).lower(); - QString second = secondItem->text(column).lower(); + TQString first = firstItem->text(column).lower(); + TQString second = secondItem->text(column).lower(); return first.localeAwareCompare(second); } @@ -398,7 +398,7 @@ void PlaylistItem::setup(CollectionListItem *item) // PlaylistItem::Pointer implementation //////////////////////////////////////////////////////////////////////////////// -QMap > PlaylistItem::Pointer::m_map; // static +TQMap > PlaylistItem::Pointer::m_map; // static PlaylistItem::Pointer::Pointer(PlaylistItem *item) : m_item(item) @@ -456,8 +456,8 @@ void PlaylistItem::Pointer::clear(PlaylistItem *item) // static if(!item) return; - QValueList l = m_map[item]; - for(QValueList::Iterator it = l.begin(); it != l.end(); ++it) + TQValueList l = m_map[item]; + for(TQValueList::Iterator it = l.begin(); it != l.end(); ++it) (*it)->m_item = 0; m_map.remove(item); item->m_watched = false; diff --git a/juk/playlistitem.h b/juk/playlistitem.h index c969d736..9b9cfa80 100644 --- a/juk/playlistitem.h +++ b/juk/playlistitem.h @@ -20,8 +20,8 @@ #include #include -#include -#include +#include +#include #include "tagguesser.h" #include "filehandle.h" @@ -31,7 +31,7 @@ class PlaylistItem; class CollectionListItem; class CollectionList; -typedef QValueList PlaylistItemList; +typedef TQValueList PlaylistItemList; /** * Items for the Playlist and the baseclass for CollectionListItem. @@ -48,7 +48,7 @@ class PlaylistItem : public KListViewItem friend class UpcomingPlaylist; friend class CollectionList; friend class CollectionListItem; - friend class QPtrDict; + friend class TQPtrDict; friend class Pointer; public: @@ -86,19 +86,19 @@ public: private: PlaylistItem *m_item; - static QMap > m_map; + static TQMap > m_map; }; friend class Pointer; static int lastColumn() { return FullPathColumn; } void setFile(const FileHandle &file); - void setFile(const QString &file); + void setFile(const TQString &file); FileHandle file() const; - virtual const QPixmap *pixmap(int column) const; - virtual QString text(int column) const; - virtual void setText(int column, const QString &text); + virtual const TQPixmap *pixmap(int column) const; + virtual TQString text(int column) const; + virtual void setText(int column, const TQString &text); void setPlaying(bool playing = true, bool master = true); @@ -113,7 +113,7 @@ public: * The widths of items are cached when they're updated for us in computations * in the "weighted" listview column width mode. */ - QValueVector cachedWidths() const; + TQValueVector cachedWidths() const; /** * This just refreshes from the in memory data. This may seem pointless at @@ -157,7 +157,7 @@ protected: * subclss or friend class. */ PlaylistItem(CollectionListItem *item, Playlist *parent); - PlaylistItem(CollectionListItem *item, Playlist *parent, QListViewItem *after); + PlaylistItem(CollectionListItem *item, Playlist *parent, TQListViewItem *after); /** * This is the constructor that shold be used by subclasses. @@ -170,10 +170,10 @@ protected: */ virtual ~PlaylistItem(); - virtual void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int align); - virtual void paintFocus(QPainter *, const QColorGroup &, const QRect &) {} + virtual void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int align); + virtual void paintFocus(TQPainter *, const TQColorGroup &, const TQRect &) {} - virtual int compare(QListViewItem *item, int column, bool ascending) const; + virtual int compare(TQListViewItem *item, int column, bool ascending) const; int compare(const PlaylistItem *firstItem, const PlaylistItem *secondItem, int column, bool ascending) const; bool isValid() const; @@ -181,12 +181,12 @@ protected: struct Data : public KShared { Data() {} - Data(const QFileInfo &info, const QString &path) : fileHandle(info, path) {} - Data(const QString &path) : fileHandle(path) {} + Data(const TQFileInfo &info, const TQString &path) : fileHandle(info, path) {} + Data(const TQString &path) : fileHandle(path) {} FileHandle fileHandle; - QValueVector local8Bit; - QValueVector cachedWidths; + TQValueVector local8Bit; + TQValueVector cachedWidths; }; KSharedPtr data() const { return d; } diff --git a/juk/playlistsearch.cpp b/juk/playlistsearch.cpp index a2109b26..940c13e8 100644 --- a/juk/playlistsearch.cpp +++ b/juk/playlistsearch.cpp @@ -61,7 +61,7 @@ void PlaylistSearch::search() PlaylistList::Iterator playlistIt = m_playlists.begin(); for(; playlistIt != m_playlists.end(); ++playlistIt) { if(!isEmpty()) { - for(QListViewItemIterator it(*playlistIt); it.current(); ++it) + for(TQListViewItemIterator it(*playlistIt); it.current(); ++it) checkItem(static_cast(*it)); } else { @@ -155,7 +155,7 @@ PlaylistSearch::Component::Component() : } -PlaylistSearch::Component::Component(const QString &query, +PlaylistSearch::Component::Component(const TQString &query, bool caseSensitive, const ColumnList &columns, MatchMode mode) : @@ -169,7 +169,7 @@ PlaylistSearch::Component::Component(const QString &query, } -PlaylistSearch::Component::Component(const QRegExp &query, const ColumnList& columns) : +PlaylistSearch::Component::Component(const TQRegExp &query, const ColumnList& columns) : m_queryRe(query), m_columns(columns), m_mode(Exact), @@ -220,7 +220,7 @@ bool PlaylistSearch::Component::matches(PlaylistItem *item) const break; case ContainsWord: { - QString s = item->text(*it); + TQString s = item->text(*it); int i = s.find(m_query, 0, m_caseSensitive); if(i >= 0) { @@ -267,7 +267,7 @@ bool PlaylistSearch::Component::operator==(const Component &v) const // helper functions //////////////////////////////////////////////////////////////////////////////// -QDataStream &operator<<(QDataStream &s, const PlaylistSearch &search) +TQDataStream &operator<<(TQDataStream &s, const PlaylistSearch &search) { s << search.components() << Q_INT32(search.searchMode()); @@ -275,7 +275,7 @@ QDataStream &operator<<(QDataStream &s, const PlaylistSearch &search) return s; } -QDataStream &operator>>(QDataStream &s, PlaylistSearch &search) +TQDataStream &operator>>(TQDataStream &s, PlaylistSearch &search) { search.clearPlaylists(); search.addPlaylist(CollectionList::instance()); @@ -294,7 +294,7 @@ QDataStream &operator>>(QDataStream &s, PlaylistSearch &search) return s; } -QDataStream &operator<<(QDataStream &s, const PlaylistSearch::Component &c) +TQDataStream &operator<<(TQDataStream &s, const PlaylistSearch::Component &c) { s << c.isPatternSearch() << (c.isPatternSearch() ? c.pattern().pattern() : c.query()) @@ -305,10 +305,10 @@ QDataStream &operator<<(QDataStream &s, const PlaylistSearch::Component &c) return s; } -QDataStream &operator>>(QDataStream &s, PlaylistSearch::Component &c) +TQDataStream &operator>>(TQDataStream &s, PlaylistSearch::Component &c) { bool patternSearch; - QString pattern; + TQString pattern; bool caseSensitive; ColumnList columns; Q_INT32 mode; @@ -320,7 +320,7 @@ QDataStream &operator>>(QDataStream &s, PlaylistSearch::Component &c) >> mode; if(patternSearch) - c = PlaylistSearch::Component(QRegExp(pattern), columns); + c = PlaylistSearch::Component(TQRegExp(pattern), columns); else c = PlaylistSearch::Component(pattern, caseSensitive, columns, PlaylistSearch::Component::MatchMode(mode)); diff --git a/juk/playlistsearch.h b/juk/playlistsearch.h index 9b46a92c..7281ba13 100644 --- a/juk/playlistsearch.h +++ b/juk/playlistsearch.h @@ -16,21 +16,21 @@ #ifndef PLAYLISTSEARCH_H #define PLAYLISTSEARCH_H -#include +#include class Playlist; -typedef QValueList PlaylistList; +typedef TQValueList PlaylistList; class PlaylistItem; -typedef QValueList PlaylistItemList; +typedef TQValueList PlaylistItemList; -typedef QValueList ColumnList; +typedef TQValueList ColumnList; class PlaylistSearch { public: class Component; - typedef QValueList ComponentList; + typedef TQValueList ComponentList; enum SearchMode { MatchAny = 0, MatchAll = 1 }; @@ -90,14 +90,14 @@ public: /** * Create an empty search component. This is only provided for use by - * QValueList and should not be used in any other context. + * TQValueList and should not be used in any other context. */ Component(); /** * Create a query component. This defaults to searching all visible coulumns. */ - Component(const QString &query, + Component(const TQString &query, bool caseSensitive = false, const ColumnList &columns = ColumnList(), MatchMode mode = Contains); @@ -105,10 +105,10 @@ public: /** * Create a query component. This defaults to searching all visible coulumns. */ - Component(const QRegExp &query, const ColumnList &columns = ColumnList()); + Component(const TQRegExp &query, const ColumnList &columns = ColumnList()); - QString query() const { return m_query; } - QRegExp pattern() const { return m_queryRe; } + TQString query() const { return m_query; } + TQRegExp pattern() const { return m_queryRe; } ColumnList columns() const { return m_columns; } bool matches(PlaylistItem *item) const; @@ -119,8 +119,8 @@ public: bool operator==(const Component &v) const; private: - QString m_query; - QRegExp m_queryRe; + TQString m_query; + TQRegExp m_queryRe; mutable ColumnList m_columns; MatchMode m_mode; bool m_searchAllVisible; @@ -134,7 +134,7 @@ private: * search is just relevant to the collection list. This is all that is presently * needed by JuK. */ -QDataStream &operator<<(QDataStream &s, const PlaylistSearch &search); +TQDataStream &operator<<(TQDataStream &s, const PlaylistSearch &search); /** * Streams \a search from the stream \a s. @@ -142,9 +142,9 @@ QDataStream &operator<<(QDataStream &s, const PlaylistSearch &search); * search is just relevant to the collection list. This is all that is presently * needed by JuK. */ -QDataStream &operator>>(QDataStream &s, PlaylistSearch &search); +TQDataStream &operator>>(TQDataStream &s, PlaylistSearch &search); -QDataStream &operator<<(QDataStream &s, const PlaylistSearch::Component &c); -QDataStream &operator>>(QDataStream &s, PlaylistSearch::Component &c); +TQDataStream &operator<<(TQDataStream &s, const PlaylistSearch::Component &c); +TQDataStream &operator>>(TQDataStream &s, PlaylistSearch::Component &c); #endif diff --git a/juk/playlistsplitter.cpp b/juk/playlistsplitter.cpp index 5bc33a69..3454ee3d 100644 --- a/juk/playlistsplitter.cpp +++ b/juk/playlistsplitter.cpp @@ -16,8 +16,8 @@ #include #include -#include -#include +#include +#include #include "playlistsplitter.h" #include "searchwidget.h" @@ -34,8 +34,8 @@ using namespace ActionCollection; // public methods //////////////////////////////////////////////////////////////////////////////// -PlaylistSplitter::PlaylistSplitter(QWidget *parent, const char *name) : - QSplitter(Qt::Horizontal, parent, name), +PlaylistSplitter::PlaylistSplitter(TQWidget *parent, const char *name) : + TQSplitter(Qt::Horizontal, parent, name), m_newVisible(0), m_playlistBox(0), m_searchWidget(0), @@ -61,7 +61,7 @@ PlaylistSplitter::~PlaylistSplitter() delete m_playlistBox; } -bool PlaylistSplitter::eventFilter(QObject *, QEvent *event) +bool PlaylistSplitter::eventFilter(TQObject *, TQEvent *event) { if(event->type() == FocusUpEvent::id) { m_searchWidget->setFocus(); @@ -89,20 +89,20 @@ void PlaylistSplitter::slotFocusCurrentPlaylist() // Select the top visible (and matching) item. - PlaylistItem *item = static_cast(playlist->itemAt(QPoint(0, 0))); + PlaylistItem *item = static_cast(playlist->itemAt(TQPoint(0, 0))); if(!item) return; - // A little bit of a hack to make QListView repaint things properly. Switch + // A little bit of a hack to make TQListView repaint things properly. Switch // to single selection mode, set the selection and then switch back. - playlist->setSelectionMode(QListView::Single); + playlist->setSelectionMode(TQListView::Single); playlist->markItemSelected(item, true); playlist->setCurrentItem(item); - playlist->setSelectionMode(QListView::Extended); + playlist->setSelectionMode(TQListView::Extended); } } @@ -121,7 +121,7 @@ void PlaylistSplitter::setupActions() new KToggleAction(i18n("Show &Search Bar"), "filefind", 0, actions(), "showSearch"); showSearch->setCheckedState(i18n("Hide &Search Bar")); - new KAction(i18n("Edit Track Search"), "edit_clear", "F6", this, SLOT(setFocus()), actions(), "editTrackSearch"); + new KAction(i18n("Edit Track Search"), "edit_clear", "F6", this, TQT_SLOT(setFocus()), actions(), "editTrackSearch"); } void PlaylistSplitter::setupLayout() @@ -130,53 +130,53 @@ void PlaylistSplitter::setupLayout() // Create a splitter to go between the playlists and the editor. - QSplitter *editorSplitter = new QSplitter(Qt::Vertical, this, "editorSplitter"); + TQSplitter *editorSplitter = new TQSplitter(Qt::Vertical, this, "editorSplitter"); // Create the playlist and the editor. - QWidget *top = new QWidget(editorSplitter); - QVBoxLayout *topLayout = new QVBoxLayout(top); + TQWidget *top = new TQWidget(editorSplitter); + TQVBoxLayout *topLayout = new TQVBoxLayout(top); - m_playlistStack = new QWidgetStack(top, "playlistStack"); + m_playlistStack = new TQWidgetStack(top, "playlistStack"); m_playlistStack->installEventFilter(this); - connect(m_playlistStack, SIGNAL(aboutToShow(QWidget *)), this, SLOT(slotPlaylistChanged(QWidget *))); + connect(m_playlistStack, TQT_SIGNAL(aboutToShow(TQWidget *)), this, TQT_SLOT(slotPlaylistChanged(TQWidget *))); m_editor = new TagEditor(editorSplitter, "tagEditor"); // Make the editor as small as possible (or at least as small as recommended) - editorSplitter->setResizeMode(m_editor, QSplitter::FollowSizeHint); + editorSplitter->setResizeMode(m_editor, TQSplitter::FollowSizeHint); // Create the PlaylistBox m_playlistBox = new PlaylistBox(this, m_playlistStack, "playlistBox"); - connect(m_playlistBox->object(), SIGNAL(signalSelectedItemsChanged()), - this, SLOT(slotPlaylistSelectionChanged())); - connect(m_playlistBox, SIGNAL(signalPlaylistDestroyed(Playlist *)), - m_editor, SLOT(slotPlaylistDestroyed(Playlist *))); + connect(m_playlistBox->object(), TQT_SIGNAL(signalSelectedItemsChanged()), + this, TQT_SLOT(slotPlaylistSelectionChanged())); + connect(m_playlistBox, TQT_SIGNAL(signalPlaylistDestroyed(Playlist *)), + m_editor, TQT_SLOT(slotPlaylistDestroyed(Playlist *))); moveToFirst(m_playlistBox); - connect(CollectionList::instance(), SIGNAL(signalCollectionChanged()), - m_editor, SLOT(slotUpdateCollection())); + connect(CollectionList::instance(), TQT_SIGNAL(signalCollectionChanged()), + m_editor, TQT_SLOT(slotUpdateCollection())); NowPlaying *nowPlaying = new NowPlaying(top, m_playlistBox); // Create the search widget -- this must be done after the CollectionList is created. m_searchWidget = new SearchWidget(top, "searchWidget"); - connect(m_searchWidget, SIGNAL(signalQueryChanged()), - this, SLOT(slotShowSearchResults())); - connect(m_searchWidget, SIGNAL(signalDownPressed()), - this, SLOT(slotFocusCurrentPlaylist())); - connect(m_searchWidget, SIGNAL(signalAdvancedSearchClicked()), - m_playlistBox->object(), SLOT(slotCreateSearchPlaylist())); - connect(m_searchWidget, SIGNAL(signalShown(bool)), - m_playlistBox->object(), SLOT(slotSetSearchEnabled(bool))); - connect(action("showSearch"), SIGNAL(toggled(bool)), - m_searchWidget, SLOT(setEnabled(bool))); + connect(m_searchWidget, TQT_SIGNAL(signalQueryChanged()), + this, TQT_SLOT(slotShowSearchResults())); + connect(m_searchWidget, TQT_SIGNAL(signalDownPressed()), + this, TQT_SLOT(slotFocusCurrentPlaylist())); + connect(m_searchWidget, TQT_SIGNAL(signalAdvancedSearchClicked()), + m_playlistBox->object(), TQT_SLOT(slotCreateSearchPlaylist())); + connect(m_searchWidget, TQT_SIGNAL(signalShown(bool)), + m_playlistBox->object(), TQT_SLOT(slotSetSearchEnabled(bool))); + connect(action("showSearch"), TQT_SIGNAL(toggled(bool)), + m_searchWidget, TQT_SLOT(setEnabled(bool))); topLayout->addWidget(nowPlaying); topLayout->addWidget(m_searchWidget); @@ -190,7 +190,7 @@ void PlaylistSplitter::readConfig() { KConfigGroup config(KGlobal::config(), "Splitter"); - QValueList splitterSizes = config.readIntListEntry("PlaylistSplitterSizes"); + TQValueList splitterSizes = config.readIntListEntry("PlaylistSplitterSizes"); if(splitterSizes.isEmpty()) { splitterSizes.append(100); splitterSizes.append(640); @@ -222,7 +222,7 @@ void PlaylistSplitter::slotPlaylistSelectionChanged() m_editor->slotSetItems(visiblePlaylist()->selectedItems()); } -void PlaylistSplitter::slotPlaylistChanged(QWidget *w) +void PlaylistSplitter::slotPlaylistChanged(TQWidget *w) { Playlist *p = dynamic_cast(w); diff --git a/juk/playlistsplitter.h b/juk/playlistsplitter.h index 0734ee05..cc163640 100644 --- a/juk/playlistsplitter.h +++ b/juk/playlistsplitter.h @@ -18,7 +18,7 @@ #include -#include +#include #include "playlistbox.h" @@ -31,7 +31,7 @@ class TagEditor; /** * This is the main layout class of JuK. It should contain a PlaylistBox and - * a QWidgetStack of the Playlists. + * a TQWidgetStack of the Playlists. * * This class serves as a "mediator" (see "Design Patterns") between the JuK * class and the playlist classes. Thus all access to the playlist classes from @@ -43,12 +43,12 @@ class PlaylistSplitter : public QSplitter Q_OBJECT public: - PlaylistSplitter(QWidget *parent, const char *name = 0); + PlaylistSplitter(TQWidget *parent, const char *name = 0); virtual ~PlaylistSplitter(); PlaylistInterface *playlist() const { return m_playlistBox; } - virtual bool eventFilter(QObject *watched, QEvent *event); + virtual bool eventFilter(TQObject *watched, TQEvent *event); public slots: virtual void setFocus(); @@ -58,7 +58,7 @@ private: /** * This returns a pointer to the first item in the playlist on the top - * of the QWidgetStack of playlists. + * of the TQWidgetStack of playlists. */ Playlist *visiblePlaylist() const; @@ -75,13 +75,13 @@ private slots: */ void slotShowSearchResults(); void slotPlaylistSelectionChanged(); - void slotPlaylistChanged(QWidget *w); + void slotPlaylistChanged(TQWidget *w); private: Playlist *m_newVisible; PlaylistBox *m_playlistBox; SearchWidget *m_searchWidget; - QWidgetStack *m_playlistStack; + TQWidgetStack *m_playlistStack; TagEditor *m_editor; }; diff --git a/juk/searchplaylist.cpp b/juk/searchplaylist.cpp index 2afd8549..ba1be917 100644 --- a/juk/searchplaylist.cpp +++ b/juk/searchplaylist.cpp @@ -15,7 +15,7 @@ #include -#include +#include #include "searchplaylist.h" #include "playlistitem.h" @@ -27,7 +27,7 @@ SearchPlaylist::SearchPlaylist(PlaylistCollection *collection, const PlaylistSearch &search, - const QString &name, + const TQString &name, bool setupPlaylist, bool synchronizePlaying) : DynamicPlaylist(search.playlists(), collection, name, "find", @@ -55,7 +55,7 @@ void SearchPlaylist::updateItems() PlaylistItemList l = Playlist::items(); - QPtrDict oldItems(503); + TQPtrDict oldItems(503); for(PlaylistItemList::ConstIterator it = l.begin(); it != l.end(); ++it) oldItems.insert((*it)->collectionItem(), *it); @@ -71,7 +71,7 @@ void SearchPlaylist::updateItems() // kdDebug(65432) << k_funcinfo << "newItems.size() == " << newItems.size() << endl; - for(QPtrDictIterator it(oldItems); it.current(); ++it) + for(TQPtrDictIterator it(oldItems); it.current(); ++it) clearItem(it.current(), false); if(!oldItems.isEmpty() && newItems.isEmpty()) @@ -90,7 +90,7 @@ void SearchPlaylist::updateItems() // helper functions //////////////////////////////////////////////////////////////////////////////// -QDataStream &operator<<(QDataStream &s, const SearchPlaylist &p) +TQDataStream &operator<<(TQDataStream &s, const SearchPlaylist &p) { s << p.name() << p.playlistSearch(); @@ -98,9 +98,9 @@ QDataStream &operator<<(QDataStream &s, const SearchPlaylist &p) return s; } -QDataStream &operator>>(QDataStream &s, SearchPlaylist &p) +TQDataStream &operator>>(TQDataStream &s, SearchPlaylist &p) { - QString name; + TQString name; PlaylistSearch search; s >> name diff --git a/juk/searchplaylist.h b/juk/searchplaylist.h index 2acd1e5c..8152670a 100644 --- a/juk/searchplaylist.h +++ b/juk/searchplaylist.h @@ -24,7 +24,7 @@ class SearchPlaylist : public DynamicPlaylist public: SearchPlaylist(PlaylistCollection *collection, const PlaylistSearch &search = PlaylistSearch(), - const QString &name = QString::null, + const TQString &name = TQString::null, bool setupPlaylist = true, bool synchronizePlaying = false); @@ -42,7 +42,7 @@ private: PlaylistSearch m_search; }; -QDataStream &operator<<(QDataStream &s, const SearchPlaylist &p); -QDataStream &operator>>(QDataStream &s, SearchPlaylist &p); +TQDataStream &operator<<(TQDataStream &s, const SearchPlaylist &p); +TQDataStream &operator>>(TQDataStream &s, SearchPlaylist &p); #endif diff --git a/juk/searchwidget.cpp b/juk/searchwidget.cpp index 83b7808e..a9b8d868 100644 --- a/juk/searchwidget.cpp +++ b/juk/searchwidget.cpp @@ -23,11 +23,11 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "searchwidget.h" #include "collectionlist.h" @@ -39,8 +39,8 @@ using namespace ActionCollection; // SearchLine public methods //////////////////////////////////////////////////////////////////////////////// -SearchLine::SearchLine(QWidget *parent, bool simple, const char *name) : - QHBox(parent, name), +SearchLine::SearchLine(TQWidget *parent, bool simple, const char *name) : + TQHBox(parent, name), m_simple(simple), m_searchFieldsBox(0) { @@ -48,24 +48,24 @@ SearchLine::SearchLine(QWidget *parent, bool simple, const char *name) : if(!m_simple) { m_searchFieldsBox = new KComboBox(this, "searchFields"); - connect(m_searchFieldsBox, SIGNAL(activated(int)), - this, SIGNAL(signalQueryChanged())); + connect(m_searchFieldsBox, TQT_SIGNAL(activated(int)), + this, TQT_SIGNAL(signalQueryChanged())); } m_lineEdit = new KLineEdit(this, "searchLineEdit"); m_lineEdit->installEventFilter(this); - connect(m_lineEdit, SIGNAL(textChanged(const QString &)), - this, SIGNAL(signalQueryChanged())); - connect(m_lineEdit, SIGNAL(returnPressed()), - this, SLOT(slotActivate())); + connect(m_lineEdit, TQT_SIGNAL(textChanged(const TQString &)), + this, TQT_SIGNAL(signalQueryChanged())); + connect(m_lineEdit, TQT_SIGNAL(returnPressed()), + this, TQT_SLOT(slotActivate())); if(!m_simple) { m_caseSensitive = new KComboBox(this); m_caseSensitive->insertItem(i18n("Normal Matching"), 0); m_caseSensitive->insertItem(i18n("Case Sensitive"), 1); m_caseSensitive->insertItem(i18n("Pattern Matching"), 2); - connect(m_caseSensitive, SIGNAL(activated(int)), - this, SIGNAL(signalQueryChanged())); + connect(m_caseSensitive, TQT_SIGNAL(activated(int)), + this, TQT_SIGNAL(signalQueryChanged())); } else m_caseSensitive = 0; @@ -75,15 +75,15 @@ SearchLine::SearchLine(QWidget *parent, bool simple, const char *name) : PlaylistSearch::Component SearchLine::searchComponent() const { - QString query = m_lineEdit->text(); + TQString query = m_lineEdit->text(); bool caseSensitive = m_caseSensitive && m_caseSensitive->currentItem() == CaseSensitive; Playlist *playlist = CollectionList::instance(); - QValueList searchedColumns; + TQValueList searchedColumns; if(!m_searchFieldsBox || m_searchFieldsBox->currentItem() == 0) { - QValueListConstIterator it = m_columnList.begin(); + TQValueListConstIterator it = m_columnList.begin(); for(; it != m_columnList.end(); ++it) { if(playlist->isColumnVisible(*it)) searchedColumns.append(*it); @@ -93,7 +93,7 @@ PlaylistSearch::Component SearchLine::searchComponent() const searchedColumns.append(m_columnList[m_searchFieldsBox->currentItem() - 1]); if(m_caseSensitive && m_caseSensitive->currentItem() == Pattern) - return PlaylistSearch::Component(QRegExp(query), searchedColumns); + return PlaylistSearch::Component(TQRegExp(query), searchedColumns); else return PlaylistSearch::Component(query, caseSensitive, searchedColumns); } @@ -134,16 +134,16 @@ void SearchLine::setFocus() m_lineEdit->setFocus(); } -bool SearchLine::eventFilter(QObject *watched, QEvent *e) +bool SearchLine::eventFilter(TQObject *watched, TQEvent *e) { - if(watched != m_lineEdit || e->type() != QEvent::KeyPress) - return QHBox::eventFilter(watched, e); + if(watched != m_lineEdit || e->type() != TQEvent::KeyPress) + return TQHBox::eventFilter(watched, e); - QKeyEvent *key = static_cast(e); + TQKeyEvent *key = static_cast(e); if(key->key() == Qt::Key_Down) emit signalDownPressed(); - return QHBox::eventFilter(watched, e); + return TQHBox::eventFilter(watched, e); } void SearchLine::slotActivate() @@ -154,16 +154,16 @@ void SearchLine::slotActivate() void SearchLine::updateColumns() { - QString currentText; + TQString currentText; if(m_searchFieldsBox) { currentText = m_searchFieldsBox->currentText(); m_searchFieldsBox->clear(); } - QStringList columnHeaders; + TQStringList columnHeaders; - columnHeaders.append(QString("<%1>").arg(i18n("All Visible"))); + columnHeaders.append(TQString("<%1>").arg(i18n("All Visible"))); Playlist *playlist = CollectionList::instance(); @@ -172,7 +172,7 @@ void SearchLine::updateColumns() for(int i = 0; i < playlist->columns(); i++) { m_columnList.append(i); - QString text = playlist->columnText(i); + TQString text = playlist->columnText(i); columnHeaders.append(text); if(currentText == text) selection = m_columnList.size() - 1; @@ -188,7 +188,7 @@ void SearchLine::updateColumns() // SearchWidget public methods //////////////////////////////////////////////////////////////////////////////// -SearchWidget::SearchWidget(QWidget *parent, const char *name) : KToolBar(parent, name) +SearchWidget::SearchWidget(TQWidget *parent, const char *name) : KToolBar(parent, name) { setupLayout(); updateColumns(); @@ -211,12 +211,12 @@ void SearchWidget::setSearch(const PlaylistSearch &search) m_searchLine->setSearchComponent(*components.begin()); } -QString SearchWidget::searchText() const +TQString SearchWidget::searchText() const { return m_searchLine->searchComponent().query(); } -void SearchWidget::setSearchText(const QString &text) +void SearchWidget::setSearchText(const TQString &text) { m_searchLine->setSearchComponent(PlaylistSearch::Component(text)); } @@ -263,29 +263,29 @@ void SearchWidget::setupLayout() { boxLayout()->setSpacing(5); - QToolButton *clearSearchButton = new QToolButton(this); + TQToolButton *clearSearchButton = new TQToolButton(this); clearSearchButton->setTextLabel(i18n("Clear Search"), true); clearSearchButton->setIconSet(SmallIconSet("locationbar_erase")); - QLabel *label = new QLabel(i18n("Search:"), this, "kde toolbar widget"); + TQLabel *label = new TQLabel(i18n("Search:"), this, "kde toolbar widget"); m_searchLine = new SearchLine(this, true, "kde toolbar widget"); label->setBuddy(m_searchLine); - connect(m_searchLine, SIGNAL(signalQueryChanged()), this, SIGNAL(signalQueryChanged())); - connect(m_searchLine, SIGNAL(signalDownPressed()), this, SIGNAL(signalDownPressed())); - connect(clearSearchButton, SIGNAL(pressed()), m_searchLine, SLOT(clear())); + connect(m_searchLine, TQT_SIGNAL(signalQueryChanged()), this, TQT_SIGNAL(signalQueryChanged())); + connect(m_searchLine, TQT_SIGNAL(signalDownPressed()), this, TQT_SIGNAL(signalDownPressed())); + connect(clearSearchButton, TQT_SIGNAL(pressed()), m_searchLine, TQT_SLOT(clear())); setStretchableWidget(m_searchLine); // I've decided that I think this is ugly, for now. /* - QToolButton *b = new QToolButton(this); + TQToolButton *b = new TQToolButton(this); b->setTextLabel(i18n("Advanced Search"), true); b->setIconSet(SmallIconSet("wizard")); - connect(b, SIGNAL(clicked()), this, SIGNAL(signalAdvancedSearchClicked())); + connect(b, TQT_SIGNAL(clicked()), this, TQT_SIGNAL(signalAdvancedSearchClicked())); */ } diff --git a/juk/searchwidget.h b/juk/searchwidget.h index 37a44cb7..577fc1c0 100644 --- a/juk/searchwidget.h +++ b/juk/searchwidget.h @@ -21,7 +21,7 @@ #include -#include +#include #include "playlistsearch.h" #include "jukIface.h" @@ -39,7 +39,7 @@ class SearchLine : public QHBox public: enum Mode { Default = 0, CaseSensitive = 1, Pattern = 2 }; - SearchLine(QWidget *parent, bool simple = false, const char *name = 0); + SearchLine(TQWidget *parent, bool simple = false, const char *name = 0); virtual ~SearchLine() {} PlaylistSearch::Component searchComponent() const; @@ -52,7 +52,7 @@ public slots: virtual void setFocus(); protected: - virtual bool eventFilter(QObject *watched, QEvent *e); + virtual bool eventFilter(TQObject *watched, TQEvent *e); signals: void signalQueryChanged(); @@ -66,7 +66,7 @@ private: KLineEdit *m_lineEdit; KComboBox *m_searchFieldsBox; KComboBox *m_caseSensitive; - QValueList m_columnList; + TQValueList m_columnList; }; class SearchWidget : public KToolBar, public SearchIface @@ -74,14 +74,14 @@ class SearchWidget : public KToolBar, public SearchIface Q_OBJECT public: - SearchWidget(QWidget *parent, const char *name = 0); + SearchWidget(TQWidget *parent, const char *name = 0); virtual ~SearchWidget(); PlaylistSearch search(const PlaylistList &playlists) const; void setSearch(const PlaylistSearch &search); - virtual QString searchText() const; - virtual void setSearchText(const QString &text); + virtual TQString searchText() const; + virtual void setSearchText(const TQString &text); public slots: void clear(); @@ -105,7 +105,7 @@ private: private: SearchLine *m_searchLine; - QStringList m_columnHeaders; + TQStringList m_columnHeaders; }; #endif diff --git a/juk/slideraction.cpp b/juk/slideraction.cpp index eacb4242..22d8446b 100644 --- a/juk/slideraction.cpp +++ b/juk/slideraction.cpp @@ -18,10 +18,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include "slideraction.h" @@ -39,22 +39,22 @@ class TrackPositionSlider : public QSlider { public: - TrackPositionSlider(QWidget *parent, const char *name) : QSlider(parent, name) + TrackPositionSlider(TQWidget *parent, const char *name) : TQSlider(parent, name) { setFocusPolicy(NoFocus); } protected: - virtual void mousePressEvent(QMouseEvent *e) + virtual void mousePressEvent(TQMouseEvent *e) { if(e->button() == LeftButton) { - QMouseEvent reverse(QEvent::MouseButtonPress, e->pos(), MidButton, e->state()); - QSlider::mousePressEvent(&reverse); + TQMouseEvent reverse(TQEvent::MouseButtonPress, e->pos(), MidButton, e->state()); + TQSlider::mousePressEvent(&reverse); emit sliderPressed(); } else if(e->button() == MidButton) { - QMouseEvent reverse(QEvent::MouseButtonPress, e->pos(), LeftButton, e->state()); - QSlider::mousePressEvent(&reverse); + TQMouseEvent reverse(TQEvent::MouseButtonPress, e->pos(), LeftButton, e->state()); + TQSlider::mousePressEvent(&reverse); } } }; @@ -63,23 +63,23 @@ protected: // VolumeSlider implementation //////////////////////////////////////////////////////////////////////////////// -VolumeSlider::VolumeSlider(Orientation o, QWidget *parent, const char *name) : - QSlider(o, parent, name) +VolumeSlider::VolumeSlider(Orientation o, TQWidget *parent, const char *name) : + TQSlider(o, parent, name) { - connect(this, SIGNAL(valueChanged(int)), this, SLOT(slotValueChanged(int))); + connect(this, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotValueChanged(int))); } -void VolumeSlider::wheelEvent(QWheelEvent *e) +void VolumeSlider::wheelEvent(TQWheelEvent *e) { if(orientation() == Horizontal) { - QWheelEvent transposed(e->pos(), -(e->delta()), e->state(), e->orientation()); - QSlider::wheelEvent(&transposed); + TQWheelEvent transposed(e->pos(), -(e->delta()), e->state(), e->orientation()); + TQSlider::wheelEvent(&transposed); } else - QSlider::wheelEvent(e); + TQSlider::wheelEvent(e); } -void VolumeSlider::focusInEvent(QFocusEvent *) +void VolumeSlider::focusInEvent(TQFocusEvent *) { clearFocus(); } @@ -108,7 +108,7 @@ void VolumeSlider::setOrientation(Orientation o) blockSignals(true); setValue(maxValue() - value()); blockSignals(false); - QSlider::setOrientation(o); + TQSlider::setOrientation(o); } void VolumeSlider::slotValueChanged(int value) @@ -126,7 +126,7 @@ void VolumeSlider::slotValueChanged(int value) const int SliderAction::minPosition = 0; const int SliderAction::maxPosition = 1000; -SliderAction::SliderAction(const QString &text, QObject *parent, const char *name) +SliderAction::SliderAction(const TQString &text, TQObject *parent, const char *name) : KAction(text, 0, parent, name), m_toolBar(0), m_layout(0), @@ -143,9 +143,9 @@ SliderAction::~SliderAction() } -int SliderAction::plug(QWidget *parent, int index) +int SliderAction::plug(TQWidget *parent, int index) { - QWidget *w = createWidget(parent); + TQWidget *w = createWidget(parent); if(!w) return -1; @@ -162,11 +162,11 @@ int SliderAction::plug(QWidget *parent, int index) addContainer(m_toolBar, id); - connect(m_toolBar, SIGNAL(destroyed()), this, SLOT(slotToolbarDestroyed())); - connect(m_toolBar, SIGNAL(orientationChanged(Orientation)), - this, SLOT(slotUpdateOrientation())); - connect(m_toolBar, SIGNAL(placeChanged(QDockWindow::Place)), - this, SLOT(slotUpdateOrientation())); + connect(m_toolBar, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotToolbarDestroyed())); + connect(m_toolBar, TQT_SIGNAL(orientationChanged(Orientation)), + this, TQT_SLOT(slotUpdateOrientation())); + connect(m_toolBar, TQT_SIGNAL(placeChanged(TQDockWindow::Place)), + this, TQT_SLOT(slotUpdateOrientation())); slotUpdateOrientation(); return (containerCount() - 1); @@ -178,7 +178,7 @@ int SliderAction::plug(QWidget *parent, int index) } -void SliderAction::unplug(QWidget *parent) +void SliderAction::unplug(TQWidget *parent) { if (parent->inherits("KToolBar")) { m_toolBar = static_cast(parent); @@ -207,12 +207,12 @@ void SliderAction::slotUpdateOrientation() if(m_toolBar->barPos() == KToolBar::Right || m_toolBar->barPos() == KToolBar::Left) { m_trackPositionSlider->setOrientation(Vertical); m_volumeSlider->setOrientation(Vertical); - m_layout->setDirection(QBoxLayout::TopToBottom); + m_layout->setDirection(TQBoxLayout::TopToBottom); } else { m_trackPositionSlider->setOrientation(Horizontal); m_volumeSlider->setOrientation(Horizontal); - m_layout->setDirection(QBoxLayout::LeftToRight); + m_layout->setDirection(TQBoxLayout::LeftToRight); } slotUpdateSize(); } @@ -221,10 +221,10 @@ void SliderAction::slotUpdateOrientation() // private members //////////////////////////////////////////////////////////////////////////////// -QWidget *SliderAction::createWidget(QWidget *parent) // virtual -- used by base class +TQWidget *SliderAction::createWidget(TQWidget *parent) // virtual -- used by base class { if(parent) { - QWidget *base = new QWidget(parent); + TQWidget *base = new TQWidget(parent); base->setBackgroundMode(parent->backgroundMode()); base->setName("kde toolbar widget"); @@ -240,38 +240,38 @@ QWidget *SliderAction::createWidget(QWidget *parent) // virtual -- used by base else orientation = Horizontal; - m_layout = new QBoxLayout(base, QBoxLayout::TopToBottom, 5, 5); + m_layout = new TQBoxLayout(base, TQBoxLayout::TopToBottom, 5, 5); - m_layout->addItem(new QSpacerItem(20, 1)); + m_layout->addItem(new TQSpacerItem(20, 1)); - QLabel *trackPositionLabel = new QLabel(base); + TQLabel *trackPositionLabel = new TQLabel(base); trackPositionLabel->setName("kde toolbar widget"); trackPositionLabel->setPixmap(SmallIcon("player_time")); - QToolTip::add(trackPositionLabel, i18n("Track position")); + TQToolTip::add(trackPositionLabel, i18n("Track position")); m_layout->addWidget(trackPositionLabel); m_trackPositionSlider = new TrackPositionSlider(base, "trackPositionSlider"); m_trackPositionSlider->setMaxValue(maxPosition); - QToolTip::add(m_trackPositionSlider, i18n("Track position")); + TQToolTip::add(m_trackPositionSlider, i18n("Track position")); m_layout->addWidget(m_trackPositionSlider); - connect(m_trackPositionSlider, SIGNAL(sliderPressed()), this, SLOT(slotSliderPressed())); - connect(m_trackPositionSlider, SIGNAL(sliderReleased()), this, SLOT(slotSliderReleased())); + connect(m_trackPositionSlider, TQT_SIGNAL(sliderPressed()), this, TQT_SLOT(slotSliderPressed())); + connect(m_trackPositionSlider, TQT_SIGNAL(sliderReleased()), this, TQT_SLOT(slotSliderReleased())); - m_layout->addItem(new QSpacerItem(10, 1)); + m_layout->addItem(new TQSpacerItem(10, 1)); - QLabel *volumeLabel = new QLabel(base); + TQLabel *volumeLabel = new TQLabel(base); volumeLabel->setName("kde toolbar widget"); volumeLabel->setPixmap(SmallIcon("player_volume")); - QToolTip::add(volumeLabel, i18n("Volume")); + TQToolTip::add(volumeLabel, i18n("Volume")); m_layout->addWidget(volumeLabel); m_volumeSlider = new VolumeSlider(orientation, base, "volumeSlider"); m_volumeSlider->setMaxValue(100); - QToolTip::add(m_volumeSlider, i18n("Volume")); + TQToolTip::add(m_volumeSlider, i18n("Volume")); m_layout->addWidget(m_volumeSlider); - connect(m_volumeSlider, SIGNAL(signalVolumeChanged(int)), SIGNAL(signalVolumeChanged(int))); - connect(m_volumeSlider, SIGNAL(sliderPressed()), this, SLOT(slotVolumeSliderPressed())); - connect(m_volumeSlider, SIGNAL(sliderReleased()), this, SLOT(slotVolumeSliderReleased())); + connect(m_volumeSlider, TQT_SIGNAL(signalVolumeChanged(int)), TQT_SIGNAL(signalVolumeChanged(int))); + connect(m_volumeSlider, TQT_SIGNAL(sliderPressed()), this, TQT_SLOT(slotVolumeSliderPressed())); + connect(m_volumeSlider, TQT_SIGNAL(sliderReleased()), this, TQT_SLOT(slotVolumeSliderReleased())); m_volumeSlider->setName("kde toolbar widget"); m_trackPositionSlider->setName("kde toolbar widget"); @@ -279,7 +279,7 @@ QWidget *SliderAction::createWidget(QWidget *parent) // virtual -- used by base m_layout->setStretchFactor(m_trackPositionSlider, 4); m_layout->setStretchFactor(m_volumeSlider, 1); - connect(parent, SIGNAL(modechange()), this, SLOT(slotUpdateSize())); + connect(parent, TQT_SIGNAL(modechange()), this, TQT_SLOT(slotUpdateSize())); return base; } diff --git a/juk/slideraction.h b/juk/slideraction.h index f312196c..ead3a93f 100644 --- a/juk/slideraction.h +++ b/juk/slideraction.h @@ -17,7 +17,7 @@ #define SLIDERACTION_H #include -#include +#include class QBoxLayout; class QDockWindow; @@ -27,7 +27,7 @@ class VolumeSlider : public QSlider Q_OBJECT public: - VolumeSlider(Orientation o, QWidget *parent, const char *name); + VolumeSlider(Orientation o, TQWidget *parent, const char *name); int volume() const; void setVolume(int value); @@ -38,8 +38,8 @@ signals: void signalVolumeChanged(int value); protected: - virtual void wheelEvent(QWheelEvent *e); - virtual void focusInEvent(QFocusEvent *); + virtual void wheelEvent(TQWheelEvent *e); + virtual void focusInEvent(TQFocusEvent *); private slots: void slotValueChanged(int value); @@ -50,17 +50,17 @@ class SliderAction : public KAction Q_OBJECT public: - SliderAction(const QString &text, QObject *parent, const char *name); + SliderAction(const TQString &text, TQObject *parent, const char *name); virtual ~SliderAction(); VolumeSlider *volumeSlider() const { return m_volumeSlider; } - QSlider *trackPositionSlider() const { return m_trackPositionSlider; } + TQSlider *trackPositionSlider() const { return m_trackPositionSlider; } bool dragging() const { return m_dragging; } bool volumeDragging() const { return m_volumeDragging; } - virtual int plug(QWidget *parent, int index = -1); - virtual void unplug(QWidget *widget); + virtual int plug(TQWidget *parent, int index = -1); + virtual void unplug(TQWidget *widget); static const int minPosition; static const int maxPosition; @@ -73,7 +73,7 @@ signals: void signalVolumeChanged(int volume); private: - QWidget *createWidget(QWidget *parent); + TQWidget *createWidget(TQWidget *parent); private slots: void slotUpdateSize(); @@ -85,8 +85,8 @@ private slots: private: KToolBar *m_toolBar; - QBoxLayout *m_layout; - QSlider *m_trackPositionSlider; + TQBoxLayout *m_layout; + TQSlider *m_trackPositionSlider; VolumeSlider *m_volumeSlider; bool m_dragging; bool m_volumeDragging; diff --git a/juk/sortedstringlist.cpp b/juk/sortedstringlist.cpp index 87f2938d..0886a88d 100644 --- a/juk/sortedstringlist.cpp +++ b/juk/sortedstringlist.cpp @@ -20,10 +20,10 @@ class SortedStringList::Node { public: - Node(const QString &value) : key(value), parent(0), left(0), right(0) {} + Node(const TQString &value) : key(value), parent(0), left(0), right(0) {} ~Node() {} - QString key; + TQString key; Node *parent; Node *left; Node *right; @@ -39,12 +39,12 @@ SortedStringList::~SortedStringList() } -bool SortedStringList::insert(const QString &value) +bool SortedStringList::insert(const TQString &value) { return BSTInsert(value); } -bool SortedStringList::contains(const QString &value) const +bool SortedStringList::contains(const TQString &value) const { return find(value); } @@ -71,7 +71,7 @@ SortedStringList::Node *SortedStringList::treeSuccessor(Node *n) const return p; } -bool SortedStringList::remove(const QString &value) +bool SortedStringList::remove(const TQString &value) { Node *n = find(value); @@ -111,9 +111,9 @@ bool SortedStringList::remove(const QString &value) return true; } -QStringList SortedStringList::values() const +TQStringList SortedStringList::values() const { - QStringList l; + TQStringList l; traverse(m_root, l); return l; } @@ -122,7 +122,7 @@ QStringList SortedStringList::values() const // private methods //////////////////////////////////////////////////////////////////////////////// -SortedStringList::Node *SortedStringList::find(const QString &value) const +SortedStringList::Node *SortedStringList::find(const TQString &value) const { Node *n = m_root; while(n && value != n->key) { @@ -135,7 +135,7 @@ SortedStringList::Node *SortedStringList::find(const QString &value) const return n; } -bool SortedStringList::BSTInsert(const QString &value) +bool SortedStringList::BSTInsert(const TQString &value) { Node *previousNode = 0; Node *node = m_root; @@ -169,7 +169,7 @@ bool SortedStringList::BSTInsert(const QString &value) return false; } -void SortedStringList::traverse(const Node *n, QStringList &list) const +void SortedStringList::traverse(const Node *n, TQStringList &list) const { if(!n) return; diff --git a/juk/sortedstringlist.h b/juk/sortedstringlist.h index 108a16c6..01386262 100644 --- a/juk/sortedstringlist.h +++ b/juk/sortedstringlist.h @@ -16,7 +16,7 @@ #ifndef SORTEDSTRINGLIST_H #define SORTEDSTRINGLIST_H -#include +#include class SortedStringList { @@ -28,27 +28,27 @@ public: * Insert the value. Returns true if the item was already in the list * or false otherwise. */ - bool insert(const QString &value); - bool contains(const QString &value) const; - bool remove(const QString &value); + bool insert(const TQString &value); + bool contains(const TQString &value) const; + bool remove(const TQString &value); /** * Returns a sorted list of the values. * Warning, this method is expensive and shouldn't be used except when * necessary. */ - QStringList values() const; + TQStringList values() const; private: class Node; - Node *find(const QString &value) const; + Node *find(const TQString &value) const; /** * The insertion implementation. Returns true if the item was already * present in the list. */ - bool BSTInsert(const QString &value); - void traverse(const Node *n, QStringList &list) const; + bool BSTInsert(const TQString &value); + void traverse(const Node *n, TQStringList &list) const; Node *treeMinimum(Node *n) const; Node *treeSuccessor(Node *n) const; diff --git a/juk/splashscreen.cpp b/juk/splashscreen.cpp index 5f91a070..b8b69c87 100644 --- a/juk/splashscreen.cpp +++ b/juk/splashscreen.cpp @@ -19,7 +19,7 @@ #include #include -#include +#include #include "splashscreen.h" @@ -27,10 +27,10 @@ SplashScreen *SplashScreen::splash = 0; bool SplashScreen::done = false; int SplashScreen::count = 0; -static QString loadedText(int i) +static TQString loadedText(int i) { - static QString loading = i18n("Loading").upper(); - return loading + ": " + QString::number(i);; + static TQString loading = i18n("Loading").upper(); + return loading + ": " + TQString::number(i);; } //////////////////////////////////////////////////////////////////////////////// @@ -70,18 +70,18 @@ void SplashScreen::update() // protected members //////////////////////////////////////////////////////////////////////////////// -SplashScreen::SplashScreen() : QLabel(0 , "splashScreen", Qt::WStyle_Splash) +SplashScreen::SplashScreen() : TQLabel(0 , "splashScreen", Qt::WStyle_Splash) { - QPixmap background = UserIcon("splash"); + TQPixmap background = UserIcon("splash"); resize(background.size()); setPaletteBackgroundPixmap(background); setMargin(7); setAlignment(AlignLeft | AlignBottom); - setPaletteForegroundColor(QColor(107, 158, 194)); + setPaletteForegroundColor(TQColor(107, 158, 194)); - QFont f = font(); + TQFont f = font(); f.setPixelSize(10); setFont(f); diff --git a/juk/splashscreen.h b/juk/splashscreen.h index 407ed509..eff0eec9 100644 --- a/juk/splashscreen.h +++ b/juk/splashscreen.h @@ -16,7 +16,7 @@ #ifndef SPLASHSCREEN_H #define SPLASHSCREEN_H -#include +#include /** * Well, all of this session restoration sure is fun, but it's starting to take diff --git a/juk/statuslabel.cpp b/juk/statuslabel.cpp index fa8dfb38..81f066ea 100644 --- a/juk/statuslabel.cpp +++ b/juk/statuslabel.cpp @@ -20,8 +20,8 @@ #include #include -#include -#include +#include +#include #include "statuslabel.h" #include "filehandle.h" @@ -35,57 +35,57 @@ using namespace ActionCollection; // public methods //////////////////////////////////////////////////////////////////////////////// -StatusLabel::StatusLabel(PlaylistInterface *playlist, QWidget *parent, const char *name) : - QHBox(parent, name), +StatusLabel::StatusLabel(PlaylistInterface *playlist, TQWidget *parent, const char *name) : + TQHBox(parent, name), PlaylistObserver(playlist), m_showTimeRemaining(false) { - QFrame *trackAndPlaylist = new QFrame(this); + TQFrame *trackAndPlaylist = new TQFrame(this); trackAndPlaylist->setFrameStyle(Box | Sunken); - trackAndPlaylist->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + trackAndPlaylist->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); // Make sure that we have enough of a margin to suffice for the borders, // hence the "lineWidth() * 2" - QHBoxLayout *trackAndPlaylistLayout = new QHBoxLayout(trackAndPlaylist, + TQHBoxLayout *trackAndPlaylistLayout = new TQHBoxLayout(trackAndPlaylist, trackAndPlaylist->lineWidth() * 2, 5, "trackAndPlaylistLayout"); trackAndPlaylistLayout->addSpacing(5); m_playlistLabel = new KSqueezedTextLabel(trackAndPlaylist, "playlistLabel"); trackAndPlaylistLayout->addWidget(m_playlistLabel); - m_playlistLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + m_playlistLabel->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); m_playlistLabel->setTextFormat(PlainText); m_playlistLabel->setAlignment(AlignLeft | AlignVCenter); m_trackLabel = new KSqueezedTextLabel(trackAndPlaylist, "trackLabel"); trackAndPlaylistLayout->addWidget(m_trackLabel); m_trackLabel->setAlignment(AlignRight | AlignVCenter); - m_trackLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + m_trackLabel->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); m_trackLabel->setTextFormat(PlainText); trackAndPlaylistLayout->addSpacing(5); - m_itemTimeLabel = new QLabel(this); - QFontMetrics fontMetrics(font()); + m_itemTimeLabel = new TQLabel(this); + TQFontMetrics fontMetrics(font()); m_itemTimeLabel->setAlignment(AlignCenter); m_itemTimeLabel->setMinimumWidth(fontMetrics.boundingRect("000:00 / 000:00").width()); - m_itemTimeLabel->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding); + m_itemTimeLabel->setSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Expanding); m_itemTimeLabel->setFrameStyle(Box | Sunken); m_itemTimeLabel->installEventFilter(this); setItemTotalTime(0); setItemCurrentTime(0); - QHBox *jumpBox = new QHBox(this); + TQHBox *jumpBox = new TQHBox(this); jumpBox->setFrameStyle(Box | Sunken); - jumpBox->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Minimum); + jumpBox->setSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::Minimum); - QPushButton *jumpButton = new QPushButton(jumpBox); + TQPushButton *jumpButton = new TQPushButton(jumpBox); jumpButton->setPixmap(SmallIcon("up")); jumpButton->setFlat(true); - QToolTip::add(jumpButton, i18n("Jump to the currently playing item")); - connect(jumpButton, SIGNAL(clicked()), action("showPlaying"), SLOT(activate())); + TQToolTip::add(jumpButton, i18n("Jump to the currently playing item")); + connect(jumpButton, TQT_SIGNAL(clicked()), action("showPlaying"), TQT_SLOT(activate())); installEventFilter(this); @@ -102,10 +102,10 @@ void StatusLabel::updateCurrent() if(playlist()->playing()) { FileHandle file = playlist()->currentFile(); - QString mid = file.tag()->artist().isEmpty() || file.tag()->title().isEmpty() - ? QString::null : QString(" - "); + TQString mid = file.tag()->artist().isEmpty() || file.tag()->title().isEmpty() + ? TQString::null : TQString(" - "); - QString text = file.tag()->artist() + mid + file.tag()->title(); + TQString text = file.tag()->artist() + mid + file.tag()->title(); m_trackLabel->setText(text); m_playlistLabel->setText(playlist()->name().simplifyWhiteSpace()); @@ -127,7 +127,7 @@ void StatusLabel::updateData() int minutes = time / 60 % 60; int seconds = time % 60; - QString timeString; + TQString timeString; if(days > 0) { timeString = i18n("1 day", "%n days", days); @@ -135,9 +135,9 @@ void StatusLabel::updateData() } if(days > 0 || hours > 0) - timeString.append(QString().sprintf("%1d:%02d:%02d", hours, minutes, seconds)); + timeString.append(TQString().sprintf("%1d:%02d:%02d", hours, minutes, seconds)); else - timeString.append(QString().sprintf("%1d:%02d", minutes, seconds)); + timeString.append(TQString().sprintf("%1d:%02d", minutes, seconds)); m_playlistLabel->setText(playlist()->name()); m_trackLabel->setText(i18n("1 item", "%n items", playlist()->count()) + " - " + timeString); @@ -165,18 +165,18 @@ void StatusLabel::updateTime() int totalMinutes = int(m_itemTotalTime / 60); int totalSeconds = m_itemTotalTime % 60; - QString timeString = formatTime(minutes, seconds) + " / " + + TQString timeString = formatTime(minutes, seconds) + " / " + formatTime(totalMinutes, totalSeconds); m_itemTimeLabel->setText(timeString); } -bool StatusLabel::eventFilter(QObject *o, QEvent *e) +bool StatusLabel::eventFilter(TQObject *o, TQEvent *e) { if(!o || !e) return false; - QMouseEvent *mouseEvent = static_cast(e); - if(e->type() == QEvent::MouseButtonRelease && + TQMouseEvent *mouseEvent = static_cast(e); + if(e->type() == TQEvent::MouseButtonRelease && mouseEvent->button() == LeftButton) { if(o == m_itemTimeLabel) { @@ -191,12 +191,12 @@ bool StatusLabel::eventFilter(QObject *o, QEvent *e) return false; } -QString StatusLabel::formatTime(int minutes, int seconds) // static +TQString StatusLabel::formatTime(int minutes, int seconds) // static { - QString m = QString::number(minutes); + TQString m = TQString::number(minutes); if(m.length() == 1) m = "0" + m; - QString s = QString::number(seconds); + TQString s = TQString::number(seconds); if(s.length() == 1) s = "0" + s; return m + ":" + s; diff --git a/juk/statuslabel.h b/juk/statuslabel.h index 6c733f21..ba519590 100644 --- a/juk/statuslabel.h +++ b/juk/statuslabel.h @@ -18,19 +18,19 @@ #include "playlistinterface.h" -#include +#include class QLabel; class KSqueezedTextLabel; class FileHandle; -class StatusLabel : public QHBox, public PlaylistObserver +class StatusLabel : public TQHBox, public PlaylistObserver { Q_OBJECT public: - StatusLabel(PlaylistInterface *playlist, QWidget *parent = 0, const char *name = 0); + StatusLabel(PlaylistInterface *playlist, TQWidget *parent = 0, const char *name = 0); virtual ~StatusLabel(); virtual void updateCurrent(); @@ -48,9 +48,9 @@ signals: private: void updateTime(); - virtual bool eventFilter(QObject *o, QEvent *e); + virtual bool eventFilter(TQObject *o, TQEvent *e); - static QString formatTime(int minutes, int seconds); + static TQString formatTime(int minutes, int seconds); int m_itemTotalTime; int m_itemCurrentTime; @@ -58,7 +58,7 @@ private: KSqueezedTextLabel *m_playlistLabel; KSqueezedTextLabel *m_trackLabel; - QLabel *m_itemTimeLabel; + TQLabel *m_itemTimeLabel; }; #endif diff --git a/juk/stringhash.h b/juk/stringhash.h index 75992eec..0d3c43bb 100644 --- a/juk/stringhash.h +++ b/juk/stringhash.h @@ -16,7 +16,7 @@ #ifndef STRINGHASH_H #define STRINGHASH_H -#include +#include #include "filehandle.h" @@ -49,7 +49,7 @@ public: */ bool remove(T value); - QValueList values() const; + TQValueList values() const; int hash(T key) const; @@ -108,7 +108,7 @@ protected: void deleteNode(Node *n); - QPtrVector m_table; + TQPtrVector m_table; static const int m_tableSize = 5003; }; @@ -116,12 +116,12 @@ protected: // helper functions //////////////////////////////////////////////////////////////////////////////// -inline char hashStringAccess(const QString &in, int index) +inline char hashStringAccess(const TQString &in, int index) { return in.unicode()[index].cell(); } -inline char hashStringAccess(const QCString &in, int index) +inline char hashStringAccess(const TQCString &in, int index) { return in[index]; } @@ -152,11 +152,11 @@ inline int hashString(const StringType &s) // StringHash -template<> inline int Hash::hash(QString key) const +template<> inline int Hash::hash(TQString key) const { return hashString(key) % tableSize(); } -typedef Hash StringHash; +typedef Hash StringHash; // PtrHash @@ -178,7 +178,7 @@ class FileHandleHash : public Hash public: FileHandleHash() : Hash() {} - FileHandle value(const QString &key) const + FileHandle value(const TQString &key) const { int h = hashString(key) % tableSize(); Node *i = m_table[h]; @@ -268,9 +268,9 @@ bool Hash::remove(T value) } template -QValueList Hash::values() const +TQValueList Hash::values() const { - QValueList l; + TQValueList l; Node *n; diff --git a/juk/stringshare.cpp b/juk/stringshare.cpp index ddd6a1ba..195fd64f 100644 --- a/juk/stringshare.cpp +++ b/juk/stringshare.cpp @@ -31,8 +31,8 @@ StringShare::Data* StringShare::s_data = 0; struct StringShare::Data { - QString qstringHash [SIZE]; - QCString qcstringHash[SIZE]; + TQString qstringHash [SIZE]; + TQCString qcstringHash[SIZE]; }; StringShare::Data* StringShare::data() @@ -42,7 +42,7 @@ StringShare::Data* StringShare::data() return s_data; } -QString StringShare::tryShare(const QString& in) +TQString StringShare::tryShare(const TQString& in) { int index = hashString(in) % SIZE; @@ -57,7 +57,7 @@ QString StringShare::tryShare(const QString& in) } } -QCString StringShare::tryShare(const QCString& in) +TQCString StringShare::tryShare(const TQCString& in) { int index = hashString(in) % SIZE; diff --git a/juk/stringshare.h b/juk/stringshare.h index 743b2c1e..3a53d038 100644 --- a/juk/stringshare.h +++ b/juk/stringshare.h @@ -16,7 +16,7 @@ #ifndef STRING_SHARE_H #define STRING_SHARE_H -#include +#include /** This class attempts to normalize repeated occurances of strings to use @@ -26,8 +26,8 @@ class StringShare { struct Data; public: - static QString tryShare(const QString& in); - static QCString tryShare(const QCString& in); + static TQString tryShare(const TQString& in); + static TQCString tryShare(const TQCString& in); private: static Data* data(); diff --git a/juk/systemtray.cpp b/juk/systemtray.cpp index 1691bc91..40cdd082 100644 --- a/juk/systemtray.cpp +++ b/juk/systemtray.cpp @@ -24,15 +24,15 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include @@ -45,59 +45,59 @@ using namespace ActionCollection; -static bool copyImage(QImage &dest, QImage &src, int x, int y); +static bool copyImage(TQImage &dest, TQImage &src, int x, int y); class FlickerFreeLabel : public QLabel { public: - FlickerFreeLabel(const QString &text, QWidget *parent, const char *name = 0) : - QLabel(text, parent, name) + FlickerFreeLabel(const TQString &text, TQWidget *parent, const char *name = 0) : + TQLabel(text, parent, name) { m_textColor = paletteForegroundColor(); m_bgColor = parentWidget()->paletteBackgroundColor(); setBackgroundMode(NoBackground); } - QColor textColor() const + TQColor textColor() const { return m_textColor; } - QColor backgroundColor() const + TQColor backgroundColor() const { return m_bgColor; } protected: - virtual void drawContents(QPainter *p) + virtual void drawContents(TQPainter *p) { // We want to intercept the drawContents call and draw on a pixmap // instead of the window to keep flicker to an absolute minimum. // Since Qt doesn't refresh the background, we need to do so // ourselves. - QPixmap pix(size()); - QPainter pixPainter(&pix); + TQPixmap pix(size()); + TQPainter pixPainter(&pix); pixPainter.fillRect(rect(), m_bgColor); - QLabel::drawContents(&pixPainter); + TQLabel::drawContents(&pixPainter); - bitBlt(p->device(), QPoint(0, 0), &pix, rect(), CopyROP); + bitBlt(p->device(), TQPoint(0, 0), &pix, rect(), CopyROP); } private: - QColor m_textColor; - QColor m_bgColor; + TQColor m_textColor; + TQColor m_bgColor; }; -PassiveInfo::PassiveInfo(QWidget *parent, const char *name) : - KPassivePopup(parent, name), m_timer(new QTimer), m_justDie(false) +PassiveInfo::PassiveInfo(TQWidget *parent, const char *name) : + KPassivePopup(parent, name), m_timer(new TQTimer), m_justDie(false) { // I'm so sick and tired of KPassivePopup screwing this up // that I'll just handle the timeout myself, thank you very much. KPassivePopup::setTimeout(0); - connect(m_timer, SIGNAL(timeout()), SLOT(timerExpired())); + connect(m_timer, TQT_SIGNAL(timeout()), TQT_SLOT(timerExpired())); } void PassiveInfo::setTimeout(int delay) @@ -121,13 +121,13 @@ void PassiveInfo::timerExpired() emit timeExpired(); } -void PassiveInfo::enterEvent(QEvent *) +void PassiveInfo::enterEvent(TQEvent *) { m_timer->stop(); emit mouseEntered(); } -void PassiveInfo::leaveEvent(QEvent *) +void PassiveInfo::leaveEvent(TQEvent *) { m_justDie = true; m_timer->start(50); @@ -137,7 +137,7 @@ void PassiveInfo::leaveEvent(QEvent *) // public methods //////////////////////////////////////////////////////////////////////////////// -SystemTray::SystemTray(QWidget *parent, const char *name) : KSystemTray(parent, name), +SystemTray::SystemTray(TQWidget *parent, const char *name) : KSystemTray(parent, name), m_popup(0), m_fadeTimer(0), m_fade(true) @@ -163,13 +163,13 @@ SystemTray::SystemTray(QWidget *parent, const char *name) : KSystemTray(parent, // bindings dialog. new KAction(i18n("Redisplay Popup"), KShortcut(), this, - SLOT(slotPlay()), actions(), "showPopup"); + TQT_SLOT(slotPlay()), actions(), "showPopup"); KPopupMenu *cm = contextMenu(); - connect(PlayerManager::instance(), SIGNAL(signalPlay()), this, SLOT(slotPlay())); - connect(PlayerManager::instance(), SIGNAL(signalPause()), this, SLOT(slotPause())); - connect(PlayerManager::instance(), SIGNAL(signalStop()), this, SLOT(slotStop())); + connect(PlayerManager::instance(), TQT_SIGNAL(signalPlay()), this, TQT_SLOT(slotPlay())); + connect(PlayerManager::instance(), TQT_SIGNAL(signalPause()), this, TQT_SLOT(slotPause())); + connect(PlayerManager::instance(), TQT_SIGNAL(signalStop()), this, TQT_SLOT(slotStop())); action("play")->plug(cm); action("pause")->plug(cm); @@ -189,8 +189,8 @@ SystemTray::SystemTray(QWidget *parent, const char *name) : KSystemTray(parent, action("togglePopups")->plug(cm); - m_fadeTimer = new QTimer(this, "systrayFadeTimer"); - connect(m_fadeTimer, SIGNAL(timeout()), SLOT(slotNextStep())); + m_fadeTimer = new TQTimer(this, "systrayFadeTimer"); + connect(m_fadeTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotNextStep())); if(PlayerManager::instance()->playing()) slotPlay(); @@ -212,7 +212,7 @@ void SystemTray::slotPlay() if(!PlayerManager::instance()->playing()) return; - QPixmap cover = PlayerManager::instance()->playingFile().coverInfo()->pixmap(CoverInfo::Thumbnail); + TQPixmap cover = PlayerManager::instance()->playingFile().coverInfo()->pixmap(CoverInfo::Thumbnail); setPixmap(m_playPix); setToolTip(PlayerManager::instance()->playingString(), cover); @@ -253,7 +253,7 @@ void SystemTray::slotPopupDestroyed() void SystemTray::slotNextStep() { - QColor result; + TQColor result; ++m_step; @@ -278,8 +278,8 @@ void SystemTray::slotFadeOut() m_startColor = m_labels[0]->textColor(); m_endColor = m_labels[0]->backgroundColor(); - connect(this, SIGNAL(fadeDone()), m_popup, SLOT(hide())); - connect(m_popup, SIGNAL(mouseEntered()), this, SLOT(slotMouseInPopup())); + connect(this, TQT_SIGNAL(fadeDone()), m_popup, TQT_SLOT(hide())); + connect(m_popup, TQT_SIGNAL(mouseEntered()), this, TQT_SLOT(slotMouseInPopup())); m_fadeTimer->start(1500 / STEPS); } @@ -289,7 +289,7 @@ void SystemTray::slotFadeOut() void SystemTray::slotMouseInPopup() { m_endColor = m_labels[0]->textColor(); - disconnect(SIGNAL(fadeDone())); + disconnect(TQT_SIGNAL(fadeDone())); m_step = STEPS - 1; // Simulate end of fade to solid text slotNextStep(); @@ -299,9 +299,9 @@ void SystemTray::slotMouseInPopup() // private methods //////////////////////////////////////////////////////////////////////////////// -QVBox *SystemTray::createPopupLayout(QWidget *parent, const FileHandle &file) +TQVBox *SystemTray::createPopupLayout(TQWidget *parent, const FileHandle &file) { - QVBox *infoBox = 0; + TQVBox *infoBox = 0; if(buttonsToLeft()) { @@ -310,7 +310,7 @@ QVBox *SystemTray::createPopupLayout(QWidget *parent, const FileHandle &file) createButtonBox(parent); addSeparatorLine(parent); - infoBox = new QVBox(parent); + infoBox = new TQVBox(parent); // Another line, and the cover, if there's a cover, and if // it's selected to be shown @@ -329,7 +329,7 @@ QVBox *SystemTray::createPopupLayout(QWidget *parent, const FileHandle &file) addSeparatorLine(parent); } - infoBox = new QVBox(parent); + infoBox = new TQVBox(parent); addSeparatorLine(parent); createButtonBox(parent); @@ -360,13 +360,13 @@ void SystemTray::createPopup() m_step = 0; m_popup = new PassiveInfo(this); - connect(m_popup, SIGNAL(destroyed()), SLOT(slotPopupDestroyed())); - connect(m_popup, SIGNAL(timeExpired()), SLOT(slotFadeOut())); + connect(m_popup, TQT_SIGNAL(destroyed()), TQT_SLOT(slotPopupDestroyed())); + connect(m_popup, TQT_SIGNAL(timeExpired()), TQT_SLOT(slotFadeOut())); - QHBox *box = new QHBox(m_popup, "popupMainLayout"); + TQHBox *box = new TQHBox(m_popup, "popupMainLayout"); box->setSpacing(15); // Add space between text and buttons - QVBox *infoBox = createPopupLayout(box, playingFile); + TQVBox *infoBox = createPopupLayout(box, playingFile); for(unsigned i = 0; i < m_labels.capacity(); ++i) { m_labels[i] = new FlickerFreeLabel(" ", infoBox); @@ -384,17 +384,17 @@ void SystemTray::createPopup() int labelCount = 0; - QString title = QStyleSheet::escape(playingInfo->title()); - m_labels[labelCount++]->setText(QString("

%1

").arg(title)); + TQString title = TQStyleSheet::escape(playingInfo->title()); + m_labels[labelCount++]->setText(TQString("

%1

").arg(title)); if(!playingInfo->artist().isEmpty()) m_labels[labelCount++]->setText(playingInfo->artist()); if(!playingInfo->album().isEmpty()) { - QString album = QStyleSheet::escape(playingInfo->album()); - QString s = playingInfo->year() > 0 - ? QString("%1 (%2)").arg(album).arg(playingInfo->year()) - : QString("%1").arg(album); + TQString album = TQStyleSheet::escape(playingInfo->album()); + TQString s = playingInfo->year() > 0 + ? TQString("%1 (%2)").arg(album).arg(playingInfo->year()) + : TQString("%1").arg(album); m_labels[labelCount++]->setText(s); } @@ -417,20 +417,20 @@ bool SystemTray::buttonsToLeft() const NETRect frame, win; ni.kdeGeometry(frame, win); - QRect bounds = KGlobalSettings::desktopGeometry(QPoint(win.pos.x, win.pos.y)); + TQRect bounds = KGlobalSettings::desktopGeometry(TQPoint(win.pos.x, win.pos.y)); // This seems to accurately guess what side of the icon that // KPassivePopup will popup on. return(win.pos.x < bounds.center().x()); } -QPixmap SystemTray::createPixmap(const QString &pixName) +TQPixmap SystemTray::createPixmap(const TQString &pixName) { - QPixmap bgPix = m_appPix; - QPixmap fgPix = SmallIcon(pixName); + TQPixmap bgPix = m_appPix; + TQPixmap fgPix = SmallIcon(pixName); - QImage bgImage = bgPix.convertToImage(); // Probably 22x22 - QImage fgImage = fgPix.convertToImage(); // Should be 16x16 + TQImage bgImage = bgPix.convertToImage(); // Probably 22x22 + TQImage fgImage = fgPix.convertToImage(); // Should be 16x16 KIconEffect::semiTransparent(bgImage); copyImage(bgImage, fgImage, (bgImage.width() - fgImage.width()) / 2, @@ -440,19 +440,19 @@ QPixmap SystemTray::createPixmap(const QString &pixName) return bgPix; } -void SystemTray::createButtonBox(QWidget *parent) +void SystemTray::createButtonBox(TQWidget *parent) { - QVBox *buttonBox = new QVBox(parent); + TQVBox *buttonBox = new TQVBox(parent); buttonBox->setSpacing(3); - QPushButton *forwardButton = new QPushButton(m_forwardPix, 0, buttonBox, "popup_forward"); + TQPushButton *forwardButton = new TQPushButton(m_forwardPix, 0, buttonBox, "popup_forward"); forwardButton->setFlat(true); - connect(forwardButton, SIGNAL(clicked()), SLOT(slotForward())); + connect(forwardButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotForward())); - QPushButton *backButton = new QPushButton(m_backPix, 0, buttonBox, "popup_back"); + TQPushButton *backButton = new TQPushButton(m_backPix, 0, buttonBox, "popup_back"); backButton->setFlat(true); - connect(backButton, SIGNAL(clicked()), SLOT(slotBack())); + connect(backButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotBack())); } /** @@ -472,10 +472,10 @@ void SystemTray::slotForward() m_fade = false; } -void SystemTray::addSeparatorLine(QWidget *parent) +void SystemTray::addSeparatorLine(TQWidget *parent) { - QFrame *line = new QFrame(parent); - line->setFrameShape(QFrame::VLine); + TQFrame *line = new TQFrame(parent); + line->setFrameShape(TQFrame::VLine); // Cover art takes up 80 pixels, make sure we take up at least 80 pixels // even if we don't show the cover art for consistency. @@ -483,18 +483,18 @@ void SystemTray::addSeparatorLine(QWidget *parent) line->setMinimumHeight(80); } -void SystemTray::addCoverButton(QWidget *parent, const QPixmap &cover) +void SystemTray::addCoverButton(TQWidget *parent, const TQPixmap &cover) { - QPushButton *coverButton = new QPushButton(parent); + TQPushButton *coverButton = new TQPushButton(parent); coverButton->setPixmap(cover); coverButton->setFixedSize(cover.size()); coverButton->setFlat(true); - connect(coverButton, SIGNAL(clicked()), this, SLOT(slotPopupLargeCover())); + connect(coverButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotPopupLargeCover())); } -QColor SystemTray::interpolateColor(int step, int steps) +TQColor SystemTray::interpolateColor(int step, int steps) { if(step < 0) return m_startColor; @@ -504,41 +504,41 @@ QColor SystemTray::interpolateColor(int step, int steps) // TODO: Perhaps the algorithm here could be better? For example, it might // make sense to go rather quickly from start to end and then slow down // the progression. - return QColor( + return TQColor( (step * m_endColor.red() + (steps - step) * m_startColor.red()) / steps, (step * m_endColor.green() + (steps - step) * m_startColor.green()) / steps, (step * m_endColor.blue() + (steps - step) * m_startColor.blue()) / steps ); } -void SystemTray::setToolTip(const QString &tip, const QPixmap &cover) +void SystemTray::setToolTip(const TQString &tip, const TQPixmap &cover) { - QToolTip::remove(this); + TQToolTip::remove(this); if(tip.isNull()) - QToolTip::add(this, i18n("JuK")); + TQToolTip::add(this, i18n("JuK")); else { - QPixmap myCover = cover; + TQPixmap myCover = cover; if(cover.isNull()) myCover = DesktopIcon("juk"); - QImage coverImage = myCover.convertToImage(); + TQImage coverImage = myCover.convertToImage(); if(coverImage.size().width() > 32 || coverImage.size().height() > 32) coverImage = coverImage.smoothScale(32, 32); - QMimeSourceFactory::defaultFactory()->setImage("tipCover", coverImage); + TQMimeSourceFactory::defaultFactory()->setImage("tipCover", coverImage); - QString html = i18n("%1 is Cover Art, %2 is the playing track, %3 is the appname", + TQString html = i18n("%1 is Cover Art, %2 is the playing track, %3 is the appname", "
" "
%1%2
%3
"); html = html.arg("%1").arg(tip), i18n("JuK")); + html = html.arg(TQString("%1").arg(tip), i18n("JuK")); - QToolTip::add(this, html); + TQToolTip::add(this, html); } } -void SystemTray::wheelEvent(QWheelEvent *e) +void SystemTray::wheelEvent(TQWheelEvent *e) { if(e->orientation() == Horizontal) return; @@ -568,7 +568,7 @@ void SystemTray::wheelEvent(QWheelEvent *e) /* * Reimplemented this in order to use the middle mouse button */ -void SystemTray::mousePressEvent(QMouseEvent *e) +void SystemTray::mousePressEvent(TQMouseEvent *e) { switch(e->button()) { case LeftButton: @@ -590,10 +590,10 @@ void SystemTray::mousePressEvent(QMouseEvent *e) /* * This function copies the entirety of src into dest, starting in * dest at x and y. This function exists because I was unable to find - * a function like it in either QImage or kdefx + * a function like it in either TQImage or kdefx */ -static bool copyImage(QImage &dest, QImage &src, int x, int y) +static bool copyImage(TQImage &dest, TQImage &src, int x, int y) { if(dest.depth() != src.depth()) return false; @@ -605,7 +605,7 @@ static bool copyImage(QImage &dest, QImage &src, int x, int y) // We want to use KIconEffect::overlay to do this, since it handles // alpha, but the images need to be the same size. We can handle that. - QImage large_src(dest); + TQImage large_src(dest); // It would perhaps be better to create large_src based on a size, but // this is the easiest way to make a new image with the same depth, size, diff --git a/juk/systemtray.h b/juk/systemtray.h index 8dd66a62..34e638c8 100644 --- a/juk/systemtray.h +++ b/juk/systemtray.h @@ -21,8 +21,8 @@ #include #include -#include -#include +#include +#include class FlickerFreeLabel; class QTimer; @@ -39,7 +39,7 @@ class PassiveInfo : public KPassivePopup { Q_OBJECT public: - PassiveInfo(QWidget *parent = 0, const char *name = 0); + PassiveInfo(TQWidget *parent = 0, const char *name = 0); public slots: void setTimeout(int delay); @@ -50,14 +50,14 @@ signals: void timeExpired(); protected: - virtual void enterEvent(QEvent *); - virtual void leaveEvent(QEvent *); + virtual void enterEvent(TQEvent *); + virtual void leaveEvent(TQEvent *); private slots: void timerExpired(); private: - QTimer *m_timer; + TQTimer *m_timer; bool m_justDie; }; @@ -66,7 +66,7 @@ class SystemTray : public KSystemTray Q_OBJECT public: - SystemTray(QWidget *parent = 0, const char *name = 0); + SystemTray(TQWidget *parent = 0, const char *name = 0); virtual ~SystemTray(); signals: @@ -76,30 +76,30 @@ signals: private: static const int STEPS = 20; ///< Number of intermediate steps for fading. - virtual void wheelEvent(QWheelEvent *e); + virtual void wheelEvent(TQWheelEvent *e); void createPopup(); - void setToolTip(const QString &tip = QString::null, const QPixmap &cover = QPixmap()); - void mousePressEvent(QMouseEvent *e); - QPixmap createPixmap(const QString &pixName); + void setToolTip(const TQString &tip = TQString::null, const TQPixmap &cover = TQPixmap()); + void mousePressEvent(TQMouseEvent *e); + TQPixmap createPixmap(const TQString &pixName); // Returns true if the popup will need to have its buttons on the left // (because the JuK icon is on the left side of the screen. bool buttonsToLeft() const; - void createButtonBox(QWidget *parent); + void createButtonBox(TQWidget *parent); - // Creates the widget layout for the popup, returning the QVBox that + // Creates the widget layout for the popup, returning the TQVBox that // holds the text labels. Uses buttonsToLeft() to figure out which // order to create them in. @p file is used to grab the cover. - QVBox *createPopupLayout(QWidget *parent, const FileHandle &file); + TQVBox *createPopupLayout(TQWidget *parent, const FileHandle &file); - void addSeparatorLine(QWidget *parent); - void addCoverButton(QWidget *parent, const QPixmap &cover); + void addSeparatorLine(TQWidget *parent); + void addCoverButton(TQWidget *parent, const TQPixmap &cover); // Interpolates from start color to end color. If @p step == 0, then // m_startColor is returned, while @p step == @steps returns // m_endColor. - QColor interpolateColor(int step, int steps = STEPS); + TQColor interpolateColor(int step, int steps = STEPS); private slots: void slotPlay(); @@ -115,17 +115,17 @@ private slots: void slotMouseInPopup(); ///< Forces the text back to its normal color. private: - QPixmap m_playPix; - QPixmap m_pausePix; - QPixmap m_currentPix; - QPixmap m_backPix; - QPixmap m_forwardPix; - QPixmap m_appPix; - QColor m_startColor, m_endColor; + TQPixmap m_playPix; + TQPixmap m_pausePix; + TQPixmap m_currentPix; + TQPixmap m_backPix; + TQPixmap m_forwardPix; + TQPixmap m_appPix; + TQColor m_startColor, m_endColor; PassiveInfo *m_popup; - QValueVector m_labels; - QTimer *m_fadeTimer; + TQValueVector m_labels; + TQTimer *m_fadeTimer; int m_step; bool m_fade; }; diff --git a/juk/tag.cpp b/juk/tag.cpp index 972b9284..802567dd 100644 --- a/juk/tag.cpp +++ b/juk/tag.cpp @@ -15,8 +15,8 @@ #include -#include -#include +#include +#include #include #include @@ -46,7 +46,7 @@ //////////////////////////////////////////////////////////////////////////////// -Tag::Tag(const QString &fileName) : +Tag::Tag(const TQString &fileName) : m_fileName(fileName), m_track(0), m_year(0), @@ -59,33 +59,33 @@ Tag::Tag(const QString &fileName) : qDebug("Reading tag for %s", fileName.local8Bit().data()); if(MediaFiles::isMP3(fileName)) { - TagLib::MPEG::File file(QFile::encodeName(fileName).data()); + TagLib::MPEG::File file(TQFile::encodeName(fileName).data()); if(file.isValid()) setup(&file); } else if(MediaFiles::isFLAC(fileName)) { - TagLib::FLAC::File file(QFile::encodeName(fileName).data()); + TagLib::FLAC::File file(TQFile::encodeName(fileName).data()); if(file.isValid()) setup(&file); } #ifdef TAGLIB_1_3 else if(MediaFiles::isMPC(fileName)) { kdDebug(65432) << "Trying to resolve Musepack file" << endl; - TagLib::MPC::File file(QFile::encodeName(fileName).data()); + TagLib::MPC::File file(TQFile::encodeName(fileName).data()); if(file.isValid()) setup(&file); } #endif #ifdef TAGLIB_1_2 else if(MediaFiles::isOggFLAC(fileName)) { - TagLib::Ogg::FLAC::File file(QFile::encodeName(fileName).data()); + TagLib::Ogg::FLAC::File file(TQFile::encodeName(fileName).data()); if(file.isValid()) setup(&file); } #endif else if(MediaFiles::isVorbis(fileName)) { - TagLib::Vorbis::File file(QFile::encodeName(fileName).data()); + TagLib::Vorbis::File file(TQFile::encodeName(fileName).data()); if(file.isValid()) setup(&file); } @@ -104,19 +104,19 @@ bool Tag::save() TagLib::File *file = 0; if(MediaFiles::isMP3(m_fileName)) - file = new TagLib::MPEG::File(QFile::encodeName(m_fileName).data()); + file = new TagLib::MPEG::File(TQFile::encodeName(m_fileName).data()); else if(MediaFiles::isFLAC(m_fileName)) - file = new TagLib::FLAC::File(QFile::encodeName(m_fileName).data()); + file = new TagLib::FLAC::File(TQFile::encodeName(m_fileName).data()); #ifdef TAGLIB_1_3 else if(MediaFiles::isMPC(m_fileName)) - file = new TagLib::MPC::File(QFile::encodeName(m_fileName).data()); + file = new TagLib::MPC::File(TQFile::encodeName(m_fileName).data()); #endif #ifdef TAGLIB_1_2 else if(MediaFiles::isOggFLAC(m_fileName)) - file = new TagLib::Ogg::FLAC::File(QFile::encodeName(m_fileName).data()); + file = new TagLib::Ogg::FLAC::File(TQFile::encodeName(m_fileName).data()); #endif else if(MediaFiles::isVorbis(m_fileName)) - file = new TagLib::Vorbis::File(QFile::encodeName(m_fileName).data()); + file = new TagLib::Vorbis::File(TQFile::encodeName(m_fileName).data()); if(file && file->isValid() && file->tag() && !file->readOnly()) { file->tag()->setTitle(QStringToTString(m_title)); @@ -169,9 +169,9 @@ CacheDataStream &Tag::read(CacheDataStream &s) break; } default: { - static QString dummyString; + static TQString dummyString; static int dummyInt; - QString bitrateString; + TQString bitrateString; s >> dummyInt >> m_title @@ -214,7 +214,7 @@ CacheDataStream &Tag::read(CacheDataStream &s) // private methods //////////////////////////////////////////////////////////////////////////////// -Tag::Tag(const QString &fileName, bool) : +Tag::Tag(const TQString &fileName, bool) : m_fileName(fileName), m_track(0), m_year(0), @@ -242,7 +242,7 @@ void Tag::setup(TagLib::File *file) const int seconds = m_seconds % 60; const int minutes = (m_seconds - seconds) / 60; - m_lengthString = QString::number(minutes) + (seconds >= 10 ? ":" : ":0") + QString::number(seconds); + m_lengthString = TQString::number(minutes) + (seconds >= 10 ? ":" : ":0") + TQString::number(seconds); if(m_title.isEmpty()) { int i = m_fileName.findRev('/'); @@ -257,7 +257,7 @@ void Tag::setup(TagLib::File *file) // related functions //////////////////////////////////////////////////////////////////////////////// -QDataStream &operator<<(QDataStream &s, const Tag &t) +TQDataStream &operator<<(TQDataStream &s, const Tag &t) { s << t.title() << t.artist() diff --git a/juk/tag.h b/juk/tag.h index 66c01d1e..c37e9b3c 100644 --- a/juk/tag.h +++ b/juk/tag.h @@ -16,7 +16,7 @@ #ifndef TAG_H #define TAG_H -#include +#include namespace TagLib { class File; } @@ -31,33 +31,33 @@ class Tag { friend class FileHandle; public: - Tag(const QString &fileName); + Tag(const TQString &fileName); /** * Create an empty tag. Used in FileHandle for cache restoration. */ - Tag(const QString &fileName, bool); + Tag(const TQString &fileName, bool); bool save(); - QString title() const { return m_title; } - QString artist() const { return m_artist; } - QString album() const { return m_album; } - QString genre() const { return m_genre; } + TQString title() const { return m_title; } + TQString artist() const { return m_artist; } + TQString album() const { return m_album; } + TQString genre() const { return m_genre; } int track() const { return m_track; } int year() const { return m_year; } - QString comment() const { return m_comment; } + TQString comment() const { return m_comment; } - QString fileName() const { return m_fileName; } + TQString fileName() const { return m_fileName; } - void setTitle(const QString &value) { m_title = value; } - void setArtist(const QString &value) { m_artist = value; } - void setAlbum(const QString &value) { m_album = value; } - void setGenre(const QString &value) { m_genre = value; } + void setTitle(const TQString &value) { m_title = value; } + void setArtist(const TQString &value) { m_artist = value; } + void setAlbum(const TQString &value) { m_album = value; } + void setGenre(const TQString &value) { m_genre = value; } void setTrack(int value) { m_track = value; } void setYear(int value) { m_year = value; } - void setComment(const QString &value) { m_comment = value; } + void setComment(const TQString &value) { m_comment = value; } - void setFileName(const QString &value) { m_fileName = value; } + void setFileName(const TQString &value) { m_fileName = value; } int seconds() const { return m_seconds; } int bitrate() const { return m_bitrate; } @@ -68,28 +68,28 @@ public: * As a convenience, since producing a length string from a number of second * isn't a one liner, provide the lenght in string form. */ - QString lengthString() const { return m_lengthString; } + TQString lengthString() const { return m_lengthString; } CacheDataStream &read(CacheDataStream &s); private: void setup(TagLib::File *file); - QString m_fileName; - QString m_title; - QString m_artist; - QString m_album; - QString m_genre; - QString m_comment; + TQString m_fileName; + TQString m_title; + TQString m_artist; + TQString m_album; + TQString m_genre; + TQString m_comment; int m_track; int m_year; int m_seconds; int m_bitrate; - QDateTime m_modificationTime; - QString m_lengthString; + TQDateTime m_modificationTime; + TQString m_lengthString; bool m_isValid; }; -QDataStream &operator<<(QDataStream &s, const Tag &t); +TQDataStream &operator<<(TQDataStream &s, const Tag &t); CacheDataStream &operator>>(CacheDataStream &s, Tag &t); #endif diff --git a/juk/tageditor.cpp b/juk/tageditor.cpp index a9bc764d..449f4392 100644 --- a/juk/tageditor.cpp +++ b/juk/tageditor.cpp @@ -31,14 +31,14 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include @@ -49,15 +49,15 @@ using namespace ActionCollection; class FileNameValidator : public QValidator { public: - FileNameValidator(QObject *parent, const char *name = 0) : - QValidator(parent, name) {} + FileNameValidator(TQObject *parent, const char *name = 0) : + TQValidator(parent, name) {} - virtual void fixup(QString &s) const + virtual void fixup(TQString &s) const { s.remove('/'); } - virtual State validate(QString &s, int &) const + virtual State validate(TQString &s, int &) const { if(s.find('/') != -1) return Invalid; @@ -68,10 +68,10 @@ public: class FileBoxToolTip : public QToolTip { public: - FileBoxToolTip(TagEditor *editor, QWidget *widget) : - QToolTip(widget), m_editor(editor) {} + FileBoxToolTip(TagEditor *editor, TQWidget *widget) : + TQToolTip(widget), m_editor(editor) {} protected: - virtual void maybeTip(const QPoint &) + virtual void maybeTip(const TQPoint &) { tip(parentWidget()->rect(), m_editor->items().first()->file().absFilePath()); } @@ -82,19 +82,19 @@ private: class FixedHLayout : public QHBoxLayout { public: - FixedHLayout(QWidget *parent, int margin = 0, int spacing = -1, const char *name = 0) : - QHBoxLayout(parent, margin, spacing, name), + FixedHLayout(TQWidget *parent, int margin = 0, int spacing = -1, const char *name = 0) : + TQHBoxLayout(parent, margin, spacing, name), m_width(-1) {} - FixedHLayout(QLayout *parentLayout, int spacing = -1, const char *name = 0) : - QHBoxLayout(parentLayout, spacing, name), + FixedHLayout(TQLayout *parentLayout, int spacing = -1, const char *name = 0) : + TQHBoxLayout(parentLayout, spacing, name), m_width(-1) {} void setWidth(int w = -1) { - m_width = w == -1 ? QHBoxLayout::minimumSize().width() : w; + m_width = w == -1 ? TQHBoxLayout::minimumSize().width() : w; } - virtual QSize minimumSize() const + virtual TQSize minimumSize() const { - QSize s = QHBoxLayout::minimumSize(); + TQSize s = TQHBoxLayout::minimumSize(); s.setWidth(m_width); return s; } @@ -127,8 +127,8 @@ private: // public members //////////////////////////////////////////////////////////////////////////////// -TagEditor::TagEditor(QWidget *parent, const char *name) : - QWidget(parent, name), +TagEditor::TagEditor(TQWidget *parent, const char *name) : + TQWidget(parent, name), m_currentPlaylist(0), m_observer(0), m_performingSave(false) @@ -172,8 +172,8 @@ void TagEditor::slotSetItems(const PlaylistItemList &list) saveChangesPrompt(); if(m_currentPlaylist) { - disconnect(m_currentPlaylist, SIGNAL(signalAboutToRemove(PlaylistItem *)), - this, SLOT(slotItemRemoved(PlaylistItem *))); + disconnect(m_currentPlaylist, TQT_SIGNAL(signalAboutToRemove(PlaylistItem *)), + this, TQT_SLOT(slotItemRemoved(PlaylistItem *))); } if(hadPlaylist && !m_currentPlaylist || !itemPlaylist) { @@ -189,9 +189,9 @@ void TagEditor::slotSetItems(const PlaylistItemList &list) } if(m_currentPlaylist) { - connect(m_currentPlaylist, SIGNAL(signalAboutToRemove(PlaylistItem *)), - this, SLOT(slotItemRemoved(PlaylistItem *))); - connect(m_currentPlaylist, SIGNAL(destroyed()), this, SLOT(slotPlaylistRemoved())); + connect(m_currentPlaylist, TQT_SIGNAL(signalAboutToRemove(PlaylistItem *)), + this, TQT_SLOT(slotItemRemoved(PlaylistItem *))); + connect(m_currentPlaylist, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotPlaylistRemoved())); } if(isVisible()) @@ -221,7 +221,7 @@ void TagEditor::slotRefresh() Tag *tag = item->file().tag(); - QFileInfo fi(item->file().absFilePath()); + TQFileInfo fi(item->file().absFilePath()); if(!fi.isWritable() && m_items.count() == 1) setEnabled(false); @@ -231,7 +231,7 @@ void TagEditor::slotRefresh() m_fileNameBox->setText(item->file().fileInfo().fileName()); new FileBoxToolTip(this, m_fileNameBox); - m_bitrateBox->setText(QString::number(tag->bitrate())); + m_bitrateBox->setText(TQString::number(tag->bitrate())); m_lengthBox->setText(tag->lengthString()); if(m_genreList.findIndex(tag->genre()) >= 0) @@ -255,7 +255,7 @@ void TagEditor::slotRefresh() if(it != m_items.end()) { - QValueListIterator hideIt = m_hideList.begin(); + TQValueListIterator hideIt = m_hideList.begin(); for(; hideIt != m_hideList.end(); ++hideIt) (*hideIt)->hide(); @@ -335,7 +335,7 @@ void TagEditor::slotRefresh() else { // Clean up in the case that we are only handling one item. - QValueListIterator showIt = m_hideList.begin(); + TQValueListIterator showIt = m_hideList.begin(); for(; showIt != m_hideList.end(); ++showIt) (*showIt)->show(); @@ -379,13 +379,13 @@ void TagEditor::updateCollection() if(!list) return; - QStringList artistList = list->uniqueSet(CollectionList::Artists); + TQStringList artistList = list->uniqueSet(CollectionList::Artists); artistList.sort(); m_artistNameBox->listBox()->clear(); m_artistNameBox->listBox()->insertStringList(artistList); m_artistNameBox->completionObject()->setItems(artistList); - QStringList albumList = list->uniqueSet(CollectionList::Albums); + TQStringList albumList = list->uniqueSet(CollectionList::Albums); albumList.sort(); m_albumNameBox->listBox()->clear(); m_albumNameBox->listBox()->insertStringList(albumList); @@ -397,7 +397,7 @@ void TagEditor::updateCollection() m_genreList = list->uniqueSet(CollectionList::Genres); - for(QStringList::ConstIterator it = m_genreList.begin(); it != m_genreList.end(); ++it) + for(TQStringList::ConstIterator it = m_genreList.begin(); it != m_genreList.end(); ++it) genreHash.insert(*it); TagLib::StringList genres = TagLib::ID3v1::genreList(); @@ -409,7 +409,7 @@ void TagEditor::updateCollection() m_genreList.sort(); m_genreBox->listBox()->clear(); - m_genreBox->listBox()->insertItem(QString::null); + m_genreBox->listBox()->insertItem(TQString::null); m_genreBox->listBox()->insertStringList(m_genreList); m_genreBox->completionObject()->setItems(m_genreList); } @@ -440,12 +440,12 @@ void TagEditor::readConfig() m_genreList.sort(); m_genreBox->clear(); - m_genreBox->insertItem(QString::null); + m_genreBox->insertItem(TQString::null); m_genreBox->insertStringList(m_genreList); m_genreBox->completionObject()->setItems(m_genreList); } -void TagEditor::readCompletionMode(KConfigBase *config, KComboBox *box, const QString &key) +void TagEditor::readCompletionMode(KConfigBase *config, KComboBox *box, const TQString &key) { KGlobalSettings::Completion mode = KGlobalSettings::Completion(config->readNumEntry(key, KGlobalSettings::CompletionAuto)); @@ -471,9 +471,9 @@ void TagEditor::setupActions() { KToggleAction *show = new KToggleAction(i18n("Show &Tag Editor"), "edit", 0, actions(), "showEditor"); show->setCheckedState(i18n("Hide &Tag Editor")); - connect(show, SIGNAL(toggled(bool)), this, SLOT(setShown(bool))); + connect(show, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(setShown(bool))); - new KAction(i18n("&Save"), "filesave", "CTRL+t", this, SLOT(slotSave()), actions(), "saveItem"); + new KAction(i18n("&Save"), "filesave", "CTRL+t", this, TQT_SLOT(slotSave()), actions(), "saveItem"); } void TagEditor::setupLayout() @@ -481,13 +481,13 @@ void TagEditor::setupLayout() static const int horizontalSpacing = 12; static const int verticalSpacing = 2; - QHBoxLayout *layout = new QHBoxLayout(this, 6, horizontalSpacing); + TQHBoxLayout *layout = new TQHBoxLayout(this, 6, horizontalSpacing); ////////////////////////////////////////////////////////////////////////////// // define two columns of the bottem layout ////////////////////////////////////////////////////////////////////////////// - QVBoxLayout *leftColumnLayout = new QVBoxLayout(layout, verticalSpacing); - QVBoxLayout *rightColumnLayout = new QVBoxLayout(layout, verticalSpacing); + TQVBoxLayout *leftColumnLayout = new TQVBoxLayout(layout, verticalSpacing); + TQVBoxLayout *rightColumnLayout = new TQVBoxLayout(layout, verticalSpacing); layout->setStretchFactor(leftColumnLayout, 2); layout->setStretchFactor(rightColumnLayout, 3); @@ -512,23 +512,23 @@ void TagEditor::setupLayout() addItem(i18n("&Genre:"), m_genreBox, leftColumnLayout, "knotify"); // this fills the space at the bottem of the left column - leftColumnLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Minimum, - QSizePolicy::Expanding)); + leftColumnLayout->addItem(new TQSpacerItem(0, 0, TQSizePolicy::Minimum, + TQSizePolicy::Expanding)); } ////////////////////////////////////////////////////////////////////////////// // put stuff in the right column ////////////////////////////////////////////////////////////////////////////// { // just for organization - QHBoxLayout *fileNameLayout = new QHBoxLayout(rightColumnLayout, + TQHBoxLayout *fileNameLayout = new TQHBoxLayout(rightColumnLayout, horizontalSpacing); m_fileNameBox = new KLineEdit(this, "fileNameBox"); m_fileNameBox->setValidator(new FileNameValidator(m_fileNameBox)); - QLabel *fileNameIcon = new QLabel(this); + TQLabel *fileNameIcon = new TQLabel(this); fileNameIcon->setPixmap(SmallIcon("sound")); - QWidget *fileNameLabel = addHidden(new QLabel(m_fileNameBox, i18n("&File name:"), this)); + TQWidget *fileNameLabel = addHidden(new TQLabel(m_fileNameBox, i18n("&File name:"), this)); fileNameLayout->addWidget(addHidden(fileNameIcon)); fileNameLayout->addWidget(fileNameLabel); @@ -545,17 +545,17 @@ void TagEditor::setupLayout() addItem(i18n("T&rack:"), m_trackSpin, trackRowLayout); m_trackSpin->installEventFilter(this); - trackRowLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, - QSizePolicy::Minimum)); + trackRowLayout->addItem(new TQSpacerItem(0, 0, TQSizePolicy::Expanding, + TQSizePolicy::Minimum)); m_yearSpin = new KIntSpinBox(0, 9999, 1, 0, 10, this, "yearSpin"); addItem(i18n("&Year:"), m_yearSpin, trackRowLayout); m_yearSpin->installEventFilter(this); - trackRowLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, - QSizePolicy::Minimum)); + trackRowLayout->addItem(new TQSpacerItem(0, 0, TQSizePolicy::Expanding, + TQSizePolicy::Minimum)); - trackRowLayout->addWidget(addHidden(new QLabel(i18n("Length:"), this))); + trackRowLayout->addWidget(addHidden(new TQLabel(i18n("Length:"), this))); m_lengthBox = new KLineEdit(this, "lengthBox"); // addItem(i18n("Length:"), m_lengthBox, trackRowLayout); m_lengthBox->setMinimumWidth(fontMetrics().width("00:00") + trackRowLayout->spacing()); @@ -564,10 +564,10 @@ void TagEditor::setupLayout() m_lengthBox->setReadOnly(true); trackRowLayout->addWidget(addHidden(m_lengthBox)); - trackRowLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, - QSizePolicy::Minimum)); + trackRowLayout->addItem(new TQSpacerItem(0, 0, TQSizePolicy::Expanding, + TQSizePolicy::Minimum)); - trackRowLayout->addWidget(addHidden(new QLabel(i18n("Bitrate:"), this))); + trackRowLayout->addWidget(addHidden(new TQLabel(i18n("Bitrate:"), this))); m_bitrateBox = new KLineEdit(this, "bitrateBox"); // addItem(i18n("Bitrate:"), m_bitrateBox, trackRowLayout); m_bitrateBox->setMinimumWidth(fontMetrics().width("000") + trackRowLayout->spacing()); @@ -586,32 +586,32 @@ void TagEditor::setupLayout() } - connect(m_artistNameBox, SIGNAL(textChanged(const QString&)), - this, SLOT(slotDataChanged())); + connect(m_artistNameBox, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(slotDataChanged())); - connect(m_trackNameBox, SIGNAL(textChanged(const QString&)), - this, SLOT(slotDataChanged())); + connect(m_trackNameBox, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(slotDataChanged())); - connect(m_albumNameBox, SIGNAL(textChanged(const QString&)), - this, SLOT(slotDataChanged())); + connect(m_albumNameBox, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(slotDataChanged())); - connect(m_genreBox, SIGNAL(activated(int)), - this, SLOT(slotDataChanged())); + connect(m_genreBox, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotDataChanged())); - connect(m_genreBox, SIGNAL(textChanged(const QString&)), - this, SLOT(slotDataChanged())); + connect(m_genreBox, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(slotDataChanged())); - connect(m_fileNameBox, SIGNAL(textChanged(const QString&)), - this, SLOT(slotDataChanged())); + connect(m_fileNameBox, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(slotDataChanged())); - connect(m_yearSpin, SIGNAL(valueChanged(int)), - this, SLOT(slotDataChanged())); + connect(m_yearSpin, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotDataChanged())); - connect(m_trackSpin, SIGNAL(valueChanged(int)), - this, SLOT(slotDataChanged())); + connect(m_trackSpin, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotDataChanged())); - connect(m_commentBox, SIGNAL(textChanged()), - this, SLOT(slotDataChanged())); + connect(m_commentBox, TQT_SIGNAL(textChanged()), + this, TQT_SLOT(slotDataChanged())); } void TagEditor::save(const PlaylistItemList &list) @@ -634,7 +634,7 @@ void TagEditor::save(const PlaylistItemList &list) // playlists will try to modify the file we edit if the tag changes // due to our alterations here. - kapp->eventLoop()->processEvents(QEventLoop::ExcludeUserInput); + kapp->eventLoop()->processEvents(TQEventLoop::ExcludeUserInput); PlaylistItem *item = *it; @@ -644,7 +644,7 @@ void TagEditor::save(const PlaylistItemList &list) ++it; - QString fileName = item->file().fileInfo().dirPath() + QDir::separator() + + TQString fileName = item->file().fileInfo().dirPath() + TQDir::separator() + m_fileNameBox->text(); if(list.count() > 1) fileName = item->file().fileInfo().absFilePath(); @@ -694,7 +694,7 @@ void TagEditor::saveChangesPrompt() if(!isVisible() || !m_dataChanged || m_items.isEmpty()) return; - QStringList files; + TQStringList files; for(PlaylistItemList::Iterator it = m_items.begin(); it != m_items.end(); ++it) files.append((*it)->file().absFilePath()); @@ -711,30 +711,30 @@ void TagEditor::saveChangesPrompt() } } -void TagEditor::addItem(const QString &text, QWidget *item, QBoxLayout *layout, const QString &iconName) +void TagEditor::addItem(const TQString &text, TQWidget *item, TQBoxLayout *layout, const TQString &iconName) { if(!item || !layout) return; - QLabel *label = new QLabel(item, text, this); - QLabel *iconLabel = new QLabel(item, 0, this); + TQLabel *label = new TQLabel(item, text, this); + TQLabel *iconLabel = new TQLabel(item, 0, this); if(!iconName.isNull()) iconLabel->setPixmap(SmallIcon(iconName)); - QCheckBox *enableBox = new QCheckBox(i18n("Enable"), this); + TQCheckBox *enableBox = new TQCheckBox(i18n("Enable"), this); enableBox->setChecked(true); label->setMinimumHeight(enableBox->height()); - if(layout->direction() == QBoxLayout::LeftToRight) { + if(layout->direction() == TQBoxLayout::LeftToRight) { layout->addWidget(iconLabel); layout->addWidget(label); layout->addWidget(item); layout->addWidget(enableBox); } else { - QHBoxLayout *l = new QHBoxLayout(layout); + TQHBoxLayout *l = new TQHBoxLayout(layout); l->addWidget(iconLabel); l->addWidget(label); @@ -750,24 +750,24 @@ void TagEditor::addItem(const QString &text, QWidget *item, QBoxLayout *layout, enableBox->hide(); - connect(enableBox, SIGNAL(toggled(bool)), item, SLOT(setEnabled(bool))); + connect(enableBox, TQT_SIGNAL(toggled(bool)), item, TQT_SLOT(setEnabled(bool))); m_enableBoxes.insert(item, enableBox); } -void TagEditor::showEvent(QShowEvent *e) +void TagEditor::showEvent(TQShowEvent *e) { if(m_collectionChanged) { updateCollection(); slotRefresh(); } - QWidget::showEvent(e); + TQWidget::showEvent(e); } -bool TagEditor::eventFilter(QObject *watched, QEvent *e) +bool TagEditor::eventFilter(TQObject *watched, TQEvent *e) { - QKeyEvent *ke = static_cast(e); - if(watched->inherits("QSpinBox") && e->type() == QEvent::KeyRelease && ke->state() == 0) + TQKeyEvent *ke = static_cast(e); + if(watched->inherits("TQSpinBox") && e->type() == TQEvent::KeyRelease && ke->state() == 0) slotDataChanged(); return false; diff --git a/juk/tageditor.h b/juk/tageditor.h index e9d9b1bf..1820a179 100644 --- a/juk/tageditor.h +++ b/juk/tageditor.h @@ -16,7 +16,7 @@ #ifndef TAGEDITOR_H #define TAGEDITOR_H -#include +#include class KComboBox; class KLineEdit; @@ -30,7 +30,7 @@ class QBoxLayout; class Playlist; class PlaylistItem; -typedef QValueList PlaylistItemList; +typedef TQValueList PlaylistItemList; class CollectionObserver; @@ -39,7 +39,7 @@ class TagEditor : public QWidget Q_OBJECT public: - TagEditor(QWidget *parent = 0, const char *name = 0); + TagEditor(TQWidget *parent = 0, const char *name = 0); virtual ~TagEditor(); PlaylistItemList items() const { return m_items; } void setupObservers(); @@ -61,7 +61,7 @@ private: void setupActions(); void setupLayout(); void readConfig(); - void readCompletionMode(KConfigBase *config, KComboBox *box, const QString &key); + void readCompletionMode(KConfigBase *config, KComboBox *box, const TQString &key); void saveConfig(); void save(const PlaylistItemList &list); void saveChangesPrompt(); @@ -69,15 +69,15 @@ private: * Adds an item to JuK's tagging layout. This handles the creation and * placement of the "enable" box as well. */ - void addItem(const QString &text, QWidget *item, QBoxLayout *layout, const QString &iconName = QString::null); + void addItem(const TQString &text, TQWidget *item, TQBoxLayout *layout, const TQString &iconName = TQString::null); /** * Adds a widget to m_hideList and returns that widget. */ - QWidget *addHidden(QWidget *w) { m_hideList.append(w); return w; } + TQWidget *addHidden(TQWidget *w) { m_hideList.append(w); return w; } - virtual void showEvent(QShowEvent *e); - virtual bool eventFilter(QObject *watched, QEvent *e); + virtual void showEvent(TQShowEvent *e); + virtual bool eventFilter(TQObject *watched, TQEvent *e); private slots: void slotDataChanged(bool c = true); @@ -85,10 +85,10 @@ private slots: void slotPlaylistRemoved() { m_currentPlaylist = 0; } private: - typedef QMap BoxMap; + typedef TQMap BoxMap; BoxMap m_enableBoxes; - QStringList m_genreList; + TQStringList m_genreList; KComboBox *m_artistNameBox; KLineEdit *m_trackNameBox; @@ -101,7 +101,7 @@ private: KLineEdit *m_bitrateBox; KEdit *m_commentBox; - QValueList m_hideList; + TQValueList m_hideList; PlaylistItemList m_items; Playlist *m_currentPlaylist; diff --git a/juk/tagguesser.cpp b/juk/tagguesser.cpp index 41795155..b540aaf1 100644 --- a/juk/tagguesser.cpp +++ b/juk/tagguesser.cpp @@ -14,7 +14,7 @@ #include #include -FileNameScheme::FileNameScheme(const QString &s) +FileNameScheme::FileNameScheme(const TQString &s) : m_regExp(), m_titleField(-1), m_artistField(-1), @@ -44,54 +44,54 @@ FileNameScheme::FileNameScheme(const QString &s) m_regExp.setPattern(composeRegExp(s)); } -bool FileNameScheme::matches(const QString &fileName) const +bool FileNameScheme::matches(const TQString &fileName) const { /* Strip extension ('.mp3') because '.' may be part of a title, and thus * does not work as a separator. */ - QString stripped = fileName; + TQString stripped = fileName; stripped.truncate(stripped.findRev('.')); return m_regExp.exactMatch(stripped); } -QString FileNameScheme::title() const +TQString FileNameScheme::title() const { if(m_titleField == -1) - return QString::null; + return TQString::null; return m_regExp.capturedTexts()[ m_titleField ]; } -QString FileNameScheme::artist() const +TQString FileNameScheme::artist() const { if(m_artistField == -1) - return QString::null; + return TQString::null; return m_regExp.capturedTexts()[ m_artistField ]; } -QString FileNameScheme::album() const +TQString FileNameScheme::album() const { if(m_albumField == -1) - return QString::null; + return TQString::null; return m_regExp.capturedTexts()[ m_albumField ]; } -QString FileNameScheme::track() const +TQString FileNameScheme::track() const { if(m_trackField == -1) - return QString::null; + return TQString::null; return m_regExp.capturedTexts()[ m_trackField ]; } -QString FileNameScheme::comment() const +TQString FileNameScheme::comment() const { if(m_commentField == -1) - return QString::null; + return TQString::null; return m_regExp.capturedTexts()[ m_commentField ]; } -QString FileNameScheme::composeRegExp(const QString &s) const +TQString FileNameScheme::composeRegExp(const TQString &s) const { - QMap substitutions; + TQMap substitutions; KConfigGroup config(KGlobal::config(), "TagGuesser"); @@ -101,7 +101,7 @@ QString FileNameScheme::composeRegExp(const QString &s) const substitutions[ 'T' ] = config.readEntry("Track regexp", "(\\d+)"); substitutions[ 'c' ] = config.readEntry("Comment regexp", "([\\w\\s_]+)"); - QString regExp = QRegExp::escape(s.simplifyWhiteSpace()); + TQString regExp = TQRegExp::escape(s.simplifyWhiteSpace()); regExp = ".*" + regExp; regExp.replace(' ', "\\s+"); regExp = KMacroExpander::expandMacros(regExp, substitutions); @@ -109,9 +109,9 @@ QString FileNameScheme::composeRegExp(const QString &s) const return regExp; } -QStringList TagGuesser::schemeStrings() +TQStringList TagGuesser::schemeStrings() { - QStringList schemes; + TQStringList schemes; KConfigGroup config(KGlobal::config(), "TagGuesser"); schemes = config.readListEntry("Filename schemes"); @@ -148,7 +148,7 @@ QStringList TagGuesser::schemeStrings() return schemes; } -void TagGuesser::setSchemeStrings(const QStringList &schemes) +void TagGuesser::setSchemeStrings(const TQStringList &schemes) { KConfig *cfg = kapp->config(); { @@ -163,7 +163,7 @@ TagGuesser::TagGuesser() loadSchemes(); } -TagGuesser::TagGuesser(const QString &absFileName) +TagGuesser::TagGuesser(const TQString &absFileName) { loadSchemes(); guess(absFileName); @@ -171,16 +171,16 @@ TagGuesser::TagGuesser(const QString &absFileName) void TagGuesser::loadSchemes() { - const QStringList schemes = schemeStrings(); - QStringList::ConstIterator it = schemes.begin(); - QStringList::ConstIterator end = schemes.end(); + const TQStringList schemes = schemeStrings(); + TQStringList::ConstIterator it = schemes.begin(); + TQStringList::ConstIterator end = schemes.end(); for ( ; it != end; ++it ) m_schemes += FileNameScheme( *it ); } -void TagGuesser::guess(const QString &absFileName) +void TagGuesser::guess(const TQString &absFileName) { - m_title = m_artist = m_album = m_track = m_comment = QString::null; + m_title = m_artist = m_album = m_track = m_comment = TQString::null; FileNameScheme::List::ConstIterator it = m_schemes.begin(); FileNameScheme::List::ConstIterator end = m_schemes.end(); @@ -197,15 +197,15 @@ void TagGuesser::guess(const QString &absFileName) } } -QString TagGuesser::capitalizeWords(const QString &s) +TQString TagGuesser::capitalizeWords(const TQString &s) { if(s.isEmpty()) return s; - QString result = s; + TQString result = s; result[ 0 ] = result[ 0 ].upper(); - const QRegExp wordRegExp("\\s\\w"); + const TQRegExp wordRegExp("\\s\\w"); int i = result.find( wordRegExp ); while ( i > -1 ) { result[ i + 1 ] = result[ i + 1 ].upper(); diff --git a/juk/tagguesser.h b/juk/tagguesser.h index eb040a4b..136ae742 100644 --- a/juk/tagguesser.h +++ b/juk/tagguesser.h @@ -9,28 +9,28 @@ #ifndef TAGGUESSER_H #define TAGGUESSER_H -#include +#include class FileNameScheme { public: - typedef QValueList List; + typedef TQValueList List; FileNameScheme() { } - FileNameScheme(const QString &s); + FileNameScheme(const TQString &s); - bool matches(const QString &s) const; + bool matches(const TQString &s) const; - QString title() const; - QString artist() const; - QString album() const; - QString track() const; - QString comment() const; + TQString title() const; + TQString artist() const; + TQString album() const; + TQString track() const; + TQString comment() const; private: - QString composeRegExp(const QString &s) const; + TQString composeRegExp(const TQString &s) const; - mutable QRegExp m_regExp; + mutable TQRegExp m_regExp; int m_titleField; int m_artistField; int m_albumField; @@ -44,30 +44,30 @@ class TagGuesser enum Type { FileName = 0, MusicBrainz = 1 }; - static QStringList schemeStrings(); - static void setSchemeStrings(const QStringList &schemes); + static TQStringList schemeStrings(); + static void setSchemeStrings(const TQStringList &schemes); TagGuesser(); - TagGuesser(const QString &absFileName); + TagGuesser(const TQString &absFileName); - void guess(const QString &absFileName); + void guess(const TQString &absFileName); - QString title() const { return m_title; } - QString artist() const { return m_artist; } - QString album() const { return m_album; } - QString track() const { return m_track; } - QString comment() const { return m_comment; } + TQString title() const { return m_title; } + TQString artist() const { return m_artist; } + TQString album() const { return m_album; } + TQString track() const { return m_track; } + TQString comment() const { return m_comment; } private: void loadSchemes(); - QString capitalizeWords(const QString &s); + TQString capitalizeWords(const TQString &s); FileNameScheme::List m_schemes; - QString m_title; - QString m_artist; - QString m_album; - QString m_track; - QString m_comment; + TQString m_title; + TQString m_artist; + TQString m_album; + TQString m_track; + TQString m_comment; }; #endif // TAGGUESSER_H diff --git a/juk/tagguesserconfigdlg.cpp b/juk/tagguesserconfigdlg.cpp index f3af1f43..7caea019 100644 --- a/juk/tagguesserconfigdlg.cpp +++ b/juk/tagguesserconfigdlg.cpp @@ -17,10 +17,10 @@ #include #include -#include -#include +#include +#include -TagGuesserConfigDlg::TagGuesserConfigDlg(QWidget *parent, const char *name) +TagGuesserConfigDlg::TagGuesserConfigDlg(TQWidget *parent, const char *name) : KDialogBase(parent, name, true, i18n("Tag Guesser Configuration"), Ok | Cancel, Ok, true) { @@ -29,27 +29,27 @@ TagGuesserConfigDlg::TagGuesserConfigDlg(QWidget *parent, const char *name) m_child->lvSchemes->setItemsRenameable(true); m_child->lvSchemes->setSorting(-1); - m_child->lvSchemes->setDefaultRenameAction(QListView::Accept); + m_child->lvSchemes->setDefaultRenameAction(TQListView::Accept); m_child->bMoveUp->setIconSet(BarIconSet("1uparrow")); m_child->bMoveDown->setIconSet(BarIconSet("1downarrow")); - const QStringList schemes = TagGuesser::schemeStrings(); - QStringList::ConstIterator it = schemes.begin(); - QStringList::ConstIterator end = schemes.end(); + const TQStringList schemes = TagGuesser::schemeStrings(); + TQStringList::ConstIterator it = schemes.begin(); + TQStringList::ConstIterator end = schemes.end(); for (; it != end; ++it) { KListViewItem *item = new KListViewItem(m_child->lvSchemes, *it); item->moveItem(m_child->lvSchemes->lastItem()); } - connect(m_child->lvSchemes, SIGNAL(currentChanged(QListViewItem *)), - this, SLOT(slotCurrentChanged(QListViewItem *))); - connect(m_child->lvSchemes, SIGNAL(doubleClicked(QListViewItem *, const QPoint &, int)), - this, SLOT(slotRenameItem(QListViewItem *, const QPoint &, int))); - connect(m_child->bMoveUp, SIGNAL(clicked()), this, SLOT(slotMoveUpClicked())); - connect(m_child->bMoveDown, SIGNAL(clicked()), this, SLOT(slotMoveDownClicked())); - connect(m_child->bAdd, SIGNAL(clicked()), this, SLOT(slotAddClicked())); - connect(m_child->bModify, SIGNAL(clicked()), this, SLOT(slotModifyClicked())); - connect(m_child->bRemove, SIGNAL(clicked()), this, SLOT(slotRemoveClicked())); + connect(m_child->lvSchemes, TQT_SIGNAL(currentChanged(TQListViewItem *)), + this, TQT_SLOT(slotCurrentChanged(TQListViewItem *))); + connect(m_child->lvSchemes, TQT_SIGNAL(doubleClicked(TQListViewItem *, const TQPoint &, int)), + this, TQT_SLOT(slotRenameItem(TQListViewItem *, const TQPoint &, int))); + connect(m_child->bMoveUp, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotMoveUpClicked())); + connect(m_child->bMoveDown, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotMoveDownClicked())); + connect(m_child->bAdd, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAddClicked())); + connect(m_child->bModify, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotModifyClicked())); + connect(m_child->bRemove, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotRemoveClicked())); m_child->lvSchemes->setSelected(m_child->lvSchemes->firstChild(), true); slotCurrentChanged(m_child->lvSchemes->currentItem()); @@ -60,18 +60,18 @@ TagGuesserConfigDlg::TagGuesserConfigDlg(QWidget *parent, const char *name) void TagGuesserConfigDlg::accept() { if(m_child->lvSchemes->renameLineEdit()) { - QKeyEvent returnKeyPress(QEvent::KeyPress, Key_Return, 0, 0); + TQKeyEvent returnKeyPress(TQEvent::KeyPress, Key_Return, 0, 0); KApplication::sendEvent(m_child->lvSchemes->renameLineEdit(), &returnKeyPress); } - QStringList schemes; - for (QListViewItem *it = m_child->lvSchemes->firstChild(); it; it = it->nextSibling()) + TQStringList schemes; + for (TQListViewItem *it = m_child->lvSchemes->firstChild(); it; it = it->nextSibling()) schemes += it->text(0); TagGuesser::setSchemeStrings(schemes); KDialogBase::accept(); } -void TagGuesserConfigDlg::slotCurrentChanged(QListViewItem *item) +void TagGuesserConfigDlg::slotCurrentChanged(TQListViewItem *item) { m_child->bMoveUp->setEnabled(item != 0 && item->itemAbove() != 0); m_child->bMoveDown->setEnabled(item != 0 && item->itemBelow() != 0); @@ -79,14 +79,14 @@ void TagGuesserConfigDlg::slotCurrentChanged(QListViewItem *item) m_child->bRemove->setEnabled(item != 0); } -void TagGuesserConfigDlg::slotRenameItem(QListViewItem *item, const QPoint &, int c) +void TagGuesserConfigDlg::slotRenameItem(TQListViewItem *item, const TQPoint &, int c) { m_child->lvSchemes->rename(item, c); } void TagGuesserConfigDlg::slotMoveUpClicked() { - QListViewItem *item = m_child->lvSchemes->currentItem(); + TQListViewItem *item = m_child->lvSchemes->currentItem(); if(item->itemAbove() == m_child->lvSchemes->firstChild()) item->itemAbove()->moveItem(item); else @@ -97,7 +97,7 @@ void TagGuesserConfigDlg::slotMoveUpClicked() void TagGuesserConfigDlg::slotMoveDownClicked() { - QListViewItem *item = m_child->lvSchemes->currentItem(); + TQListViewItem *item = m_child->lvSchemes->currentItem(); item->moveItem(item->itemBelow()); m_child->lvSchemes->ensureItemVisible(item); slotCurrentChanged(item); diff --git a/juk/tagguesserconfigdlg.h b/juk/tagguesserconfigdlg.h index 353e743a..f704eeeb 100644 --- a/juk/tagguesserconfigdlg.h +++ b/juk/tagguesserconfigdlg.h @@ -18,14 +18,14 @@ class TagGuesserConfigDlg : public KDialogBase { Q_OBJECT public: - TagGuesserConfigDlg(QWidget *parent, const char *name = 0); + TagGuesserConfigDlg(TQWidget *parent, const char *name = 0); protected slots: virtual void accept(); private slots: - void slotCurrentChanged(QListViewItem *item); - void slotRenameItem(QListViewItem *item, const QPoint &p, int c); + void slotCurrentChanged(TQListViewItem *item); + void slotRenameItem(TQListViewItem *item, const TQPoint &p, int c); void slotMoveUpClicked(); void slotMoveDownClicked(); void slotAddClicked(); diff --git a/juk/tagguessertest.cpp b/juk/tagguessertest.cpp index f726e01b..b94f9639 100644 --- a/juk/tagguessertest.cpp +++ b/juk/tagguessertest.cpp @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include @@ -33,9 +33,9 @@ using std::cout; using std::endl; -void check( const QString &filename, const QString &title, - const QString &artist, const QString &track, - const QString &comment, const QString &album = QString::null ) +void check( const TQString &filename, const TQString &title, + const TQString &artist, const TQString &track, + const TQString &comment, const TQString &album = TQString::null ) { cout << "Checking " << filename.latin1() << "..."; TagGuesser guesser( filename ); @@ -72,57 +72,57 @@ int main( int argc, char **argv ) check( "/home/frerich/Chemical Brothers - (01) - Block rockin' beats (Live).mp3", "Block Rockin' Beats", "Chemical Brothers", "01", "Live" ); check( "/home/frerich/Chemical Brothers - (01) - Block rockin' beats.mp3", - "Block Rockin' Beats", "Chemical Brothers", "01", QString::null ); + "Block Rockin' Beats", "Chemical Brothers", "01", TQString::null ); check( "/home/frerich/Chemical Brothers - [01] - Block rockin' beats [Live].mp3", "Block Rockin' Beats", "Chemical Brothers", "01", "Live" ); check( "/home/frerich/Chemical Brothers - [01] - Block rockin' beats (Live).mp3", "Block Rockin' Beats", "Chemical Brothers", "01", "Live" ); check( "/home/frerich/Chemical Brothers - [01] - Block rockin' beats.mp3", - "Block Rockin' Beats", "Chemical Brothers", "01", QString::null ); + "Block Rockin' Beats", "Chemical Brothers", "01", TQString::null ); check( "/home/frerich/Chemical Brothers - 01 - Block rockin' beats [Live].mp3", "Block Rockin' Beats", "Chemical Brothers", "01", "Live" ); check( "/home/frerich/Chemical Brothers - 01 - Block rockin' beats (Live).mp3", "Block Rockin' Beats", "Chemical Brothers", "01", "Live" ); check( "/home/frerich/Chemical Brothers - 01 - Block rockin' beats.mp3", - "Block Rockin' Beats", "Chemical Brothers", "01", QString::null ); + "Block Rockin' Beats", "Chemical Brothers", "01", TQString::null ); check( "/home/frerich/(01) Chemical Brothers - Block rockin' beats [Live].mp3", "Block Rockin' Beats", "Chemical Brothers", "01", "Live" ); check( "/home/frerich/(01) Chemical Brothers - Block rockin' beats (Live).mp3", "Block Rockin' Beats", "Chemical Brothers", "01", "Live" ); check( "/home/frerich/(01) Chemical Brothers - Block rockin' beats.mp3", - "Block Rockin' Beats", "Chemical Brothers", "01", QString::null ); + "Block Rockin' Beats", "Chemical Brothers", "01", TQString::null ); check( "/home/frerich/[01] Chemical Brothers - Block rockin' beats [Live].mp3", "Block Rockin' Beats", "Chemical Brothers", "01", "Live" ); check( "/home/frerich/[01] Chemical Brothers - Block rockin' beats (Live).mp3", "Block Rockin' Beats", "Chemical Brothers", "01", "Live" ); check( "/home/frerich/[01] Chemical Brothers - Block rockin' beats.mp3", - "Block Rockin' Beats", "Chemical Brothers", "01", QString::null ); + "Block Rockin' Beats", "Chemical Brothers", "01", TQString::null ); check( "/home/frerich/01 Chemical Brothers - Block rockin' beats [Live].mp3", "Block Rockin' Beats", "Chemical Brothers", "01", "Live" ); check( "/home/frerich/01 Chemical Brothers - Block rockin' beats (Live).mp3", "Block Rockin' Beats", "Chemical Brothers", "01", "Live" ); check( "/home/frerich/01 Chemical Brothers - Block rockin' beats.mp3", - "Block Rockin' Beats", "Chemical Brothers", "01", QString::null ); + "Block Rockin' Beats", "Chemical Brothers", "01", TQString::null ); check( "/home/frerich/(Chemical Brothers) Block rockin' beats [Live].mp3", - "Block Rockin' Beats", "Chemical Brothers", QString::null, "Live" ); + "Block Rockin' Beats", "Chemical Brothers", TQString::null, "Live" ); check( "/home/frerich/(Chemical Brothers) Block rockin' beats (Live).mp3", - "Block Rockin' Beats", "Chemical Brothers", QString::null, "Live" ); + "Block Rockin' Beats", "Chemical Brothers", TQString::null, "Live" ); check( "/home/frerich/(Chemical Brothers) Block rockin' beats.mp3", - "Block Rockin' Beats", "Chemical Brothers", QString::null, QString::null ); + "Block Rockin' Beats", "Chemical Brothers", TQString::null, TQString::null ); check( "/home/frerich/Chemical Brothers - Block rockin' beats [Live].mp3", - "Block Rockin' Beats", "Chemical Brothers", QString::null, "Live" ); + "Block Rockin' Beats", "Chemical Brothers", TQString::null, "Live" ); check( "/home/frerich/Chemical Brothers - Block rockin' beats (Live).mp3", - "Block Rockin' Beats", "Chemical Brothers", QString::null, "Live" ); + "Block Rockin' Beats", "Chemical Brothers", TQString::null, "Live" ); check( "/home/frerich/Chemical Brothers - Block rockin' beats.mp3", - "Block Rockin' Beats", "Chemical Brothers", QString::null, QString::null ); + "Block Rockin' Beats", "Chemical Brothers", TQString::null, TQString::null ); check( "/home/frerich/mp3/Chemical Brothers/Dig your own hole/[01] Block rockin' beats.mp3", - "Block Rockin' Beats", "Chemical Brothers", "01", QString::null, "Dig Your Own Hole"); - check( QDir::homeDirPath() + "/[01] Randy - Religion, religion.mp3", - "Religion, Religion", "Randy", "01", QString::null, QString::null ); - check( QDir::homeDirPath() + "/(3) Mr. Doe - Punk.mp3", - "Punk", "Mr. Doe", "3", QString::null, QString::null ); + "Block Rockin' Beats", "Chemical Brothers", "01", TQString::null, "Dig Your Own Hole"); + check( TQDir::homeDirPath() + "/[01] Randy - Religion, religion.mp3", + "Religion, Religion", "Randy", "01", TQString::null, TQString::null ); + check( TQDir::homeDirPath() + "/(3) Mr. Doe - Punk.mp3", + "Punk", "Mr. Doe", "3", TQString::null, TQString::null ); check( "c:\\music\\mp3s\\(3) Mr. Doe - Punk.mp3", - "Punk", "Mr. Doe", "3", QString::null, QString::null ); + "Punk", "Mr. Doe", "3", TQString::null, TQString::null ); cout << "All OK" << endl; return 0; } diff --git a/juk/tagrenameroptions.cpp b/juk/tagrenameroptions.cpp index 4f7ceba8..50f7036d 100644 --- a/juk/tagrenameroptions.cpp +++ b/juk/tagrenameroptions.cpp @@ -63,18 +63,18 @@ TagRenamerOptions::TagRenamerOptions(const CategoryID &category) // Make sure we don't use translated strings for the config file keys. - QString typeKey = tagTypeText(category.category, false); + TQString typeKey = tagTypeText(category.category, false); KConfigGroup config(KGlobal::config(), "FileRenamer"); if(categoryNum > 0) - typeKey.append(QString::number(categoryNum)); + typeKey.append(TQString::number(categoryNum)); - setSuffix(config.readEntry(QString("%1Suffix").arg(typeKey))); - setPrefix(config.readEntry(QString("%1Prefix").arg(typeKey))); + setSuffix(config.readEntry(TQString("%1Suffix").arg(typeKey))); + setPrefix(config.readEntry(TQString("%1Prefix").arg(typeKey))); // Default the emptyAction to ignoring the empty tag. - const QString emptyAction = config.readEntry(QString("%1EmptyAction").arg(typeKey)).lower(); + const TQString emptyAction = config.readEntry(TQString("%1EmptyAction").arg(typeKey)).lower(); setEmptyAction(IgnoreEmptyTag); if(emptyAction == "forceemptyinclude") @@ -82,12 +82,12 @@ TagRenamerOptions::TagRenamerOptions(const CategoryID &category) else if(emptyAction == "usereplacementvalue") setEmptyAction(UseReplacementValue); - setEmptyText(config.readEntry(QString("%1EmptyText").arg(typeKey))); - setTrackWidth(config.readUnsignedNumEntry(QString("%1TrackWidth").arg(typeKey))); - setDisabled(config.readBoolEntry(QString("%1Disabled").arg(typeKey), disabled)); + setEmptyText(config.readEntry(TQString("%1EmptyText").arg(typeKey))); + setTrackWidth(config.readUnsignedNumEntry(TQString("%1TrackWidth").arg(typeKey))); + setDisabled(config.readBoolEntry(TQString("%1Disabled").arg(typeKey), disabled)); } -QString TagRenamerOptions::tagTypeText(TagType type, bool translate) +TQString TagRenamerOptions::tagTypeText(TagType type, bool translate) { // These must be declared in the same order that they are defined in // the TagType enum in test.h. We can dynamically translate these strings, @@ -111,16 +111,16 @@ void TagRenamerOptions::saveConfig(unsigned categoryNum) const { // Make sure we don't use translated strings for the config file keys. - QString typeKey = tagTypeText(false); + TQString typeKey = tagTypeText(false); if(categoryNum > 0) - typeKey.append(QString::number(categoryNum)); + typeKey.append(TQString::number(categoryNum)); KConfigGroup config(KGlobal::config(), "FileRenamer"); - config.writeEntry(QString("%1Suffix").arg(typeKey), suffix()); - config.writeEntry(QString("%1Prefix").arg(typeKey), prefix()); + config.writeEntry(TQString("%1Suffix").arg(typeKey), suffix()); + config.writeEntry(TQString("%1Prefix").arg(typeKey), prefix()); - QString emptyStr; + TQString emptyStr; switch(emptyAction()) { case ForceEmptyInclude: @@ -136,17 +136,17 @@ void TagRenamerOptions::saveConfig(unsigned categoryNum) const break; } - config.writeEntry(QString("%1EmptyAction").arg(typeKey), emptyStr); - config.writeEntry(QString("%1EmptyText").arg(typeKey), emptyText()); - config.writeEntry(QString("%1Disabled").arg(typeKey), disabled()); + config.writeEntry(TQString("%1EmptyAction").arg(typeKey), emptyStr); + config.writeEntry(TQString("%1EmptyText").arg(typeKey), emptyText()); + config.writeEntry(TQString("%1Disabled").arg(typeKey), disabled()); if(category() == Track) - config.writeEntry(QString("%1TrackWidth").arg(typeKey), trackWidth()); + config.writeEntry(TQString("%1TrackWidth").arg(typeKey), trackWidth()); config.sync(); } -TagType TagRenamerOptions::tagFromCategoryText(const QString &text, bool translate) +TagType TagRenamerOptions::tagFromCategoryText(const TQString &text, bool translate) { for(unsigned i = StartTag; i < NumTypes; ++i) if(tagTypeText(static_cast(i), translate) == text) diff --git a/juk/tagrenameroptions.h b/juk/tagrenameroptions.h index b62e9bf4..4c979fa0 100644 --- a/juk/tagrenameroptions.h +++ b/juk/tagrenameroptions.h @@ -96,17 +96,17 @@ public: TagRenamerOptions(const CategoryID &category); TagRenamerOptions(const TagRenamerOptions &other); - QString prefix() const { return m_prefix; } - QString suffix() const { return m_suffix; } - QString emptyText() const { return m_emptyText; } + TQString prefix() const { return m_prefix; } + TQString suffix() const { return m_suffix; } + TQString emptyText() const { return m_emptyText; } EmptyActions emptyAction() const { return m_emptyAction; } unsigned trackWidth() const { return m_trackWidth; } bool disabled() const { return m_disabled; } TagType category() const { return m_category; } - void setPrefix(const QString &prefix) { m_prefix = prefix; } - void setSuffix(const QString &suffix) { m_suffix = suffix; } - void setEmptyText(const QString &emptyText) { m_emptyText = emptyText; } + void setPrefix(const TQString &prefix) { m_prefix = prefix; } + void setSuffix(const TQString &suffix) { m_suffix = suffix; } + void setEmptyText(const TQString &emptyText) { m_emptyText = emptyText; } void setEmptyAction(EmptyActions action) { m_emptyAction = action; } void setTrackWidth(unsigned width) { m_trackWidth = width; } void setDisabled(bool disabled) { m_disabled = disabled; } @@ -119,9 +119,9 @@ public: * @param translate if true, the string is translated (if possible). * @return text representation of category. */ - static QString tagTypeText(TagType category, bool translate = true); + static TQString tagTypeText(TagType category, bool translate = true); - QString tagTypeText(bool translate = true) const + TQString tagTypeText(bool translate = true) const { return tagTypeText(category(), translate); } @@ -134,7 +134,7 @@ public: * @param translated If true, @p text is translated, if false, it is the untranslated * version. */ - static TagType tagFromCategoryText(const QString &text, bool translate = true); + static TagType tagFromCategoryText(const TQString &text, bool translate = true); /** * This saves the options to the global KConfig object. @@ -151,15 +151,15 @@ private: // Member variables - QString m_prefix; - QString m_suffix; + TQString m_prefix; + TQString m_suffix; /// Defines the action to take when the tag is empty. EmptyActions m_emptyAction; /// If m_emptyAction is UseReplacementValue, this holds the text of the value /// to use. - QString m_emptyText; + TQString m_emptyText; /// Used only for the Track type. Defines the minimum track width when /// expanding the track token. diff --git a/juk/tagtransactionmanager.cpp b/juk/tagtransactionmanager.cpp index e6c8adef..cc8b1c80 100644 --- a/juk/tagtransactionmanager.cpp +++ b/juk/tagtransactionmanager.cpp @@ -19,8 +19,8 @@ #include #include -#include -#include +#include +#include #include "tagtransactionmanager.h" #include "playlistitem.h" @@ -83,11 +83,11 @@ void TagTransactionManager::changeTagOnItem(PlaylistItem *item, Tag *newTag) m_list.append(TagTransactionAtom(item->collectionItem(), newTag)); } -Tag *TagTransactionManager::duplicateTag(const Tag *tag, const QString &fileName) +Tag *TagTransactionManager::duplicateTag(const Tag *tag, const TQString &fileName) { Q_ASSERT(tag); - QString name = fileName.isNull() ? tag->fileName() : fileName; + TQString name = fileName.isNull() ? tag->fileName() : fileName; Tag *newTag = new Tag(*tag); newTag->setFileName(name); @@ -123,24 +123,24 @@ bool TagTransactionManager::undo() return result; } -TagTransactionManager::TagTransactionManager(QWidget *parent) : QObject(parent, "tagmanager") +TagTransactionManager::TagTransactionManager(TQWidget *parent) : TQObject(parent, "tagmanager") { m_manager = this; } -bool TagTransactionManager::renameFile(const QFileInfo &from, const QFileInfo &to) const +bool TagTransactionManager::renameFile(const TQFileInfo &from, const TQFileInfo &to) const { - if(!QFileInfo(to.dirPath()).isWritable() || !from.exists()) + if(!TQFileInfo(to.dirPath()).isWritable() || !from.exists()) return false; if(!to.exists() || KMessageBox::warningContinueCancel( - static_cast(parent()), + static_cast(parent()), i18n("This file already exists.\nDo you want to replace it?"), i18n("File Exists"),i18n("Replace")) == KMessageBox::Continue) { kdDebug(65432) << "Renaming " << from.absFilePath() << " to " << to.absFilePath() << endl; - QDir currentDir; + TQDir currentDir; return currentDir.rename(from.absFilePath(), to.absFilePath()); } @@ -150,7 +150,7 @@ bool TagTransactionManager::renameFile(const QFileInfo &from, const QFileInfo &t bool TagTransactionManager::processChangeList(bool undo) { TagAlterationList::ConstIterator it, end; - QStringList errorItems; + TQStringList errorItems; it = undo ? m_undoList.begin() : m_list.begin(); end = undo ? m_undoList.end() : m_list.end(); @@ -161,11 +161,11 @@ bool TagTransactionManager::processChangeList(bool undo) PlaylistItem *item = (*it).item(); Tag *tag = (*it).tag(); - QFileInfo newFile(tag->fileName()); + TQFileInfo newFile(tag->fileName()); if(item->file().fileInfo().fileName() != newFile.fileName()) { if(!renameFile(item->file().fileInfo(), newFile)) { - errorItems.append(item->text(1) + QString(" - ") + item->text(0)); + errorItems.append(item->text(1) + TQString(" - ") + item->text(0)); continue; } } @@ -182,7 +182,7 @@ bool TagTransactionManager::processChangeList(bool undo) } else { Tag *errorTag = item->file().tag(); - QString str = errorTag->artist() + " - " + errorTag->title(); + TQString str = errorTag->artist() + " - " + errorTag->title(); if(errorTag->artist().isEmpty()) str = errorTag->title(); @@ -200,7 +200,7 @@ bool TagTransactionManager::processChangeList(bool undo) action("edit_undo")->setEnabled(false); if(!errorItems.isEmpty()) - KMessageBox::errorList(static_cast(parent()), + KMessageBox::errorList(static_cast(parent()), i18n("The following files were unable to be changed."), errorItems, i18n("Error")); diff --git a/juk/tagtransactionmanager.h b/juk/tagtransactionmanager.h index ce39393f..85bfc0b7 100644 --- a/juk/tagtransactionmanager.h +++ b/juk/tagtransactionmanager.h @@ -33,7 +33,7 @@ class TagTransactionAtom { public: /** - * Default constructor, for use by QValueList. + * Default constructor, for use by TQValueList. */ TagTransactionAtom(); @@ -63,7 +63,7 @@ class TagTransactionAtom /** * Assignment operator. This operator takes ownership of the m_tag pointer, * so the object being assigned from no longer has access to the tag. This - * function exists mainly for the benefit of QValueList. + * function exists mainly for the benefit of TQValueList. * * @param other The TagTransactionAtom to copy from. * @return The TagTransactionAtom being assigned to. @@ -89,7 +89,7 @@ class TagTransactionAtom mutable Tag *m_tag; }; -typedef QValueList TagAlterationList; +typedef TQValueList TagAlterationList; /** * This class manages alterations of a group of PlaylistItem's FileHandles. What this @@ -111,9 +111,9 @@ class TagTransactionManager : public QObject /** * Constructs a TagTransactionManager, owned by @p parent. * - * @param parent The parent QWidget. + * @param parent The parent TQWidget. */ - TagTransactionManager(QWidget *parent = 0); + TagTransactionManager(TQWidget *parent = 0); /** * Returns the global TagTransactionManager instance. @@ -137,13 +137,13 @@ class TagTransactionManager : public QObject * object doesn't have a decent copy constructor. * * @param tag The Tag to duplicate. - * @param fileName The filename to assign to the tag. If QString::null + * @param fileName The filename to assign to the tag. If TQString::null * (the default) is passed, the filename of the existing tag is * used. * @bug Tag should have a correct copy ctor and assignment operator. * @return The duplicate Tag. */ - static Tag *duplicateTag(const Tag *tag, const QString &fileName = QString::null); + static Tag *duplicateTag(const Tag *tag, const TQString &fileName = TQString::null); /** * Commits the changes to the PlaylistItems. It is important that the @@ -188,11 +188,11 @@ class TagTransactionManager : public QObject * Renames the file identified by @p from to have the name given by @p to, * prompting the user to confirm if necessary. * - * @param from QFileInfo with the filename of the original file. - * @param to QFileInfo with the new filename. + * @param from TQFileInfo with the filename of the original file. + * @param to TQFileInfo with the new filename. * @return true if no errors occurred, false otherwise. */ - bool renameFile(const QFileInfo &from, const QFileInfo &to) const; + bool renameFile(const TQFileInfo &from, const TQFileInfo &to) const; /** * Used internally by commit() and undo(). Performs the work of updating diff --git a/juk/trackpickerdialog.cpp b/juk/trackpickerdialog.cpp index 44cf8f7a..407ffea2 100644 --- a/juk/trackpickerdialog.cpp +++ b/juk/trackpickerdialog.cpp @@ -17,7 +17,7 @@ #if HAVE_MUSICBRAINZ -#include +#include #include #include @@ -25,7 +25,7 @@ #include "trackpickerdialog.h" #include "trackpickerdialogbase.h" -#define NUMBER(x) (x == 0 ? QString::null : QString::number(x)) +#define NUMBER(x) (x == 0 ? TQString::null : TQString::number(x)) class TrackPickerItem : public KListViewItem { @@ -45,9 +45,9 @@ private: // public methods //////////////////////////////////////////////////////////////////////////////// -TrackPickerDialog::TrackPickerDialog(const QString &name, +TrackPickerDialog::TrackPickerDialog(const TQString &name, const KTRMResultList &results, - QWidget *parent) : + TQWidget *parent) : KDialogBase(parent, name.latin1(), true, i18n("Internet Tag Guesser"), Ok | Cancel, Ok, true) { m_base = new TrackPickerDialogBase(this); @@ -61,8 +61,8 @@ TrackPickerDialog::TrackPickerDialog(const QString &name, m_base->trackList->setSelected(m_base->trackList->firstChild(), true); - connect(m_base->trackList, SIGNAL(doubleClicked(QListViewItem *, const QPoint &, int)), - this, SLOT(accept())); + connect(m_base->trackList, TQT_SIGNAL(doubleClicked(TQListViewItem *, const TQPoint &, int)), + this, TQT_SLOT(accept())); setMinimumWidth(kMax(400, width())); } diff --git a/juk/trackpickerdialog.h b/juk/trackpickerdialog.h index 623944d8..06450efa 100644 --- a/juk/trackpickerdialog.h +++ b/juk/trackpickerdialog.h @@ -31,9 +31,9 @@ class TrackPickerDialog : public KDialogBase Q_OBJECT public: - TrackPickerDialog(const QString &name, + TrackPickerDialog(const TQString &name, const KTRMResultList &results, - QWidget *parent = 0); + TQWidget *parent = 0); virtual ~TrackPickerDialog(); diff --git a/juk/tracksequenceiterator.cpp b/juk/tracksequenceiterator.cpp index 2c71008a..d53a3a17 100644 --- a/juk/tracksequenceiterator.cpp +++ b/juk/tracksequenceiterator.cpp @@ -179,9 +179,9 @@ void DefaultSequenceIterator::prepareToPlay(Playlist *playlist) refillRandomList(); } else { - QListViewItemIterator it(playlist, QListViewItemIterator::Visible | QListViewItemIterator::Selected); + TQListViewItemIterator it(playlist, TQListViewItemIterator::Visible | TQListViewItemIterator::Selected); if(!it.current()) - it = QListViewItemIterator(playlist, QListViewItemIterator::Visible); + it = TQListViewItemIterator(playlist, TQListViewItemIterator::Visible); setCurrent(static_cast(it.current())); } diff --git a/juk/tracksequencemanager.cpp b/juk/tracksequencemanager.cpp index 7e05f825..828c61d5 100644 --- a/juk/tracksequencemanager.cpp +++ b/juk/tracksequencemanager.cpp @@ -121,8 +121,8 @@ void TrackSequenceManager::setCurrentPlaylist(Playlist *list) m_playlist->disconnect(this); m_playlist = list; - connect(m_playlist, SIGNAL(signalAboutToRemove(PlaylistItem *)), - this, SLOT(slotItemAboutToDie(PlaylistItem *))); + connect(m_playlist, TQT_SIGNAL(signalAboutToRemove(PlaylistItem *)), + this, TQT_SLOT(slotItemAboutToDie(PlaylistItem *))); } void TrackSequenceManager::setCurrent(PlaylistItem *item) @@ -148,14 +148,14 @@ void TrackSequenceManager::initialize() return; // Make sure we don't use m_playNextItem if it's invalid. - connect(collection, SIGNAL(signalAboutToRemove(PlaylistItem *)), - this, SLOT(slotItemAboutToDie(PlaylistItem *))); + connect(collection, TQT_SIGNAL(signalAboutToRemove(PlaylistItem *)), + this, TQT_SLOT(slotItemAboutToDie(PlaylistItem *))); m_initialized = true; } TrackSequenceManager::TrackSequenceManager() : - QObject(), + TQObject(), m_playlist(0), m_playNextItem(0), m_popupMenu(0), diff --git a/juk/tracksequencemanager.h b/juk/tracksequencemanager.h index 3aa186cd..a83cd508 100644 --- a/juk/tracksequencemanager.h +++ b/juk/tracksequencemanager.h @@ -16,7 +16,7 @@ #ifndef _TRACKSEQUENCEMANAGER_H #define _TRACKSEQUENCEMANAGER_H -#include +#include class KPopupMenu; class TrackSequenceIterator; diff --git a/juk/treeviewitemplaylist.cpp b/juk/treeviewitemplaylist.cpp index 9096979a..22872760 100644 --- a/juk/treeviewitemplaylist.cpp +++ b/juk/treeviewitemplaylist.cpp @@ -18,8 +18,8 @@ #include #include -#include -#include +#include +#include #include "collectionlist.h" #include "treeviewitemplaylist.h" @@ -30,21 +30,21 @@ TreeViewItemPlaylist::TreeViewItemPlaylist(PlaylistCollection *collection, const PlaylistSearch &search, - const QString &name) : + const TQString &name) : SearchPlaylist(collection, search, name, false) { PlaylistSearch::Component component = *(search.components().begin()); m_columnType = static_cast(*(component.columns().begin())); } -void TreeViewItemPlaylist::retag(const QStringList &files, Playlist *) +void TreeViewItemPlaylist::retag(const TQStringList &files, Playlist *) { CollectionList *collection = CollectionList::instance(); if(files.isEmpty()) return; - QString changedTag = i18n("artist"); + TQString changedTag = i18n("artist"); if(m_columnType == PlaylistItem::GenreColumn) changedTag = i18n("genre"); else if(m_columnType == PlaylistItem::AlbumColumn) @@ -62,7 +62,7 @@ void TreeViewItemPlaylist::retag(const QStringList &files, Playlist *) return; } - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for(it = files.begin(); it != files.end(); ++it) { CollectionListItem *item = collection->lookup(*it); if(!item) diff --git a/juk/treeviewitemplaylist.h b/juk/treeviewitemplaylist.h index 6b0e13c2..7458172b 100644 --- a/juk/treeviewitemplaylist.h +++ b/juk/treeviewitemplaylist.h @@ -28,10 +28,10 @@ class TreeViewItemPlaylist : public SearchPlaylist public: TreeViewItemPlaylist(PlaylistCollection *collection, const PlaylistSearch &search = PlaylistSearch(), - const QString &name = QString::null); + const TQString &name = TQString::null); virtual bool searchIsEditable() const { return false; } - void retag(const QStringList &files, Playlist *donorPlaylist); + void retag(const TQStringList &files, Playlist *donorPlaylist); signals: void signalTagsChanged(); diff --git a/juk/upcomingplaylist.cpp b/juk/upcomingplaylist.cpp index a9cdbcb7..f31e3144 100644 --- a/juk/upcomingplaylist.cpp +++ b/juk/upcomingplaylist.cpp @@ -113,12 +113,12 @@ void UpcomingPlaylist::clearItem(PlaylistItem *item, bool emitChanged) Playlist::clearItem(item, emitChanged); } -void UpcomingPlaylist::addFiles(const QStringList &files, PlaylistItem *after) +void UpcomingPlaylist::addFiles(const TQStringList &files, PlaylistItem *after) { CollectionList::instance()->addFiles(files, after); PlaylistItemList l; - for(QStringList::ConstIterator it = files.begin(); it != files.end(); ++it) { + for(TQStringList::ConstIterator it = files.begin(); it != files.end(); ++it) { FileHandle f(*it); PlaylistItem *i = CollectionList::instance()->lookup(f.absFilePath()); if(i) @@ -128,7 +128,7 @@ void UpcomingPlaylist::addFiles(const QStringList &files, PlaylistItem *after) appendItems(l); } -QMap< PlaylistItem::Pointer, QGuardedPtr > &UpcomingPlaylist::playlistIndex() +TQMap< PlaylistItem::Pointer, TQGuardedPtr > &UpcomingPlaylist::playlistIndex() { return m_playlistIndex; } @@ -246,7 +246,7 @@ void UpcomingPlaylist::UpcomingSequenceIterator::prepareToPlay(Playlist *) setCurrent(m_playlist->firstChild()); } -QDataStream &operator<<(QDataStream &s, const UpcomingPlaylist &p) +TQDataStream &operator<<(TQDataStream &s, const UpcomingPlaylist &p) { PlaylistItemList l = const_cast(&p)->items(); @@ -258,9 +258,9 @@ QDataStream &operator<<(QDataStream &s, const UpcomingPlaylist &p) return s; } -QDataStream &operator>>(QDataStream &s, UpcomingPlaylist &p) +TQDataStream &operator>>(TQDataStream &s, UpcomingPlaylist &p) { - QString fileName; + TQString fileName; PlaylistItem *newItem = 0; Q_INT32 count; diff --git a/juk/upcomingplaylist.h b/juk/upcomingplaylist.h index ee0570f9..4bd7b712 100644 --- a/juk/upcomingplaylist.h +++ b/juk/upcomingplaylist.h @@ -17,7 +17,7 @@ #define _UPCOMINGPLAYLIST_H -#include +#include #include "playlist.h" #include "tracksequenceiterator.h" @@ -90,14 +90,14 @@ public: */ virtual void clearItem(PlaylistItem *item, bool emitChanged = true); - virtual void addFiles(const QStringList &files, PlaylistItem *after = 0); + virtual void addFiles(const TQStringList &files, PlaylistItem *after = 0); /** * Returns a reference to the index between items in the list and the * playlist that they came from. This is used to remap the currently * playing item to the source playlist. */ - QMap > &playlistIndex(); + TQMap > &playlistIndex(); bool active() const { return m_active; } @@ -125,7 +125,7 @@ private: bool m_active; TrackSequenceIterator *m_oldIterator; int m_defaultSize; - QMap > m_playlistIndex; + TQMap > m_playlistIndex; }; /** @@ -205,8 +205,8 @@ private: UpcomingPlaylist *m_playlist; }; -QDataStream &operator<<(QDataStream &s, const UpcomingPlaylist &p); -QDataStream &operator>>(QDataStream &s, UpcomingPlaylist &p); +TQDataStream &operator<<(TQDataStream &s, const UpcomingPlaylist &p); +TQDataStream &operator>>(TQDataStream &s, UpcomingPlaylist &p); #endif /* _UPCOMINGPLAYLIST_H */ diff --git a/juk/viewmode.cpp b/juk/viewmode.cpp index 4bd4b9d8..6c46278b 100644 --- a/juk/viewmode.cpp +++ b/juk/viewmode.cpp @@ -17,11 +17,11 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "viewmode.h" #include "playlistbox.h" @@ -34,7 +34,7 @@ //////////////////////////////////////////////////////////////////////////////// ViewMode::ViewMode(PlaylistBox *b) : - QObject(b), + TQObject(b), m_playlistBox(b), m_visible(false), m_needsRefresh(false) @@ -48,8 +48,8 @@ ViewMode::~ViewMode() } void ViewMode::paintCell(PlaylistBox::Item *item, - QPainter *painter, - const QColorGroup &colorGroup, + TQPainter *painter, + const TQColorGroup &colorGroup, int column, int width, int) { if(width < item->pixmap(column)->width()) @@ -58,28 +58,28 @@ void ViewMode::paintCell(PlaylistBox::Item *item, if(m_needsRefresh) updateHeights(); - QFontMetrics fm = painter->fontMetrics(); + TQFontMetrics fm = painter->fontMetrics(); int y = item->listView()->itemMargin() + border; - const QPixmap *pm = item->pixmap(column); + const TQPixmap *pm = item->pixmap(column); if(item->isSelected()) { painter->eraseRect(0, 0, width, item->height()); - QPen oldPen = painter->pen(); - QPen newPen = oldPen; + TQPen oldPen = painter->pen(); + TQPen newPen = oldPen; newPen.setWidth(5); newPen.setJoinStyle(RoundJoin); - newPen.setColor(QColorGroup::Highlight); + newPen.setColor(TQColorGroup::Highlight); painter->setPen(newPen); painter->drawRect(border, border, width - border * 2, item->height() - border * 2 + 1); painter->setPen(oldPen); painter->fillRect(border, border, width - border * 2, item->height() - border * 2 + 1, - colorGroup.brush(QColorGroup::Highlight)); + colorGroup.brush(TQColorGroup::Highlight)); painter->setPen(colorGroup.highlightedText()); } else @@ -91,7 +91,7 @@ void ViewMode::paintCell(PlaylistBox::Item *item, painter->drawPixmap(x, y, *pm); } y += pm->height() + fm.height() - fm.descent(); - for(QStringList::Iterator it = m_lines[item].begin(); it != m_lines[item].end(); ++it) { + for(TQStringList::Iterator it = m_lines[item].begin(); it != m_lines[item].end(); ++it) { int x = (width - fm.width(*it)) / 2; x = QMAX(x, item->listView()->itemMargin()); painter->drawText(x, y, *it); @@ -102,18 +102,18 @@ void ViewMode::paintCell(PlaylistBox::Item *item, paintDropIndicator(painter, width, item->height()); } -bool ViewMode::eventFilter(QObject *watched, QEvent *e) +bool ViewMode::eventFilter(TQObject *watched, TQEvent *e) { - if(m_visible && watched == m_playlistBox->viewport() && e->type() == QEvent::Resize) { - QResizeEvent *re = static_cast(e); + if(m_visible && watched == m_playlistBox->viewport() && e->type() == TQEvent::Resize) { + TQResizeEvent *re = static_cast(e); if(re->size().width() != re->oldSize().width()) m_needsRefresh = true; } - if(e->type() == QEvent::Hide) + if(e->type() == TQEvent::Hide) m_needsRefresh = true; - return QObject::eventFilter(watched, e); + return TQObject::eventFilter(watched, e); } void ViewMode::setShown(bool shown) @@ -127,7 +127,7 @@ void ViewMode::setShown(bool shown) void ViewMode::updateIcons(int size) { - for(QListViewItemIterator it(m_playlistBox); it.current(); ++it) { + for(TQListViewItemIterator it(m_playlistBox); it.current(); ++it) { PlaylistBox::Item *i = static_cast(*it); i->setPixmap(0, SmallIcon(i->iconName(), size)); } @@ -138,7 +138,7 @@ void ViewMode::setupItem(PlaylistBox::Item *item) const const PlaylistBox *box = item->listView(); const int width = box->width() - box->verticalScrollBar()->width() - border * 2; const int baseHeight = 2 * box->itemMargin() + 32 + border * 2; - const QFontMetrics fm = box->fontMetrics(); + const TQFontMetrics fm = box->fontMetrics(); item->setHeight(baseHeight + (fm.height() - fm.descent()) * lines(item, fm, width).count()); } @@ -147,9 +147,9 @@ void ViewMode::updateHeights() const int width = m_playlistBox->width() - m_playlistBox->verticalScrollBar()->width() - border * 2; const int baseHeight = 2 * m_playlistBox->itemMargin() + 32 + border * 2; - const QFontMetrics fm = m_playlistBox->fontMetrics(); + const TQFontMetrics fm = m_playlistBox->fontMetrics(); - for(QListViewItemIterator it(m_playlistBox); it.current(); ++it) { + for(TQListViewItemIterator it(m_playlistBox); it.current(); ++it) { PlaylistBox::Item *i = static_cast(it.current()); m_lines[i] = lines(i, fm, width); const int height = baseHeight + (fm.height() - fm.descent()) * m_lines[i].count(); @@ -159,13 +159,13 @@ void ViewMode::updateHeights() m_needsRefresh = false; } -void ViewMode::paintDropIndicator(QPainter *painter, int width, int height) // static +void ViewMode::paintDropIndicator(TQPainter *painter, int width, int height) // static { static const int border = 1; static const int lineWidth = 2; - QPen oldPen = painter->pen(); - QPen newPen = oldPen; + TQPen oldPen = painter->pen(); + TQPen newPen = oldPen; newPen.setWidth(lineWidth); newPen.setStyle(DotLine); @@ -175,19 +175,19 @@ void ViewMode::paintDropIndicator(QPainter *painter, int width, int height) // s painter->setPen(oldPen); } -QStringList ViewMode::lines(const PlaylistBox::Item *item, - const QFontMetrics &fm, +TQStringList ViewMode::lines(const PlaylistBox::Item *item, + const TQFontMetrics &fm, int width) { // Here 32 is a bit arbitrary, but that's the width of the icons in this // mode and seems to a reasonable lower bound. if(width < 32) - return QStringList(); + return TQStringList(); - QString line = item->text(); + TQString line = item->text(); - QStringList l; + TQStringList l; while(!line.isEmpty()) { int textLength = line.length(); @@ -195,7 +195,7 @@ QStringList ViewMode::lines(const PlaylistBox::Item *item, fm.width(line.mid(0, textLength).stripWhiteSpace()) + item->listView()->itemMargin() * 2 > width) { - int i = line.findRev(QRegExp( "\\W"), textLength - 1); + int i = line.findRev(TQRegExp( "\\W"), textLength - 1); if(i > 0) textLength = i; else @@ -223,8 +223,8 @@ CompactViewMode::~CompactViewMode() } void CompactViewMode::paintCell(PlaylistBox::Item *item, - QPainter *painter, - const QColorGroup &colorGroup, + TQPainter *painter, + const TQColorGroup &colorGroup, int column, int width, int align) { item->KListViewItem::paintCell(painter, colorGroup, column, width, align); @@ -244,7 +244,7 @@ void CompactViewMode::setShown(bool shown) void CompactViewMode::updateHeights() { - for(QListViewItemIterator it(playlistBox()); it.current(); ++it) + for(TQListViewItemIterator it(playlistBox()); it.current(); ++it) it.current()->setup(); } @@ -278,7 +278,7 @@ void TreeViewMode::setShown(bool show) if(collectionItem && m_searchCategories.isEmpty()) setupDynamicPlaylists(); else { - for(QDictIterator it(m_searchCategories); it.current(); ++it) + for(TQDictIterator it(m_searchCategories); it.current(); ++it) it.current()->setVisible(true); } @@ -291,17 +291,17 @@ void TreeViewMode::setShown(bool show) } } else { - for(QDictIterator it(m_searchCategories); it.current(); ++it) + for(TQDictIterator it(m_searchCategories); it.current(); ++it) it.current()->setVisible(false); } } -void TreeViewMode::removeItem(const QString &item, unsigned column) +void TreeViewMode::removeItem(const TQString &item, unsigned column) { if(!m_setup) return; - QString itemKey; + TQString itemKey; if(column == PlaylistItem::ArtistColumn) itemKey = "artists" + item; else if(column == PlaylistItem::GenreColumn) @@ -328,12 +328,12 @@ void TreeViewMode::removeItem(const QString &item, unsigned column) emit signalPlaylistDestroyed(itemPlaylist); } -void TreeViewMode::addItems(const QStringList &items, unsigned column) +void TreeViewMode::addItems(const TQStringList &items, unsigned column) { if(!m_setup) return; - QString searchCategory; + TQString searchCategory; if(column == PlaylistItem::ArtistColumn) searchCategory = "artists"; else if(column == PlaylistItem::GenreColumn) @@ -345,7 +345,7 @@ void TreeViewMode::addItems(const QStringList &items, unsigned column) return; } - QValueList columns; + TQValueList columns; columns.append(column); PlaylistSearch::Component::MatchMode mode = PlaylistSearch::Component::ContainsWord; @@ -356,10 +356,10 @@ void TreeViewMode::addItems(const QStringList &items, unsigned column) PlaylistList playlists; playlists.append(CollectionList::instance()); - QString itemKey, item; + TQString itemKey, item; PlaylistBox::Item *itemParent = m_searchCategories[searchCategory]; - for(QStringList::ConstIterator it = items.begin(); it != items.end(); ++it) { + for(TQStringList::ConstIterator it = items.begin(); it != items.end(); ++it) { item = *it; itemKey = searchCategory + item; @@ -384,10 +384,10 @@ void TreeViewMode::setDynamicListsFrozen(bool frozen) if(frozen) return; - QStringList categories; + TQStringList categories; categories << "artists" << "albums" << "genres"; - for(QStringList::ConstIterator it = m_pendingItemsToRemove.begin(); + for(TQStringList::ConstIterator it = m_pendingItemsToRemove.begin(); it != m_pendingItemsToRemove.end(); ++it) { diff --git a/juk/viewmode.h b/juk/viewmode.h index dcb5574c..9ec3e0db 100644 --- a/juk/viewmode.h +++ b/juk/viewmode.h @@ -17,7 +17,7 @@ #define VIEWMODE_H -#include +#include #include "playlistbox.h" @@ -34,15 +34,15 @@ public: ViewMode(PlaylistBox *b); virtual ~ViewMode(); - virtual QString name() const { return i18n("Default"); } + virtual TQString name() const { return i18n("Default"); } virtual void setShown(bool shown); virtual void paintCell(PlaylistBox::Item *item, - QPainter *painter, - const QColorGroup &colorGroup, + TQPainter *painter, + const TQColorGroup &colorGroup, int column, int width, int align); - virtual bool eventFilter(QObject *watched, QEvent *e); + virtual bool eventFilter(TQObject *watched, TQEvent *e); void queueRefresh() { m_needsRefresh = true; } virtual void setupItem(PlaylistBox::Item *item) const; @@ -58,7 +58,7 @@ public: * Used for dynamic view modes. This function will be called when \p items * are added to \p column (even if the view mode hasn't been shown yet). */ - virtual void addItems(const QStringList &items, unsigned column) + virtual void addItems(const TQStringList &items, unsigned column) { (void) items; (void) column; @@ -68,7 +68,7 @@ public: * Used for dynamic view modes. This function will be called when \p item * is removed from \p column (even if the view mode hasn't been shown yet). */ - virtual void removeItem(const QString &item, unsigned column) + virtual void removeItem(const TQString &item, unsigned column) { (void) item; (void) column; @@ -80,15 +80,15 @@ protected: void setVisible(bool v) { m_visible = v; } void updateIcons(int size); virtual void updateHeights(); - static void paintDropIndicator(QPainter *painter, int width, int height); + static void paintDropIndicator(TQPainter *painter, int width, int height); private: - static QStringList lines(const PlaylistBox::Item *item, const QFontMetrics &fm, int width); + static TQStringList lines(const PlaylistBox::Item *item, const TQFontMetrics &fm, int width); PlaylistBox *m_playlistBox; bool m_visible; bool m_needsRefresh; - QMap m_lines; + TQMap m_lines; static const int border = 4; }; @@ -100,12 +100,12 @@ public: CompactViewMode(PlaylistBox *b); virtual ~CompactViewMode(); - virtual QString name() const { return i18n("Compact"); } + virtual TQString name() const { return i18n("Compact"); } virtual void setShown(bool shown); virtual void paintCell(PlaylistBox::Item *item, - QPainter *painter, - const QColorGroup &colorGroup, + TQPainter *painter, + const TQColorGroup &colorGroup, int column, int width, int align); virtual void setupItem(PlaylistBox::Item *item) const { item->KListViewItem::setup(); } @@ -125,21 +125,21 @@ public: TreeViewMode(PlaylistBox *l); virtual ~TreeViewMode(); - virtual QString name() const { return i18n("Tree"); } + virtual TQString name() const { return i18n("Tree"); } virtual void setShown(bool shown); virtual void setupDynamicPlaylists(); virtual void setDynamicListsFrozen(bool frozen); - virtual void removeItem(const QString &item, unsigned column); - virtual void addItems(const QStringList &items, unsigned column); + virtual void removeItem(const TQString &item, unsigned column); + virtual void addItems(const TQStringList &items, unsigned column); signals: void signalPlaylistDestroyed(Playlist*); private: - QDict m_searchCategories; - QDict m_treeViewItems; - QStringList m_pendingItemsToRemove; + TQDict m_searchCategories; + TQDict m_treeViewItems; + TQStringList m_pendingItemsToRemove; bool m_dynamicListsFrozen; bool m_setup; }; @@ -152,7 +152,7 @@ class CoverManagerMode : public ViewMode public: CoverManagerMode(PlaylistBox *b); - virtual QString name() const { return i18n("Cover Manager"); } + virtual TQString name() const { return i18n("Cover Manager"); } //virtual void setShown(bool shown); }; diff --git a/juk/webimagefetcher.cpp b/juk/webimagefetcher.cpp index 3e806bff..1e5bec83 100644 --- a/juk/webimagefetcher.cpp +++ b/juk/webimagefetcher.cpp @@ -12,9 +12,9 @@ * * ***************************************************************************/ -#include -#include -#include +#include +#include +#include #include #include @@ -33,22 +33,22 @@ WebImage::WebImage() { } -WebImage::WebImage(const QString &imageURL, const QString &thumbURL, +WebImage::WebImage(const TQString &imageURL, const TQString &thumbURL, int width, int height) : m_imageURL(imageURL), m_thumbURL(thumbURL), - m_size(QString("\n%1 x %2").arg(width).arg(height)) + m_size(TQString("\n%1 x %2").arg(width).arg(height)) { } -WebImageFetcher::WebImageFetcher(QObject *parent) - : QObject(parent), - m_connection(new QHttp(this)), +WebImageFetcher::WebImageFetcher(TQObject *parent) + : TQObject(parent), + m_connection(new TQHttp(this)), m_connectionId(-1), m_dialog(0) { - connect(m_connection, SIGNAL(requestFinished(int,bool)), SLOT(slotWebRequestFinished(int,bool))); + connect(m_connection, TQT_SIGNAL(requestFinished(int,bool)), TQT_SLOT(slotWebRequestFinished(int,bool))); } WebImageFetcher::~WebImageFetcher() @@ -59,7 +59,7 @@ WebImageFetcher::~WebImageFetcher() void WebImageFetcher::setFile(const FileHandle &file) { m_file = file; - m_searchString = QString(file.tag()->artist() + ' ' + file.tag()->album()); + m_searchString = TQString(file.tag()->artist() + ' ' + file.tag()->album()); if(m_dialog) m_dialog->setFile(file); @@ -103,9 +103,9 @@ void WebImageFetcher::slotWebRequestFinished(int id, bool error) return; } - QDomDocument results("ResultSet"); + TQDomDocument results("ResultSet"); - QString errorStr; + TQString errorStr; int errorCol, errorLine; if(!results.setContent(m_connection->readAll(), &errorStr, &errorLine, &errorCol)) { kdError(65432) << "Unable to create XML document from Yahoo results.\n"; @@ -113,7 +113,7 @@ void WebImageFetcher::slotWebRequestFinished(int id, bool error) return; } - QDomNode n = results.documentElement(); + TQDomNode n = results.documentElement(); bool hasNoResults = false; @@ -122,7 +122,7 @@ void WebImageFetcher::slotWebRequestFinished(int id, bool error) hasNoResults = true; } else { - QDomElement result = n.toElement(); + TQDomElement result = n.toElement(); if(result.attribute("totalResultsReturned").toInt() == 0) kdDebug(65432) << "Search returned " << result.attribute("totalResultsAvailable") << " results.\n"; @@ -144,10 +144,10 @@ void WebImageFetcher::slotWebRequestFinished(int id, bool error) n = n.firstChild(); while(!n.isNull()) { - QDomNode resultUrl = n.namedItem("Url"); - QDomNode thumbnail = n.namedItem("Thumbnail"); - QDomNode height = n.namedItem("Height"); - QDomNode width = n.namedItem("Width"); + TQDomNode resultUrl = n.namedItem("Url"); + TQDomNode thumbnail = n.namedItem("Thumbnail"); + TQDomNode height = n.namedItem("Height"); + TQDomNode width = n.namedItem("Width"); // We have the necessary info, move to next node before we forget. n = n.nextSibling(); @@ -173,8 +173,8 @@ void WebImageFetcher::slotWebRequestFinished(int id, bool error) m_dialog = new WebImageFetcherDialog(m_imageList, m_file, 0); m_dialog->setModal(true); - connect(m_dialog, SIGNAL(coverSelected()), SLOT(slotCoverChosen())); - connect(m_dialog, SIGNAL(newSearchRequested()), SLOT(slotNewSearch())); + connect(m_dialog, TQT_SIGNAL(coverSelected()), TQT_SLOT(slotCoverChosen())); + connect(m_dialog, TQT_SIGNAL(newSearchRequested()), TQT_SLOT(slotNewSearch())); } m_dialog->refreshScreen(m_imageList); @@ -183,7 +183,7 @@ void WebImageFetcher::slotWebRequestFinished(int id, bool error) void WebImageFetcher::slotCoverChosen() { - QPixmap pixmap = m_dialog->result(); + TQPixmap pixmap = m_dialog->result(); if(pixmap.isNull()) { kdError(65432) << "Selected pixmap is null for some reason.\n"; return; @@ -210,7 +210,7 @@ void WebImageFetcher::displayWaitMessage() void WebImageFetcher::requestNewSearchTerms(bool noResults) { bool ok; - QString search = KInputDialog::getText(i18n("Cover Downloader"), + TQString search = KInputDialog::getText(i18n("Cover Downloader"), noResults ? i18n("No matching images found, please enter new search terms:") : i18n("Enter new search terms:"), diff --git a/juk/webimagefetcher.h b/juk/webimagefetcher.h index 796e205e..9706e6ad 100644 --- a/juk/webimagefetcher.h +++ b/juk/webimagefetcher.h @@ -19,9 +19,9 @@ #include -#include -#include -#include +#include +#include +#include #include "filehandle.h" @@ -36,28 +36,28 @@ class WebImage public: WebImage(); - WebImage(const QString &imageURL, - const QString &thumbURL, + WebImage(const TQString &imageURL, + const TQString &thumbURL, int width, int height); - QString imageURL() const { return m_imageURL; } - QString thumbURL() const { return m_thumbURL; } - QString size() const { return m_size; } + TQString imageURL() const { return m_imageURL; } + TQString thumbURL() const { return m_thumbURL; } + TQString size() const { return m_size; } private: - QString m_imageURL; - QString m_thumbURL; - QString m_size; + TQString m_imageURL; + TQString m_thumbURL; + TQString m_size; }; -typedef QValueList WebImageList; +typedef TQValueList WebImageList; class WebImageFetcher : public QObject { Q_OBJECT public: - WebImageFetcher(QObject *parent); + WebImageFetcher(TQObject *parent); ~WebImageFetcher(); void setFile(const FileHandle &file); @@ -82,11 +82,11 @@ private slots: private: FileHandle m_file; - QString m_searchString; - QString m_loadedQuery; + TQString m_searchString; + TQString m_loadedQuery; WebImageList m_imageList; uint m_selectedIndex; - QHttp *m_connection; + TQHttp *m_connection; int m_connectionId; WebImageFetcherDialog *m_dialog; }; diff --git a/juk/webimagefetcherdialog.cpp b/juk/webimagefetcherdialog.cpp index cc14ed61..5e9e0d0c 100644 --- a/juk/webimagefetcherdialog.cpp +++ b/juk/webimagefetcherdialog.cpp @@ -24,39 +24,39 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include "webimagefetcherdialog.h" #include "tag.h" WebImageFetcherDialog::WebImageFetcherDialog(const WebImageList &imageList, const FileHandle &file, - QWidget *parent) : - KDialogBase(parent, "internet_image_fetcher", true, QString::null, + TQWidget *parent) : + KDialogBase(parent, "internet_image_fetcher", true, TQString::null, Ok | Cancel | User1 , NoDefault, true), - m_pixmap(QPixmap()), + m_pixmap(TQPixmap()), m_imageList(imageList), m_file(file) { disableResize(); - QWidget *mainBox = new QWidget(this); - QBoxLayout *mainLayout = new QVBoxLayout(mainBox); + TQWidget *mainBox = new TQWidget(this); + TQBoxLayout *mainLayout = new TQVBoxLayout(mainBox); m_iconWidget = new KIconView(mainBox); - m_iconWidget->setResizeMode(QIconView::Adjust); + m_iconWidget->setResizeMode(TQIconView::Adjust); m_iconWidget->setSpacing(10); m_iconWidget->setFixedSize(500,550); m_iconWidget->arrangeItemsInGrid(); m_iconWidget->setItemsMovable(false); mainLayout->addWidget(m_iconWidget); - connect(m_iconWidget, SIGNAL(executed(QIconViewItem *)), - this, SLOT(slotOk())); + connect(m_iconWidget, TQT_SIGNAL(executed(TQIconViewItem *)), + this, TQT_SLOT(slotOk())); // Before changing the code below be sure to check the attribution terms // of the Yahoo Image Search API. @@ -66,10 +66,10 @@ WebImageFetcherDialog::WebImageFetcherDialog(const WebImageList &imageList, logoLabel->setPixmap(UserIcon("yahoo_credit")); logoLabel->setMargin(15); // Allow large margin per attribution terms. logoLabel->setUseTips(true); // Show URL in tooltip. - connect(logoLabel, SIGNAL(leftClickedURL(const QString &)), - SLOT(showCreditURL(const QString &))); + connect(logoLabel, TQT_SIGNAL(leftClickedURL(const TQString &)), + TQT_SLOT(showCreditURL(const TQString &))); - QBoxLayout *creditLayout = new QHBoxLayout(mainLayout); + TQBoxLayout *creditLayout = new TQHBoxLayout(mainLayout); creditLayout->addStretch(); // Left spacer creditLayout->addWidget(logoLabel); creditLayout->addStretch(); // Right spacer @@ -82,7 +82,7 @@ WebImageFetcherDialog::~WebImageFetcherDialog() { } -void WebImageFetcherDialog::showCreditURL(const QString &url) +void WebImageFetcherDialog::showCreditURL(const TQString &url) { // Don't use static member since I'm sure that someday knowing my luck // Yahoo will change their mimetype they serve. @@ -91,7 +91,7 @@ void WebImageFetcherDialog::showCreditURL(const QString &url) void WebImageFetcherDialog::setLayout() { - setCaption(QString("%1 - %2 (%3)") + setCaption(TQString("%1 - %2 (%3)") .arg(m_file.tag()->artist()) .arg(m_file.tag()->album()) .arg(m_imageList.size())); @@ -138,7 +138,7 @@ void WebImageFetcherDialog::slotOk() KMessageBox::sorry(this, i18n("The cover you have selected is unavailable. Please select another."), i18n("Cover Unavailable")); - QPixmap blankPix; + TQPixmap blankPix; blankPix.resize(80, 80); blankPix.fill(); m_iconWidget->currentItem()->setPixmap(blankPix, true, true); @@ -151,45 +151,45 @@ void WebImageFetcherDialog::slotOk() void WebImageFetcherDialog::slotCancel() { - m_pixmap = QPixmap(); + m_pixmap = TQPixmap(); reject(); } void WebImageFetcherDialog::slotUser1() { - m_pixmap = QPixmap(); + m_pixmap = TQPixmap(); accept(); emit newSearchRequested(); } -QPixmap WebImageFetcherDialog::fetchedImage(uint index) const +TQPixmap WebImageFetcherDialog::fetchedImage(uint index) const { - return (index > m_imageList.count()) ? QPixmap() : pixmapFromURL(m_imageList[index].imageURL()); + return (index > m_imageList.count()) ? TQPixmap() : pixmapFromURL(m_imageList[index].imageURL()); } -QPixmap WebImageFetcherDialog::pixmapFromURL(const KURL &url) const +TQPixmap WebImageFetcherDialog::pixmapFromURL(const KURL &url) const { - QString file; + TQString file; if(KIO::NetAccess::download(url, file, 0)) { - QPixmap pixmap = QPixmap(file); + TQPixmap pixmap = TQPixmap(file); KIO::NetAccess::removeTempFile(file); return pixmap; } KIO::NetAccess::removeTempFile(file); - return QPixmap(); + return TQPixmap(); } //////////////////////////////////////////////////////////////////////////////// // CoverIconViewItem //////////////////////////////////////////////////////////////////////////////// -CoverIconViewItem::CoverIconViewItem(QIconView *parent, const WebImage &image) : - QObject(parent), KIconViewItem(parent, parent->lastItem(), image.size()), m_job(0) +CoverIconViewItem::CoverIconViewItem(TQIconView *parent, const WebImage &image) : + TQObject(parent), KIconViewItem(parent, parent->lastItem(), image.size()), m_job(0) { // Set up the iconViewItem - QPixmap mainMap; + TQPixmap mainMap; mainMap.resize(80, 80); mainMap.fill(); setPixmap(mainMap, true, true); @@ -197,9 +197,9 @@ CoverIconViewItem::CoverIconViewItem(QIconView *parent, const WebImage &image) : // Start downloading the image. m_job = KIO::get(image.thumbURL(), false, false); - connect(m_job, SIGNAL(result(KIO::Job *)), this, SLOT(imageResult(KIO::Job *))); - connect(m_job, SIGNAL(data(KIO::Job *, const QByteArray &)), - this, SLOT(imageData(KIO::Job *, const QByteArray &))); + connect(m_job, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SLOT(imageResult(KIO::Job *))); + connect(m_job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)), + this, TQT_SLOT(imageData(KIO::Job *, const TQByteArray &))); } CoverIconViewItem::~CoverIconViewItem() @@ -209,16 +209,16 @@ CoverIconViewItem::~CoverIconViewItem() // Drain results issued by KIO before being deleted, // and before deleting the job. - kapp->eventLoop()->processEvents(QEventLoop::ExcludeUserInput); + kapp->eventLoop()->processEvents(TQEventLoop::ExcludeUserInput); delete m_job; } } -void CoverIconViewItem::imageData(KIO::Job *, const QByteArray &data) +void CoverIconViewItem::imageData(KIO::Job *, const TQByteArray &data) { int currentSize = m_buffer.size(); - m_buffer.resize(currentSize + data.size(), QGArray::SpeedOptim); + m_buffer.resize(currentSize + data.size(), TQGArray::SpeedOptim); memcpy(&(m_buffer.data()[currentSize]), data.data(), data.size()); } @@ -227,8 +227,8 @@ void CoverIconViewItem::imageResult(KIO::Job *job) if(job->error()) return; - QPixmap iconImage(m_buffer); - iconImage = QImage(iconImage.convertToImage()).smoothScale(80, 80, QImage::ScaleMin); + TQPixmap iconImage(m_buffer); + iconImage = TQImage(iconImage.convertToImage()).smoothScale(80, 80, TQImage::ScaleMin); setPixmap(iconImage, true, true); } diff --git a/juk/webimagefetcherdialog.h b/juk/webimagefetcherdialog.h index a4424a2f..d418a947 100644 --- a/juk/webimagefetcherdialog.h +++ b/juk/webimagefetcherdialog.h @@ -31,11 +31,11 @@ class WebImageFetcherDialog : public KDialogBase public: WebImageFetcherDialog(const WebImageList &urlList, const FileHandle &file, - QWidget *parent = 0); + TQWidget *parent = 0); virtual ~WebImageFetcherDialog(); - QPixmap result() const { return m_pixmap; } + TQPixmap result() const { return m_pixmap; } void setLayout(); void setImageList(const WebImageList &urlList); @@ -53,13 +53,13 @@ protected slots: void slotOk(); void slotCancel(); void slotUser1(); - void showCreditURL(const QString &url); + void showCreditURL(const TQString &url); private: - QPixmap fetchedImage(uint index) const; - QPixmap pixmapFromURL(const KURL &url) const; + TQPixmap fetchedImage(uint index) const; + TQPixmap pixmapFromURL(const KURL &url) const; - QPixmap m_pixmap; + TQPixmap m_pixmap; WebImageList m_imageList; KIconView *m_iconWidget; FileHandle m_file; @@ -70,21 +70,21 @@ namespace KIO class TransferJob; } -class CoverIconViewItem : public QObject, public KIconViewItem +class CoverIconViewItem : public TQObject, public KIconViewItem { Q_OBJECT public: - CoverIconViewItem(QIconView *parent, const WebImage &image); + CoverIconViewItem(TQIconView *parent, const WebImage &image); ~CoverIconViewItem(); private slots: - void imageData(KIO::Job *job, const QByteArray &data); + void imageData(KIO::Job *job, const TQByteArray &data); void imageResult(KIO::Job* job); private: - QByteArray m_buffer; - QGuardedPtr m_job; + TQByteArray m_buffer; + TQGuardedPtr m_job; }; #endif diff --git a/kaboodle/conf.cpp b/kaboodle/conf.cpp index eb5b0d7d..4570bf2e 100644 --- a/kaboodle/conf.cpp +++ b/kaboodle/conf.cpp @@ -25,19 +25,19 @@ #include #include -#include -#include +#include +#include #include "conf.h" #include "view.h" -Kaboodle::Conf::Conf(QWidget *_parent, const char *_name) - : KDialogBase(_parent, _name, true, QString::null, Ok | Cancel) +Kaboodle::Conf::Conf(TQWidget *_parent, const char *_name) + : KDialogBase(_parent, _name, true, TQString::null, Ok | Cancel) { - QVBox *box = makeVBoxMainWidget(); + TQVBox *box = makeVBoxMainWidget(); - autoPlay = new QCheckBox(i18n("Start playing automatically"), box); - quitAfterPlaying = new QCheckBox(i18n("Quit when finished playing"), box); + autoPlay = new TQCheckBox(i18n("Start playing automatically"), box); + quitAfterPlaying = new TQCheckBox(i18n("Quit when finished playing"), box); KConfig &config = *KGlobal::config(); config.setGroup("core"); diff --git a/kaboodle/conf.h b/kaboodle/conf.h index ecd1d0da..a79bc08a 100644 --- a/kaboodle/conf.h +++ b/kaboodle/conf.h @@ -38,13 +38,13 @@ class Conf : public KDialogBase Q_OBJECT public: - Conf(QWidget *_parent = 0, const char *_name = 0); + Conf(TQWidget *_parent = 0, const char *_name = 0); protected: virtual void accept(void); private: - QCheckBox *autoPlay, *quitAfterPlaying; + TQCheckBox *autoPlay, *quitAfterPlaying; }; } diff --git a/kaboodle/controls.cpp b/kaboodle/controls.cpp index 4d86e1c7..305ae661 100644 --- a/kaboodle/controls.cpp +++ b/kaboodle/controls.cpp @@ -23,15 +23,15 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "controls.h" -Kaboodle::L33tSlider::L33tSlider(QWidget * parent, const char * name) : - QSlider(parent,name), pressed(false) +Kaboodle::L33tSlider::L33tSlider(TQWidget * parent, const char * name) : + TQSlider(parent,name), pressed(false) {} -Kaboodle::L33tSlider::L33tSlider(Orientation o, QWidget * parent, const char * name) : - QSlider(o,parent,name), pressed(false) +Kaboodle::L33tSlider::L33tSlider(Orientation o, TQWidget * parent, const char * name) : + TQSlider(o,parent,name), pressed(false) {} Kaboodle::L33tSlider::L33tSlider(int minValue, int maxValue, int pageStep, int value, - Orientation o, QWidget * parent, const char * name) : - QSlider(minValue, maxValue, pageStep, value, o, parent,name), pressed(false) + Orientation o, TQWidget * parent, const char * name) : + TQSlider(minValue, maxValue, pageStep, value, o, parent,name), pressed(false) {} bool Kaboodle::L33tSlider::currentlyPressed() const @@ -42,28 +42,28 @@ bool Kaboodle::L33tSlider::currentlyPressed() const void Kaboodle::L33tSlider::setValue(int i) { if (!pressed) - QSlider::setValue(i); + TQSlider::setValue(i); } -void Kaboodle::L33tSlider::mousePressEvent(QMouseEvent*e) +void Kaboodle::L33tSlider::mousePressEvent(TQMouseEvent*e) { if (e->button()!=RightButton) { pressed=true; - QSlider::mousePressEvent(e); + TQSlider::mousePressEvent(e); } } -void Kaboodle::L33tSlider::mouseReleaseEvent(QMouseEvent*e) +void Kaboodle::L33tSlider::mouseReleaseEvent(TQMouseEvent*e) { pressed=false; - QSlider::mouseReleaseEvent(e); + TQSlider::mouseReleaseEvent(e); emit userChanged(value()); } -void Kaboodle::L33tSlider::wheelEvent(QWheelEvent *e) +void Kaboodle::L33tSlider::wheelEvent(TQWheelEvent *e) { - QSlider::wheelEvent(e); + TQSlider::wheelEvent(e); int newValue = value(); if(newValue < minValue()) @@ -75,15 +75,15 @@ void Kaboodle::L33tSlider::wheelEvent(QWheelEvent *e) emit userChanged(newValue); } -Kaboodle::SliderAction::SliderAction(const QString& text, int accel, const QObject *receiver, - const char *member, QObject* parent, const char* name ) +Kaboodle::SliderAction::SliderAction(const TQString& text, int accel, const TQObject *receiver, + const char *member, TQObject* parent, const char* name ) : KAction( text, accel, parent, name ) { m_receiver = receiver; m_member = member; } -int Kaboodle::SliderAction::plug( QWidget *w, int index ) +int Kaboodle::SliderAction::plug( TQWidget *w, int index ) { if (!w->inherits("KToolBar")) return -1; @@ -97,11 +97,11 @@ int Kaboodle::SliderAction::plug( QWidget *w, int index ) addContainer( toolBar, id ); - connect( toolBar, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) ); + connect( toolBar, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) ); toolBar->setItemAutoSized( id, true ); if (w->inherits( "KToolBar" )) - connect(toolBar, SIGNAL(moved(KToolBar::BarPosition)), this, SLOT(toolbarMoved(KToolBar::BarPosition))); + connect(toolBar, TQT_SIGNAL(moved(KToolBar::BarPosition)), this, TQT_SLOT(toolbarMoved(KToolBar::BarPosition))); emit plugged(); @@ -126,7 +126,7 @@ return; */ } -void Kaboodle::SliderAction::unplug( QWidget *w ) +void Kaboodle::SliderAction::unplug( TQWidget *w ) { KToolBar *toolBar = (KToolBar *)w; int idx = findContainer( w ); diff --git a/kaboodle/controls.h b/kaboodle/controls.h index d288d1fc..a434489f 100644 --- a/kaboodle/controls.h +++ b/kaboodle/controls.h @@ -24,12 +24,12 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #ifndef __CONTROLS_H #define __CONTROLS_H -#include +#include #include #include -#include -#include +#include +#include class QComboBox; class QLabel; @@ -44,10 +44,10 @@ class L33tSlider : public QSlider { Q_OBJECT public: - L33tSlider(QWidget * parent, const char * name=0); - L33tSlider(Orientation, QWidget * parent, const char * name=0); + L33tSlider(TQWidget * parent, const char * name=0); + L33tSlider(Orientation, TQWidget * parent, const char * name=0); L33tSlider(int minValue, int maxValue, int pageStep, int value, - Orientation, QWidget * parent, const char * name=0); + Orientation, TQWidget * parent, const char * name=0); bool currentlyPressed() const; signals: @@ -59,9 +59,9 @@ signals: public slots: virtual void setValue(int); protected: - virtual void mousePressEvent(QMouseEvent*); - virtual void mouseReleaseEvent(QMouseEvent*); - virtual void wheelEvent(QWheelEvent *e); + virtual void mousePressEvent(TQMouseEvent*); + virtual void mouseReleaseEvent(TQMouseEvent*); + virtual void wheelEvent(TQWheelEvent *e); private: bool pressed; @@ -74,11 +74,11 @@ class SliderAction : public KAction { Q_OBJECT public: - SliderAction(const QString& text, int accel, const QObject *receiver, - const char *member, QObject* parent, const char* name ); - virtual int plug( QWidget *w, int index = -1 ); - virtual void unplug( QWidget *w ); - QSlider* slider() const { return m_slider; } + SliderAction(const TQString& text, int accel, const TQObject *receiver, + const char *member, TQObject* parent, const char* name ); + virtual int plug( TQWidget *w, int index = -1 ); + virtual void unplug( TQWidget *w ); + TQSlider* slider() const { return m_slider; } signals: void plugged(); @@ -86,9 +86,9 @@ signals: public slots: void toolbarMoved(KToolBar::BarPosition pos); private: - QGuardedPtr m_slider; - QStringList m_items; - const QObject *m_receiver; + TQGuardedPtr m_slider; + TQStringList m_items; + const TQObject *m_receiver; const char *m_member; }; diff --git a/kaboodle/engine.cpp b/kaboodle/engine.cpp index 20d9d2e4..5909dbcd 100644 --- a/kaboodle/engine.cpp +++ b/kaboodle/engine.cpp @@ -33,9 +33,9 @@ extern "C" #include #include #include -#include -#include -#include +#include +#include +#include #include #include @@ -71,8 +71,8 @@ public: KURL file; }; -Kaboodle::Engine::Engine(QObject *parent) - : QObject(parent) +Kaboodle::Engine::Engine(TQObject *parent) + : TQObject(parent) , d(new EnginePrivate) { } diff --git a/kaboodle/engine.h b/kaboodle/engine.h index 7174af3a..c8001e56 100644 --- a/kaboodle/engine.h +++ b/kaboodle/engine.h @@ -24,7 +24,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #ifndef _ENGINE_H #define _ENGINE_H -#include +#include #include #include #include @@ -47,7 +47,7 @@ class Engine : public QObject Q_OBJECT public: - Engine(QObject *parent=0); + Engine(TQObject *parent=0); ~Engine(); Arts::PlayObject playObject() const; diff --git a/kaboodle/kaboodle_factory.cpp b/kaboodle/kaboodle_factory.cpp index 1706f3c3..99302702 100644 --- a/kaboodle/kaboodle_factory.cpp +++ b/kaboodle/kaboodle_factory.cpp @@ -42,9 +42,9 @@ Kaboodle::KaboodleFactory::~KaboodleFactory() s_instance = 0; } -KParts::Part *Kaboodle::KaboodleFactory::createPartObject(QWidget *widgetParent, const char *widgetName, QObject *parent, const char *name, const char *className, const QStringList &) +KParts::Part *Kaboodle::KaboodleFactory::createPartObject(TQWidget *widgetParent, const char *widgetName, TQObject *parent, const char *name, const char *className, const TQStringList &) { - if(className == QString("KMediaPlayer/Engine")) + if(className == TQString("KMediaPlayer/Engine")) { return new Player(parent, name); } diff --git a/kaboodle/kaboodle_factory.h b/kaboodle/kaboodle_factory.h index 0c43c7c2..415876d5 100644 --- a/kaboodle/kaboodle_factory.h +++ b/kaboodle/kaboodle_factory.h @@ -40,7 +40,7 @@ public: KaboodleFactory(); virtual ~KaboodleFactory(); - virtual KParts::Part *createPartObject(QWidget *widgetParent, const char *widgetName, QObject *parent = 0, const char *name = 0, const char *classname = "QObject", const QStringList &args = QStringList()); + virtual KParts::Part *createPartObject(TQWidget *widgetParent, const char *widgetName, TQObject *parent = 0, const char *name = 0, const char *classname = "TQObject", const TQStringList &args = TQStringList()); static const KAboutData *aboutData(); static KInstance *instance(); diff --git a/kaboodle/main.cpp b/kaboodle/main.cpp index 35e858df..943e90df 100644 --- a/kaboodle/main.cpp +++ b/kaboodle/main.cpp @@ -24,7 +24,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include #include -#include +#include #include "kaboodle_factory.h" #include "kaboodleapp.h" diff --git a/kaboodle/player.cpp b/kaboodle/player.cpp index 2530c0c5..70517c2d 100644 --- a/kaboodle/player.cpp +++ b/kaboodle/player.cpp @@ -32,7 +32,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "player.h" #include "view.h" -Kaboodle::Player::Player(QObject *parent, const char *name) +Kaboodle::Player::Player(TQObject *parent, const char *name) : KMediaPlayer::Player(parent, name) , engine(new Engine(this)) , widget(0) @@ -41,13 +41,13 @@ Kaboodle::Player::Player(QObject *parent, const char *name) { setInstance(KaboodleFactory::instance()); - connect(&ticker, SIGNAL(timeout()), SLOT(tickerTimeout())); + connect(&ticker, TQT_SIGNAL(timeout()), TQT_SLOT(tickerTimeout())); ticker.start(500); setState(Empty); } -Kaboodle::Player::Player(QWidget *widgetParent, const char *widgetName, - QObject *parent, const char *name) +Kaboodle::Player::Player(TQWidget *widgetParent, const char *widgetName, + TQObject *parent, const char *name) : KMediaPlayer::Player(widgetParent, widgetName, parent, name) , engine(new Engine(this)) , widget(new View(widgetParent, widgetName, this)) @@ -56,18 +56,18 @@ Kaboodle::Player::Player(QWidget *widgetParent, const char *widgetName, { setInstance(KaboodleFactory::instance()); - connect(&ticker, SIGNAL(timeout()), SLOT(tickerTimeout())); + connect(&ticker, TQT_SIGNAL(timeout()), TQT_SLOT(tickerTimeout())); ticker.start(500); setState(Empty); - playAction = new KAction(i18n("&Play"), 0, this, SLOT(play()), actionCollection(), "play"); - pauseAction = new KAction(i18n("&Pause"), 0, this, SLOT(pause()), actionCollection(), "pause"); - stopAction = new KAction(i18n("&Stop"), 0, this, SLOT(stop()), actionCollection(), "stop"); - loopAction = new KToggleAction(i18n("&Looping"), 0, this, SLOT(loop()), actionCollection(), "loop"); + playAction = new KAction(i18n("&Play"), 0, this, TQT_SLOT(play()), actionCollection(), "play"); + pauseAction = new KAction(i18n("&Pause"), 0, this, TQT_SLOT(pause()), actionCollection(), "pause"); + stopAction = new KAction(i18n("&Stop"), 0, this, TQT_SLOT(stop()), actionCollection(), "stop"); + loopAction = new KToggleAction(i18n("&Looping"), 0, this, TQT_SLOT(loop()), actionCollection(), "loop"); stopAction->setEnabled(false); playAction->setEnabled(false); pauseAction->setEnabled(false); - connect(this, SIGNAL(loopingChanged(bool)), loopAction, SLOT(setChecked(bool))); + connect(this, TQT_SIGNAL(loopingChanged(bool)), loopAction, TQT_SLOT(setChecked(bool))); KParts::Part::setWidget(widget); setXMLFile("kaboodlepartui.rc"); @@ -124,23 +124,23 @@ bool Kaboodle::Player::openFile(void) return true; } -QString Kaboodle::Player::timeString(unsigned long time) +TQString Kaboodle::Player::timeString(unsigned long time) { int posSecs = (int)(time / 1000); int posSeconds = posSecs % 60; int posMinutes = (posSecs - posSeconds) / 60; - QString result; + TQString result; result.sprintf("%.2d:%.2d", posMinutes, posSeconds); return result; } -QString Kaboodle::Player::positionString(void) +TQString Kaboodle::Player::positionString(void) { return timeString(engine->position()); } -QString Kaboodle::Player::lengthString(void) +TQString Kaboodle::Player::lengthString(void) { return timeString(engine->length()); } diff --git a/kaboodle/player.h b/kaboodle/player.h index 90ddad49..4d67abb6 100644 --- a/kaboodle/player.h +++ b/kaboodle/player.h @@ -28,8 +28,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include #include -#include -#include +#include +#include class KAction; class KToggleAction; @@ -53,9 +53,9 @@ class Player : public KMediaPlayer::Player Q_OBJECT public: - Player(QWidget *widgetParent, const char *widgetName, - QObject *parent, const char *name); - Player(QObject *parent, const char *name); + Player(TQWidget *widgetParent, const char *widgetName, + TQObject *parent, const char *name); + Player(TQObject *parent, const char *name); virtual ~Player(); virtual bool openURL(const KURL &); @@ -66,9 +66,9 @@ public: * be used in the UI: * CC:CC/LL:LL (mm:ss) **/ - static QString timeString(unsigned long); - QString lengthString(void); - QString positionString(void); + static TQString timeString(unsigned long); + TQString lengthString(void); + TQString positionString(void); virtual KMediaPlayer::View *view(void); @@ -105,7 +105,7 @@ private: KAction *playAction, *pauseAction, *stopAction; KToggleAction *loopAction; - QTimer ticker; + TQTimer ticker; KURL current; bool uncompleted; diff --git a/kaboodle/userinterface.cpp b/kaboodle/userinterface.cpp index eca95c75..72449fcf 100644 --- a/kaboodle/userinterface.cpp +++ b/kaboodle/userinterface.cpp @@ -34,10 +34,10 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -48,19 +48,19 @@ #include "view.h" #include "userinterface.h" -Kaboodle::UserInterface::UserInterface(QWidget *parent, const KURL &initialFile) +Kaboodle::UserInterface::UserInterface(TQWidget *parent, const KURL &initialFile) : KParts::MainWindow(parent) { setAcceptDrops(true); setStandardToolBarMenuEnabled(true); - KStdAction::open(this, SLOT(fileOpen()), actionCollection()); - KStdAction::quit(kapp, SLOT(quit()), actionCollection()); - KStdAction::preferences(this, SLOT(playerPreferences()), actionCollection()); - KStdAction::keyBindings( this, SLOT( slotConfigureKeys() ), actionCollection() ); + KStdAction::open(this, TQT_SLOT(fileOpen()), actionCollection()); + KStdAction::quit(kapp, TQT_SLOT(quit()), actionCollection()); + KStdAction::preferences(this, TQT_SLOT(playerPreferences()), actionCollection()); + KStdAction::keyBindings( this, TQT_SLOT( slotConfigureKeys() ), actionCollection() ); - menubarAction = KStdAction::showMenubar(this, SLOT(showMenubar()), actionCollection()); - propertiesAction = new KAction(i18n("Properties"), 0, this, SLOT(properties()), actionCollection(), "properties"); + menubarAction = KStdAction::showMenubar(this, TQT_SLOT(showMenubar()), actionCollection()); + propertiesAction = new KAction(i18n("Properties"), 0, this, TQT_SLOT(properties()), actionCollection(), "properties"); propertiesAction->setEnabled(false); part = new Player(this, "KaboodlePlayer", this, "KaboodleView"); @@ -72,8 +72,8 @@ Kaboodle::UserInterface::UserInterface(QWidget *parent, const KURL &initialFile) statusBar()->show(); - connect(part, SIGNAL(setWindowCaption(const QString &)), this, SLOT(updateTitle(const QString &))); - connect(part->view(), SIGNAL(adaptSize(int, int)), this, SLOT(adaptSize(int, int))); + connect(part, TQT_SIGNAL(setWindowCaption(const TQString &)), this, TQT_SLOT(updateTitle(const TQString &))); + connect(part->view(), TQT_SIGNAL(adaptSize(int, int)), this, TQT_SLOT(adaptSize(int, int))); setIcon(SmallIcon("kaboodle")); @@ -109,7 +109,7 @@ Kaboodle::UserInterface::~UserInterface(void) void Kaboodle::UserInterface::fileOpen(void) { - KURL file(KFileDialog::getOpenURL(QString::null, KDE::PlayObjectFactory::mimeTypes().join(" "), this, i18n("Select File to Play"))); + KURL file(KFileDialog::getOpenURL(TQString::null, KDE::PlayObjectFactory::mimeTypes().join(" "), this, i18n("Select File to Play"))); if(file.isValid()) { part->openURL(file); @@ -117,13 +117,13 @@ void Kaboodle::UserInterface::fileOpen(void) } } -void Kaboodle::UserInterface::dragEnterEvent(QDragEnterEvent *event) +void Kaboodle::UserInterface::dragEnterEvent(TQDragEnterEvent *event) { // accept uri drops only event->accept(KURLDrag::canDecode(event)); } -void Kaboodle::UserInterface::dropEvent(QDropEvent *event) +void Kaboodle::UserInterface::dropEvent(TQDropEvent *event) { KURL::List list; if (KURLDrag::decode(event, list)) @@ -157,7 +157,7 @@ void Kaboodle::UserInterface::showMenubar(void) menuBar()->hide(); } -void Kaboodle::UserInterface::updateTitle(const QString &text) +void Kaboodle::UserInterface::updateTitle(const TQString &text) { setCaption(text); statusBar()->message(text); diff --git a/kaboodle/userinterface.h b/kaboodle/userinterface.h index db91ebad..a58dfa5d 100644 --- a/kaboodle/userinterface.h +++ b/kaboodle/userinterface.h @@ -43,14 +43,14 @@ class UserInterface : public KParts::MainWindow { Q_OBJECT public: - UserInterface(QWidget *parent, const KURL &initialFile = KURL()); + UserInterface(TQWidget *parent, const KURL &initialFile = KURL()); virtual ~UserInterface(void); - void load(const QString& url); + void load(const TQString& url); protected: - virtual void dragEnterEvent(QDragEnterEvent *); - virtual void dropEvent(QDropEvent *); + virtual void dragEnterEvent(TQDragEnterEvent *); + virtual void dropEvent(TQDropEvent *); public slots: void playerPreferences(void); @@ -58,7 +58,7 @@ public slots: private slots: void fileOpen(void); void showMenubar(void); - void updateTitle(const QString &text); + void updateTitle(const TQString &text); void applySettings(void); void properties(void); void adaptSize(int width, int height); diff --git a/kaboodle/view.cpp b/kaboodle/view.cpp index 3ddf3621..eba6ff20 100644 --- a/kaboodle/view.cpp +++ b/kaboodle/view.cpp @@ -29,33 +29,33 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include "view.h" #include "player.h" namespace { -QButton *createButton(const QIconSet &_iconset, const QString &_tip, QObject *_receiver, const char *_slot, QWidget *_parent) +TQButton *createButton(const TQIconSet &_iconset, const TQString &_tip, TQObject *_receiver, const char *_slot, TQWidget *_parent) { - QToolButton *button = new QToolButton(_parent); + TQToolButton *button = new TQToolButton(_parent); button->setMaximumSize(50, 50); button->setIconSet(_iconset); - QToolTip::add(button, _tip); - QObject::connect(button, SIGNAL(clicked()), _receiver, _slot); + TQToolTip::add(button, _tip); + TQObject::connect(button, TQT_SIGNAL(clicked()), _receiver, _slot); button->show(); return button; } } -Kaboodle::View::View(QWidget *parent, const char *name, Player *p) +Kaboodle::View::View(TQWidget *parent, const char *name, Player *p) : KMediaPlayer::View(parent, name) , state((KMediaPlayer::Player::State)p->state()) , autoPlay(false) @@ -64,54 +64,54 @@ Kaboodle::View::View(QWidget *parent, const char *name, Player *p) , firstVideo(false) , lastWidth(0) { - (new QHBoxLayout(this))->setAutoAdd(true); - QVBox *box = new QVBox(this); + (new TQHBoxLayout(this))->setAutoAdd(true); + TQVBox *box = new TQVBox(this); box->setSpacing(KDialog::spacingHint()); box->setMargin(0); video = new KVideoWidget(player, box); video->actionCollection()->readShortcutSettings(); setVideoWidget(video); - connect(video, SIGNAL(adaptSize(int, int)), this, SLOT(calculateSize(int, int))); - connect(video, SIGNAL(mouseButtonPressed(int, const QPoint&, int)), this, SLOT(slotButtonPressed(int, const QPoint &, int) ) ) ; - connect(video, SIGNAL(mouseButtonDoubleClick(const QPoint&, int)), this, SLOT(slotDblClick(const QPoint &, int) ) ) ; + connect(video, TQT_SIGNAL(adaptSize(int, int)), this, TQT_SLOT(calculateSize(int, int))); + connect(video, TQT_SIGNAL(mouseButtonPressed(int, const TQPoint&, int)), this, TQT_SLOT(slotButtonPressed(int, const TQPoint &, int) ) ) ; + connect(video, TQT_SIGNAL(mouseButtonDoubleClick(const TQPoint&, int)), this, TQT_SLOT(slotDblClick(const TQPoint &, int) ) ) ; - QWidget *sliderBox = new QWidget(box); - sliderBox->setFocusPolicy(QWidget::ClickFocus); + TQWidget *sliderBox = new TQWidget(box); + sliderBox->setFocusPolicy(TQWidget::ClickFocus); sliderBox->setAcceptDrops(true); - QHBoxLayout *layout = new QHBoxLayout(sliderBox); + TQHBoxLayout *layout = new TQHBoxLayout(sliderBox); layout->setSpacing(KDialog::spacingHint()); layout->setMargin(0); layout->setAutoAdd(true); - playButton = createButton(BarIconSet("1rightarrow"), i18n("Play"), player, SLOT(play()), sliderBox); - pauseButton = createButton(BarIconSet("player_pause"), i18n("Pause"), player, SLOT(pause()), sliderBox); - stopButton = createButton(BarIconSet("player_stop"), i18n("Stop"), player, SLOT(stop()), sliderBox); + playButton = createButton(BarIconSet("1rightarrow"), i18n("Play"), player, TQT_SLOT(play()), sliderBox); + pauseButton = createButton(BarIconSet("player_pause"), i18n("Pause"), player, TQT_SLOT(pause()), sliderBox); + stopButton = createButton(BarIconSet("player_stop"), i18n("Stop"), player, TQT_SLOT(stop()), sliderBox); slider = new L33tSlider(0, 1000, 10, 0, L33tSlider::Horizontal, sliderBox); - slider->setTickmarks(QSlider::NoMarks); + slider->setTickmarks(TQSlider::NoMarks); slider->show(); - elapsedLabel = new QLabel(sliderBox); - QFont labelFont = elapsedLabel->font(); + elapsedLabel = new TQLabel(sliderBox); + TQFont labelFont = elapsedLabel->font(); labelFont.setPointSize(24); labelFont.setBold(true); - QFontMetrics labelFontMetrics(labelFont); + TQFontMetrics labelFontMetrics(labelFont); elapsedLabel->setFont(labelFont); elapsedLabel->setAlignment(AlignCenter | AlignVCenter | ExpandTabs); elapsedLabel->setFixedHeight(labelFontMetrics.height()); elapsedLabel->setMinimumWidth(labelFontMetrics.width("00:00")); - connect(player, SIGNAL(stateChanged(int)), this, SLOT(stateChanged(int))); - connect(player, SIGNAL(completed()), this, SLOT(playerFinished())); - connect(player, SIGNAL(timeout()), this, SLOT(playerTimeout())); + connect(player, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(stateChanged(int))); + connect(player, TQT_SIGNAL(completed()), this, TQT_SLOT(playerFinished())); + connect(player, TQT_SIGNAL(timeout()), this, TQT_SLOT(playerTimeout())); - connect(slider, SIGNAL(userChanged(int)), this, SLOT(skipToWrapper(int))); - connect(slider, SIGNAL(sliderMoved(int)), this, SLOT(sliderMoved(int))); + connect(slider, TQT_SIGNAL(userChanged(int)), this, TQT_SLOT(skipToWrapper(int))); + connect(slider, TQT_SIGNAL(sliderMoved(int)), this, TQT_SLOT(sliderMoved(int))); slider->setEnabled(false); - connect(this, SIGNAL(buttonsChanged(int)), this, SLOT(updateButtons(int))); + connect(this, TQT_SIGNAL(buttonsChanged(int)), this, TQT_SLOT(updateButtons(int))); updateButtons(buttons()); updateLabel("--:--/--:--"); @@ -233,7 +233,7 @@ void Kaboodle::View::skipToWrapper(int second) player->seek((unsigned long)(second*1000)); } -void Kaboodle::View::updateLabel(const QString &text) +void Kaboodle::View::updateLabel(const TQString &text) { if(elapsedLabel) elapsedLabel->setText(text.left(5)); @@ -304,14 +304,14 @@ void Kaboodle::View::updateButtons(int b) } -void Kaboodle::View::slotButtonPressed(int /*type*/, const QPoint &, int /* state */) +void Kaboodle::View::slotButtonPressed(int /*type*/, const TQPoint &, int /* state */) { if((KMediaPlayer::Player::State)player->state() == KMediaPlayer::Player::Pause ) player->play(); else player->pause(); } -void Kaboodle::View::slotDblClick( const QPoint &, int /* state */) +void Kaboodle::View::slotDblClick( const TQPoint &, int /* state */) { if ( video->isFullscreen() ) video->setWindowed(); diff --git a/kaboodle/view.h b/kaboodle/view.h index f21de905..8ac94db4 100644 --- a/kaboodle/view.h +++ b/kaboodle/view.h @@ -27,11 +27,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "controls.h" #include "player.h" @@ -47,7 +47,7 @@ class View : public KMediaPlayer::View Q_OBJECT public: - View(QWidget *parent, const char *name, Player *player); + View(TQWidget *parent, const char *name, Player *player); virtual ~View(void); /** @@ -78,9 +78,9 @@ signals: void adaptSize(int width, int height); private slots: - void updateLabel(const QString &text); - void slotButtonPressed( int, const QPoint &, int state ); - void slotDblClick( const QPoint &, int state ); + void updateLabel(const TQString &text); + void slotButtonPressed( int, const TQPoint &, int state ); + void slotDblClick( const TQPoint &, int state ); void calculateSize(int width, int height); @@ -92,13 +92,13 @@ private: void updateTicks(void); L33tSlider *slider; - QLabel *elapsedLabel; + TQLabel *elapsedLabel; KVideoWidget *video; bool firstVideo; int lastWidth; - QButton *playButton, *pauseButton, *stopButton; + TQButton *playButton, *pauseButton, *stopButton; }; } #endif diff --git a/kaudiocreator/encodefileimp.cpp b/kaudiocreator/encodefileimp.cpp index 4836c87c..59f32405 100644 --- a/kaudiocreator/encodefileimp.cpp +++ b/kaudiocreator/encodefileimp.cpp @@ -21,20 +21,20 @@ #include "encodefileimp.h" #include "job.h" -#include -#include +#include +#include #include -#include +#include #include -EncodeFileImp::EncodeFileImp(QWidget* parent, +EncodeFileImp::EncodeFileImp(TQWidget* parent, const char* name) : EncodeFile(parent, name), m_genres(KCDDB::Genres()) { genre->insertStringList(m_genres.i18nList()); // Specify to only accept wav files file->setFilter("*.wav|Wav Files"); - connect(file,SIGNAL(textChanged(const QString &)),this,SLOT(enableEncodeButton(const QString &))); - connect(encodeButton,SIGNAL(clicked()),this,SLOT(encode())); + connect(file,TQT_SIGNAL(textChanged(const TQString &)),this,TQT_SLOT(enableEncodeButton(const TQString &))); + connect(encodeButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(encode())); } /** @@ -74,7 +74,7 @@ void EncodeFileImp::encode(){ i18n("Jobs have started"), i18n("Jobs have started")); } -void EncodeFileImp::enableEncodeButton(const QString &text){ +void EncodeFileImp::enableEncodeButton(const TQString &text){ encodeButton->setEnabled(!text.isEmpty()); } diff --git a/kaudiocreator/encodefileimp.h b/kaudiocreator/encodefileimp.h index b1cb41ce..e0e6eaa7 100644 --- a/kaudiocreator/encodefileimp.h +++ b/kaudiocreator/encodefileimp.h @@ -23,7 +23,7 @@ #include "libkcddb/genres.h" #include "encodefile.h" -#include "qmap.h" +#include "tqmap.h" class Job; @@ -39,13 +39,13 @@ signals: void startJob(Job *newJob); public: - EncodeFileImp(QWidget* parent = 0, const char* name = 0); + EncodeFileImp(TQWidget* parent = 0, const char* name = 0); protected slots: // Encode button void encode(); // Enable encode button when user selects a file - void enableEncodeButton(const QString &text); + void enableEncodeButton(const TQString &text); private: // List of genres and i18n versions diff --git a/kaudiocreator/encoder.cpp b/kaudiocreator/encoder.cpp index e6b506a6..ced2fcac 100644 --- a/kaudiocreator/encoder.cpp +++ b/kaudiocreator/encoder.cpp @@ -24,20 +24,20 @@ #include "encoder_prefs.h" #include "encoderoutput.h" -#include -#include +#include +#include #include #include #include #include #include -#include +#include #include /** * Constructor, load settings. */ -Encoder::Encoder( QObject* parent, const char* name):QObject(parent,name),reportCount(0) { +Encoder::Encoder( TQObject* parent, const char* name):TQObject(parent,name),reportCount(0) { loadSettings(); } @@ -53,11 +53,11 @@ void Encoder::loadSettings() { EncoderPrefs* Encoder::loadEncoder( int encoder ){ EncoderPrefs* prefs; - QString currentEncoderGroup = QString("Encoder_%1").arg(encoder); + TQString currentEncoderGroup = TQString("Encoder_%1").arg(encoder); prefs = EncoderPrefs::prefs(currentEncoderGroup); if ( !EncoderPrefs::hasPrefs(currentEncoderGroup) ) { KMessageBox::sorry(0, i18n("No encoder has been selected.\nPlease select an encoder in the configuration."), i18n("No Encoder Selected")); - prefs->setCommandLine(QString::null); + prefs->setCommandLine(TQString::null); } return prefs; @@ -69,13 +69,13 @@ EncoderPrefs* Encoder::loadEncoder( int encoder ){ Encoder::~Encoder() { pendingJobs.clear(); - QMap::Iterator pit; + TQMap::Iterator pit; for( pit = jobs.begin(); pit != jobs.end(); ++pit ) { Job *job = jobs[pit.key()]; KShellProcess *process = pit.key(); threads.remove(process); process->kill(); - QFile::remove(job->newLocation); + TQFile::remove(job->newLocation); delete job; delete process; } @@ -101,7 +101,7 @@ int Encoder::pendingJobCount() { * @param id the id number of the job to stop. */ void Encoder::removeJob(int id ) { - QMap::Iterator it; + TQMap::Iterator it; for( it = jobs.begin(); it != jobs.end(); ++it ) { if ( it.data()->id == id ) { KShellProcess *process = it.key(); @@ -159,10 +159,10 @@ void Encoder::tendToNewJobs() { EncoderPrefs* prefs = loadEncoder(job->encoder); - QString desiredFile = Prefs::fileFormat(); - desiredFile.replace( QRegExp("~"), QDir::homeDirPath() ); + TQString desiredFile = Prefs::fileFormat(); + desiredFile.replace( TQRegExp("~"), TQDir::homeDirPath() ); { - QMap map; + TQMap map; map.insert("extension", prefs->extension()); Job jobx = *job; jobx.fix(Prefs::replaceInput(), Prefs::replaceOutput()); @@ -171,9 +171,9 @@ void Encoder::tendToNewJobs() { desiredFile = jobx.replaceSpecialChars(desiredFile, false, map); } - while ( QFile::exists( desiredFile ) ) { + while ( TQFile::exists( desiredFile ) ) { bool ok; - QString text = KInputDialog::getText( + TQString text = KInputDialog::getText( i18n("File Already Exists"), i18n("Sorry, file already exists. Please pick a new name:"), desiredFile, &ok ); if ( ok && !text.isEmpty() ) @@ -197,8 +197,8 @@ void Encoder::tendToNewJobs() { job->newLocation = desiredFile; reportCount = 0; - QString command = prefs->commandLine(); { - QMap map; + TQString command = prefs->commandLine(); { + TQMap map; map.insert("extension", prefs->extension()); map.insert("f", job->location); map.insert("o", desiredFile); @@ -211,12 +211,12 @@ void Encoder::tendToNewJobs() { KShellProcess *proc = new KShellProcess(); proc->setPriority(Prefs::niceLevel()); - *proc << QFile::encodeName(command); - connect(proc, SIGNAL(receivedStdout(KProcess *, char *, int )), - this, SLOT(receivedThreadOutput(KProcess *, char *, int ))); - connect(proc, SIGNAL(receivedStderr(KProcess *, char *, int )), - this, SLOT(receivedThreadOutput(KProcess *, char *, int ))); - connect(proc, SIGNAL(processExited(KProcess *)), this, SLOT(jobDone(KProcess *))); + *proc << TQFile::encodeName(command); + connect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int )), + this, TQT_SLOT(receivedThreadOutput(KProcess *, char *, int ))); + connect(proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int )), + this, TQT_SLOT(receivedThreadOutput(KProcess *, char *, int ))); + connect(proc, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(jobDone(KProcess *))); jobs.insert(proc, job); threads.append(proc); @@ -243,21 +243,21 @@ void Encoder::receivedThreadOutput(KProcess *process, char *buffer, int length ) Job *job = jobs[(KShellProcess*)process]; // Keep the output in the event it fails. - job->output += QString(buffer).mid(0,length); + job->output += TQString(buffer).mid(0,length); // Make sure the output string has a % symble in it. - QString output = QString(buffer).mid(0,length); + TQString output = TQString(buffer).mid(0,length); if ( output.find('%') == -1 && reportCount < 5 ) { kdDebug(60002) << "No \'%%\' in output. Report as bug w/encoder options if progressbar doesn't fill." << endl; reportCount++; return; } - //qDebug(QString("Pre cropped: %1").arg(output).latin1()); + //qDebug(TQString("Pre cropped: %1").arg(output).latin1()); output = output.mid(output.find('%')-loadEncoder(job->encoder)->percentLength(),2); - //qDebug(QString("Post cropped: %1").arg(output).latin1()); + //qDebug(TQString("Post cropped: %1").arg(output).latin1()); bool conversionSuccessfull = false; int percent = output.toInt(&conversionSuccessfull); - //qDebug(QString("number: %1").arg(percent).latin1()); + //qDebug(TQString("number: %1").arg(percent).latin1()); if ( percent >= 0 && percent < 100 && conversionSuccessfull ) { emit(updateProgress(job->id, percent)); } @@ -287,7 +287,7 @@ void Encoder::jobDone(KProcess *process ) { KMessageBox::sorry(0, i18n("The selected encoder was not found.\nThe wav file has been removed. Command was: %1").arg(job->errorString), i18n("Encoding Failed")); emit(updateProgress(job->id, -1)); } - else if ( QFile::exists(job->newLocation) ) { + else if ( TQFile::exists(job->newLocation) ) { // fyi segfaults return 136 if ( process->exitStatus() != 0 ) { if ( KMessageBox::questionYesNo(0, i18n("The encoder exited with a error. Please check that the file was created.\nDo you want to see the full encoder output?"), i18n("Encoding Failed"),i18n("Show Output"),i18n("Skip Output")) == KMessageBox::Yes ) @@ -313,7 +313,7 @@ void Encoder::jobDone(KProcess *process ) { } if ( job->removeTempFile ) - QFile::remove( job->location ); + TQFile::remove( job->location ); if( showDebugBox ){ EncoderOutput dlg( 0, "Encoder Output" ); diff --git a/kaudiocreator/encoder.h b/kaudiocreator/encoder.h index 809a5275..24ebcafc 100644 --- a/kaudiocreator/encoder.h +++ b/kaudiocreator/encoder.h @@ -21,26 +21,26 @@ #ifndef ENCODER_H #define ENCODER_H -#include +#include -#include -#include +#include +#include #include "job.h" #include class EncoderPrefs; -class Encoder : public QObject { +class Encoder : public TQObject { Q_OBJECT signals: - void addJob(Job *job, const QString &name); + void addJob(Job *job, const TQString &name); void updateProgress(int id, int progress); void jobsChanged(); public: - Encoder( QObject* parent = 0, const char* name = 0); + Encoder( TQObject* parent = 0, const char* name = 0); ~Encoder(); int activeJobCount(); int pendingJobCount(); @@ -57,9 +57,9 @@ private slots: void tendToNewJobs(); private: - QPtrList pendingJobs; - QPtrList threads; - QMap jobs; + TQPtrList pendingJobs; + TQPtrList threads; + TQMap jobs; int reportCount; }; diff --git a/kaudiocreator/encoder_prefs_addons.h b/kaudiocreator/encoder_prefs_addons.h index 067f4d79..9ecb0e07 100644 --- a/kaudiocreator/encoder_prefs_addons.h +++ b/kaudiocreator/encoder_prefs_addons.h @@ -1,8 +1,8 @@ public: - static EncoderPrefs *prefs(const QString &groupName); - static bool hasPrefs(const QString &groupName); - static void deletePrefs(const QString &groupName); + static EncoderPrefs *prefs(const TQString &groupName); + static bool hasPrefs(const TQString &groupName); + static void deletePrefs(const TQString &groupName); private: - static QDict *m_prefs; + static TQDict *m_prefs; diff --git a/kaudiocreator/encoderconfig.ui.h b/kaudiocreator/encoderconfig.ui.h index fd95a75a..e24f9535 100644 --- a/kaudiocreator/encoderconfig.ui.h +++ b/kaudiocreator/encoderconfig.ui.h @@ -8,7 +8,7 @@ *****************************************************************************/ #include "wizard.h" -#include +#include /** * Load up the wizard with the encoder fileFormat string. Save it if OK is hit. diff --git a/kaudiocreator/encoderconfigimp.cpp b/kaudiocreator/encoderconfigimp.cpp index 509cd59d..e49dd6a9 100644 --- a/kaudiocreator/encoderconfigimp.cpp +++ b/kaudiocreator/encoderconfigimp.cpp @@ -22,8 +22,8 @@ #include "encoderedit.h" #include "prefs.h" -#include -#include +#include +#include #include #include #include @@ -32,12 +32,12 @@ /** * Constructor. */ -EncoderConfigImp::EncoderConfigImp( QWidget* parent, const char* name) : +EncoderConfigImp::EncoderConfigImp( TQWidget* parent, const char* name) : EncoderConfig (parent, name) { - connect(addEncoder, SIGNAL(clicked()), this, SLOT(addEncoderSlot())); - connect(removeEncoder, SIGNAL(clicked()), this, SLOT(removeEncoderSlot())); - connect(configureEncoder, SIGNAL(clicked()), this, SLOT(configureEncoderSlot())); - connect(kcfg_currentEncoder, SIGNAL(doubleClicked ( QListBoxItem * )),this, SLOT(configureEncoderSlot())); + connect(addEncoder, TQT_SIGNAL(clicked()), this, TQT_SLOT(addEncoderSlot())); + connect(removeEncoder, TQT_SIGNAL(clicked()), this, TQT_SLOT(removeEncoderSlot())); + connect(configureEncoder, TQT_SIGNAL(clicked()), this, TQT_SLOT(configureEncoderSlot())); + connect(kcfg_currentEncoder, TQT_SIGNAL(doubleClicked ( TQListBoxItem * )),this, TQT_SLOT(configureEncoderSlot())); // If there are no encoders then store the three default ones. if( Prefs::lastKnownEncoder() == 0){ @@ -93,11 +93,11 @@ void EncoderConfigImp::loadEncoderList(){ int lastKnownEncoder = Prefs::lastKnownEncoder(); lastKnownEncoder++; for( int i=0; i<=lastKnownEncoder; i++ ){ - QString currentGroup = QString("Encoder_%1").arg(i); + TQString currentGroup = TQString("Encoder_%1").arg(i); if(EncoderPrefs::hasPrefs(currentGroup)){ lastEncoder = i; EncoderPrefs *encPrefs = EncoderPrefs::prefs(currentGroup); - QString encoderName = encPrefs->encoderName(); + TQString encoderName = encPrefs->encoderName(); kcfg_currentEncoder->insertItem(encoderName); encoderNames.insert(encoderName, currentGroup); if(Prefs::currentEncoder() == i) @@ -121,9 +121,9 @@ void EncoderConfigImp::loadEncoderList(){ void EncoderConfigImp::addEncoderSlot(){ bool foundEmptyGroup = false; uint number = 0; - QString groupName; + TQString groupName; while(!foundEmptyGroup){ - groupName = QString("Encoder_%1").arg(number); + groupName = TQString("Encoder_%1").arg(number); if(!EncoderPrefs::hasPrefs(groupName)) foundEmptyGroup = true; else @@ -138,7 +138,7 @@ void EncoderConfigImp::addEncoderSlot(){ KDialogBase::Ok | KDialogBase::Cancel | KDialogBase::Help); dialog->setCaption(i18n("Configure Encoder")); dialog->addPage(new EncoderEdit(0, groupName.latin1()), i18n("Encoder Configuration"), "package_settings"); - connect(dialog, SIGNAL(settingsChanged()), this, SLOT(loadEncoderList())); + connect(dialog, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT(loadEncoderList())); dialog->show(); } @@ -165,7 +165,7 @@ void EncoderConfigImp::removeEncoderSlot(){ == KMessageBox::Cancel ) return; - QString groupName = encoderNames[kcfg_currentEncoder->currentText()]; + TQString groupName = encoderNames[kcfg_currentEncoder->currentText()]; kcfg_currentEncoder->removeItem(kcfg_currentEncoder->currentItem()); delete KConfigDialog::exists(groupName.latin1()); @@ -185,7 +185,7 @@ void EncoderConfigImp::configureEncoderSlot() { KMessageBox:: sorry(this, i18n("Please select an encoder."), i18n("No Encoder Selected")); return; } - QString groupName = encoderNames[kcfg_currentEncoder->currentText()]; + TQString groupName = encoderNames[kcfg_currentEncoder->currentText()]; KConfig &config = *KGlobal::config(); if(!config.hasGroup(groupName)) return; @@ -198,16 +198,16 @@ void EncoderConfigImp::configureEncoderSlot() { KDialogBase::Ok | KDialogBase::Cancel | KDialogBase::Help); dialog->setCaption(i18n("Configure Encoder")); dialog->addPage(new EncoderEdit(0, groupName.latin1()), i18n("Encoder Configuration"), "package_settings"); - connect(dialog, SIGNAL(destroyed(QObject *)), this, SLOT(updateEncoder(QObject *))); - connect(dialog, SIGNAL(settingsChanged()), this, SIGNAL(encoderUpdated())); - connect(dialog, SIGNAL(settingsChanged(const char *)), this, SLOT(updateEncoder(const char *))); + connect(dialog, TQT_SIGNAL(destroyed(TQObject *)), this, TQT_SLOT(updateEncoder(TQObject *))); + connect(dialog, TQT_SIGNAL(settingsChanged()), this, TQT_SIGNAL(encoderUpdated())); + connect(dialog, TQT_SIGNAL(settingsChanged(const char *)), this, TQT_SLOT(updateEncoder(const char *))); dialog->show(); } /** * If object exists update encoder */ -void EncoderConfigImp::updateEncoder(QObject * obj){ +void EncoderConfigImp::updateEncoder(TQObject * obj){ if(!obj) return; updateEncoder(obj->name()); @@ -224,10 +224,10 @@ void EncoderConfigImp::updateEncoder(QObject * obj){ * If current encoder update also. */ void EncoderConfigImp::updateEncoder(const char *dialogName){ - QString groupName = dialogName; - QString encoderName; + TQString groupName = dialogName; + TQString encoderName; bool found = false; - QMap::Iterator it; + TQMap::Iterator it; for ( it = encoderNames.begin(); it != encoderNames.end(); ++it ) { if(it.data() == groupName){ found = true; @@ -238,11 +238,11 @@ void EncoderConfigImp::updateEncoder(const char *dialogName){ return; if(!EncoderPrefs::hasPrefs(groupName)) return; - QString newName = EncoderPrefs::prefs(groupName)->encoderName(); + TQString newName = EncoderPrefs::prefs(groupName)->encoderName(); if(newName == encoderName) return; - QListBoxItem *item = kcfg_currentEncoder->findItem(encoderName); + TQListBoxItem *item = kcfg_currentEncoder->findItem(encoderName); if(!item) return; kcfg_currentEncoder->changeItem(newName, kcfg_currentEncoder->index(item)); @@ -251,13 +251,13 @@ void EncoderConfigImp::updateEncoder(const char *dialogName){ encoderNames.erase(encoderName); } -QDict *EncoderPrefs::m_prefs = 0; +TQDict *EncoderPrefs::m_prefs = 0; -EncoderPrefs *EncoderPrefs::prefs(const QString &groupName) +EncoderPrefs *EncoderPrefs::prefs(const TQString &groupName) { if (!m_prefs) { - m_prefs = new QDict(); + m_prefs = new TQDict(); m_prefs->setAutoDelete(true); } EncoderPrefs *encPrefs = m_prefs->find(groupName); @@ -270,13 +270,13 @@ EncoderPrefs *EncoderPrefs::prefs(const QString &groupName) return encPrefs; } -bool EncoderPrefs::hasPrefs(const QString &groupName) +bool EncoderPrefs::hasPrefs(const TQString &groupName) { KConfig &config = *KGlobal::config(); return config.hasGroup(groupName); } -void EncoderPrefs::deletePrefs(const QString &groupName) +void EncoderPrefs::deletePrefs(const TQString &groupName) { KConfig &config = *KGlobal::config(); config.deleteGroup(groupName); diff --git a/kaudiocreator/encoderconfigimp.h b/kaudiocreator/encoderconfigimp.h index c16dc0c0..a72e138f 100644 --- a/kaudiocreator/encoderconfigimp.h +++ b/kaudiocreator/encoderconfigimp.h @@ -23,8 +23,8 @@ #include "encoderconfig.h" #include "encoder_prefs.h" -#include -#include +#include +#include /** * Class mainly build to manage encoder list. @@ -37,20 +37,20 @@ signals: void encoderUpdated(); public: - EncoderConfigImp( QWidget* parent = 0, const char* name = 0); + EncoderConfigImp( TQWidget* parent = 0, const char* name = 0); private slots: void addEncoderSlot(); void removeEncoderSlot(); void configureEncoderSlot(); - void updateEncoder(QObject * obj); + void updateEncoder(TQObject * obj); void updateEncoder(const char *dialogName); void loadEncoderList(); private: // Name, groupName - QMap encoderNames; + TQMap encoderNames; }; #endif diff --git a/kaudiocreator/general.ui.h b/kaudiocreator/general.ui.h index c54af842..244219ab 100644 --- a/kaudiocreator/general.ui.h +++ b/kaudiocreator/general.ui.h @@ -7,13 +7,13 @@ ** place of a destructor. *****************************************************************************/ -#include -#include -#include +#include +#include +#include void General::updateExample() { - QString text = example->text(); - text.replace( QRegExp(kcfg_replaceInput->text()), kcfg_replaceOutput->text() ); + TQString text = example->text(); + text.replace( TQRegExp(kcfg_replaceInput->text()), kcfg_replaceOutput->text() ); exampleOutput->setText(text); } diff --git a/kaudiocreator/job.cpp b/kaudiocreator/job.cpp index 44a05eee..740aeb5e 100644 --- a/kaudiocreator/job.cpp +++ b/kaudiocreator/job.cpp @@ -18,20 +18,20 @@ #include "job.h" #include -#include +#include /** * A helper function to replace %X with the stuff in the album. * if quote is true then put "" around the %X */ -QString Job::replaceSpecialChars(const QString &string, bool quote, QMap _map){ - QMap map = _map; +TQString Job::replaceSpecialChars(const TQString &string, bool quote, TQMap _map){ + TQMap map = _map; map.insert("title", track_title); map.insert("artist", track_artist); - map.insert("number", QString().sprintf("%02d", track)); + map.insert("number", TQString().sprintf("%02d", track)); map.insert("comment", track_comment); - map.insert("year", QString::number(year)); + map.insert("year", TQString::number(year)); map.insert("genre", genre); map.insert("albumtitle", album); @@ -44,15 +44,15 @@ QString Job::replaceSpecialChars(const QString &string, bool quote, QMap +#include #include /** @@ -33,34 +33,34 @@ class Job{ public: inline Job():id(-1),track_title(""),track_artist(""), track(-1),track_comment(""), year(-1), genre(i18n("Other")), group(""), album(""), comment(""), lastSongInAlbum(false), removeTempFile(true), encoder(-1) {}; - QString replaceSpecialChars(const QString &string, bool quote, QMap map); + TQString replaceSpecialChars(const TQString &string, bool quote, TQMap map); - void fix( const QString &in, const QString &out ); + void fix( const TQString &in, const TQString &out ); // The device to obtain the file such as /dev/cdrom/ (Used when ripping and ejecting) - QString device; + TQString device; int id; - QString track_title; - QString track_artist; + TQString track_title; + TQString track_artist; int track; - QString track_comment; + TQString track_comment; int year; - QString genre; + TQString genre; - QString group; - QString album; - QString comment; + TQString group; + TQString album; + TQString comment; // Currently location of file X - QString location; + TQString location; // New location of a file after current opertation is complete (rip/encode). - QString newLocation; + TQString newLocation; // What was just attempted to do via this job and is spit out in the event // of an error. - QString errorString; + TQString errorString; // If this is the last track to be ripped then value is true. bool lastSongInAlbum; @@ -69,7 +69,7 @@ public: bool removeTempFile; // output from the processing. - QString output; + TQString output; int encoder; }; diff --git a/kaudiocreator/jobqueimp.cpp b/kaudiocreator/jobqueimp.cpp index c39aac4f..81c0431d 100644 --- a/kaudiocreator/jobqueimp.cpp +++ b/kaudiocreator/jobqueimp.cpp @@ -21,21 +21,21 @@ #include "jobqueimp.h" #include "job.h" #include "prefs.h" -#include -#include -#include +#include +#include +#include #include #include #include #include #include #include -#include -#include -#include +#include +#include +#include #include #include -#include +#include #define HEADER_JOB 0 #define HEADER_PROGRESS 1 @@ -49,11 +49,11 @@ * @param parent - parent widget * @param name - widget name */ -JobQueImp::JobQueImp( QWidget* parent, const char* name) : +JobQueImp::JobQueImp( TQWidget* parent, const char* name) : JobQue(parent,name),highestNumber(DEFAULT_HIGHEST_NUMBER), currentId(0){ - connect(removeSelected,SIGNAL(clicked()), this, SLOT( removeSelectedJob())); - connect(removeAll, SIGNAL(clicked()), this, SLOT(removeAllJobs())); - connect(removeDoneJobs, SIGNAL(clicked()), this, SLOT(clearDoneJobs())); + connect(removeSelected,TQT_SIGNAL(clicked()), this, TQT_SLOT( removeSelectedJob())); + connect(removeAll, TQT_SIGNAL(clicked()), this, TQT_SLOT(removeAllJobs())); + connect(removeDoneJobs, TQT_SIGNAL(clicked()), this, TQT_SLOT(clearDoneJobs())); } /** @@ -62,9 +62,9 @@ JobQueImp::JobQueImp( QWidget* parent, const char* name) : * Based upon a highest number that is kept. * @param number the number to fill out. */ -QString JobQueImp::getStringFromNumber(int number){ +TQString JobQueImp::getStringFromNumber(int number){ if(number > highestNumber){ - int diff = QString("%1").arg(number).length() - QString("%1").arg(highestNumber).length(); + int diff = TQString("%1").arg(number).length() - TQString("%1").arg(highestNumber).length(); highestNumber = number; if(diff > 0){ // We have to update all of the cells. @@ -76,8 +76,8 @@ QString JobQueImp::getStringFromNumber(int number){ } } - QString buffer = ""; - uint newLength = QString("%1").arg(highestNumber).length() - QString("%1").arg(number).length(); + TQString buffer = ""; + uint newLength = TQString("%1").arg(highestNumber).length() - TQString("%1").arg(number).length(); for(uint i=0; i < newLength; i++) buffer += "0"; return buffer; @@ -88,11 +88,11 @@ QString JobQueImp::getStringFromNumber(int number){ * @param id the id of the job. * @param name the name of the job. */ -void JobQueImp::addJob(Job*job, const QString &name ){ +void JobQueImp::addJob(Job*job, const TQString &name ){ if(!job) return; job->id = ++currentId; - QueListViewItem *currentItem = new QueListViewItem(todoQue, QString("%1%2").arg(getStringFromNumber(currentId)).arg(currentId), "0", name); + QueListViewItem *currentItem = new QueListViewItem(todoQue, TQString("%1%2").arg(getStringFromNumber(currentId)).arg(currentId), "0", name); currentItem->setPixmap(ICON_LOC, SmallIcon("player_pause", currentItem->height()-2)); queLabel->setText(i18n("Number of jobs in the queue: %1").arg(todoQue->childCount())); } @@ -105,8 +105,8 @@ void JobQueImp::addJob(Job*job, const QString &name ){ void JobQueImp::updateProgress(int id, int progress){ int currentJobCount = numberOfJobsNotFinished(); QueListViewItem * currentItem = (QueListViewItem*)todoQue->firstChild(); - QString buffer = getStringFromNumber(id); - buffer += QString("%1").arg(id); + TQString buffer = getStringFromNumber(id); + buffer += TQString("%1").arg(id); // Find the current item while( currentItem != NULL ){ @@ -272,10 +272,10 @@ int JobQueImp::numberOfJobsNotFinished(){ /** * The repaint function overloaded so that we can have a built in progressbar. */ -void QueListViewItem::paintCell (QPainter * p,const QColorGroup &cg,int column, +void QueListViewItem::paintCell (TQPainter * p,const TQColorGroup &cg,int column, int width,int align){ if(column != HEADER_PROGRESS){ - QListViewItem::paintCell(p,cg,column,width,align); + TQListViewItem::paintCell(p,cg,column,width,align); return; } @@ -295,7 +295,7 @@ void QueListViewItem::paintCell (QPainter * p,const QColorGroup &cg,int column, if(isSelected()) p->setPen(cg.highlightedText()); if(percentDone != -1) - p->drawText(0,0,width-1,height()-1,AlignCenter,QString().setNum((int)percentDone) + "%"); + p->drawText(0,0,width-1,height()-1,AlignCenter,TQString().setNum((int)percentDone) + "%"); else p->drawText(0,0,width-1,height()-1,AlignCenter,i18n("Error")); } @@ -303,7 +303,7 @@ void QueListViewItem::paintCell (QPainter * p,const QColorGroup &cg,int column, /** * Header for built in treelist item so we can have a progress bar in them. */ -QueListViewItem::QueListViewItem(QListView *parent, const QString id, const QString p , const QString name, const QString d, const QString e) : QListViewItem(parent, id, p, name,d,e), percentDone(0), progressing(false) { +QueListViewItem::QueListViewItem(TQListView *parent, const TQString id, const TQString p , const TQString name, const TQString d, const TQString e) : TQListViewItem(parent, id, p, name,d,e), percentDone(0), progressing(false) { } #include "jobqueimp.moc" diff --git a/kaudiocreator/jobqueimp.h b/kaudiocreator/jobqueimp.h index 2287cf37..ef5de4b3 100644 --- a/kaudiocreator/jobqueimp.h +++ b/kaudiocreator/jobqueimp.h @@ -22,8 +22,8 @@ #define JOBQUEIMP_H #include "jobque.h" -#include -#include +#include +#include class Job; class QPainter; @@ -33,11 +33,11 @@ class QListView; /** * Helper class to allow for progress bars in list view items. */ -class QueListViewItem : public QListViewItem { +class QueListViewItem : public TQListViewItem { public: - QueListViewItem (QListView * p = NULL, const QString a=0, const QString b=0, const QString c=0, const QString d=0, const QString e=0); - virtual void paintCell (QPainter * p,const QColorGroup &cg,int column, + QueListViewItem (TQListView * p = NULL, const TQString a=0, const TQString b=0, const TQString c=0, const TQString d=0, const TQString e=0); + virtual void paintCell (TQPainter * p,const TQColorGroup &cg,int column, int width,int align); double percentDone; // Has the percentDone gone beyond 0 @@ -54,12 +54,12 @@ signals: void removeJob( int idNumber ); public: - JobQueImp( QWidget* parent = 0, const char* name = 0 ); + JobQueImp( TQWidget* parent = 0, const char* name = 0 ); int numberOfJobsNotFinished(); public slots: void updateProgress( int id, int progress ); - void addJob( Job* job, const QString &name ); + void addJob( Job* job, const TQString &name ); // Toolbar Button void clearDoneJobs(); @@ -70,7 +70,7 @@ private slots: private: bool removeJob( QueListViewItem *item, bool kill=true, bool prompt=true ); - QString getStringFromNumber( int number ); + TQString getStringFromNumber( int number ); int highestNumber; int currentId; diff --git a/kaudiocreator/kaudiocreator.cpp b/kaudiocreator/kaudiocreator.cpp index 8cf2953b..6ac77beb 100644 --- a/kaudiocreator/kaudiocreator.cpp +++ b/kaudiocreator/kaudiocreator.cpp @@ -20,7 +20,7 @@ #include "kaudiocreator.h" -#include +#include #include #include @@ -49,89 +49,89 @@ /** * Constructor. Connect all of the object and the job control. */ -KAudioCreator::KAudioCreator( QWidget* parent, const char* name) : +KAudioCreator::KAudioCreator( TQWidget* parent, const char* name) : KMainWindow(parent, name) { janusWidget = new KJanusWidget(this, name, KJanusWidget::Tabbed); setCentralWidget(janusWidget); - QVBox *frame = janusWidget->addVBoxPage(i18n("&CD Tracks"), QString::null, SmallIcon("cdaudio_unmount", 32)); + TQVBox *frame = janusWidget->addVBoxPage(i18n("&CD Tracks"), TQString::null, SmallIcon("cdaudio_unmount", 32)); tracks = new TracksImp(frame, "Tracks"); ripper = new Ripper ( frame, "Rip" ); encoder = new Encoder( frame, "Encoder" ); - frame = janusWidget->addVBoxPage( i18n("&Jobs"), QString::null, SmallIcon( "run", 32 ) ); + frame = janusWidget->addVBoxPage( i18n("&Jobs"), TQString::null, SmallIcon( "run", 32 ) ); jobQue = new JobQueImp( frame, "Que" ); resize(500, 440); /*KAction *eject = */new KAction( i18n("&Eject CD"), 0, tracks, - SLOT( eject() ), actionCollection(), "eject" ); + TQT_SLOT( eject() ), actionCollection(), "eject" ); (void)new KAction( i18n("&Configure KAudioCreator..."), 0, this, - SLOT( showSettings() ), actionCollection(), "configure_kaudiocreator" ); + TQT_SLOT( showSettings() ), actionCollection(), "configure_kaudiocreator" ); KAction *selectAll = new KAction( i18n( "Select &All Tracks"), 0, tracks, - SLOT( selectAllTracks() ), actionCollection(), "select_all" ) ; + TQT_SLOT( selectAllTracks() ), actionCollection(), "select_all" ) ; KAction *deselectAll = new KAction( i18n( "Deselect &All Tracks"), 0, tracks, - SLOT( deselectAllTracks() ), actionCollection(), "deselect_all" ); + TQT_SLOT( deselectAllTracks() ), actionCollection(), "deselect_all" ); selectAll->setEnabled( false ); deselectAll->setEnabled( false ); KActionMenu *actActionMenu = new KActionMenu( i18n("Rip &Selection"), "rip", actionCollection(), "rip" ); actActionMenu->setDelayed(true); //needed for checking "all accounts" actActionMenu->setEnabled( false ); - connect( actActionMenu, SIGNAL( activated() ), tracks, SLOT( startSession() ) ); + connect( actActionMenu, TQT_SIGNAL( activated() ), tracks, TQT_SLOT( startSession() ) ); ripMenu = actActionMenu->popupMenu(); - connect( ripMenu, SIGNAL( activated(int) ), this, SLOT( slotRipSelection(int)) ); - connect( ripMenu, SIGNAL( aboutToShow() ), this, SLOT( getRipMenu()) ); + connect( ripMenu, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( slotRipSelection(int)) ); + connect( ripMenu, TQT_SIGNAL( aboutToShow() ), this, TQT_SLOT( getRipMenu()) ); KAction *rip = new KAction( i18n( "Rip &Selection" ), 0, tracks, - SLOT( startSession() ), actionCollection(), "rip_selected" ); + TQT_SLOT( startSession() ), actionCollection(), "rip_selected" ); rip->setEnabled( false ); - connect( jobQue, SIGNAL( removeJob(int) ), this, SLOT( updateStatus() ) ); - connect( jobQue, SIGNAL( removeJob(int) ), ripper, SLOT( removeJob(int) ) ); - connect( jobQue, SIGNAL( removeJob(int) ), encoder, SLOT( removeJob(int)) ); + connect( jobQue, TQT_SIGNAL( removeJob(int) ), this, TQT_SLOT( updateStatus() ) ); + connect( jobQue, TQT_SIGNAL( removeJob(int) ), ripper, TQT_SLOT( removeJob(int) ) ); + connect( jobQue, TQT_SIGNAL( removeJob(int) ), encoder, TQT_SLOT( removeJob(int)) ); - connect( ripper, SIGNAL( updateProgress(int, int) ) , jobQue, SLOT( updateProgress(int,int) ) ); - connect( ripper, SIGNAL( addJob(Job*, const QString &) ), jobQue, SLOT( addJob(Job*, const QString &)) ); - connect( ripper, SIGNAL( eject(const QString &) ) , tracks, SLOT( ejectDevice(const QString &)) ); - connect( ripper, SIGNAL( encodeWav(Job *) ) , encoder, SLOT( encodeWav(Job *)) ); - connect( ripper, SIGNAL( jobsChanged() ) , this, SLOT( updateStatus() ) ); + connect( ripper, TQT_SIGNAL( updateProgress(int, int) ) , jobQue, TQT_SLOT( updateProgress(int,int) ) ); + connect( ripper, TQT_SIGNAL( addJob(Job*, const TQString &) ), jobQue, TQT_SLOT( addJob(Job*, const TQString &)) ); + connect( ripper, TQT_SIGNAL( eject(const TQString &) ) , tracks, TQT_SLOT( ejectDevice(const TQString &)) ); + connect( ripper, TQT_SIGNAL( encodeWav(Job *) ) , encoder, TQT_SLOT( encodeWav(Job *)) ); + connect( ripper, TQT_SIGNAL( jobsChanged() ) , this, TQT_SLOT( updateStatus() ) ); - connect( encoder, SIGNAL( updateProgress(int, int) ) , jobQue, SLOT( updateProgress(int,int)) ); - connect( encoder, SIGNAL( addJob(Job*, const QString&)), jobQue, SLOT( addJob(Job*, const QString &)) ); - connect( encoder, SIGNAL( jobsChanged() ) , this, SLOT( updateStatus() ) ); + connect( encoder, TQT_SIGNAL( updateProgress(int, int) ) , jobQue, TQT_SLOT( updateProgress(int,int)) ); + connect( encoder, TQT_SIGNAL( addJob(Job*, const TQString&)), jobQue, TQT_SLOT( addJob(Job*, const TQString &)) ); + connect( encoder, TQT_SIGNAL( jobsChanged() ) , this, TQT_SLOT( updateStatus() ) ); - connect( tracks, SIGNAL( hasCD(bool) ) , this, SLOT( hasCD(bool) ) ); - connect( tracks, SIGNAL( ripTrack(Job *) ), ripper, SLOT( ripTrack(Job *)) ); - connect( tracks, SIGNAL( hasTracks(bool) ), rip, SLOT( setEnabled(bool)) ); - connect( tracks, SIGNAL( hasTracks(bool) ), actActionMenu, SLOT( setEnabled(bool)) ); - connect( tracks, SIGNAL( hasTracks(bool) ), deselectAll, SLOT( setEnabled(bool)) ); - connect( tracks, SIGNAL( hasTracks(bool) ), selectAll, SLOT( setEnabled(bool)) ); + connect( tracks, TQT_SIGNAL( hasCD(bool) ) , this, TQT_SLOT( hasCD(bool) ) ); + connect( tracks, TQT_SIGNAL( ripTrack(Job *) ), ripper, TQT_SLOT( ripTrack(Job *)) ); + connect( tracks, TQT_SIGNAL( hasTracks(bool) ), rip, TQT_SLOT( setEnabled(bool)) ); + connect( tracks, TQT_SIGNAL( hasTracks(bool) ), actActionMenu, TQT_SLOT( setEnabled(bool)) ); + connect( tracks, TQT_SIGNAL( hasTracks(bool) ), deselectAll, TQT_SLOT( setEnabled(bool)) ); + connect( tracks, TQT_SIGNAL( hasTracks(bool) ), selectAll, TQT_SLOT( setEnabled(bool)) ); (void)new KAction(i18n("Remove &Completed Jobs"), 0, jobQue, - SLOT(clearDoneJobs()), actionCollection(), "clear_done_jobs" ); + TQT_SLOT(clearDoneJobs()), actionCollection(), "clear_done_jobs" ); KAction *edit = new KAction(i18n("&Edit Album..."), 0, tracks, - SLOT(editInformation()), actionCollection(), "edit_cd"); - connect(tracks, SIGNAL(hasCD(bool)), edit, SLOT(setEnabled(bool))); + TQT_SLOT(editInformation()), actionCollection(), "edit_cd"); + connect(tracks, TQT_SIGNAL(hasCD(bool)), edit, TQT_SLOT(setEnabled(bool))); edit->setEnabled( false ); (void)new KAction(i18n("Encode &File..."), 0, this, - SLOT(encodeFile()), actionCollection(), "encode_file"); + TQT_SLOT(encodeFile()), actionCollection(), "encode_file"); KAction *cddb = new KAction(i18n("&CDDB Lookup"), 0, tracks, - SLOT(performCDDB()), actionCollection(), "cddb_now"); - connect(tracks, SIGNAL(hasCD(bool)), cddb, SLOT(setEnabled(bool))); + TQT_SLOT(performCDDB()), actionCollection(), "cddb_now"); + connect(tracks, TQT_SIGNAL(hasCD(bool)), cddb, TQT_SLOT(setEnabled(bool))); cddb->setEnabled( false ); - KStdAction::configureNotifications(this, SLOT(configureNotifications()), + KStdAction::configureNotifications(this, TQT_SLOT(configureNotifications()), actionCollection()); - KStdAction::quit( this, SLOT(close()), actionCollection(), "quit" ); + KStdAction::quit( this, TQT_SLOT(close()), actionCollection(), "quit" ); // Init statusbar statusBar()->insertItem(i18n("No Audio CD detected"), 0 ); @@ -140,7 +140,7 @@ KAudioCreator::KAudioCreator( QWidget* parent, const char* name) : setupGUI(); } -void KAudioCreator::setDevice( const QString &device ) +void KAudioCreator::setDevice( const TQString &device ) { tracks->deviceCombo->setCurrentText( device ); } @@ -153,10 +153,10 @@ void KAudioCreator::getRipMenu(){ ripMenu->clear(); int i=0; - QString currentGroup = QString("Encoder_%1").arg(i); + TQString currentGroup = TQString("Encoder_%1").arg(i); while(EncoderPrefs::hasPrefs(currentGroup)){ ripMenu->insertItem(EncoderPrefs::prefs(currentGroup)->encoderName(), i); - currentGroup = QString("Encoder_%1").arg(++i); + currentGroup = TQString("Encoder_%1").arg(++i); } } @@ -171,9 +171,9 @@ void KAudioCreator::hasCD(bool cd){ } void KAudioCreator::updateStatus() { - QString status = i18n("Idle."); - QString rippingStatus; - QString encodingStatus; + TQString status = i18n("Idle."); + TQString rippingStatus; + TQString encodingStatus; int activeRippingJobs = ripper->activeJobCount(); int pendingRippingJobs = ripper->pendingJobCount(); int activeEncodingJobs = encoder->activeJobCount(); @@ -216,7 +216,7 @@ void KAudioCreator::configureNotifications() { void KAudioCreator::encodeFile(){ EncodeFileImp *file = new EncodeFileImp(this, "EncodeFile"); - connect(file, SIGNAL(startJob(Job*)),encoder, SLOT(encodeWav(Job*))); + connect(file, TQT_SIGNAL(startJob(Job*)),encoder, TQT_SLOT(encodeWav(Job*))); file->show(); } @@ -228,14 +228,14 @@ void KAudioCreator::showSettings(){ return; SettingsDialog *dialog = new SettingsDialog(this, "settings", Prefs::self()); - connect(dialog, SIGNAL(settingsChanged()), ripper, SLOT(loadSettings())); - connect(dialog, SIGNAL(settingsChanged()), encoder, SLOT(loadSettings())); - connect(dialog, SIGNAL(settingsChanged()), tracks, SLOT(loadSettings())); - connect(dialog->encoderConfigImp, SIGNAL(encoderUpdated()), encoder, SLOT(loadSettings())); + connect(dialog, TQT_SIGNAL(settingsChanged()), ripper, TQT_SLOT(loadSettings())); + connect(dialog, TQT_SIGNAL(settingsChanged()), encoder, TQT_SLOT(loadSettings())); + connect(dialog, TQT_SIGNAL(settingsChanged()), tracks, TQT_SLOT(loadSettings())); + connect(dialog->encoderConfigImp, TQT_SIGNAL(encoderUpdated()), encoder, TQT_SLOT(loadSettings())); dialog->show(); } -SettingsDialog::SettingsDialog(QWidget *parent, const char *name,KConfigSkeleton *config) +SettingsDialog::SettingsDialog(TQWidget *parent, const char *name,KConfigSkeleton *config) : KConfigDialog(parent, name, config), cddb(0), cddbChanged(false) { @@ -248,12 +248,12 @@ SettingsDialog::SettingsDialog(QWidget *parent, const char *name,KConfigSkeleton KService::Ptr libkcddb = KService::serviceByDesktopName("libkcddb"); if (libkcddb && libkcddb->isValid()) { - cddb = KCModuleLoader::loadModule(QString("libkcddb"), KCModuleLoader::Inline); + cddb = KCModuleLoader::loadModule(TQString("libkcddb"), KCModuleLoader::Inline); if (cddb) { cddb->load(); addPage(cddb, i18n("CDDB"), "cdaudio_mount", i18n("CDDB Configuration"), false); - connect(cddb, SIGNAL(changed(bool)), this, SLOT(slotCddbChanged(bool))); + connect(cddb, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(slotCddbChanged(bool))); } } RipConfig *rip = new RipConfig(0, "Ripper"); diff --git a/kaudiocreator/kaudiocreator.h b/kaudiocreator/kaudiocreator.h index 71eafe89..d2e0c57d 100644 --- a/kaudiocreator/kaudiocreator.h +++ b/kaudiocreator/kaudiocreator.h @@ -38,8 +38,8 @@ class KAudioCreator : public KMainWindow { Q_OBJECT public: - KAudioCreator( QWidget* parent = 0, const char* name = 0); - void setDevice( const QString &device ); + KAudioCreator( TQWidget* parent = 0, const char* name = 0); + void setDevice( const TQString &device ); protected: virtual bool queryClose(); @@ -69,7 +69,7 @@ class SettingsDialog: public KConfigDialog { Q_OBJECT public: - SettingsDialog(QWidget *parent, const char *name,KConfigSkeleton *config); + SettingsDialog(TQWidget *parent, const char *name,KConfigSkeleton *config); protected slots: void updateSettings(); diff --git a/kaudiocreator/ripper.cpp b/kaudiocreator/ripper.cpp index 38f1a4fe..cb9c012b 100644 --- a/kaudiocreator/ripper.cpp +++ b/kaudiocreator/ripper.cpp @@ -21,8 +21,8 @@ #include "ripper.h" #include "prefs.h" -#include -#include +#include +#include #include #include #include @@ -32,7 +32,7 @@ /** * Constructor, load settings. */ -Ripper::Ripper( QObject* parent, const char* name) : QObject(parent,name) { +Ripper::Ripper( TQObject* parent, const char* name) : TQObject(parent,name) { loadSettings(); } @@ -49,7 +49,7 @@ void Ripper::loadSettings(){ */ Ripper::~Ripper(){ pendingJobs.clear(); - QMap::Iterator it; + TQMap::Iterator it; for( it = jobs.begin(); it != jobs.end(); ++it ){ KIO::Job* ioJob = it.key(); Job *job = it.data(); @@ -57,11 +57,11 @@ Ripper::~Ripper(){ if(ioJob){ KIO::FileCopyJob *copyJob = static_cast (ioJob); - disconnect(copyJob, SIGNAL(result(KIO::Job*)), this, SLOT(copyJobResult(KIO::Job*))); - disconnect(copyJob, SIGNAL(percent ( KIO::Job *, unsigned long)), this, SLOT(updateProgress ( KIO::Job *, unsigned long))); - QString fileDestination = (copyJob->destURL()).path(); + disconnect(copyJob, TQT_SIGNAL(result(KIO::Job*)), this, TQT_SLOT(copyJobResult(KIO::Job*))); + disconnect(copyJob, TQT_SIGNAL(percent ( KIO::Job *, unsigned long)), this, TQT_SLOT(updateProgress ( KIO::Job *, unsigned long))); + TQString fileDestination = (copyJob->destURL()).path(); copyJob->kill(); - QFile file( fileDestination ); + TQFile file( fileDestination ); file.remove(); } } @@ -89,20 +89,20 @@ int Ripper::pendingJobCount() { * @param id the id number of the job to remove. */ void Ripper::removeJob(int id){ - QMap::Iterator it; + TQMap::Iterator it; for( it = jobs.begin(); it != jobs.end(); ++it ){ if(it.data()->id == id){ KIO::FileCopyJob *copyJob = dynamic_cast (it.key()); if(copyJob){ - QString fileDestination = (copyJob->destURL()).path(); + TQString fileDestination = (copyJob->destURL()).path(); copyJob->kill(); // This here is such a hack, shouldn't kill() do this, or why isn't there a stop()? // TODO add to copyJob a stop() function. - QFile file( fileDestination ); + TQFile file( fileDestination ); if(file.exists()) file.remove(); else { - QFile f( fileDestination+".part" ); + TQFile f( fileDestination+".part" ); f.remove(); } } @@ -120,7 +120,7 @@ void Ripper::removeJob(int id){ pendingJobs.remove(job); delete job; } - //qDebug(QString("Done removing Job:%1").arg(id).latin1()); + //qDebug(TQString("Done removing Job:%1").arg(id).latin1()); tendToNewJobs(); } @@ -158,8 +158,8 @@ void Ripper::tendToNewJobs(){ return; pendingJobs.remove(job); - QMap map; - QString defaultTempDir; + TQMap map; + TQString defaultTempDir; if(Prefs::enableTempDir()) defaultTempDir = Prefs::tempDir(); else @@ -169,23 +169,23 @@ void Ripper::tendToNewJobs(){ KTempFile tmp( defaultTempDir, ".wav" ); tmp.setAutoDelete(true); - QString wavFile; - QString args = job->device; + TQString wavFile; + TQString args = job->device; if(!args.isEmpty()) - args = QString("?device=%1").arg(args); + args = TQString("?device=%1").arg(args); args = args+"&fileNameTemplate=Track %{number}"; if(job->track < 10) - wavFile = QString("audiocd:/Wav/Track 0%1.wav%2").arg(job->track).arg(args); + wavFile = TQString("audiocd:/Wav/Track 0%1.wav%2").arg(job->track).arg(args); else - wavFile = QString("audiocd:/Wav/Track %1.wav%2").arg(job->track).arg(args); + wavFile = TQString("audiocd:/Wav/Track %1.wav%2").arg(job->track).arg(args); KURL source(wavFile); KURL dest(tmp.name()); KIO::FileCopyJob *copyJob = new KIO::FileCopyJob(source, dest, 0644, false, true, false, false); jobs.insert(copyJob, job); - connect(copyJob, SIGNAL(result(KIO::Job*)), this, SLOT(copyJobResult(KIO::Job*))); - connect(copyJob, SIGNAL(percent ( KIO::Job *, unsigned long)), this, SLOT(updateProgress ( KIO::Job *, unsigned long))); + connect(copyJob, TQT_SIGNAL(result(KIO::Job*)), this, TQT_SLOT(copyJobResult(KIO::Job*))); + connect(copyJob, TQT_SIGNAL(percent ( KIO::Job *, unsigned long)), this, TQT_SLOT(updateProgress ( KIO::Job *, unsigned long))); emit jobsChanged(); } @@ -216,7 +216,7 @@ void Ripper::copyJobResult(KIO::Job *copyjob){ } else{ copyJob->showErrorDialog(0); - QFile file( (copyJob->destURL()).path()); + TQFile file( (copyJob->destURL()).path()); file.remove(); emit updateProgress(newJob->id, -1); delete newJob; @@ -234,7 +234,7 @@ void Ripper::copyJobResult(KIO::Job *copyjob){ } if( !job ){ deviceToEject = newJob->device; - QTimer::singleShot( Prefs::autoEjectDelay()*1000 + 500, this, SLOT(ejectNow())); + TQTimer::singleShot( Prefs::autoEjectDelay()*1000 + 500, this, TQT_SLOT(ejectNow())); } } KNotifyClient::event("cd ripped"); diff --git a/kaudiocreator/ripper.h b/kaudiocreator/ripper.h index 87d25259..1b92493e 100644 --- a/kaudiocreator/ripper.h +++ b/kaudiocreator/ripper.h @@ -23,24 +23,24 @@ #include "job.h" #include -#include -#include +#include +#include class Job; -class Ripper : public QObject { +class Ripper : public TQObject { Q_OBJECT signals: - void addJob( Job *job, const QString &name ); + void addJob( Job *job, const TQString &name ); void updateProgress( int id, int progress ); void encodeWav( Job *job ); - void eject( const QString &device ); + void eject( const TQString &device ); void jobsChanged(); public: - Ripper( QObject* parent = 0, const char* name = 0 ); + Ripper( TQObject* parent = 0, const char* name = 0 ); ~Ripper(); int activeJobCount(); int pendingJobCount(); @@ -57,11 +57,11 @@ private slots: void ejectNow(); private: - QString deviceToEject; + TQString deviceToEject; // Jobs that we are currently doing. - QMap jobs; + TQMap jobs; // Jobs that we want to do , but haven't done yet - QPtrList pendingJobs; + TQPtrList pendingJobs; }; #endif // RIPPER_H diff --git a/kaudiocreator/tracksimp.cpp b/kaudiocreator/tracksimp.cpp index 000fdfb9..9a864e9d 100644 --- a/kaudiocreator/tracksimp.cpp +++ b/kaudiocreator/tracksimp.cpp @@ -32,13 +32,13 @@ #include #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include "job.h" #include "kcompactdisc.h" @@ -49,28 +49,28 @@ /** * Constructor, connect up slots and signals. */ -TracksImp::TracksImp( QWidget* parent, const char* name) : +TracksImp::TracksImp( TQWidget* parent, const char* name) : Tracks(parent,name), cddbInfo() { cd = new KCompactDisc; - connect(cd,SIGNAL(discChanged(unsigned)),this,SLOT(newDisc(unsigned))); + connect(cd,TQT_SIGNAL(discChanged(unsigned)),this,TQT_SLOT(newDisc(unsigned))); - connect(trackListing, SIGNAL(clicked( QListViewItem * )), this, SLOT(selectTrack(QListViewItem*))); - connect(trackListing, SIGNAL(doubleClicked(QListViewItem *)), this, SLOT(editInformation())); - connect(trackListing, SIGNAL(returnPressed(QListViewItem *)), this, SLOT(editInformation())); - connect(selectAllTracksButton, SIGNAL(clicked()), this, SLOT(selectAllTracks())); - connect(deselectAllTracksButton, SIGNAL(clicked()), this, SLOT(deselectAllTracks())); + connect(trackListing, TQT_SIGNAL(clicked( TQListViewItem * )), this, TQT_SLOT(selectTrack(TQListViewItem*))); + connect(trackListing, TQT_SIGNAL(doubleClicked(TQListViewItem *)), this, TQT_SLOT(editInformation())); + connect(trackListing, TQT_SIGNAL(returnPressed(TQListViewItem *)), this, TQT_SLOT(editInformation())); + connect(selectAllTracksButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(selectAllTracks())); + connect(deselectAllTracksButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(deselectAllTracks())); - connect(deviceCombo, SIGNAL(textChanged(const QString &)), this, SLOT(changeDevice(const QString &))); + connect(deviceCombo, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changeDevice(const TQString &))); selectAllTracksButton->setEnabled( false ); deselectAllTracksButton->setEnabled( false ); cddb = new KCDDB::Client(); cddb->setBlockingMode(false); - connect(cddb, SIGNAL(finished(CDDB::Result)), this, SLOT(lookupCDDBDone(CDDB::Result))); + connect(cddb, TQT_SIGNAL(finished(CDDB::Result)), this, TQT_SLOT(lookupCDDBDone(CDDB::Result))); trackListing->setSorting(-1, false); loadSettings(); } @@ -79,11 +79,11 @@ TracksImp::TracksImp( QWidget* parent, const char* name) : * store the current device from the combo. */ TracksImp::~TracksImp() { - QStringList list; + TQStringList list; if( deviceCombo->count() != 0) list.append(deviceCombo->currentText()); for ( int i=0; icount();i++ ) { - QString text = deviceCombo->text(i); + TQString text = deviceCombo->text(i); if( list.find(text) == list.end()) list.append(text); if( list.count() == 5) @@ -98,18 +98,18 @@ TracksImp::~TracksImp() { * Load the class settings. */ void TracksImp::loadSettings() { - QStringList list; + TQStringList list; // Add the saved list, no dups - QStringList prefsList = Prefs::device(); - QStringList::Iterator it; + TQStringList prefsList = Prefs::device(); + TQStringList::Iterator it; for ( it = prefsList.begin(); it != prefsList.end(); ++it ) { if( list.find( *it ) == list.end()) list.append(*it); } // Get current list, no dups for ( int i=0; icount();i++ ) { - QString text = deviceCombo->text(i); + TQString text = deviceCombo->text(i); if( list.find(text) == list.end()) list.append(text); } @@ -145,7 +145,7 @@ void TracksImp::newDisc(unsigned discId) cddbInfo.clear(); - cddbInfo.id = QString::number(discId, 16).rightJustify(8,'0'); + cddbInfo.id = TQString::number(discId, 16).rightJustify(8,'0'); cddbInfo.length = cd->discLength(); cddbInfo.artist = cd->discArtist(); @@ -179,15 +179,15 @@ bool TracksImp::hasCD(){ * The device text has changed. * @param file - the new text to check. */ -void TracksImp::changeDevice(const QString &file ) { - QString newDevice = KCompactDisc::urlToDevice(file); +void TracksImp::changeDevice(const TQString &file ) { + TQString newDevice = KCompactDisc::urlToDevice(file); if( newDevice == cd->device() ) { //qDebug("Device names match, returning"); return; } - QFileInfo fileInfo(newDevice); + TQFileInfo fileInfo(newDevice); if( !fileInfo.exists() || fileInfo.isDir()) { //qDebug("Device file !exist or isDir or !file"); return; @@ -195,7 +195,7 @@ void TracksImp::changeDevice(const QString &file ) { if (!cd->setDevice(newDevice, 50, false)) { - QString errstring = + TQString errstring = i18n("CDROM read or access error (or no audio disk in drive).\n"\ "Please make sure you have access permissions to:\n%1") .arg(file); @@ -242,24 +242,24 @@ void TracksImp::lookupCDDBDone(CDDB::Result result ) { // TODO Why doesn't libcddb not return MultipleRecordFound? //if( result == KCDDB::CDDB::MultipleRecordFound ) { if( Prefs::promptIfIncompleteInfo() && cddb->lookupResponse().count() > 1 ) { - QString searchedCDId = cddbInfo.id; + TQString searchedCDId = cddbInfo.id; CDInfoList cddb_info = cddb->lookupResponse(); CDInfoList::iterator it; - QStringList list; + TQStringList list; for ( it = cddb_info.begin(); it != cddb_info.end(); ++it ) { - list.append( QString("%1, %2, %3").arg((*it).artist).arg((*it).title) + list.append( TQString("%1, %2, %3").arg((*it).artist).arg((*it).title) .arg((*it).genre)); } bool ok(false); - QString res = KInputDialog::getItem( + TQString res = KInputDialog::getItem( i18n("Select CDDB entry"), i18n("Select a CDDB entry:"), list, 0, false, &ok, this ); if ( ok ) { // The user selected and item and pressed OK uint c = 0; - for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) { + for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { if( *it == res) break; c++; } @@ -308,7 +308,7 @@ void TracksImp::editInformation( ) CDInfoDialogBase *base = new CDInfoDialogBase(dialog, "Album info editor dialog"); // Workaround the fact that CDInfoDialogBase doesn't take // a const TrackOffsetList - QValueList discSig = cd->discSignature(); + TQValueList discSig = cd->discSignature(); base->setInfo(cddbInfo, discSig); dialog->setMainWidget(base); @@ -322,14 +322,14 @@ void TracksImp::editInformation( ) delete dialog; } -QString TracksImp::formatTime(unsigned ms) +TQString TracksImp::formatTime(unsigned ms) { - QTime time; + TQTime time; time = time.addMSecs((int)ms); // Use ".zzz" for milliseconds... - QString temp2; + TQString temp2; if (time.hour() > 0) temp2 = time.toString("hh:mm:ss"); else @@ -352,7 +352,7 @@ void TracksImp::ripWholeAlbum() { */ void TracksImp::startSession( int encoder ) { - QPtrList selected = selectedTracks(); + TQPtrList selected = selectedTracks(); if( selected.isEmpty() ) { @@ -365,7 +365,7 @@ void TracksImp::startSession( int encoder ) selected = selectedTracks(); } - QStringList list; + TQStringList list; if( cddbInfo.genre == "Unknown" ) list += "Genre"; if( cddbInfo.year == 0 ) @@ -425,7 +425,7 @@ void TracksImp::startSession( int encoder ) * Selects and unselects the tracks. * @param currentItem the track to swich the selection choice. */ -void TracksImp::selectTrack( QListViewItem *item ) +void TracksImp::selectTrack( TQListViewItem *item ) { if( !item ) return; @@ -435,9 +435,9 @@ void TracksImp::selectTrack( QListViewItem *item ) #undef item } -QPtrList TracksImp::selectedTracks() +TQPtrList TracksImp::selectedTracks() { - QPtrList selected; + TQPtrList selected; TracksItem *item = static_cast(trackListing->firstChild()); while( item ) @@ -480,7 +480,7 @@ void TracksImp::deselectAllTracks() */ void TracksImp::newAlbum() { - QString albumText = cddbInfo.title; + TQString albumText = cddbInfo.title; if( !cddbInfo.artist.isEmpty() ) albumText = cddbInfo.artist + i18n( " - " ) + albumText; @@ -506,8 +506,8 @@ void TracksImp::newAlbum() TracksItem *last = 0; for( unsigned i = 0; i < t.count(); i++ ) { - QString trackArtist; - QString title; + TQString trackArtist; + TQString title; if( isSampler ) { @@ -523,7 +523,7 @@ void TracksImp::newAlbum() } // There is a new track for this title. Add it to the list of tracks. - QString trackLength = formatTime(cd->trackLength(i+1)); + TQString trackLength = formatTime(cd->trackLength(i+1)); last = new TracksItem( trackListing, last, title, trackArtist, i+1, trackLength, t[i].extt ); } @@ -540,11 +540,11 @@ void TracksImp::newAlbum() /** * If the user presses the F2 key, trigger renaming of the title. - * @param event the QKeyEvent passed to this event handler. + * @param event the TQKeyEvent passed to this event handler. */ -void TracksImp::keyPressEvent(QKeyEvent *event) +void TracksImp::keyPressEvent(TQKeyEvent *event) { - QListViewItem *item = trackListing->selectedItem(); + TQListViewItem *item = trackListing->selectedItem(); if( !item ) return; if( event->key() == Qt::Key_F2 ) @@ -568,7 +568,7 @@ void TracksImp::eject() { * Eject a device * @param deviceToEject the device to eject. */ -void TracksImp::ejectDevice(const QString &deviceToEject) { +void TracksImp::ejectDevice(const TQString &deviceToEject) { changeDevice(deviceToEject); cd->eject(); diff --git a/kaudiocreator/tracksimp.h b/kaudiocreator/tracksimp.h index 48e34f4f..89ea2e36 100644 --- a/kaudiocreator/tracksimp.h +++ b/kaudiocreator/tracksimp.h @@ -44,8 +44,8 @@ class KCompactDisc; class TracksItem : public KListViewItem { public: - TracksItem( KListView *parent, KListViewItem *after, QString t, QString a, int tr, QString l, QString c ) - : KListViewItem( parent, after, QString::null/*rip*/, QString::number(tr), l, t ) + TracksItem( KListView *parent, KListViewItem *after, TQString t, TQString a, int tr, TQString l, TQString c ) + : KListViewItem( parent, after, TQString::null/*rip*/, TQString::number(tr), l, t ) { m_title = t; m_artist = a; @@ -55,14 +55,14 @@ public: m_checked = false; } - QString title() const { return m_title; } - QString artist() const { return m_artist; } + TQString title() const { return m_title; } + TQString artist() const { return m_artist; } int track() const { return m_track; } - QString length() const { return m_length; } + TQString length() const { return m_length; } bool checked() const { return m_checked; } - QString comment() const { return m_comment; } + TQString comment() const { return m_comment; } #include - void setTitle( const QString &t ) { m_title = t; kdDebug() << "title: " << m_title << endl; } + void setTitle( const TQString &t ) { m_title = t; kdDebug() << "title: " << m_title << endl; } void setChecked( const bool &b ) { m_checked = b; b ? setPixmap( HEADER_RIP, SmallIcon( "apply", height()-2 ) ) : @@ -70,11 +70,11 @@ public: } private: - QString m_title; - QString m_artist; + TQString m_title; + TQString m_artist; int m_track; - QString m_length; - QString m_comment; + TQString m_length; + TQString m_comment; bool m_checked; // marked for ripping }; @@ -93,7 +93,7 @@ signals: void hasTracks(bool); public: - TracksImp( QWidget* parent = 0, const char* name = 0); + TracksImp( TQWidget* parent = 0, const char* name = 0); ~TracksImp(); bool hasCD(); @@ -105,26 +105,26 @@ public slots: void startSession( int encoder = -1 ); void editInformation(); void performCDDB(); - void ejectDevice(const QString &deviceToEject); + void ejectDevice(const TQString &deviceToEject); void eject(); void selectAllTracks(); void deselectAllTracks(); private slots: - void changeDevice(const QString &file); - void keyPressEvent(QKeyEvent *event); + void changeDevice(const TQString &file); + void keyPressEvent(TQKeyEvent *event); void lookupCDDBDone(CDDB::Result result); void newDisc(unsigned discId); - void selectTrack(QListViewItem *); + void selectTrack(TQListViewItem *); private: void lookupDevice(); void lookupCDDB(); void newAlbum(); void ripWholeAlbum(); - QPtrList selectedTracks(); + TQPtrList selectedTracks(); - QString formatTime(unsigned ms); + TQString formatTime(unsigned ms); KCDDB::Client *cddb; KCompactDisc *cd; diff --git a/kaudiocreator/wizard.ui.h b/kaudiocreator/wizard.ui.h index 539316fe..57a21a42 100644 --- a/kaudiocreator/wizard.ui.h +++ b/kaudiocreator/wizard.ui.h @@ -26,9 +26,9 @@ ** a constructor, and a destroy() slot in place of a destructor. *****************************************************************************/ -#include -#include -#include +#include +#include +#include #include #include "job.h" @@ -87,10 +87,10 @@ void fileWizard::commentPressed() fileFormat->insert("%{albumcomment}"); } -void fileWizard::fileFormatTextChanged(const QString& text) +void fileWizard::fileFormatTextChanged(const TQString& text) { - QString string = text; - string.replace(QRegExp("~"), "/home/foo"); + TQString string = text; + string.replace(TQRegExp("~"), "/home/foo"); Job job; job.genre = "Rock"; job.group = "J Rocker"; @@ -102,7 +102,7 @@ void fileWizard::fileFormatTextChanged(const QString& text) job.track_title = "Time"; job.track_artist = "John Rocker"; job.track_comment = "This Song Rocks!"; - QMap map; + TQMap map; map.insert("extension", "mp3"); string = job.replaceSpecialChars(string, false, map); exampleLabel->setText(i18n("Example: %1").arg(string)); diff --git a/kfile-plugins/au/kfile_au.cpp b/kfile-plugins/au/kfile_au.cpp index fc241168..ae1b4614 100644 --- a/kfile-plugins/au/kfile_au.cpp +++ b/kfile-plugins/au/kfile_au.cpp @@ -26,11 +26,11 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #if !defined(__osf__) #include @@ -43,8 +43,8 @@ typedef KGenericFactory AuFactory; K_EXPORT_COMPONENT_FACTORY(kfile_au, AuFactory( "kfile_au" )) -KAuPlugin::KAuPlugin(QObject *parent, const char *name, - const QStringList &args) +KAuPlugin::KAuPlugin(TQObject *parent, const char *name, + const TQStringList &args) : KFilePlugin(parent, name, args) { @@ -56,15 +56,15 @@ KAuPlugin::KAuPlugin(QObject *parent, const char *name, KFileMimeTypeInfo::ItemInfo* item; - item = addItemInfo(group, "Length", i18n("Length"), QVariant::Int); + item = addItemInfo(group, "Length", i18n("Length"), TQVariant::Int); setSuffix(item, "s"); - item = addItemInfo(group, "Sample Rate", i18n("Sample Rate"), QVariant::Int); + item = addItemInfo(group, "Sample Rate", i18n("Sample Rate"), TQVariant::Int); setSuffix(item, "Hz"); - item = addItemInfo(group, "Channels", i18n("Channels"), QVariant::Int); + item = addItemInfo(group, "Channels", i18n("Channels"), TQVariant::Int); - item = addItemInfo(group, "Encoding", i18n("Encoding"), QVariant::String); + item = addItemInfo(group, "Encoding", i18n("Encoding"), TQVariant::String); } @@ -86,18 +86,18 @@ bool KAuPlugin::readInfo( KFileMetaInfo& info, uint what) if ( info.path().isEmpty() ) // remote file return false; - 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); // AU files are big-endian - dstream.setByteOrder(QDataStream::BigEndian); + dstream.setByteOrder(TQDataStream::BigEndian); // Read and verify the signature diff --git a/kfile-plugins/au/kfile_au.h b/kfile-plugins/au/kfile_au.h index c6aea2c7..9912ef70 100644 --- a/kfile-plugins/au/kfile_au.h +++ b/kfile-plugins/au/kfile_au.h @@ -29,7 +29,7 @@ class KAuPlugin: public KFilePlugin Q_OBJECT public: - KAuPlugin( QObject *parent, const char *name, const QStringList& args ); + KAuPlugin( TQObject *parent, const char *name, const TQStringList& args ); virtual bool readInfo( KFileMetaInfo& info, uint what); }; diff --git a/kfile-plugins/avi/kfile_avi.cpp b/kfile-plugins/avi/kfile_avi.cpp index 30919206..a7c2bc31 100644 --- a/kfile-plugins/avi/kfile_avi.cpp +++ b/kfile-plugins/avi/kfile_avi.cpp @@ -27,11 +27,11 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #if !defined(__osf__) #include @@ -45,8 +45,8 @@ typedef KGenericFactory AviFactory; K_EXPORT_COMPONENT_FACTORY(kfile_avi, AviFactory( "kfile_avi" )) -KAviPlugin::KAviPlugin(QObject *parent, const char *name, - const QStringList &args) +KAviPlugin::KAviPlugin(TQObject *parent, const char *name, + const TQStringList &args) : KFilePlugin(parent, name, args) { @@ -58,16 +58,16 @@ KAviPlugin::KAviPlugin(QObject *parent, const char *name, KFileMimeTypeInfo::ItemInfo* item; - item = addItemInfo(group, "Length", i18n("Length"), QVariant::Int); + item = addItemInfo(group, "Length", i18n("Length"), TQVariant::Int); setUnit(item, KFileMimeTypeInfo::Seconds); - item = addItemInfo(group, "Resolution", i18n("Resolution"), QVariant::Size); + item = addItemInfo(group, "Resolution", i18n("Resolution"), TQVariant::Size); - item = addItemInfo(group, "Frame rate", i18n("Frame Rate"), QVariant::Int); + item = addItemInfo(group, "Frame rate", i18n("Frame Rate"), TQVariant::Int); setSuffix(item, i18n("fps")); - item = addItemInfo(group, "Video codec", i18n("Video Codec"), QVariant::String); - item = addItemInfo(group, "Audio codec", i18n("Audio Codec"), QVariant::String); + item = addItemInfo(group, "Video codec", i18n("Video Codec"), TQVariant::String); + item = addItemInfo(group, "Audio codec", i18n("Audio Codec"), TQVariant::String); } @@ -486,13 +486,13 @@ bool KAviPlugin::readInfo( KFileMetaInfo& info, uint /*what*/) // open file, set up stream and set endianness if (!f.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); dstream.setDevice(&f); - dstream.setByteOrder(QDataStream::LittleEndian); + dstream.setByteOrder(TQDataStream::LittleEndian); /***************************************************/ @@ -514,7 +514,7 @@ bool KAviPlugin::readInfo( KFileMetaInfo& info, uint /*what*/) if (0 != avih_microsecperframe) { appendItem(group, "Frame rate", int(1000000 / avih_microsecperframe)); } - appendItem(group, "Resolution", QSize(avih_width, avih_height)); + appendItem(group, "Resolution", TQSize(avih_width, avih_height)); // work out and add length uint64_t mylength = (uint64_t) ((float) avih_totalframes * (float) avih_microsecperframe / 1000000.0); diff --git a/kfile-plugins/avi/kfile_avi.h b/kfile-plugins/avi/kfile_avi.h index 298fca31..db60fc72 100644 --- a/kfile-plugins/avi/kfile_avi.h +++ b/kfile-plugins/avi/kfile_avi.h @@ -21,7 +21,7 @@ #define __KFILE_AVI_H__ #include -#include +#include #if !defined(__osf__) #include @@ -39,7 +39,7 @@ class KAviPlugin: public KFilePlugin Q_OBJECT public: - KAviPlugin( QObject *parent, const char *name, const QStringList& args ); + KAviPlugin( TQObject *parent, const char *name, const TQStringList& args ); @@ -58,8 +58,8 @@ private: // methods to sort out human readable names for the codecs const char * resolve_audio(uint16_t id); - QFile f; - QDataStream dstream; + TQFile f; + TQDataStream dstream; // AVI header information bool done_avih; diff --git a/kfile-plugins/flac/kfile_flac.cpp b/kfile-plugins/flac/kfile_flac.cpp index c04ee57d..6462c917 100644 --- a/kfile-plugins/flac/kfile_flac.cpp +++ b/kfile-plugins/flac/kfile_flac.cpp @@ -23,12 +23,12 @@ #include "kfile_flac.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -56,8 +56,8 @@ K_EXPORT_COMPONENT_FACTORY(kfile_flac, KGenericFactory("kfile_flac")) -KFlacPlugin::KFlacPlugin( QObject *parent, const char *name, - const QStringList &args ) +KFlacPlugin::KFlacPlugin( TQObject *parent, const char *name, + const TQStringList &args ) : KFilePlugin( parent, name, args ) { kdDebug(7034) << "flac plugin\n"; @@ -69,7 +69,7 @@ KFlacPlugin::KFlacPlugin( QObject *parent, const char *name, } -void KFlacPlugin::makeMimeTypeInfo(const QString& mimeType) +void KFlacPlugin::makeMimeTypeInfo(const TQString& mimeType) { KFileMimeTypeInfo* info = addMimeTypeInfo( mimeType ); @@ -82,40 +82,40 @@ void KFlacPlugin::makeMimeTypeInfo(const QString& mimeType) KFileMimeTypeInfo::ItemInfo* item = 0; - item = addItemInfo(group, "Artist", i18n("Artist"), QVariant::String); + item = addItemInfo(group, "Artist", i18n("Artist"), TQVariant::String); setHint(item, KFileMimeTypeInfo::Author); setAttributes(item, KFileMimeTypeInfo::Modifiable); - item = addItemInfo(group, "Title", i18n("Title"), QVariant::String); + item = addItemInfo(group, "Title", i18n("Title"), TQVariant::String); setHint(item, KFileMimeTypeInfo::Name); setAttributes(item, KFileMimeTypeInfo::Modifiable); - item = addItemInfo(group, "Album", i18n("Album"), QVariant::String); + item = addItemInfo(group, "Album", i18n("Album"), TQVariant::String); setAttributes(item, KFileMimeTypeInfo::Modifiable); - item = addItemInfo(group, "Genre", i18n("Genre"), QVariant::String); + item = addItemInfo(group, "Genre", i18n("Genre"), TQVariant::String); setAttributes(item, KFileMimeTypeInfo::Modifiable); - item = addItemInfo(group, "Tracknumber", i18n("Track Number"), QVariant::String); + item = addItemInfo(group, "Tracknumber", i18n("Track Number"), TQVariant::String); setAttributes(item, KFileMimeTypeInfo::Modifiable); - item = addItemInfo(group, "Date", i18n("Date"), QVariant::String); + item = addItemInfo(group, "Date", i18n("Date"), TQVariant::String); setAttributes(item, KFileMimeTypeInfo::Modifiable); - item = addItemInfo(group, "Description", i18n("Description"), QVariant::String); + item = addItemInfo(group, "Description", i18n("Description"), TQVariant::String); setAttributes(item, KFileMimeTypeInfo::Modifiable); - item = addItemInfo(group, "Organization", i18n("Organization"), QVariant::String); + item = addItemInfo(group, "Organization", i18n("Organization"), TQVariant::String); setAttributes(item, KFileMimeTypeInfo::Modifiable); - item = addItemInfo(group, "Location", i18n("Location"), QVariant::String); + item = addItemInfo(group, "Location", i18n("Location"), TQVariant::String); setAttributes(item, KFileMimeTypeInfo::Modifiable); - item = addItemInfo(group, "Copyright", i18n("Copyright"), QVariant::String); + item = addItemInfo(group, "Copyright", i18n("Copyright"), TQVariant::String); setAttributes(item, KFileMimeTypeInfo::Modifiable); - addVariableInfo(group, QVariant::String, KFileMimeTypeInfo::Addable | + addVariableInfo(group, TQVariant::String, KFileMimeTypeInfo::Addable | KFileMimeTypeInfo::Removable | KFileMimeTypeInfo::Modifiable); @@ -123,21 +123,21 @@ void KFlacPlugin::makeMimeTypeInfo(const QString& mimeType) group = addGroupInfo(info, "Technical", i18n("Technical Details")); setAttributes(group, 0); - addItemInfo(group, "Channels", i18n("Channels"), QVariant::Int); + addItemInfo(group, "Channels", i18n("Channels"), TQVariant::Int); - item = addItemInfo(group, "Sample Rate", i18n("Sample Rate"), QVariant::Int); + item = addItemInfo(group, "Sample Rate", i18n("Sample Rate"), TQVariant::Int); setSuffix(item, i18n(" Hz")); - item = addItemInfo(group, "Sample Width", i18n("Sample Width"), QVariant::Int); + item = addItemInfo(group, "Sample Width", i18n("Sample Width"), TQVariant::Int); setSuffix(item, i18n(" bits")); item = addItemInfo(group, "Bitrate", i18n("Average Bitrate"), - QVariant::Int); + TQVariant::Int); setAttributes(item, KFileMimeTypeInfo::Averaged); setHint(item, KFileMimeTypeInfo::Bitrate); setSuffix(item, i18n( " kbps")); - item = addItemInfo(group, "Length", i18n("Length"), QVariant::Int); + item = addItemInfo(group, "Length", i18n("Length"), TQVariant::Int); setAttributes(item, KFileMimeTypeInfo::Cummulative); setHint(item, KFileMimeTypeInfo::Length); setUnit(item, KFileMimeTypeInfo::Seconds); @@ -161,10 +161,10 @@ bool KFlacPlugin::readInfo( KFileMetaInfo& info, uint what ) TagLib::File *file = 0; if (info.mimeType() == "audio/x-flac") - file = new TagLib::FLAC::File(QFile::encodeName(info.path()).data(), readTech); + file = new TagLib::FLAC::File(TQFile::encodeName(info.path()).data(), readTech); #ifdef TAGLIB_1_2 else - file = new TagLib::Ogg::FLAC::File(QFile::encodeName(info.path()).data(), readTech); + file = new TagLib::Ogg::FLAC::File(TQFile::encodeName(info.path()).data(), readTech); #endif if (!file || !file->isValid()) @@ -178,8 +178,8 @@ bool KFlacPlugin::readInfo( KFileMetaInfo& info, uint what ) { KFileMetaInfoGroup commentgroup = appendGroup(info, "Comment"); - QString date = file->tag()->year() > 0 ? QString::number(file->tag()->year()) : QString::null; - QString track = file->tag()->track() > 0 ? QString::number(file->tag()->track()) : QString::null; + TQString date = file->tag()->year() > 0 ? TQString::number(file->tag()->year()) : TQString::null; + TQString track = file->tag()->track() > 0 ? TQString::number(file->tag()->track()) : TQString::null; appendItem(commentgroup, "Title", TStringToQString(file->tag()->title()).stripWhiteSpace()); appendItem(commentgroup, "Artist", TStringToQString(file->tag()->artist()).stripWhiteSpace()); @@ -232,16 +232,16 @@ bool KFlacPlugin::writeInfo(const KFileMetaInfo& info) const { TagLib::File *file; - if (!TagLib::File::isWritable(QFile::encodeName(info.path()).data())) { + if (!TagLib::File::isWritable(TQFile::encodeName(info.path()).data())) { kdDebug(7034) << "can't write to " << info.path() << endl; return false; } if (info.mimeType() == "audio/x-flac") - file = new TagLib::FLAC::File(QFile::encodeName(info.path()).data(), false); + file = new TagLib::FLAC::File(TQFile::encodeName(info.path()).data(), false); #ifdef TAGLIB_1_2 else - file = new TagLib::Ogg::FLAC::File(QFile::encodeName(info.path()).data(), false); + file = new TagLib::Ogg::FLAC::File(TQFile::encodeName(info.path()).data(), false); #endif if(!file->isOpen()) @@ -267,16 +267,16 @@ bool KFlacPlugin::writeInfo(const KFileMetaInfo& info) const return true; } -QValidator* KFlacPlugin::createValidator( const QString&, - const QString &group, const QString &key, - QObject* parent, const char* name) const +TQValidator* KFlacPlugin::createValidator( const TQString&, + const TQString &group, const TQString &key, + TQObject* parent, const char* name) const { if(key == "Tracknumber" || key == "Date") { - return new QIntValidator(0, 9999, parent, name); + return new TQIntValidator(0, 9999, parent, name); } else - return new QRegExpValidator(QRegExp(".*"), parent, name); + return new TQRegExpValidator(TQRegExp(".*"), parent, name); } #include "kfile_flac.moc" diff --git a/kfile-plugins/flac/kfile_flac.h b/kfile-plugins/flac/kfile_flac.h index f8dffa0e..03ad51bb 100644 --- a/kfile-plugins/flac/kfile_flac.h +++ b/kfile-plugins/flac/kfile_flac.h @@ -34,16 +34,16 @@ class KFlacPlugin: public KFilePlugin Q_OBJECT public: - KFlacPlugin( QObject *parent, const char *name, const QStringList& args ); + KFlacPlugin( 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; protected: - virtual void makeMimeTypeInfo(const QString& mimeType); + virtual void makeMimeTypeInfo(const TQString& mimeType); }; diff --git a/kfile-plugins/m3u/kfile_m3u.cpp b/kfile-plugins/m3u/kfile_m3u.cpp index ab719152..5fff1a08 100644 --- a/kfile-plugins/m3u/kfile_m3u.cpp +++ b/kfile-plugins/m3u/kfile_m3u.cpp @@ -26,19 +26,19 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include typedef KGenericFactory M3uFactory; K_EXPORT_COMPONENT_FACTORY( kfile_m3u, M3uFactory( "kfile_m3u" ) ) -KM3uPlugin::KM3uPlugin( QObject *parent, const char *name, - const QStringList &preferredItems ) +KM3uPlugin::KM3uPlugin( TQObject *parent, const char *name, + const TQStringList &preferredItems ) : KFilePlugin( parent, name, preferredItems ) { kdDebug(7034) << "m3u plugin\n"; @@ -49,7 +49,7 @@ KM3uPlugin::KM3uPlugin( QObject *parent, const char *name, // tracks group group = addGroupInfo(info, "Tracks", i18n("Tracks")); - addVariableInfo(group, QVariant::String, 0); + addVariableInfo(group, TQVariant::String, 0); } bool KM3uPlugin::readInfo( KFileMetaInfo& info, uint ) @@ -57,10 +57,10 @@ bool KM3uPlugin::readInfo( KFileMetaInfo& info, uint ) if ( info.path().isEmpty() ) // remote file return false; - QFile f(info.path()); + TQFile f(info.path()); if (!f.open(IO_ReadOnly)) return false; - QTextStream str(&f); - str.setEncoding(QTextStream::Locale); + TQTextStream str(&f); + str.setEncoding(TQTextStream::Locale); KFileMetaInfoGroup group = appendGroup(info, "Tracks"); @@ -69,7 +69,7 @@ bool KM3uPlugin::readInfo( KFileMetaInfo& info, uint ) int num = 1; while (!str.atEnd()) { - QString s = str.readLine(); + TQString s = str.readLine(); if (!s.startsWith("#")) { if (s.endsWith("\n")) s.truncate(s.length()-1); diff --git a/kfile-plugins/m3u/kfile_m3u.h b/kfile-plugins/m3u/kfile_m3u.h index 42e4e205..d10e3264 100644 --- a/kfile-plugins/m3u/kfile_m3u.h +++ b/kfile-plugins/m3u/kfile_m3u.h @@ -31,7 +31,7 @@ class KM3uPlugin: public KFilePlugin Q_OBJECT public: - KM3uPlugin( QObject *parent, const char *name, const QStringList& args ); + KM3uPlugin( TQObject *parent, const char *name, const TQStringList& args ); virtual bool readInfo( KFileMetaInfo& info, uint what ); }; diff --git a/kfile-plugins/mp3/kfile_mp3.cpp b/kfile-plugins/mp3/kfile_mp3.cpp index 38adce70..c6317946 100644 --- a/kfile-plugins/mp3/kfile_mp3.cpp +++ b/kfile-plugins/mp3/kfile_mp3.cpp @@ -28,11 +28,11 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -44,7 +44,7 @@ typedef KGenericFactory Mp3Factory; K_EXPORT_COMPONENT_FACTORY(kfile_mp3, Mp3Factory( "kfile_mp3" )) -KMp3Plugin::KMp3Plugin(QObject *parent, const char *name, const QStringList &args) +KMp3Plugin::KMp3Plugin(TQObject *parent, const char *name, const TQStringList &args) : KFilePlugin(parent, name, args) { kdDebug(7034) << "mp3 plugin\n"; @@ -60,54 +60,54 @@ KMp3Plugin::KMp3Plugin(QObject *parent, const char *name, const QStringList &arg KFileMimeTypeInfo::ItemInfo *item; - item = addItemInfo(group, "Title", i18n("Title"), QVariant::String); + item = addItemInfo(group, "Title", i18n("Title"), TQVariant::String); setAttributes(item, KFileMimeTypeInfo::Modifiable); setHint(item, KFileMimeTypeInfo::Name); - item = addItemInfo(group, "Artist", i18n("Artist"), QVariant::String); + item = addItemInfo(group, "Artist", i18n("Artist"), TQVariant::String); setAttributes(item, KFileMimeTypeInfo::Modifiable); setHint(item, KFileMimeTypeInfo::Author); - item = addItemInfo(group, "Album", i18n("Album"), QVariant::String); + item = addItemInfo(group, "Album", i18n("Album"), TQVariant::String); setAttributes(item, KFileMimeTypeInfo::Modifiable); - item = addItemInfo(group, "Date", i18n("Year"), QVariant::String); + item = addItemInfo(group, "Date", i18n("Year"), TQVariant::String); setAttributes(item, KFileMimeTypeInfo::Modifiable); - item = addItemInfo(group, "Comment", i18n("Comment"), QVariant::String); + item = addItemInfo(group, "Comment", i18n("Comment"), TQVariant::String); setAttributes(item, KFileMimeTypeInfo::Modifiable); setHint(item, KFileMimeTypeInfo::Description); - item = addItemInfo(group, "Tracknumber", i18n("Track"), QVariant::Int); + item = addItemInfo(group, "Tracknumber", i18n("Track"), TQVariant::Int); setAttributes(item, KFileMimeTypeInfo::Modifiable); - item = addItemInfo(group, "Genre", i18n("Genre"), QVariant::String); + item = addItemInfo(group, "Genre", i18n("Genre"), TQVariant::String); setAttributes(item, KFileMimeTypeInfo::Modifiable); // technical group group = addGroupInfo(info, "Technical", i18n("Technical Details")); - item = addItemInfo(group, "Version", i18n("Version"), QVariant::Int); + item = addItemInfo(group, "Version", i18n("Version"), TQVariant::Int); setPrefix(item, i18n("MPEG ")); - item = addItemInfo(group, "Layer", i18n("Layer"), QVariant::Int); - item = addItemInfo(group, "CRC", i18n("CRC"), QVariant::Bool); - item = addItemInfo(group, "Bitrate", i18n("Bitrate"), QVariant::Int); + item = addItemInfo(group, "Layer", i18n("Layer"), TQVariant::Int); + item = addItemInfo(group, "CRC", i18n("CRC"), TQVariant::Bool); + item = addItemInfo(group, "Bitrate", i18n("Bitrate"), TQVariant::Int); setAttributes(item, KFileMimeTypeInfo::Averaged); setHint(item, KFileMimeTypeInfo::Bitrate); setSuffix(item, i18n(" kbps")); - item = addItemInfo(group, "Sample Rate", i18n("Sample Rate"), QVariant::Int); + item = addItemInfo(group, "Sample Rate", i18n("Sample Rate"), TQVariant::Int); setSuffix(item, i18n("Hz")); - item = addItemInfo(group, "Channels", i18n("Channels"), QVariant::Int); - item = addItemInfo(group, "Copyright", i18n("Copyright"), QVariant::Bool); - item = addItemInfo(group, "Original", i18n("Original"), QVariant::Bool); - item = addItemInfo(group, "Length", i18n("Length"), QVariant::Int); + item = addItemInfo(group, "Channels", i18n("Channels"), TQVariant::Int); + item = addItemInfo(group, "Copyright", i18n("Copyright"), TQVariant::Bool); + item = addItemInfo(group, "Original", i18n("Original"), TQVariant::Bool); + item = addItemInfo(group, "Length", i18n("Length"), TQVariant::Int); setAttributes(item, KFileMimeTypeInfo::Cummulative); setUnit(item, KFileMimeTypeInfo::Seconds); - item = addItemInfo(group, "Emphasis", i18n("Emphasis"), QVariant::String); + item = addItemInfo(group, "Emphasis", i18n("Emphasis"), TQVariant::String); } bool KMp3Plugin::readInfo(KFileMetaInfo &info, uint what) @@ -139,7 +139,7 @@ bool KMp3Plugin::readInfo(KFileMetaInfo &info, uint what) if ( info.path().isEmpty() ) // remote file return false; - TagLib::MPEG::File file(QFile::encodeName(info.path()).data(), readTech); + TagLib::MPEG::File file(TQFile::encodeName(info.path()).data(), readTech); if(!file.isOpen()) { @@ -151,24 +151,24 @@ bool KMp3Plugin::readInfo(KFileMetaInfo &info, uint what) { KFileMetaInfoGroup id3group = appendGroup(info, "id3"); - QString date = file.tag()->year() > 0 ? QString::number(file.tag()->year()) : QString::null; - QString track = file.tag()->track() > 0 ? QString::number(file.tag()->track()) : QString::null; + TQString date = file.tag()->year() > 0 ? TQString::number(file.tag()->year()) : TQString::null; + TQString track = file.tag()->track() > 0 ? TQString::number(file.tag()->track()) : TQString::null; - QString title = TStringToQString(file.tag()->title()).stripWhiteSpace(); + TQString title = TStringToQString(file.tag()->title()).stripWhiteSpace(); if (!title.isEmpty()) appendItem(id3group, "Title", title); - QString artist = TStringToQString(file.tag()->artist()).stripWhiteSpace(); + TQString artist = TStringToQString(file.tag()->artist()).stripWhiteSpace(); if (!artist.isEmpty()) appendItem(id3group, "Artist", artist); - QString album = TStringToQString(file.tag()->album()).stripWhiteSpace(); + TQString album = TStringToQString(file.tag()->album()).stripWhiteSpace(); if (!album.isEmpty()) appendItem(id3group, "Album", album); appendItem(id3group, "Date", date); - QString comment = TStringToQString(file.tag()->comment()).stripWhiteSpace(); + TQString comment = TStringToQString(file.tag()->comment()).stripWhiteSpace(); if (!comment.isEmpty()) appendItem(id3group, "Comment", comment); appendItem(id3group, "Tracknumber", track); - QString genre = TStringToQString(file.tag()->genre()).stripWhiteSpace(); + TQString genre = TStringToQString(file.tag()->genre()).stripWhiteSpace(); if (!genre.isEmpty()) appendItem(id3group, "Genre", genre); } @@ -177,7 +177,7 @@ bool KMp3Plugin::readInfo(KFileMetaInfo &info, uint what) { KFileMetaInfoGroup techgroup = appendGroup(info, "Technical"); - QString version; + TQString version; switch(file.audioProperties()->version()) { case TagLib::MPEG::Header::Version1: @@ -201,8 +201,8 @@ bool KMp3Plugin::readInfo(KFileMetaInfo &info, uint what) appendItem(techgroup, "Bitrate", file.audioProperties()->bitrate()); appendItem(techgroup, "Sample Rate", file.audioProperties()->sampleRate()); appendItem(techgroup, "Channels", file.audioProperties()->channels()); - appendItem(techgroup, "Copyright", QVariant(file.audioProperties()->isCopyrighted(), dummy)); - appendItem(techgroup, "Original", QVariant(file.audioProperties()->isOriginal(), dummy)); + appendItem(techgroup, "Copyright", TQVariant(file.audioProperties()->isCopyrighted(), dummy)); + appendItem(techgroup, "Original", TQVariant(file.audioProperties()->isOriginal(), dummy)); appendItem(techgroup, "Length", file.audioProperties()->length()); // appendItem(techgroup, "Emphasis", file.audioProperties()->empahsis()); } @@ -235,7 +235,7 @@ private: bool KMp3Plugin::writeInfo(const KFileMetaInfo &info) const { TagLib::ID3v2::FrameFactory::instance()->setDefaultTextEncoding(TagLib::String::UTF8); - TagLib::MPEG::File file(QFile::encodeName(info.path()).data(), false); + TagLib::MPEG::File file(TQFile::encodeName(info.path()).data(), false); if(!file.isOpen() || !TagLib::File::isWritable(file.name())) { @@ -266,33 +266,33 @@ bool KMp3Plugin::writeInfo(const KFileMetaInfo &info) const class ComboValidator : public KStringListValidator { public: - ComboValidator(const QStringList &list, bool rejecting, - bool fixupEnabled, QObject *parent, const char *name) : + ComboValidator(const TQStringList &list, bool rejecting, + bool fixupEnabled, TQObject *parent, const char *name) : KStringListValidator(list, rejecting, fixupEnabled, parent, name) { } - virtual QValidator::State validate(QString &, int &) const + virtual TQValidator::State validate(TQString &, int &) const { - return QValidator::Acceptable; + return TQValidator::Acceptable; } }; -QValidator *KMp3Plugin::createValidator(const QString & /* mimetype */, - const QString &group, const QString &key, - QObject *parent, const char *name) const +TQValidator *KMp3Plugin::createValidator(const TQString & /* mimetype */, + const TQString &group, const TQString &key, + TQObject *parent, const char *name) const { kdDebug(7034) << "making a validator for " << group << "/" << key << endl; if(key == "Tracknumber" || key == "Date") { - return new QIntValidator(0, 9999, parent, name); + return new TQIntValidator(0, 9999, parent, name); } if(key == "Genre") { - QStringList l; + TQStringList l; TagLib::StringList genres = TagLib::ID3v1::genreList(); for(TagLib::StringList::ConstIterator it = genres.begin(); it != genres.end(); ++it) { diff --git a/kfile-plugins/mp3/kfile_mp3.h b/kfile-plugins/mp3/kfile_mp3.h index e5736d0c..e1923bad 100644 --- a/kfile-plugins/mp3/kfile_mp3.h +++ b/kfile-plugins/mp3/kfile_mp3.h @@ -28,14 +28,14 @@ class KMp3Plugin: public KFilePlugin Q_OBJECT public: - KMp3Plugin(QObject *parent, const char *name, const QStringList &args); + KMp3Plugin(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; }; #endif diff --git a/kfile-plugins/mpc/kfile_mpc.cpp b/kfile-plugins/mpc/kfile_mpc.cpp index d575e71f..4b6800df 100644 --- a/kfile-plugins/mpc/kfile_mpc.cpp +++ b/kfile-plugins/mpc/kfile_mpc.cpp @@ -23,12 +23,12 @@ #include "kfile_mpc.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -48,8 +48,8 @@ K_EXPORT_COMPONENT_FACTORY(kfile_mpc, KGenericFactory("kfile_mpc")) -KMpcPlugin::KMpcPlugin( QObject *parent, const char *name, - const QStringList &args ) +KMpcPlugin::KMpcPlugin( TQObject *parent, const char *name, + const TQStringList &args ) : KFilePlugin( parent, name, args ) { kdDebug(7034) << "mpc plugin\n"; @@ -65,40 +65,40 @@ KMpcPlugin::KMpcPlugin( QObject *parent, const char *name, KFileMimeTypeInfo::ItemInfo* item = 0; - item = addItemInfo(group, "Artist", i18n("Artist"), QVariant::String); + item = addItemInfo(group, "Artist", i18n("Artist"), TQVariant::String); setHint(item, KFileMimeTypeInfo::Author); setAttributes(item, KFileMimeTypeInfo::Modifiable); - item = addItemInfo(group, "Title", i18n("Title"), QVariant::String); + item = addItemInfo(group, "Title", i18n("Title"), TQVariant::String); setHint(item, KFileMimeTypeInfo::Name); setAttributes(item, KFileMimeTypeInfo::Modifiable); - item = addItemInfo(group, "Album", i18n("Album"), QVariant::String); + item = addItemInfo(group, "Album", i18n("Album"), TQVariant::String); setAttributes(item, KFileMimeTypeInfo::Modifiable); - item = addItemInfo(group, "Genre", i18n("Genre"), QVariant::String); + item = addItemInfo(group, "Genre", i18n("Genre"), TQVariant::String); setAttributes(item, KFileMimeTypeInfo::Modifiable); - item = addItemInfo(group, "Tracknumber", i18n("Track Number"), QVariant::String); + item = addItemInfo(group, "Tracknumber", i18n("Track Number"), TQVariant::String); setAttributes(item, KFileMimeTypeInfo::Modifiable); - item = addItemInfo(group, "Date", i18n("Date"), QVariant::String); + item = addItemInfo(group, "Date", i18n("Date"), TQVariant::String); setAttributes(item, KFileMimeTypeInfo::Modifiable); - item = addItemInfo(group, "Description", i18n("Description"), QVariant::String); + item = addItemInfo(group, "Description", i18n("Description"), TQVariant::String); setAttributes(item, KFileMimeTypeInfo::Modifiable); - item = addItemInfo(group, "Organization", i18n("Organization"), QVariant::String); + item = addItemInfo(group, "Organization", i18n("Organization"), TQVariant::String); setAttributes(item, KFileMimeTypeInfo::Modifiable); - item = addItemInfo(group, "Location", i18n("Location"), QVariant::String); + item = addItemInfo(group, "Location", i18n("Location"), TQVariant::String); setAttributes(item, KFileMimeTypeInfo::Modifiable); - item = addItemInfo(group, "Copyright", i18n("Copyright"), QVariant::String); + item = addItemInfo(group, "Copyright", i18n("Copyright"), TQVariant::String); setAttributes(item, KFileMimeTypeInfo::Modifiable); - addVariableInfo(group, QVariant::String, KFileMimeTypeInfo::Addable | + addVariableInfo(group, TQVariant::String, KFileMimeTypeInfo::Addable | KFileMimeTypeInfo::Removable | KFileMimeTypeInfo::Modifiable); @@ -106,20 +106,20 @@ KMpcPlugin::KMpcPlugin( QObject *parent, const char *name, group = addGroupInfo(info, "Technical", i18n("Technical Details")); setAttributes(group, 0); - addItemInfo(group, "Channels", i18n("Channels"), QVariant::Int); + addItemInfo(group, "Channels", i18n("Channels"), TQVariant::Int); - addItemInfo(group, "Version", i18n("Version"), QVariant::Int); + addItemInfo(group, "Version", i18n("Version"), TQVariant::Int); - item = addItemInfo(group, "Sample Rate", i18n("Sample Rate"), QVariant::Int); + item = addItemInfo(group, "Sample Rate", i18n("Sample Rate"), TQVariant::Int); setSuffix(item, i18n(" Hz")); item = addItemInfo(group, "Bitrate", i18n("Average Bitrate"), - QVariant::Int); + TQVariant::Int); setAttributes(item, KFileMimeTypeInfo::Averaged); setHint(item, KFileMimeTypeInfo::Bitrate); setSuffix(item, i18n( " kbps")); - item = addItemInfo(group, "Length", i18n("Length"), QVariant::Int); + item = addItemInfo(group, "Length", i18n("Length"), TQVariant::Int); setAttributes(item, KFileMimeTypeInfo::Cummulative); setHint(item, KFileMimeTypeInfo::Length); setUnit(item, KFileMimeTypeInfo::Seconds); @@ -141,7 +141,7 @@ bool KMpcPlugin::readInfo( KFileMetaInfo& info, uint what ) if ( info.path().isEmpty() ) // remote file return false; - TagLib::File *file = new TagLib::MPC::File(QFile::encodeName(info.path()).data(), readTech); + TagLib::File *file = new TagLib::MPC::File(TQFile::encodeName(info.path()).data(), readTech); if (!file->isOpen()) { @@ -154,8 +154,8 @@ bool KMpcPlugin::readInfo( KFileMetaInfo& info, uint what ) { KFileMetaInfoGroup commentgroup = appendGroup(info, "Comment"); - QString date = file->tag()->year() > 0 ? QString::number(file->tag()->year()) : QString::null; - QString track = file->tag()->track() > 0 ? QString::number(file->tag()->track()) : QString::null; + TQString date = file->tag()->year() > 0 ? TQString::number(file->tag()->year()) : TQString::null; + TQString track = file->tag()->track() > 0 ? TQString::number(file->tag()->track()) : TQString::null; appendItem(commentgroup, "Title", TStringToQString(file->tag()->title()).stripWhiteSpace()); appendItem(commentgroup, "Artist", TStringToQString(file->tag()->artist()).stripWhiteSpace()); @@ -208,12 +208,12 @@ bool KMpcPlugin::writeInfo(const KFileMetaInfo& info) const { TagLib::File *file; - if (!TagLib::File::isWritable(QFile::encodeName(info.path()).data())) { + if (!TagLib::File::isWritable(TQFile::encodeName(info.path()).data())) { kdDebug(7034) << "can't write to " << info.path() << endl; return false; } - file = new TagLib::MPC::File(QFile::encodeName(info.path()).data(), false); + file = new TagLib::MPC::File(TQFile::encodeName(info.path()).data(), false); if(!file->isOpen()) { @@ -238,16 +238,16 @@ bool KMpcPlugin::writeInfo(const KFileMetaInfo& info) const return true; } -QValidator* KMpcPlugin::createValidator( const QString&, - const QString &group, const QString &key, - QObject* parent, const char* name) const +TQValidator* KMpcPlugin::createValidator( const TQString&, + const TQString &group, const TQString &key, + TQObject* parent, const char* name) const { if(key == "Tracknumber" || key == "Date") { - return new QIntValidator(0, 9999, parent, name); + return new TQIntValidator(0, 9999, parent, name); } else - return new QRegExpValidator(QRegExp(".*"), parent, name); + return new TQRegExpValidator(TQRegExp(".*"), parent, name); } #include "kfile_mpc.moc" diff --git a/kfile-plugins/mpc/kfile_mpc.h b/kfile-plugins/mpc/kfile_mpc.h index 10875365..576cc5cc 100644 --- a/kfile-plugins/mpc/kfile_mpc.h +++ b/kfile-plugins/mpc/kfile_mpc.h @@ -34,14 +34,14 @@ class KMpcPlugin: public KFilePlugin Q_OBJECT public: - KMpcPlugin( QObject *parent, const char *name, const QStringList& args ); + KMpcPlugin( 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/mpeg/kfile_mpeg.cpp b/kfile-plugins/mpeg/kfile_mpeg.cpp index b0696d40..f532318e 100644 --- a/kfile-plugins/mpeg/kfile_mpeg.cpp +++ b/kfile-plugins/mpeg/kfile_mpeg.cpp @@ -30,11 +30,11 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include // #include @@ -46,8 +46,8 @@ typedef KGenericFactory MpegFactory; K_EXPORT_COMPONENT_FACTORY(kfile_mpeg, MpegFactory( "kfile_mpeg" )) -KMpegPlugin::KMpegPlugin(QObject *parent, const char *name, - const QStringList &args) +KMpegPlugin::KMpegPlugin(TQObject *parent, const char *name, + const TQStringList &args) : KFilePlugin(parent, name, args) { @@ -59,18 +59,18 @@ KMpegPlugin::KMpegPlugin(QObject *parent, const char *name, KFileMimeTypeInfo::ItemInfo* item; - item = addItemInfo(group, "Length", i18n("Length"), QVariant::Int); + item = addItemInfo(group, "Length", i18n("Length"), TQVariant::Int); setUnit(item, KFileMimeTypeInfo::Seconds); - item = addItemInfo(group, "Resolution", i18n("Resolution"), QVariant::Size); + item = addItemInfo(group, "Resolution", i18n("Resolution"), TQVariant::Size); - item = addItemInfo(group, "Frame rate", i18n("Frame Rate"), QVariant::Double); + item = addItemInfo(group, "Frame rate", i18n("Frame Rate"), TQVariant::Double); setSuffix(item, i18n("fps")); - item = addItemInfo(group, "Video codec", i18n("Video Codec"), QVariant::String); - item = addItemInfo(group, "Audio codec", i18n("Audio Codec"), QVariant::String); + item = addItemInfo(group, "Video codec", i18n("Video Codec"), TQVariant::String); + item = addItemInfo(group, "Audio codec", i18n("Audio Codec"), TQVariant::String); - item = addItemInfo(group, "Aspect ratio", i18n("Aspect ratio"), QVariant::String); + item = addItemInfo(group, "Aspect ratio", i18n("Aspect ratio"), TQVariant::String); } // Frame-rate table from libmpeg3 @@ -216,12 +216,12 @@ int KMpegPlugin::skip_packet() { } int KMpegPlugin::skip_riff_chunk() { - dstream.setByteOrder(QDataStream::LittleEndian); + dstream.setByteOrder(TQDataStream::LittleEndian); uint32_t len; dstream >> len; // std::cerr << "Length of skipped chunk: " << len << std::endl; - dstream.setByteOrder(QDataStream::BigEndian); + dstream.setByteOrder(TQDataStream::BigEndian); return len; } @@ -358,7 +358,7 @@ bool KMpegPlugin::read_mpeg() // kdDebug(7034) << "Bytes skimmed:" << skimmed << endl; skimmed = 0; } -// kdDebug(7034) << "Packet of type:" << QString::number(byte,16) << endl; +// kdDebug(7034) << "Packet of type:" << TQString::number(byte,16) << endl; switch (byte) { case 0xb3: if (video_found) break; @@ -415,7 +415,7 @@ bool KMpegPlugin::read_mpeg() audio_found = true; break; default: -// kdDebug(7034) << "Unhandled packet of type:" << QString::number(byte,16) << endl; +// kdDebug(7034) << "Unhandled packet of type:" << TQString::number(byte,16) << endl; break; } state = 0; @@ -454,7 +454,7 @@ void KMpegPlugin::read_length() file.at(file.size()-1024); for(int j=1; j<64; j++) { // dstream.setDevice(&file); -// dstream.setByteOrder(QDataStream::BigEndian); +// dstream.setByteOrder(TQDataStream::BigEndian); for(int i=0; i<1024; i++) { dstream >> byte; switch (state) { @@ -502,12 +502,12 @@ bool KMpegPlugin::readInfo( KFileMetaInfo& info, uint /*what*/) // open file, set up stream and set endianness 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; } dstream.setDevice(&file); - dstream.setByteOrder(QDataStream::BigEndian); + dstream.setByteOrder(TQDataStream::BigEndian); start_time = end_time = 0L; @@ -519,7 +519,7 @@ bool KMpegPlugin::readInfo( KFileMetaInfo& info, uint /*what*/) appendItem(group, "Frame rate", double(frame_rate)); - appendItem(group, "Resolution", QSize(horizontal_size, vertical_size)); + appendItem(group, "Resolution", TQSize(horizontal_size, vertical_size)); /* The GOP timings are completely bogus read_length(); if (end_time != 0) { diff --git a/kfile-plugins/mpeg/kfile_mpeg.h b/kfile-plugins/mpeg/kfile_mpeg.h index 754dc5d0..5fcba670 100644 --- a/kfile-plugins/mpeg/kfile_mpeg.h +++ b/kfile-plugins/mpeg/kfile_mpeg.h @@ -21,7 +21,7 @@ #define __KFILE_MPEG_H__ #include -#include +#include class QStringList; @@ -30,7 +30,7 @@ class KMpegPlugin: public KFilePlugin Q_OBJECT public: - KMpegPlugin( QObject *parent, const char *name, const QStringList& args ); + KMpegPlugin( TQObject *parent, const char *name, const TQStringList& args ); virtual bool readInfo( KFileMetaInfo& info, uint what); @@ -47,8 +47,8 @@ private: bool read_mpeg(); void read_length(); - QFile file; - QDataStream dstream; + TQFile file; + TQDataStream dstream; // MPEG information int horizontal_size; diff --git a/kfile-plugins/ogg/kfile_ogg.cpp b/kfile-plugins/ogg/kfile_ogg.cpp index 0f131154..dc4a8f3e 100644 --- a/kfile-plugins/ogg/kfile_ogg.cpp +++ b/kfile-plugins/ogg/kfile_ogg.cpp @@ -21,12 +21,12 @@ #include "kfile_ogg.h" #include "vcedit.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -61,8 +61,8 @@ static const char* const knownTranslations[] = { K_EXPORT_COMPONENT_FACTORY(kfile_ogg, KGenericFactory("kfile_ogg")) -KOggPlugin::KOggPlugin( QObject *parent, const char *name, - const QStringList &args ) +KOggPlugin::KOggPlugin( TQObject *parent, const char *name, + const TQStringList &args ) : KFilePlugin( parent, name, args ) { kdDebug(7034) << "ogg plugin\n"; @@ -78,40 +78,40 @@ KOggPlugin::KOggPlugin( QObject *parent, const char *name, KFileMimeTypeInfo::ItemInfo* item = 0; - item = addItemInfo(group, "Artist", i18n("Artist"), QVariant::String); + item = addItemInfo(group, "Artist", i18n("Artist"), TQVariant::String); setHint(item, KFileMimeTypeInfo::Author); setAttributes(item, KFileMimeTypeInfo::Modifiable); - item = addItemInfo(group, "Title", i18n("Title"), QVariant::String); + item = addItemInfo(group, "Title", i18n("Title"), TQVariant::String); setHint(item, KFileMimeTypeInfo::Name); setAttributes(item, KFileMimeTypeInfo::Modifiable); - item = addItemInfo(group, "Album", i18n("Album"), QVariant::String); + item = addItemInfo(group, "Album", i18n("Album"), TQVariant::String); setAttributes(item, KFileMimeTypeInfo::Modifiable); - item = addItemInfo(group, "Genre", i18n("Genre"), QVariant::String); + item = addItemInfo(group, "Genre", i18n("Genre"), TQVariant::String); setAttributes(item, KFileMimeTypeInfo::Modifiable); - item = addItemInfo(group, "Tracknumber", i18n("Track Number"), QVariant::String); + item = addItemInfo(group, "Tracknumber", i18n("Track Number"), TQVariant::String); setAttributes(item, KFileMimeTypeInfo::Modifiable); - item = addItemInfo(group, "Date", i18n("Date"), QVariant::String); + item = addItemInfo(group, "Date", i18n("Date"), TQVariant::String); setAttributes(item, KFileMimeTypeInfo::Modifiable); - item = addItemInfo(group, "Description", i18n("Description"), QVariant::String); + item = addItemInfo(group, "Description", i18n("Description"), TQVariant::String); setAttributes(item, KFileMimeTypeInfo::Modifiable); - item = addItemInfo(group, "Organization", i18n("Organization"), QVariant::String); + item = addItemInfo(group, "Organization", i18n("Organization"), TQVariant::String); setAttributes(item, KFileMimeTypeInfo::Modifiable); - item = addItemInfo(group, "Location", i18n("Location"), QVariant::String); + item = addItemInfo(group, "Location", i18n("Location"), TQVariant::String); setAttributes(item, KFileMimeTypeInfo::Modifiable); - item = addItemInfo(group, "Copyright", i18n("Copyright"), QVariant::String); + item = addItemInfo(group, "Copyright", i18n("Copyright"), TQVariant::String); setAttributes(item, KFileMimeTypeInfo::Modifiable); - addVariableInfo(group, QVariant::String, KFileMimeTypeInfo::Addable | + addVariableInfo(group, TQVariant::String, KFileMimeTypeInfo::Addable | KFileMimeTypeInfo::Removable | KFileMimeTypeInfo::Modifiable); @@ -120,31 +120,31 @@ KOggPlugin::KOggPlugin( QObject *parent, const char *name, group = addGroupInfo(info, "Technical", i18n("Technical Details")); setAttributes(group, 0); - addItemInfo(group, "Version", i18n("Version"), QVariant::Int); - addItemInfo(group, "Channels", i18n("Channels"), QVariant::Int); + addItemInfo(group, "Version", i18n("Version"), TQVariant::Int); + addItemInfo(group, "Channels", i18n("Channels"), TQVariant::Int); - item = addItemInfo(group, "Sample Rate", i18n("Sample Rate"), QVariant::Int); + item = addItemInfo(group, "Sample Rate", i18n("Sample Rate"), TQVariant::Int); setSuffix(item, i18n(" Hz")); item = addItemInfo(group, "UpperBitrate", i18n("Upper Bitrate"), - QVariant::Int); + TQVariant::Int); setSuffix(item, i18n(" kbps")); item = addItemInfo(group, "LowerBitrate", i18n("Lower Bitrate"), - QVariant::Int); + TQVariant::Int); setSuffix(item, i18n(" kbps")); item = addItemInfo(group, "NominalBitrate", i18n("Nominal Bitrate"), - QVariant::Int); + TQVariant::Int); setSuffix(item, i18n(" kbps")); item = addItemInfo(group, "Bitrate", i18n("Average Bitrate"), - QVariant::Int); + TQVariant::Int); setAttributes(item, KFileMimeTypeInfo::Averaged); setHint(item, KFileMimeTypeInfo::Bitrate); setSuffix(item, i18n( " kbps")); - item = addItemInfo(group, "Length", i18n("Length"), QVariant::Int); + item = addItemInfo(group, "Length", i18n("Length"), TQVariant::Int); setAttributes(item, KFileMimeTypeInfo::Cummulative); setUnit(item, KFileMimeTypeInfo::Seconds); } @@ -173,10 +173,10 @@ bool KOggPlugin::readInfo( KFileMetaInfo& info, uint what ) if ( info.path().isEmpty() ) // remote file return false; - fp = fopen(QFile::encodeName(info.path()),"rb"); + fp = fopen(TQFile::encodeName(info.path()),"rb"); if (!fp) { - kdDebug(7034) << "Unable to open " << QFile::encodeName(info.path()) << endl; + kdDebug(7034) << "Unable to open " << TQFile::encodeName(info.path()) << endl; return false; } @@ -184,13 +184,13 @@ bool KOggPlugin::readInfo( KFileMetaInfo& info, uint what ) if (rc < 0) { - kdDebug(7034) << "Unable to understand " << QFile::encodeName(info.path()) + kdDebug(7034) << "Unable to understand " << TQFile::encodeName(info.path()) << ", errorcode=" << rc << endl; return false; } // info.insert(KFileMetaInfoItem("Vendor", i18n("Vendor"), -// QVariant(QString(vi->vendor)))); +// TQVariant(TQString(vi->vendor)))); // get the vorbis comments if (readComment) @@ -202,7 +202,7 @@ bool KOggPlugin::readInfo( KFileMetaInfo& info, uint what ) for (i=0; i < vc->comments; i++) { kdDebug(7034) << vc->user_comments[i] << endl; - QStringList split = QStringList::split("=", QString::fromUtf8(vc->user_comments[i])); + TQStringList split = TQStringList::split("=", TQString::fromUtf8(vc->user_comments[i])); split[0] = split[0].lower(); split[0][0] = split[0][0].upper(); @@ -252,7 +252,7 @@ bool KOggPlugin::writeInfo(const KFileMetaInfo& info) const // todo: add writing support FILE* infile; - infile = fopen(QFile::encodeName(info.path()), "r"); + infile = fopen(TQFile::encodeName(info.path()), "r"); if (!infile) { @@ -284,19 +284,19 @@ bool KOggPlugin::writeInfo(const KFileMetaInfo& info) const KFileMetaInfoGroup group = info["Comment"]; - QStringList keys = group.keys(); - QStringList::Iterator it; + TQStringList keys = group.keys(); + TQStringList::Iterator it; for (it = keys.begin(); it!=keys.end(); ++it) { KFileMetaInfoItem item = group[*it]; - if (!item.isEditable() || !(item.type()==QVariant::String) ) + if (!item.isEditable() || !(item.type()==TQVariant::String) ) continue; - QCString key = item.key().upper().utf8(); - if (item.value().canCast(QVariant::String)) + TQCString key = item.key().upper().utf8(); + if (item.value().canCast(TQVariant::String)) { - QCString value = item.value().toString().utf8(); + TQCString value = item.value().toString().utf8(); kdDebug(7034) << " writing tag " << key << "=" << value << endl; @@ -309,9 +309,9 @@ bool KOggPlugin::writeInfo(const KFileMetaInfo& info) const } - QString filename; + TQString filename; - QFileInfo fileinfo(info.path()); + TQFileInfo fileinfo(info.path()); // follow symlinks if (fileinfo.isSymLink()) @@ -321,7 +321,7 @@ bool KOggPlugin::writeInfo(const KFileMetaInfo& info) const // nothing in Qt or KDE to get the mode as an int? struct stat s; - stat(QFile::encodeName(filename), &s); + stat(TQFile::encodeName(filename), &s); KSaveFile sf(filename, s.st_mode); FILE* outfile = sf.fstream(); @@ -348,10 +348,10 @@ bool KOggPlugin::writeInfo(const KFileMetaInfo& info) const return true; } -QValidator* KOggPlugin::createValidator( const QString&, - const QString &, const QString &, - QObject* parent, const char* name) const { - return new QRegExpValidator(QRegExp(".*"), parent, name); +TQValidator* KOggPlugin::createValidator( const TQString&, + const TQString &, const TQString &, + TQObject* parent, const char* name) const { + return new TQRegExpValidator(TQRegExp(".*"), parent, name); } #include "kfile_ogg.moc" diff --git a/kfile-plugins/ogg/kfile_ogg.h b/kfile-plugins/ogg/kfile_ogg.h index 52b5f833..ed511ec4 100644 --- a/kfile-plugins/ogg/kfile_ogg.h +++ b/kfile-plugins/ogg/kfile_ogg.h @@ -31,14 +31,14 @@ class KOggPlugin: public KFilePlugin Q_OBJECT public: - KOggPlugin( QObject *parent, const char *name, const QStringList& args ); + KOggPlugin( 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/sid/kfile_sid.cpp b/kfile-plugins/sid/kfile_sid.cpp index 63697063..444e2ea8 100644 --- a/kfile-plugins/sid/kfile_sid.cpp +++ b/kfile-plugins/sid/kfile_sid.cpp @@ -23,9 +23,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include @@ -36,8 +36,8 @@ typedef KGenericFactory SidFactory; K_EXPORT_COMPONENT_FACTORY(kfile_sid, SidFactory("kfile_sid")) -KSidPlugin::KSidPlugin(QObject *parent, const char *name, - const QStringList &args) +KSidPlugin::KSidPlugin(TQObject *parent, const char *name, + const TQStringList &args) : KFilePlugin(parent, name, args) { @@ -52,42 +52,42 @@ KSidPlugin::KSidPlugin(QObject *parent, const char *name, KFileMimeTypeInfo::ItemInfo* item; - item = addItemInfo(group, "Title", i18n("Title"), QVariant::String); + item = addItemInfo(group, "Title", i18n("Title"), TQVariant::String); setAttributes(item, KFileMimeTypeInfo::Modifiable); setHint(item, KFileMimeTypeInfo::Name); - item = addItemInfo(group, "Artist", i18n("Artist"), QVariant::String); + item = addItemInfo(group, "Artist", i18n("Artist"), TQVariant::String); setAttributes(item, KFileMimeTypeInfo::Modifiable); setHint(item, KFileMimeTypeInfo::Author); - item = addItemInfo(group, "Copyright", i18n("Copyright"), QVariant::String); + item = addItemInfo(group, "Copyright", i18n("Copyright"), TQVariant::String); setAttributes(item, KFileMimeTypeInfo::Modifiable); setHint(item, KFileMimeTypeInfo::Description); // technical group group = addGroupInfo(info, "Technical", i18n("Technical Details")); - item = addItemInfo(group, "Version", i18n("Version"), QVariant::Int); + item = addItemInfo(group, "Version", i18n("Version"), TQVariant::Int); setPrefix(item, i18n("PSID v")); - addItemInfo(group, "Number of Songs", i18n("Number of Songs"), QVariant::Int); - item = addItemInfo(group, "Start Song", i18n("Start Song"), QVariant::Int); + addItemInfo(group, "Number of Songs", i18n("Number of Songs"), TQVariant::Int); + item = addItemInfo(group, "Start Song", i18n("Start Song"), TQVariant::Int); } bool KSidPlugin::readInfo(KFileMetaInfo& info, uint /*what*/) { if ( info.path().isEmpty() ) // remote file return false; - QFile file(info.path()); + TQFile file(info.path()); if ( !file.open(IO_ReadOnly) ) return false; int version; int num_songs; int start_song; - QString name; - QString artist; - QString copyright; + TQString name; + TQString artist; + TQString copyright; char buf[64] = { 0 }; @@ -138,7 +138,7 @@ bool KSidPlugin::readInfo(KFileMetaInfo& info, uint /*what*/) return false; copyright = buf; - QString TODO("TODO"); + TQString TODO("TODO"); kdDebug(7034) << "sid plugin readInfo\n"; KFileMetaInfoGroup general = appendGroup(info, "General"); @@ -166,7 +166,7 @@ bool KSidPlugin::writeInfo(const KFileMetaInfo& info) const char copyright[32] = {0}; int file = 0; - QString s; + TQString s; KFileMetaInfoGroup group = info.group("General"); if (!group.isValid()) @@ -185,7 +185,7 @@ bool KSidPlugin::writeInfo(const KFileMetaInfo& info) const strncpy(copyright, s.local8Bit(), 31); kdDebug(7034) << "Opening sid file " << info.path() << endl; - file = ::open(QFile::encodeName(info.path()), O_WRONLY); + file = ::open(TQFile::encodeName(info.path()), O_WRONLY); //name if (-1 == ::lseek(file, 0x16, SEEK_SET)) goto failure; @@ -209,15 +209,15 @@ failure: return false; } -QValidator* -KSidPlugin::createValidator(const QString& /*mimetype*/, const QString& group, - const QString& /*key*/, QObject* parent, +TQValidator* +KSidPlugin::createValidator(const TQString& /*mimetype*/, const TQString& group, + const TQString& /*key*/, TQObject* parent, const char* name) const { kdDebug(7034) << k_funcinfo << endl; // all items in "General" group are strings of max lenght 31 if (group == "General") - return new QRegExpValidator(QRegExp(".{,31}"), parent, name); + return new TQRegExpValidator(TQRegExp(".{,31}"), parent, name); // all others are read-only return 0; } diff --git a/kfile-plugins/sid/kfile_sid.h b/kfile-plugins/sid/kfile_sid.h index ad702ad1..6c221bd3 100644 --- a/kfile-plugins/sid/kfile_sid.h +++ b/kfile-plugins/sid/kfile_sid.h @@ -30,12 +30,12 @@ class KSidPlugin: public KFilePlugin Q_OBJECT public: - KSidPlugin(QObject *parent, const char *name, const QStringList& args); + KSidPlugin(TQObject *parent, const char *name, const TQStringList& args); virtual bool readInfo(KFileMetaInfo& info, uint what); virtual bool writeInfo(const KFileMetaInfo& info) const; - QValidator* createValidator(const QString& mimetype, const QString& group, - const QString& key, QObject* parent, + TQValidator* createValidator(const TQString& mimetype, const TQString& group, + const TQString& key, TQObject* parent, const char* name) const; }; diff --git a/kfile-plugins/theora/kfile_theora.cpp b/kfile-plugins/theora/kfile_theora.cpp index 0a687cd7..d426cc7f 100644 --- a/kfile-plugins/theora/kfile_theora.cpp +++ b/kfile-plugins/theora/kfile_theora.cpp @@ -18,7 +18,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#include +#include #include #include "kfile_theora.h" @@ -56,8 +56,8 @@ typedef KGenericFactory theoraFactory; K_EXPORT_COMPONENT_FACTORY(kfile_theora, theoraFactory( "kfile_theora" )) -theoraPlugin::theoraPlugin(QObject *parent, const char *name, - const QStringList &args) +theoraPlugin::theoraPlugin(TQObject *parent, const char *name, + const TQStringList &args) : KFilePlugin(parent, name, args) { // kdDebug(7034) << "theora plugin\n"; @@ -71,25 +71,25 @@ theoraPlugin::theoraPlugin(QObject *parent, const char *name, group = addGroupInfo(info, "Video", i18n("Video Details")); setAttributes(group, 0); - item = addItemInfo(group, "Length", i18n("Length"), QVariant::Int); + item = addItemInfo(group, "Length", i18n("Length"), TQVariant::Int); setUnit(item, KFileMimeTypeInfo::Seconds); setHint(item, KFileMimeTypeInfo::Length); - item = addItemInfo(group, "Resolution", i18n("Resolution"), QVariant::Size); + item = addItemInfo(group, "Resolution", i18n("Resolution"), TQVariant::Size); setHint(item, KFileMimeTypeInfo::Size); setUnit(item, KFileMimeTypeInfo::Pixels); - item = addItemInfo(group, "FrameRate", i18n("Frame Rate"), QVariant::Int); + item = addItemInfo(group, "FrameRate", i18n("Frame Rate"), TQVariant::Int); setUnit(item, KFileMimeTypeInfo::FramesPerSecond); - item = addItemInfo(group, "TargetBitrate", i18n("Target Bitrate"), QVariant::Int); + item = addItemInfo(group, "TargetBitrate", i18n("Target Bitrate"), TQVariant::Int); setUnit(item, KFileMimeTypeInfo::Bitrate); - item = addItemInfo(group, "Quality", i18n("Quality"), QVariant::Int); + item = addItemInfo(group, "Quality", i18n("Quality"), TQVariant::Int); // audio group group = addGroupInfo(info, "Audio", i18n("Audio Details")); setAttributes(group, 0); - addItemInfo(group, "Channels", i18n("Channels"), QVariant::Int); + addItemInfo(group, "Channels", i18n("Channels"), TQVariant::Int); - item = addItemInfo(group, "SampleRate", i18n("Sample Rate"), QVariant::Int); + item = addItemInfo(group, "SampleRate", i18n("Sample Rate"), TQVariant::Int); setUnit(item, KFileMimeTypeInfo::Hertz); } @@ -133,10 +133,10 @@ bool theoraPlugin::readInfo( KFileMetaInfo& info, uint what) if ( info.path().isEmpty() ) // remote file return false; - fp = fopen(QFile::encodeName(info.path()),"rb"); + fp = fopen(TQFile::encodeName(info.path()),"rb"); if (!fp) { - kdDebug(7034) << "Unable to open " << QFile::encodeName(info.path()) << endl; + kdDebug(7034) << "Unable to open " << TQFile::encodeName(info.path()) << endl; return false; } @@ -292,7 +292,7 @@ bool theoraPlugin::readInfo( KFileMetaInfo& info, uint what) stream_fps=t_info.fps_numerator/t_info.fps_denominator; KFileMetaInfoGroup videogroup = appendGroup(info, "Video"); appendItem(videogroup, "Length", int (duration)); - appendItem(videogroup, "Resolution", QSize(t_info.frame_width,t_info.frame_height)); + appendItem(videogroup, "Resolution", TQSize(t_info.frame_width,t_info.frame_height)); appendItem(videogroup, "FrameRate", stream_fps); appendItem(videogroup, "Quality", (int) t_info.quality); diff --git a/kfile-plugins/theora/kfile_theora.h b/kfile-plugins/theora/kfile_theora.h index 3d2c224e..2bc9fd54 100644 --- a/kfile-plugins/theora/kfile_theora.h +++ b/kfile-plugins/theora/kfile_theora.h @@ -33,7 +33,7 @@ class theoraPlugin: public KFilePlugin Q_OBJECT public: - theoraPlugin( QObject *parent, const char *name, const QStringList& args ); + theoraPlugin( TQObject *parent, const char *name, const TQStringList& args ); virtual bool readInfo( KFileMetaInfo& info, uint what); }; diff --git a/kfile-plugins/wav/kfile_wav.cpp b/kfile-plugins/wav/kfile_wav.cpp index be2724c7..09e2c2cc 100644 --- a/kfile-plugins/wav/kfile_wav.cpp +++ b/kfile-plugins/wav/kfile_wav.cpp @@ -26,11 +26,11 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #if !defined(__osf__) #include @@ -43,8 +43,8 @@ typedef KGenericFactory WavFactory; K_EXPORT_COMPONENT_FACTORY(kfile_wav, WavFactory( "kfile_wav" )) -KWavPlugin::KWavPlugin(QObject *parent, const char *name, - const QStringList &args) +KWavPlugin::KWavPlugin(TQObject *parent, const char *name, + const TQStringList &args) : KFilePlugin(parent, name, args) { @@ -57,15 +57,15 @@ KWavPlugin::KWavPlugin(QObject *parent, const char *name, KFileMimeTypeInfo::ItemInfo* item; - item = addItemInfo(group, "Sample Size", i18n("Sample Size"), QVariant::Int); + item = addItemInfo(group, "Sample Size", i18n("Sample Size"), TQVariant::Int); setSuffix(item, i18n(" bits")); - item = addItemInfo(group, "Sample Rate", i18n("Sample Rate"), QVariant::Int); + item = addItemInfo(group, "Sample Rate", i18n("Sample Rate"), TQVariant::Int); setSuffix(item, i18n(" Hz")); - item = addItemInfo(group, "Channels", i18n("Channels"), QVariant::Int); + item = addItemInfo(group, "Channels", i18n("Channels"), TQVariant::Int); - item = addItemInfo(group, "Length", i18n("Length"), QVariant::Int); + item = addItemInfo(group, "Length", i18n("Length"), TQVariant::Int); setAttributes(item, KFileMimeTypeInfo::Cummulative); setUnit(item, KFileMimeTypeInfo::Seconds); } @@ -75,7 +75,7 @@ bool KWavPlugin::readInfo( KFileMetaInfo& info, uint /*what*/) if ( info.path().isEmpty() ) // remote file return false; - QFile file(info.path()); + TQFile file(info.path()); uint32_t format_size; uint16_t format_tag; @@ -89,7 +89,7 @@ bool KWavPlugin::readInfo( KFileMetaInfo& info, uint /*what*/) uint16_t unknown_chunk16; bool have_fmt = false; bool have_data = false; - QIODevice::Offset file_length; + TQIODevice::Offset file_length; const char *riff_signature = "RIFF"; const char *wav_signature = "WAVE"; @@ -99,15 +99,15 @@ bool KWavPlugin::readInfo( KFileMetaInfo& info, uint /*what*/) 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; } file_length = file.size() - 100; // a bit of insurance - QDataStream dstream(&file); + TQDataStream dstream(&file); // WAV files are little-endian - dstream.setByteOrder(QDataStream::LittleEndian); + dstream.setByteOrder(TQDataStream::LittleEndian); // Read and verify the RIFF signature dstream.readRawBytes(signature_buffer, 4); diff --git a/kfile-plugins/wav/kfile_wav.h b/kfile-plugins/wav/kfile_wav.h index 27990b0e..a80f49ec 100644 --- a/kfile-plugins/wav/kfile_wav.h +++ b/kfile-plugins/wav/kfile_wav.h @@ -29,7 +29,7 @@ class KWavPlugin: public KFilePlugin Q_OBJECT public: - KWavPlugin( QObject *parent, const char *name, const QStringList& args ); + KWavPlugin( TQObject *parent, const char *name, const TQStringList& args ); virtual bool readInfo( KFileMetaInfo& info, uint what); }; diff --git a/kioslave/audiocd/audiocd.cpp b/kioslave/audiocd/audiocd.cpp index af81c13d..d092ffda 100644 --- a/kioslave/audiocd/audiocd.cpp +++ b/kioslave/audiocd/audiocd.cpp @@ -44,13 +44,13 @@ extern "C" #include #include -#include -#include +#include +#include #include #include #include #include -#include +#include // CDDB #include @@ -59,7 +59,7 @@ extern "C" using namespace KIO; using namespace KCDDB; -#define QFL1(x) QString::fromLatin1(x) +#define QFL1(x) TQString::fromLatin1(x) #define DEFAULT_CD_DEVICE "/dev/cdrom" #define CDDB_INFORMATION "CDDB Information" @@ -121,17 +121,17 @@ public: bool req_allTracks; Which_dir which_dir; int req_track; - QString fname; + TQString fname; AudioCDEncoder *encoder_dir_type; // Misc settings - QString device; // URL settable + TQString device; // URL settable int paranoiaLevel; // URL settable bool reportErrors; // Directory strings, never change after init - QString s_info; - QString s_fullCD; + TQString s_info; + TQString s_fullCD; // Current CD unsigned discid; @@ -146,19 +146,19 @@ public: KCDDB::CDInfo cddbBestChoice; // Template for .. - QString fileNameTemplate; // URL settable - QString albumTemplate; // URL settable - QString rsearch; - QString rreplace; + TQString fileNameTemplate; // URL settable + TQString albumTemplate; // URL settable + TQString rsearch; + TQString rreplace; // Current strings for this CD and or cddb selection - QStringList templateTitles; - QString templateAlbumName; + TQStringList templateTitles; + TQString templateAlbumName; }; int paranoia_read_limited_error; -AudioCDProtocol::AudioCDProtocol(const QCString & protocol, const QCString & pool, const QCString & app) +AudioCDProtocol::AudioCDProtocol(const TQCString & protocol, const TQCString & pool, const TQCString & app) : SlaveBase(protocol, pool, app) { d = new Private; @@ -175,18 +175,18 @@ AudioCDProtocol::~AudioCDProtocol() delete d; } -AudioCDEncoder *AudioCDProtocol::encoderFromExtension(const QString& extension) +AudioCDEncoder *AudioCDProtocol::encoderFromExtension(const TQString& extension) { AudioCDEncoder *encoder; for ( encoder = encoders.first(); encoder; encoder = encoders.next() ){ - if(QString(".")+encoder->fileType() == extension) + if(TQString(".")+encoder->fileType() == extension) return encoder; } Q_ASSERT(false); return NULL; } -AudioCDEncoder *AudioCDProtocol::determineEncoder(const QString & filename) +AudioCDEncoder *AudioCDProtocol::determineEncoder(const TQString & filename) { int len = filename.length(); int pos = filename.findRev('.'); @@ -251,7 +251,7 @@ struct cdrom_drive * AudioCDProtocol::initRequest(const KURL & url) // circumstances, so build a representation from // the unit number and SCSI device name. // - QString devname = QString::fromLatin1( "/dev/%1%2" ) + TQString devname = TQString::fromLatin1( "/dev/%1%2" ) .arg( drive->dev->given_dev_name ) .arg( drive->dev->given_unit_number ) ; kdDebug(7117) << " Using derived name " << devname << endl; @@ -275,7 +275,7 @@ struct cdrom_drive * AudioCDProtocol::initRequest(const KURL & url) // Determine what file or folder that is wanted. d->fname = url.fileName(false); - QString dname = url.directory(true, false); + TQString dname = url.directory(true, false); if (!dname.isEmpty() && dname[0] == '/') dname = dname.mid(1); @@ -323,7 +323,7 @@ struct cdrom_drive * AudioCDProtocol::initRequest(const KURL & url) // See if the url is a track d->req_track = -1; if (!d->fname.isEmpty()){ - QString name(d->fname); + TQString name(d->fname); // Remove extension int dot = name.findRev('.'); @@ -399,7 +399,7 @@ void AudioCDProtocol::get(const KURL & url) if( d->fname.contains(i18n(CDDB_INFORMATION))){ uint choice = 1; - if(d->fname != QString("%1.txt").arg(i18n(CDDB_INFORMATION))){ + if(d->fname != TQString("%1.txt").arg(i18n(CDDB_INFORMATION))){ choice= d->fname.section('_',1,1).section('.',0,0).toInt(); } uint count = 1; @@ -408,9 +408,9 @@ void AudioCDProtocol::get(const KURL & url) for ( it = d->cddbList.begin(); it != d->cddbList.end(); ++it ){ if(count == choice){ mimeType("text/html"); - data(QCString( (*it).toString().latin1() )); - // send an empty QByteArray to signal end of data. - data(QByteArray()); + data(TQCString( (*it).toString().latin1() )); + // send an empty TQByteArray to signal end of data. + data(TQByteArray()); finished(); found = true; break; @@ -419,9 +419,9 @@ void AudioCDProtocol::get(const KURL & url) } if(!found && d->fname.contains(i18n(CDDB_INFORMATION)+":")){ mimeType("text/html"); - //data(QCString( d->fname.latin1() )); - // send an empty QByteArray to signal end of data. - data(QByteArray()); + //data(TQCString( d->fname.latin1() )); + // send an empty TQByteArray to signal end of data. + data(TQByteArray()); finished(); found = true; } @@ -470,8 +470,8 @@ void AudioCDProtocol::get(const KURL & url) // Read data (track/disk) from the cd paranoiaRead(drive, firstSector, lastSector, encoder, url.fileName(), size); - // send an empty QByteArray to signal end of data. - data(QByteArray()); + // send an empty TQByteArray to signal end of data. + data(TQByteArray()); cdda_close(drive); @@ -541,7 +541,7 @@ void AudioCDProtocol::stat(const KURL & url) finished(); } -static void app_entry(UDSEntry& e, unsigned int uds, const QString& str) +static void app_entry(UDSEntry& e, unsigned int uds, const TQString& str) { UDSAtom a; a.m_uds = uds; @@ -557,20 +557,20 @@ static void app_entry(UDSEntry& e, unsigned int uds, long l) e.append(a); } -static void app_dir(UDSEntry& e, const QString & n, size_t s) +static void app_dir(UDSEntry& e, const TQString & n, size_t s) { e.clear(); - app_entry(e, KIO::UDS_NAME, QFile::decodeName(n.local8Bit())); + app_entry(e, KIO::UDS_NAME, TQFile::decodeName(n.local8Bit())); app_entry(e, KIO::UDS_FILE_TYPE, S_IFDIR); app_entry(e, KIO::UDS_ACCESS, 0400); app_entry(e, KIO::UDS_SIZE, s); app_entry(e, KIO::UDS_MIME_TYPE, "inode/directory"); } -static void app_file(UDSEntry& e, const QString & n, size_t s) +static void app_file(UDSEntry& e, const TQString & n, size_t s) { e.clear(); - app_entry(e, KIO::UDS_NAME, QFile::decodeName(n.local8Bit())); + app_entry(e, KIO::UDS_NAME, TQFile::decodeName(n.local8Bit())); app_entry(e, KIO::UDS_FILE_TYPE, S_IFREG); app_entry(e, KIO::UDS_ACCESS, 0400); app_entry(e, KIO::UDS_SIZE, s); @@ -610,15 +610,15 @@ void AudioCDProtocol::listDir(const KURL & url) for ( it = d->cddbList.begin(); it != d->cddbList.end(); ++it ){ (*it).toString(); if(count == 1) - app_file(entry, QString("%1.txt").arg(i18n(CDDB_INFORMATION)), ((*it).toString().length())+1); + app_file(entry, TQString("%1.txt").arg(i18n(CDDB_INFORMATION)), ((*it).toString().length())+1); else - app_file(entry, QString("%1_%2.txt").arg(i18n(CDDB_INFORMATION)).arg(count), ((*it).toString().length())+1); + app_file(entry, TQString("%1_%2.txt").arg(i18n(CDDB_INFORMATION)).arg(count), ((*it).toString().length())+1); count++; listEntry(entry, false); } // Error if( count == 1 ) { - app_file(entry, QString("%1: %2.txt").arg(i18n(CDDB_INFORMATION)).arg(CDDB::resultToString(d->cddbResult)), ((*it).toString().length())+1); + app_file(entry, TQString("%1: %2.txt").arg(i18n(CDDB_INFORMATION)).arg(CDDB::resultToString(d->cddbResult)), ((*it).toString().length())+1); count++; listEntry(entry, false); } @@ -694,7 +694,7 @@ void AudioCDProtocol::listDir(const KURL & url) finished(); } -void AudioCDProtocol::addEntry(const QString& trackTitle, AudioCDEncoder *encoder, struct cdrom_drive * drive, int trackNo) +void AudioCDProtocol::addEntry(const TQString& trackTitle, AudioCDEncoder *encoder, struct cdrom_drive * drive, int trackNo) { if(!encoder || !drive) return; @@ -713,7 +713,7 @@ void AudioCDProtocol::addEntry(const QString& trackTitle, AudioCDEncoder *encode theFileSize = fileSize(firstSector, lastSector, encoder); } UDSEntry entry; - app_file(entry, trackTitle + QString(".")+encoder->fileType(), theFileSize); + app_file(entry, trackTitle + TQString(".")+encoder->fileType(), theFileSize); listEntry(entry, false); } @@ -730,7 +730,7 @@ long AudioCDProtocol::fileSize(long firstSector, long lastSector, AudioCDEncoder struct cdrom_drive *AudioCDProtocol::getDrive() { - QCString device(QFile::encodeName(d->device)); + TQCString device(TQFile::encodeName(d->device)); struct cdrom_drive * drive = 0; @@ -742,7 +742,7 @@ struct cdrom_drive *AudioCDProtocol::getDrive() if (0 == drive) { - if (QFile(QFile::decodeName(DEFAULT_CD_DEVICE)).exists()) + if (TQFile(TQFile::decodeName(DEFAULT_CD_DEVICE)).exists()) drive = cdda_identify(DEFAULT_CD_DEVICE, CDDA_MESSAGE_PRINTIT, 0); } } @@ -750,7 +750,7 @@ struct cdrom_drive *AudioCDProtocol::getDrive() if (0 == drive) { kdDebug(7117) << "Can't find an audio CD on: \"" << d->device << "\"" << endl; - QFileInfo fi(d->device); + TQFileInfo fi(d->device); if(!fi.isReadable()) error(KIO::ERR_SLAVE_DEFINED, i18n("Device doesn't have read permissions for this account. Check the read permissions on the device.")); else if(!fi.isWritable()) @@ -778,7 +778,7 @@ void AudioCDProtocol::paranoiaRead( long firstSector, long lastSector, AudioCDEncoder* encoder, - const QString& fileName, + const TQString& fileName, unsigned long size ) { @@ -848,8 +848,8 @@ void AudioCDProtocol::paranoiaRead( if(encoderProcessed == -1){ kdDebug(7117) << "Encoder processing error, stopping." << endl; ok = false; - QString errMsg = i18n( "Couldn't read %1: encoding failed" ).arg( fileName ); - QString details = encoder->lastErrorMessage(); + TQString errMsg = i18n( "Couldn't read %1: encoding failed" ).arg( fileName ); + TQString details = encoder->lastErrorMessage(); if ( !details.isEmpty() ) errMsg += "\n" + details; error( ERR_SLAVE_DEFINED, errMsg ); @@ -940,25 +940,25 @@ void AudioCDProtocol::parseURLArgs(const KURL & url) { d->clearURLargs(); - QString query(KURL::decode_string(url.query())); + TQString query(KURL::decode_string(url.query())); if (query.isEmpty() || query[0] != '?') return; query = query.mid(1); // Strip leading '?'. - QStringList tokens(QStringList::split('&', query)); + TQStringList tokens(TQStringList::split('&', query)); - for (QStringList::ConstIterator it(tokens.begin()); it != tokens.end(); ++it) + for (TQStringList::ConstIterator it(tokens.begin()); it != tokens.end(); ++it) { - QString token(*it); + TQString token(*it); int equalsPos(token.find('=')); if (-1 == equalsPos) continue; - QString attribute(token.left(equalsPos)); - QString value(token.mid(equalsPos + 1)); + TQString attribute(token.left(equalsPos)); + TQString value(token.mid(equalsPos + 1)); if (attribute == QFL1("device")) d->device = value; @@ -1021,7 +1021,7 @@ void AudioCDProtocol::loadSettings() // otherwise it is not possible to search for a space " ", since an empty (only spaces) value is not // supported by KConfig, so the space has to be qouted, but then here the regexp searches really for " " // instead of just the space. Alex - QRegExp qoutedString("^\".*\"$"); + TQRegExp qoutedString("^\".*\"$"); if (qoutedString.exactMatch(d->rsearch)) { d->rsearch=d->rsearch.mid(1, d->rsearch.length()-2); @@ -1057,7 +1057,7 @@ void AudioCDProtocol::generateTemplateTitles() if (d->cddbResult != KCDDB::CDDB::Success) { for (unsigned int i = 0; i < d->tracks; i++){ - QString n; + TQString n; d->templateTitles.append( i18n("Track %1").arg(n.sprintf("%02d", i + 1))); } return; @@ -1070,28 +1070,28 @@ void AudioCDProtocol::generateTemplateTitles() // Then generate the templates d->templateTitles.clear(); for (uint i = 0; i < d->tracks; i++) { - QMap macros; + TQMap macros; macros["albumartist"] = info.artist; macros["albumtitle"] = info.title; macros["title"] = (info.trackInfoList[i].title); - QString n; + TQString n; macros["number"] = n.sprintf("%02d", i + 1); - //macros["number"] = QString("%1").arg(i+1, 2, 10); + //macros["number"] = TQString("%1").arg(i+1, 2, 10); macros["genre"] = info.genre; - macros["year"] = QString::number(info.year); + macros["year"] = TQString::number(info.year); - QString title = KMacroExpander::expandMacros(d->fileNameTemplate, macros, '%').replace('/', QFL1("%2F")); - title.replace( QRegExp(d->rsearch), d->rreplace ); + TQString title = KMacroExpander::expandMacros(d->fileNameTemplate, macros, '%').replace('/', QFL1("%2F")); + title.replace( TQRegExp(d->rsearch), d->rreplace ); d->templateTitles.append(title); } - QMap macros; + TQMap macros; macros["albumartist"] = info.artist; macros["albumtitle"] = info.title; macros["genre"] = info.genre; - macros["year"] = QString::number(info.year); + macros["year"] = TQString::number(info.year); d->templateAlbumName = KMacroExpander::expandMacros(d->albumTemplate, macros, '%').replace('/', QFL1("%2F")); - d->templateAlbumName.replace( QRegExp(d->rsearch), d->rreplace ); + d->templateAlbumName.replace( TQRegExp(d->rsearch), d->rreplace ); } /** diff --git a/kioslave/audiocd/audiocd.h b/kioslave/audiocd/audiocd.h index c2ebdda7..45271b16 100644 --- a/kioslave/audiocd/audiocd.h +++ b/kioslave/audiocd/audiocd.h @@ -42,7 +42,7 @@ class AudioCDProtocol : public KIO::SlaveBase { public: - AudioCDProtocol(const QCString & protocol, const QCString & pool, const QCString & app); + AudioCDProtocol(const TQCString & protocol, const TQCString & pool, const TQCString & app); virtual ~AudioCDProtocol(); virtual void get(const KURL &); @@ -50,8 +50,8 @@ class AudioCDProtocol : public KIO::SlaveBase virtual void listDir(const KURL &); protected: - AudioCDEncoder *encoderFromExtension(const QString& extension); - AudioCDEncoder *determineEncoder(const QString & filename); + AudioCDEncoder *encoderFromExtension(const TQString& extension); + AudioCDEncoder *determineEncoder(const TQString & filename); struct cdrom_drive *findDrive(bool &noPermission); void parseURLArgs(const KURL &); @@ -82,7 +82,7 @@ class AudioCDProtocol : public KIO::SlaveBase long firstSector, long lastSector, AudioCDEncoder* encoder, - const QString& fileName, + const TQString& fileName, unsigned long size ); @@ -101,7 +101,7 @@ class AudioCDProtocol : public KIO::SlaveBase * so NO NEED to wrap your calls with #ifdef for lame or vorbis. * this function will do the right thing. */ - void addEntry(const QString& trackTitle, AudioCDEncoder *encoder, + void addEntry(const TQString& trackTitle, AudioCDEncoder *encoder, struct cdrom_drive * drive, int trackNo); class Private; @@ -111,7 +111,7 @@ private: void generateTemplateTitles(); - QPtrList encoders; + TQPtrList encoders; cdrom_drive * getDrive(); // These are the only garenteed encoders to be built, the rest diff --git a/kioslave/audiocd/kcmaudiocd/kcmaudiocd.cpp b/kioslave/audiocd/kcmaudiocd/kcmaudiocd.cpp index 7c952726..87614806 100644 --- a/kioslave/audiocd/kcmaudiocd/kcmaudiocd.cpp +++ b/kioslave/audiocd/kcmaudiocd/kcmaudiocd.cpp @@ -20,39 +20,39 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include -#include -#include +#include +#include #include #include "kcmaudiocd.moc" #include -KAudiocdModule::KAudiocdModule(QWidget *parent, const char *name) +KAudiocdModule::KAudiocdModule(TQWidget *parent, const char *name) : AudiocdConfig(parent, name), configChanged(false) { - QString foo = i18n("Report errors found on the cd."); + TQString foo = i18n("Report errors found on the cd."); setButtons(Default|Apply); config = new KConfig("kcmaudiocdrc"); - QPtrList encoders; + TQPtrList encoders; AudioCDEncoder::findAllPlugins(0, encoders); AudioCDEncoder *encoder; for ( encoder = encoders.first(); encoder; encoder = encoders.next() ){ if (encoder->init()) { KConfigSkeleton *config = NULL; - QWidget *widget = encoder->getConfigureWidget(&config); + TQWidget *widget = encoder->getConfigureWidget(&config); if(widget && config){ tabWidget->addTab(widget, i18n("%1 Encoder").arg(encoder->type())); - KConfigDialogManager *configManager = new KConfigDialogManager(widget, config, QString(encoder->type()+" EncoderConfigManager").latin1()); + KConfigDialogManager *configManager = new KConfigDialogManager(widget, config, TQString(encoder->type()+" EncoderConfigManager").latin1()); encoderSettings.append(configManager); } } @@ -62,25 +62,25 @@ KAudiocdModule::KAudiocdModule(QWidget *parent, const char *name) KConfigDialogManager *widget; for ( widget = encoderSettings.first(); widget; widget = encoderSettings.next() ){ - connect(widget, SIGNAL(widgetModified()), this, SLOT(slotModuleChanged())); + connect(widget, TQT_SIGNAL(widgetModified()), this, TQT_SLOT(slotModuleChanged())); } //CDDA Options - connect(cd_specify_device,SIGNAL(clicked()),this,SLOT(slotConfigChanged())); - connect(ec_enable_check,SIGNAL(clicked()),this,SLOT(slotEcEnable())); - connect(ec_skip_check,SIGNAL(clicked()),SLOT(slotConfigChanged())); - connect(cd_device_string,SIGNAL(textChanged(const QString &)),SLOT(slotConfigChanged())); - connect(niceLevel,SIGNAL(valueChanged(int)),SLOT(slotConfigChanged())); + connect(cd_specify_device,TQT_SIGNAL(clicked()),this,TQT_SLOT(slotConfigChanged())); + connect(ec_enable_check,TQT_SIGNAL(clicked()),this,TQT_SLOT(slotEcEnable())); + connect(ec_skip_check,TQT_SIGNAL(clicked()),TQT_SLOT(slotConfigChanged())); + connect(cd_device_string,TQT_SIGNAL(textChanged(const TQString &)),TQT_SLOT(slotConfigChanged())); + connect(niceLevel,TQT_SIGNAL(valueChanged(int)),TQT_SLOT(slotConfigChanged())); // File Name - connect(fileNameLineEdit, SIGNAL(textChanged(const QString &)), this, SLOT(slotConfigChanged())); - connect(albumNameLineEdit, SIGNAL(textChanged(const QString &)), this, SLOT(slotConfigChanged())); - connect( kcfg_replaceInput, SIGNAL( textChanged(const QString&) ), this, SLOT( updateExample() ) ); - connect( kcfg_replaceOutput, SIGNAL( textChanged(const QString&) ), this, SLOT( updateExample() ) ); - connect( example, SIGNAL( textChanged(const QString&) ), this, SLOT( updateExample() ) ); - connect( kcfg_replaceInput, SIGNAL( textChanged(const QString&) ), this, SLOT( slotConfigChanged() ) ); - connect( kcfg_replaceOutput, SIGNAL( textChanged(const QString&) ), this, SLOT( slotConfigChanged() ) ); - connect( example, SIGNAL( textChanged(const QString&) ), this, SLOT( slotConfigChanged() ) ); + connect(fileNameLineEdit, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(slotConfigChanged())); + connect(albumNameLineEdit, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(slotConfigChanged())); + connect( kcfg_replaceInput, TQT_SIGNAL( textChanged(const TQString&) ), this, TQT_SLOT( updateExample() ) ); + connect( kcfg_replaceOutput, TQT_SIGNAL( textChanged(const TQString&) ), this, TQT_SLOT( updateExample() ) ); + connect( example, TQT_SIGNAL( textChanged(const TQString&) ), this, TQT_SLOT( updateExample() ) ); + connect( kcfg_replaceInput, TQT_SIGNAL( textChanged(const TQString&) ), this, TQT_SLOT( slotConfigChanged() ) ); + connect( kcfg_replaceOutput, TQT_SIGNAL( textChanged(const TQString&) ), this, TQT_SLOT( slotConfigChanged() ) ); + connect( example, TQT_SIGNAL( textChanged(const TQString&) ), this, TQT_SLOT( slotConfigChanged() ) ); KAboutData *about = new KAboutData(I18N_NOOP("kcmaudiocd"), I18N_NOOP("KDE Audio CD IO Slave"), @@ -97,10 +97,10 @@ KAudiocdModule::~KAudiocdModule() delete config; } -QString removeQoutes(const QString& text) +TQString removeQoutes(const TQString& text) { - QString deqoutedString=text; - QRegExp qoutedStringRegExp("^\".*\"$"); + TQString deqoutedString=text; + TQRegExp qoutedStringRegExp("^\".*\"$"); if (qoutedStringRegExp.exactMatch(text)) { deqoutedString=text.mid(1, text.length()-2); @@ -108,10 +108,10 @@ QString removeQoutes(const QString& text) return deqoutedString; } -bool needsQoutes(const QString& text) +bool needsQoutes(const TQString& text) { - QRegExp spaceAtTheBeginning("^\\s+.*$"); - QRegExp spaceAtTheEnd("^.*\\s+$"); + TQRegExp spaceAtTheBeginning("^\\s+.*$"); + TQRegExp spaceAtTheEnd("^.*\\s+$"); return (spaceAtTheBeginning.exactMatch(text) || spaceAtTheEnd.exactMatch(text)); @@ -119,11 +119,11 @@ bool needsQoutes(const QString& text) void KAudiocdModule::updateExample() { - QString text = example->text(); - QString deqoutedReplaceInput=removeQoutes(kcfg_replaceInput->text()); - QString deqoutedReplaceOutput=removeQoutes(kcfg_replaceOutput->text()); + TQString text = example->text(); + TQString deqoutedReplaceInput=removeQoutes(kcfg_replaceInput->text()); + TQString deqoutedReplaceOutput=removeQoutes(kcfg_replaceOutput->text()); - text.replace( QRegExp(deqoutedReplaceInput), deqoutedReplaceOutput ); + text.replace( TQRegExp(deqoutedReplaceInput), deqoutedReplaceOutput ); exampleOutput->setText(text); } @@ -154,15 +154,15 @@ void KAudiocdModule::save() { config->writeEntry("album_name_template", albumNameLineEdit->text()); config->writeEntry("regexp_example", example->text()); // save qouted if required - QString replaceInput=kcfg_replaceInput->text(); - QString replaceOutput=kcfg_replaceOutput->text(); + TQString replaceInput=kcfg_replaceInput->text(); + TQString replaceOutput=kcfg_replaceOutput->text(); if (needsQoutes(replaceInput)) { - replaceInput=QString("\"")+replaceInput+QString("\""); + replaceInput=TQString("\"")+replaceInput+TQString("\""); } if (needsQoutes(replaceOutput)) { - replaceOutput=QString("\"")+replaceOutput+QString("\""); + replaceOutput=TQString("\"")+replaceOutput+TQString("\""); } config->writeEntry("regexp_search", replaceInput); config->writeEntry("regexp_replace", replaceOutput); @@ -246,7 +246,7 @@ void KAudiocdModule::slotEcEnable() { slotConfigChanged(); } -QString KAudiocdModule::quickHelp() const +TQString KAudiocdModule::quickHelp() const { return i18n("

Audio CDs

The Audio CD IO-Slave enables you to easily" " create wav, MP3 or Ogg Vorbis files from your audio CD-ROMs or DVDs." @@ -259,7 +259,7 @@ QString KAudiocdModule::quickHelp() const extern "C" { - KCModule *create_audiocd(QWidget *parent, const char */*name*/) + KCModule *create_audiocd(TQWidget *parent, const char */*name*/) { return new KAudiocdModule(parent, "kcmaudiocd"); } diff --git a/kioslave/audiocd/kcmaudiocd/kcmaudiocd.h b/kioslave/audiocd/kcmaudiocd/kcmaudiocd.h index c0d9a65e..4d51134d 100644 --- a/kioslave/audiocd/kcmaudiocd/kcmaudiocd.h +++ b/kioslave/audiocd/kcmaudiocd/kcmaudiocd.h @@ -35,10 +35,10 @@ class KAudiocdModule : public AudiocdConfig public: - KAudiocdModule(QWidget *parent=0, const char *name=0); + KAudiocdModule(TQWidget *parent=0, const char *name=0); ~KAudiocdModule(); - QString quickHelp() const; + TQString quickHelp() const; public slots: void defaults(); @@ -58,7 +58,7 @@ private: int getBitrateIndex(int value); - QPtrList encoderSettings; + TQPtrList encoderSettings; }; #endif // KAUDIOCDCONFIG_H diff --git a/kioslave/audiocd/plugins/audiocdencoder.cpp b/kioslave/audiocd/plugins/audiocdencoder.cpp index 32f13914..6dfbec18 100644 --- a/kioslave/audiocd/plugins/audiocdencoder.cpp +++ b/kioslave/audiocd/plugins/audiocdencoder.cpp @@ -19,8 +19,8 @@ #include #include #include -#include -#include +#include +#include #include /** @@ -28,7 +28,7 @@ * @param libFileName file to try to load. * @returns pointer to the symbol or NULL */ -void *loadPlugin(const QString &libFileName) +void *loadPlugin(const TQString &libFileName) { #ifdef DEBUG kdDebug(7117) << "Trying to load library. File: \"" << libFileName.latin1() << "\"." << endl; @@ -59,24 +59,24 @@ void *loadPlugin(const QString &libFileName) * but I do know that this does work. :) Feel free to improve the loading system, * there isn't much code anyway. */ -void AudioCDEncoder::findAllPlugins(KIO::SlaveBase *slave, QPtrList &encoders){ - QString foundEncoders; +void AudioCDEncoder::findAllPlugins(KIO::SlaveBase *slave, TQPtrList &encoders){ + TQString foundEncoders; KStandardDirs standardDirs; - QStringList dirs = standardDirs.findDirs("module", ""); - for (QStringList::Iterator it = dirs.begin(); it != dirs.end(); ++it) { - QDir dir(*it); + TQStringList dirs = standardDirs.findDirs("module", ""); + for (TQStringList::Iterator it = dirs.begin(); it != dirs.end(); ++it) { + TQDir dir(*it); if (!dir.exists()) { kdDebug(7117) << "Directory given by KStandardDirs: " << dir.path() << " doesn't exists!" << endl; continue; } - dir.setFilter(QDir::Files | QDir::Hidden); + dir.setFilter(TQDir::Files | TQDir::Hidden); - QStringList list = dir.entryList( "libaudiocd_encoder_*.so"); + TQStringList list = dir.entryList( "libaudiocd_encoder_*.so"); kdDebug() << "list " << list << endl; - for (QStringList::ConstIterator it2 = list.begin(); it2 != list.end(); ++it2) + for (TQStringList::ConstIterator it2 = list.begin(); it2 != list.end(); ++it2) { - QString fileName = *it2; + TQString fileName = *it2; kdDebug() << fileName << endl; if (foundEncoders.contains(fileName)) { kdDebug(7117) << "Warning, encoder has been found twice!" << endl; @@ -86,7 +86,7 @@ void AudioCDEncoder::findAllPlugins(KIO::SlaveBase *slave, QPtrList &) = (void (*)(KIO::SlaveBase *slave, QPtrList &encoders)) function; + void (*functionPointer)(KIO::SlaveBase *, TQPtrList &) = (void (*)(KIO::SlaveBase *slave, TQPtrList &encoders)) function; functionPointer(slave, encoders); } } diff --git a/kioslave/audiocd/plugins/audiocdencoder.h b/kioslave/audiocd/plugins/audiocdencoder.h index a9ff691f..cac9b2aa 100644 --- a/kioslave/audiocd/plugins/audiocdencoder.h +++ b/kioslave/audiocd/plugins/audiocdencoder.h @@ -65,7 +65,7 @@ public: * @returns the generic user string type/name of this encoder * Examples: "MP3", "Ogg Vorbis", "Wav", "FID Level 2", etc */ - virtual QString type() const = 0; + virtual TQString type() const = 0; /** * @returns the mime type for the files this encoder produces. @@ -86,7 +86,7 @@ public: * information if they want to so it can be inserted * where neccessary (start, middle, end, or combos etc). */ - virtual void fillSongInfo( KCDDB::CDInfo info, int track, const QString &comment ) = 0; + virtual void fillSongInfo( KCDDB::CDInfo info, int track, const TQString &comment ) = 0; /** * Perform any initial file creation necessary for a new song (that @@ -114,13 +114,13 @@ public: /** * Returns a configure widget for the encoder */ - virtual QWidget* getConfigureWidget(KConfigSkeleton** manager) const + virtual TQWidget* getConfigureWidget(KConfigSkeleton** manager) const { Q_UNUSED(manager); return NULL; }; /** * Returns the last error message; called when e.g. read() returns -1. */ - virtual QString lastErrorMessage() const { return QString::null; } + virtual TQString lastErrorMessage() const { return TQString::null; } /** * Helper function to load all of the AudioCD Encoders from libraries. @@ -130,7 +130,7 @@ public: * @param slave ioslave needed if the plugin is going to be used to encode something. * @param encoders container for new encoders. */ - static void findAllPlugins(KIO::SlaveBase *slave, QPtrList &encoders); + static void findAllPlugins(KIO::SlaveBase *slave, TQPtrList &encoders); protected: /** diff --git a/kioslave/audiocd/plugins/flac/encoderflac.cpp b/kioslave/audiocd/plugins/flac/encoderflac.cpp index a787984b..86d30a89 100644 --- a/kioslave/audiocd/plugins/flac/encoderflac.cpp +++ b/kioslave/audiocd/plugins/flac/encoderflac.cpp @@ -32,7 +32,7 @@ extern "C" { - KDE_EXPORT void create_audiocd_encoders(KIO::SlaveBase *slave, QPtrList &encoders) + KDE_EXPORT void create_audiocd_encoders(KIO::SlaveBase *slave, TQPtrList &encoders) { encoders.append(new EncoderFLAC(slave)); } @@ -53,7 +53,7 @@ static FLAC__StreamEncoderWriteStatus WriteCallback(const FLAC__StreamEncoder *e d->data += bytes; - QByteArray output; + TQByteArray output; if (bytes) { output.setRawData((const char*)buffer, bytes); @@ -153,29 +153,29 @@ long EncoderFLAC::readCleanup() return 0; } -void EncoderFLAC::fillSongInfo( KCDDB::CDInfo info, int track, const QString &comment ) +void EncoderFLAC::fillSongInfo( KCDDB::CDInfo info, int track, const TQString &comment ) { d->metadata = new FLAC__StreamMetadata*[1]; d->metadata[0] = FLAC__metadata_object_new(FLAC__METADATA_TYPE_VORBIS_COMMENT); // d->metadata[1] = FLAC__metadata_object_new(FLAC__METADATA_TYPE_PADDING); // d->metadata[2] = FLAC__metadata_object_new(FLAC__METADATA_TYPE_SEEKTABLE) - typedef QPair Comment; + typedef QPair Comment; Comment comments[7] = { Comment("Title", info.trackInfoList[track].get("title")), Comment("Artist", info.get("artist")), Comment("Album", info.get("title")), Comment("Genre", info.get("genre")), - Comment("Tracknumber", QString::number(track+1)), + Comment("Tracknumber", TQString::number(track+1)), Comment("Comment", comment), - Comment("Date", QString::null )}; + Comment("Date", TQString::null )}; if (info.get("Year").toInt() > 0) { - QDateTime dt(QDate(info.get("Year").toInt(), 1, 1)); + TQDateTime dt(TQDate(info.get("Year").toInt(), 1, 1)); comments[6] = Comment("Date", dt.toString(Qt::ISODate)); } FLAC__StreamMetadata_VorbisComment_Entry entry; - QString field; - QCString cfield; + TQString field; + TQCString cfield; int num_comments = 0; for(int i=0; i<7; i++) { diff --git a/kioslave/audiocd/plugins/flac/encoderflac.h b/kioslave/audiocd/plugins/flac/encoderflac.h index 0dd285b8..9bec8bf4 100644 --- a/kioslave/audiocd/plugins/flac/encoderflac.h +++ b/kioslave/audiocd/plugins/flac/encoderflac.h @@ -38,13 +38,13 @@ public: EncoderFLAC(KIO::SlaveBase *slave); ~EncoderFLAC(); - virtual QString type() const { return "FLAC"; }; + virtual TQString type() const { return "FLAC"; }; virtual bool init(); virtual void loadSettings(); virtual unsigned long size(long time_secs) const; virtual const char * fileType() const { return "flac"; }; virtual const char * mimeType() const { return "audio/x-flac"; } - virtual void fillSongInfo( KCDDB::CDInfo info, int track, const QString &comment ); + virtual void fillSongInfo( KCDDB::CDInfo info, int track, const TQString &comment ); virtual long readInit(long size); virtual long read(int16_t * buf, int frames); virtual long readCleanup(); diff --git a/kioslave/audiocd/plugins/lame/collectingprocess.cpp b/kioslave/audiocd/plugins/lame/collectingprocess.cpp index b3a13755..42bdf206 100644 --- a/kioslave/audiocd/plugins/lame/collectingprocess.cpp +++ b/kioslave/audiocd/plugins/lame/collectingprocess.cpp @@ -32,7 +32,7 @@ #include "collectingprocess.h" -#include +#include #include @@ -41,13 +41,13 @@ struct CollectingProcess::Private { {} uint stdoutSize; - QValueList stdoutBuffer; + TQValueList stdoutBuffer; uint stderrSize; - QValueList stderrBuffer; + TQValueList stderrBuffer; }; -CollectingProcess::CollectingProcess( QObject * parent, const char * name ) +CollectingProcess::CollectingProcess( TQObject * parent, const char * name ) : KProcess( parent, name ) { d = new Private(); @@ -59,25 +59,25 @@ CollectingProcess::~CollectingProcess() { bool CollectingProcess::start( RunMode runmode, Communication comm ) { // prevent duplicate connection - disconnect( this, SIGNAL( receivedStdout( KProcess *, char *, int ) ), - this, SLOT( slotReceivedStdout( KProcess *, char *, int ) ) ); + disconnect( this, TQT_SIGNAL( receivedStdout( KProcess *, char *, int ) ), + this, TQT_SLOT( slotReceivedStdout( KProcess *, char *, int ) ) ); if ( comm & Stdout ) { - connect( this, SIGNAL( receivedStdout( KProcess *, char *, int ) ), - this, SLOT( slotReceivedStdout( KProcess *, char *, int ) ) ); + connect( this, TQT_SIGNAL( receivedStdout( KProcess *, char *, int ) ), + this, TQT_SLOT( slotReceivedStdout( KProcess *, char *, int ) ) ); } // prevent duplicate connection - disconnect( this, SIGNAL( receivedStderr( KProcess *, char *, int ) ), - this, SLOT( slotReceivedStderr( KProcess *, char *, int ) ) ); + disconnect( this, TQT_SIGNAL( receivedStderr( KProcess *, char *, int ) ), + this, TQT_SLOT( slotReceivedStderr( KProcess *, char *, int ) ) ); if ( comm & Stderr ) { - connect( this, SIGNAL( receivedStderr( KProcess *, char *, int ) ), - this, SLOT( slotReceivedStderr( KProcess *, char *, int ) ) ); + connect( this, TQT_SIGNAL( receivedStderr( KProcess *, char *, int ) ), + this, TQT_SLOT( slotReceivedStderr( KProcess *, char *, int ) ) ); } return KProcess::start( runmode, comm ); } void CollectingProcess::slotReceivedStdout( KProcess *, char *buf, int len ) { - QByteArray b; + TQByteArray b; b.duplicate( buf, len ); d->stdoutBuffer.append( b ); d->stdoutSize += len; @@ -85,21 +85,21 @@ void CollectingProcess::slotReceivedStdout( KProcess *, char *buf, int len ) void CollectingProcess::slotReceivedStderr( KProcess *, char *buf, int len ) { - QByteArray b; + TQByteArray b; b.duplicate( buf, len ); d->stderrBuffer.append( b ); d->stderrSize += len; } -QByteArray CollectingProcess::collectedStdout() +TQByteArray CollectingProcess::collectedStdout() { if ( d->stdoutSize == 0 ) { - return QByteArray(); + return TQByteArray(); } uint offset = 0; - QByteArray b( d->stdoutSize ); - for ( QValueList::const_iterator it = d->stdoutBuffer.begin(); + TQByteArray b( d->stdoutSize ); + for ( TQValueList::const_iterator it = d->stdoutBuffer.begin(); it != d->stdoutBuffer.end(); ++it ) { memcpy( b.data() + offset, (*it).data(), (*it).size() ); @@ -111,15 +111,15 @@ QByteArray CollectingProcess::collectedStdout() return b; } -QByteArray CollectingProcess::collectedStderr() +TQByteArray CollectingProcess::collectedStderr() { if ( d->stderrSize == 0 ) { - return QByteArray(); + return TQByteArray(); } uint offset = 0; - QByteArray b( d->stderrSize ); - for ( QValueList::const_iterator it = d->stderrBuffer.begin(); + TQByteArray b( d->stderrSize ); + for ( TQValueList::const_iterator it = d->stderrBuffer.begin(); it != d->stderrBuffer.end(); ++it ) { memcpy( b.data() + offset, (*it).data(), (*it).size() ); diff --git a/kioslave/audiocd/plugins/lame/collectingprocess.h b/kioslave/audiocd/plugins/lame/collectingprocess.h index 7549fee3..e9f0def4 100644 --- a/kioslave/audiocd/plugins/lame/collectingprocess.h +++ b/kioslave/audiocd/plugins/lame/collectingprocess.h @@ -46,7 +46,7 @@ class CollectingProcess : public KProcess { Q_OBJECT public: - CollectingProcess( QObject * parent = 0, const char * name = 0 ); + CollectingProcess( TQObject * parent = 0, const char * name = 0 ); ~CollectingProcess(); /** Starts the process in NotifyOnExit mode and writes in to stdin of @@ -55,9 +55,9 @@ public: bool start( RunMode runmode, Communication comm ); /** Returns the contents of the stdout buffer and clears it afterwards. */ - QByteArray collectedStdout(); + TQByteArray collectedStdout(); /** Returns the contents of the stderr buffer and clears it afterwards. */ - QByteArray collectedStderr(); + TQByteArray collectedStderr(); private slots: void slotReceivedStdout( KProcess *, char *, int ); diff --git a/kioslave/audiocd/plugins/lame/encoderlame.cpp b/kioslave/audiocd/plugins/lame/encoderlame.cpp index 16cf2bee..5e59c6a4 100644 --- a/kioslave/audiocd/plugins/lame/encoderlame.cpp +++ b/kioslave/audiocd/plugins/lame/encoderlame.cpp @@ -23,21 +23,21 @@ #include "audiocd_lame_encoder.h" #include -#include +#include #include #include #include #include #include -#include +#include #include #include #include "collectingprocess.h" extern "C" { - KDE_EXPORT void create_audiocd_encoders(KIO::SlaveBase *slave, QPtrList &encoders) { + KDE_EXPORT void create_audiocd_encoders(KIO::SlaveBase *slave, TQPtrList &encoders) { encoders.append(new EncoderLame(slave)); } } @@ -50,14 +50,14 @@ public: int bitrate; bool waitingForWrite; bool processHasExited; - QString lastErrorMessage; - QStringList genreList; + TQString lastErrorMessage; + TQStringList genreList; uint lastSize; KProcess *currentEncodeProcess; KTempFile *tempFile; }; -EncoderLame::EncoderLame(KIO::SlaveBase *slave) : QObject(), AudioCDEncoder(slave) { +EncoderLame::EncoderLame(KIO::SlaveBase *slave) : TQObject(), AudioCDEncoder(slave) { d = new Private(); d->waitingForWrite = false; d->processHasExited = false; @@ -69,7 +69,7 @@ EncoderLame::~EncoderLame(){ delete d; } -QWidget* EncoderLame::getConfigureWidget(KConfigSkeleton** manager) const { +TQWidget* EncoderLame::getConfigureWidget(KConfigSkeleton** manager) const { (*manager) = Settings::self(); KGlobal::locale()->insertCatalogue("audiocd_encoder_lame"); EncoderLameConfig *config = new EncoderLameConfig(); @@ -91,15 +91,15 @@ bool EncoderLame::init(){ if(proc.exitStatus() != 0) return false; - const QByteArray data = proc.collectedStdout(); - QString str; + const TQByteArray data = proc.collectedStdout(); + TQString str; if ( !data.isEmpty() ) - str = QString::fromLocal8Bit( data, data.size() ); + str = TQString::fromLocal8Bit( data, data.size() ); - d->genreList = QStringList::split( '\n', str ); + d->genreList = TQStringList::split( '\n', str ); // Remove the numbers in front of every genre - for( QStringList::Iterator it = d->genreList.begin(); it != d->genreList.end(); ++it ) { - QString& genre = *it; + for( TQStringList::Iterator it = d->genreList.begin(); it != d->genreList.end(); ++it ) { + TQString& genre = *it; uint i = 0; while ( i < genre.length() && ( genre[i].isSpace() || genre[i].isDigit() ) ) ++i; @@ -126,31 +126,31 @@ void EncoderLame::loadSettings(){ if (method == 0) { // Constant Bitrate Encoding args.append("-b"); - args.append(QString("%1").arg(bitrates[settings->cbr_bitrate()])); + args.append(TQString("%1").arg(bitrates[settings->cbr_bitrate()])); d->bitrate = bitrates[settings->cbr_bitrate()]; args.append("-q"); - args.append(QString("%1").arg(quality)); + args.append(TQString("%1").arg(quality)); } else { // Variable Bitrate Encoding if (settings->vbr_average_br()) { args.append("--abr"); - args.append(QString("%1").arg(bitrates[settings->vbr_mean_brate()])); + args.append(TQString("%1").arg(bitrates[settings->vbr_mean_brate()])); d->bitrate = bitrates[settings->vbr_mean_brate()]; if (settings->vbr_min_br()){ args.append("-b"); - args.append(QString("%1").arg(bitrates[settings->vbr_min_brate()])); + args.append(TQString("%1").arg(bitrates[settings->vbr_min_brate()])); } if (settings->vbr_min_hard()) args.append("-F"); if (settings->vbr_max_br()){ args.append("-B"); - args.append(QString("%1").arg(bitrates[settings->vbr_max_brate()])); + args.append(TQString("%1").arg(bitrates[settings->vbr_max_brate()])); } } else { d->bitrate = 128; args.append("-V"); - args.append(QString("%1").arg(quality)); + args.append(TQString("%1").arg(quality)); } if ( !settings->vbr_xing_tag() ) args.append("-t"); @@ -186,21 +186,21 @@ void EncoderLame::loadSettings(){ if ( settings->enable_lowpass() ) { args.append("--lowpass"); - args.append(QString("%1").arg(settings->lowfilterfreq())); + args.append(TQString("%1").arg(settings->lowfilterfreq())); if (settings->set_lpf_width()){ args.append("--lowpass-width"); - args.append(QString("%1").arg(settings->lowfilterwidth())); + args.append(TQString("%1").arg(settings->lowfilterwidth())); } } if ( settings->enable_highpass()) { args.append("--hipass"); - args.append(QString("%1").arg(settings->highfilterfreq())); + args.append(TQString("%1").arg(settings->highfilterfreq())); if (settings->set_hpf_width()){ args.append("--hipass-width"); - args.append(QString("%1").arg(settings->highfilterwidth())); + args.append(TQString("%1").arg(settings->highfilterwidth())); } } } @@ -212,10 +212,10 @@ unsigned long EncoderLame::size(long time_secs) const { long EncoderLame::readInit(long /*size*/){ // Create KProcess d->currentEncodeProcess = new KProcess(0); - QString prefix = locateLocal("tmp", ""); + TQString prefix = locateLocal("tmp", ""); d->tempFile = new KTempFile(prefix, ".mp3"); d->tempFile->setAutoDelete(true); - d->lastErrorMessage = QString::null; + d->lastErrorMessage = TQString::null; d->processHasExited = false; // -x bitswap @@ -237,15 +237,15 @@ long EncoderLame::readInit(long /*size*/){ //kdDebug(7117) << d->currentEncodeProcess->args() << endl; - connect(d->currentEncodeProcess, SIGNAL(receivedStdout(KProcess *, char *, int)), - this, SLOT(receivedStdout(KProcess *, char *, int))); - connect(d->currentEncodeProcess, SIGNAL(receivedStderr(KProcess *, char *, int)), - this, SLOT(receivedStderr(KProcess *, char *, int))); - connect(d->currentEncodeProcess, SIGNAL(wroteStdin(KProcess *)), - this, SLOT(wroteStdin(KProcess *))); + connect(d->currentEncodeProcess, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), + this, TQT_SLOT(receivedStdout(KProcess *, char *, int))); + connect(d->currentEncodeProcess, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), + this, TQT_SLOT(receivedStderr(KProcess *, char *, int))); + connect(d->currentEncodeProcess, TQT_SIGNAL(wroteStdin(KProcess *)), + this, TQT_SLOT(wroteStdin(KProcess *))); - connect(d->currentEncodeProcess, SIGNAL(processExited(KProcess *)), - this, SLOT(processExited(KProcess *))); + connect(d->currentEncodeProcess, TQT_SIGNAL(processExited(KProcess *)), + this, TQT_SLOT(processExited(KProcess *))); // Launch! d->currentEncodeProcess->start(KProcess::NotifyOnExit, KShellProcess::All); @@ -261,7 +261,7 @@ void EncoderLame::receivedStderr( KProcess * /*process*/, char *buffer, int /*bu kdDebug(7117) << "Lame stderr: " << buffer << endl; if ( !d->lastErrorMessage.isEmpty() ) d->lastErrorMessage += '\t'; - d->lastErrorMessage += QString::fromLocal8Bit( buffer ); + d->lastErrorMessage += TQString::fromLocal8Bit( buffer ); } void EncoderLame::receivedStdout( KProcess * /*process*/, char *buffer, int /*length*/ ){ @@ -290,7 +290,7 @@ long EncoderLame::read(int16_t *buf, int frames){ } // Determine the file size increase - QFileInfo file(d->tempFile->name()); + TQFileInfo file(d->tempFile->name()); uint change = file.size() - d->lastSize; d->lastSize = file.size(); return change; @@ -308,9 +308,9 @@ long EncoderLame::readCleanup(){ } // Now copy the file out of the temp into kio - QFile file( d->tempFile->name() ); + TQFile file( d->tempFile->name() ); if ( file.open( IO_ReadOnly ) ) { - QByteArray output; + TQByteArray output; char data[1024]; while ( !file.atEnd() ) { uint read = file.readBlock(data, 1024); @@ -329,7 +329,7 @@ long EncoderLame::readCleanup(){ return 0; } -void EncoderLame::fillSongInfo( KCDDB::CDInfo info, int track, const QString &comment ){ +void EncoderLame::fillSongInfo( KCDDB::CDInfo info, int track, const TQString &comment ){ trackInfo.clear(); trackInfo.append("--tt"); trackInfo.append(info.trackInfoList[track].get("title").toString()); @@ -341,15 +341,15 @@ void EncoderLame::fillSongInfo( KCDDB::CDInfo info, int track, const QString &co trackInfo.append(info.get("title").toString()); trackInfo.append("--ty"); - trackInfo.append(QString("%1").arg(info.get("year").toString())); + trackInfo.append(TQString("%1").arg(info.get("year").toString())); trackInfo.append("--tc"); trackInfo.append(comment); trackInfo.append("--tn"); - trackInfo.append(QString("%1").arg(track+1)); + trackInfo.append(TQString("%1").arg(track+1)); - const QString genre = info.get( "genre" ).toString(); + const TQString genre = info.get( "genre" ).toString(); if ( d->genreList.find( genre ) != d->genreList.end() ) { trackInfo.append("--tg"); @@ -358,7 +358,7 @@ void EncoderLame::fillSongInfo( KCDDB::CDInfo info, int track, const QString &co } -QString EncoderLame::lastErrorMessage() const +TQString EncoderLame::lastErrorMessage() const { return d->lastErrorMessage; } diff --git a/kioslave/audiocd/plugins/lame/encoderlame.h b/kioslave/audiocd/plugins/lame/encoderlame.h index b1b2b702..ba02cf4f 100644 --- a/kioslave/audiocd/plugins/lame/encoderlame.h +++ b/kioslave/audiocd/plugins/lame/encoderlame.h @@ -27,7 +27,7 @@ class KProcess; * MP3 encoder using the LAME encoder. * Go to http://lame.sourceforge.net/ for lots of information. */ -class EncoderLame : public QObject, public AudioCDEncoder { +class EncoderLame : public TQObject, public AudioCDEncoder { Q_OBJECT @@ -35,19 +35,19 @@ public: EncoderLame(KIO::SlaveBase *slave); ~EncoderLame(); - virtual QString type() const { return "MP3"; }; + virtual TQString type() const { return "MP3"; }; virtual bool init(); virtual void loadSettings(); virtual unsigned long size(long time_secs) const; virtual const char * fileType() const { return "mp3"; }; virtual const char * mimeType() const { return "audio/x-mp3"; }; - virtual void fillSongInfo( KCDDB::CDInfo info, int track, const QString &comment ); + virtual void fillSongInfo( KCDDB::CDInfo info, int track, const TQString &comment ); virtual long readInit(long size); virtual long read(int16_t * buf, int frames); virtual long readCleanup(); - virtual QString lastErrorMessage() const; + virtual TQString lastErrorMessage() const; - virtual QWidget* getConfigureWidget(KConfigSkeleton** manager) const; + virtual TQWidget* getConfigureWidget(KConfigSkeleton** manager) const; protected slots: void wroteStdin(KProcess *proc); @@ -59,8 +59,8 @@ private: class Private; Private * d; - QStringList args; - QStringList trackInfo; + TQStringList args; + TQStringList trackInfo; }; #endif // ENCODER_LAME_H diff --git a/kioslave/audiocd/plugins/vorbis/encodervorbis.cpp b/kioslave/audiocd/plugins/vorbis/encodervorbis.cpp index 5b61f6ea..739e1c8f 100644 --- a/kioslave/audiocd/plugins/vorbis/encodervorbis.cpp +++ b/kioslave/audiocd/plugins/vorbis/encodervorbis.cpp @@ -33,14 +33,14 @@ #include #include #include -#include +#include #include #include extern "C" { - KDE_EXPORT void create_audiocd_encoders(KIO::SlaveBase *slave, QPtrList &encoders) + KDE_EXPORT void create_audiocd_encoders(KIO::SlaveBase *slave, TQPtrList &encoders) { encoders.append(new EncoderVorbis(slave)); } @@ -79,7 +79,7 @@ EncoderVorbis::~EncoderVorbis(){ delete d; } -QWidget* EncoderVorbis::getConfigureWidget(KConfigSkeleton** manager) const { +TQWidget* EncoderVorbis::getConfigureWidget(KConfigSkeleton** manager) const { (*manager) = Settings::self(); KGlobal::locale()->insertCatalogue("audiocd_encoder_vorbis"); EncoderVorbisConfig *config = new EncoderVorbisConfig(); @@ -170,7 +170,7 @@ long EncoderVorbis::flush_vorbis(void) { while(int result=ogg_stream_pageout(&d->os,&d->og)) { if (!result) break; - QByteArray output; + TQByteArray output; char * oggheader = reinterpret_cast(d->og.header); char * oggbody = reinterpret_cast(d->og.body); @@ -250,7 +250,7 @@ long EncoderVorbis::readInit(long /*size*/){ if (!result) break; - QByteArray output; + TQByteArray output; char * oggheader = reinterpret_cast(d->og.header); char * oggbody = reinterpret_cast(d->og.body); @@ -296,27 +296,27 @@ long EncoderVorbis::readCleanup(){ return processed; } -void EncoderVorbis::fillSongInfo( KCDDB::CDInfo info, int track, const QString &comment ) +void EncoderVorbis::fillSongInfo( KCDDB::CDInfo info, int track, const TQString &comment ) { if( !d->write_vorbis_comments ) return; - typedef QPair CommentField; - QValueList commentFields; + typedef QPair CommentField; + TQValueList commentFields; commentFields.append(CommentField("title", info.trackInfoList[track].get("title"))); commentFields.append(CommentField("artist", info.get("artist"))); commentFields.append(CommentField("album", info.get("title"))); commentFields.append(CommentField("genre", info.get("genre"))); - commentFields.append(CommentField("tracknumber", QString::number(track+1))); + commentFields.append(CommentField("tracknumber", TQString::number(track+1))); commentFields.append(CommentField("comment", comment)); if (info.get("year").toInt() > 0) { - QDateTime dt(QDate(info.get("year").toInt(), 1, 1)); + TQDateTime dt(TQDate(info.get("year").toInt(), 1, 1)); commentFields.append(CommentField("date", dt.toString(Qt::ISODate).utf8().data())); } - for(QValueListIterator it = commentFields.begin(); it != commentFields.end(); ++it) { + for(TQValueListIterator it = commentFields.begin(); it != commentFields.end(); ++it) { // if the value is not empty if(!(*it).second.toString().isEmpty()) { diff --git a/kioslave/audiocd/plugins/vorbis/encodervorbis.h b/kioslave/audiocd/plugins/vorbis/encodervorbis.h index a6ad22ff..fbf649c7 100644 --- a/kioslave/audiocd/plugins/vorbis/encodervorbis.h +++ b/kioslave/audiocd/plugins/vorbis/encodervorbis.h @@ -42,17 +42,17 @@ public: EncoderVorbis(KIO::SlaveBase *slave); ~EncoderVorbis(); - virtual QString type() const { return "Ogg Vorbis"; }; + virtual TQString type() const { return "Ogg Vorbis"; }; virtual bool init(); virtual void loadSettings(); virtual unsigned long size(long time_secs) const; virtual const char * fileType() const { return "ogg"; }; virtual const char * mimeType() const; - virtual void fillSongInfo( KCDDB::CDInfo info, int track, const QString &comment ); + virtual void fillSongInfo( KCDDB::CDInfo info, int track, const TQString &comment ); virtual long readInit(long size); virtual long read(int16_t * buf, int frames); virtual long readCleanup(); - virtual QWidget* getConfigureWidget(KConfigSkeleton** manager) const; + virtual TQWidget* getConfigureWidget(KConfigSkeleton** manager) const; private: long flush_vorbis(); diff --git a/kioslave/audiocd/plugins/wav/encodercda.cpp b/kioslave/audiocd/plugins/wav/encodercda.cpp index 4fb534bd..ef8522d9 100644 --- a/kioslave/audiocd/plugins/wav/encodercda.cpp +++ b/kioslave/audiocd/plugins/wav/encodercda.cpp @@ -51,7 +51,7 @@ inline int16_t swap16 (int16_t i) } long EncoderCda::read(int16_t * buf, int frames){ - QByteArray output; + TQByteArray output; int16_t i16 = 1; /* WAV is defined to be little endian, so we need to swap it on big endian platforms. */ diff --git a/kioslave/audiocd/plugins/wav/encodercda.h b/kioslave/audiocd/plugins/wav/encodercda.h index 04a946ea..814432b3 100644 --- a/kioslave/audiocd/plugins/wav/encodercda.h +++ b/kioslave/audiocd/plugins/wav/encodercda.h @@ -43,10 +43,10 @@ public: virtual bool init(){ return true; }; virtual void loadSettings(){}; virtual unsigned long size(long time_secs) const; - virtual QString type() const { return "CDA"; }; + virtual TQString type() const { return "CDA"; }; virtual const char * mimeType() const; virtual const char * fileType() const { return "cda"; }; - virtual void fillSongInfo( KCDDB::CDInfo, int, const QString &){}; + virtual void fillSongInfo( KCDDB::CDInfo, int, const TQString &){}; virtual long readInit(long){ return 0; }; virtual long read(int16_t * buf, int frames); virtual long readCleanup(){ return 0; }; diff --git a/kioslave/audiocd/plugins/wav/encoderwav.cpp b/kioslave/audiocd/plugins/wav/encoderwav.cpp index bcf3ba64..8052ce41 100644 --- a/kioslave/audiocd/plugins/wav/encoderwav.cpp +++ b/kioslave/audiocd/plugins/wav/encoderwav.cpp @@ -26,7 +26,7 @@ extern "C" { - KDE_EXPORT void create_audiocd_encoders(KIO::SlaveBase *slave, QPtrList &encoders) + KDE_EXPORT void create_audiocd_encoders(KIO::SlaveBase *slave, TQPtrList &encoders) { encoders.append( new EncoderWav(slave)); encoders.append( new EncoderCda(slave)); @@ -76,7 +76,7 @@ long EncoderWav::readInit(long byteCount){ riffHeader[42] = (byteCount >> 16) & 0xff; riffHeader[43] = (byteCount >> 24) & 0xff; - QByteArray output; + TQByteArray output; output.setRawData(riffHeader, 44); ioslave->data(output); output.resetRawData(riffHeader, 44); diff --git a/kioslave/audiocd/plugins/wav/encoderwav.h b/kioslave/audiocd/plugins/wav/encoderwav.h index 3be07f9c..128faa87 100644 --- a/kioslave/audiocd/plugins/wav/encoderwav.h +++ b/kioslave/audiocd/plugins/wav/encoderwav.h @@ -41,10 +41,10 @@ public: ~EncoderWav(){}; virtual bool init(){ return true; }; virtual unsigned long size(long time_secs) const; - virtual QString type() const { return "Wav"; }; + virtual TQString type() const { return "Wav"; }; virtual const char * fileType() const { return "wav"; }; virtual const char * mimeType() const; - virtual void fillSongInfo( KCDDB::CDInfo, int, const QString &){}; + virtual void fillSongInfo( KCDDB::CDInfo, int, const TQString &){}; virtual long readInit(long size); private: diff --git a/kmid/channel.cpp b/kmid/channel.cpp index 7e48dc03..7d077dd7 100644 --- a/kmid/channel.cpp +++ b/kmid/channel.cpp @@ -25,8 +25,8 @@ #include #include -#include -#include +#include +#include #include #include @@ -39,39 +39,39 @@ #include "instrname.h" #include -KMidChannel::KMidChannel(int chn,QWidget *parent) : QWidget (parent) +KMidChannel::KMidChannel(int chn,TQWidget *parent) : TQWidget (parent) { channel=chn; replay=TRUE; int i; for (i=0;i<128;i++) pressed[i]=0; - keyboard = QPixmap(locate("appdata","icons/keyboard.xpm")); - penB = new QPen (black); - penW = new QPen (white); - penT = new QPen (colorGroup().background()); + keyboard = TQPixmap(locate("appdata","icons/keyboard.xpm")); + penB = new TQPen (black); + penW = new TQPen (white); + penT = new TQPen (colorGroup().background()); KConfig *kcfg=KGlobal::instance()->config(); kcfg->setGroup("KMid"); - QFont *qtextfontdefault=new QFont("lucida",18,QFont::Bold,TRUE); - qcvfont=new QFont(kcfg->readFontEntry("ChannelViewFont",qtextfontdefault)); + TQFont *qtextfontdefault=new TQFont("lucida",18,TQFont::Bold,TRUE); + qcvfont=new TQFont(kcfg->readFontEntry("ChannelViewFont",qtextfontdefault)); delete qtextfontdefault; - instrumentCombo = new QComboBox(FALSE,this,"instr"); + instrumentCombo = new TQComboBox(FALSE,this,"instr"); instrumentCombo->setGeometry(160,2,200,20); for (i=0;i<128;i++) instrumentCombo->insertItem(i18n(instrumentName[i]),i); - connect(instrumentCombo,SIGNAL(activated(int)),this,SLOT(pgmChanged(int))); + connect(instrumentCombo,TQT_SIGNAL(activated(int)),this,TQT_SLOT(pgmChanged(int))); forcepgm=new KMidButton(this,"forcepgm"); forcepgm->setGeometry(135,4,16,16); forcepgm->setToggleButton(TRUE); - button1 = QPixmap(locate("appdata","icons/button1.xpm")); - button2 = QPixmap(locate("appdata","icons/button2.xpm")); + button1 = TQPixmap(locate("appdata","icons/button1.xpm")); + button2 = TQPixmap(locate("appdata","icons/button2.xpm")); forcepgm->setPixmaps(button1,button2); forcepgm->show(); - connect(forcepgm,SIGNAL(toggled(bool)),this,SLOT(changeForcedState(bool))); + connect(forcepgm,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(changeForcedState(bool))); } @@ -82,12 +82,12 @@ KMidChannel::~KMidChannel() delete penT; } -void KMidChannel::paintEvent( QPaintEvent * ) +void KMidChannel::paintEvent( TQPaintEvent * ) { - QPainter *qpaint=new QPainter(this); + TQPainter *qpaint=new TQPainter(this); - QString tmp = i18n("Channel %1").arg(channel); + TQString tmp = i18n("Channel %1").arg(channel); qpaint->setFont(*qcvfont); qpaint->setPen(*penB); qpaint->drawText(2,20,tmp); @@ -100,7 +100,7 @@ void KMidChannel::paintEvent( QPaintEvent * ) delete qpaint; } -void KMidChannel::drawKeyboard(QPainter *qpaint) +void KMidChannel::drawKeyboard(TQPainter *qpaint) { int x=1; for (int i=0;(i<12) && (x -#include +#include +#include #define CHANNELHEIGHT 71 #define KEYBOARDY CHANNELHEIGHT-46 @@ -47,40 +47,40 @@ private: // changing the force state protected: - QPixmap keyboard; - QPixmap button1; - QPixmap button2; + TQPixmap keyboard; + TQPixmap button1; + TQPixmap button2; - QComboBox *instrumentCombo; + TQComboBox *instrumentCombo; KMidButton *forcepgm; - QFont *qcvfont; + TQFont *qcvfont; - QPen *penB; // Black - QPen *penW; // White - QPen *penT; // "Transparent" for Background + TQPen *penB; // Black + TQPen *penW; // White + TQPen *penT; // "Transparent" for Background - void paintEvent( QPaintEvent * ); + void paintEvent( TQPaintEvent * ); public: - KMidChannel(int i,QWidget *Parent); + KMidChannel(int i,TQWidget *Parent); virtual ~KMidChannel(); - void drawKeyboard(QPainter *qpaint); - void drawPressedKeys(QPainter *qpaint); - void drawKey(QPainter *qpaint,int key); - - virtual void drawDo (QPainter *qpaint,int x,int p) = 0; - virtual void drawDo__ (QPainter *qpaint,int x,int p) = 0; - virtual void drawRe (QPainter *qpaint,int x,int p) = 0; - virtual void drawRe__ (QPainter *qpaint,int x,int p) = 0; - virtual void drawMi (QPainter *qpaint,int x,int p) = 0; - virtual void drawFa (QPainter *qpaint,int x,int p) = 0; - virtual void drawFa__ (QPainter *qpaint,int x,int p) = 0; - virtual void drawSol (QPainter *qpaint,int x,int p) = 0; - virtual void drawSol__(QPainter *qpaint,int x,int p) = 0; - virtual void drawLa (QPainter *qpaint,int x,int p) = 0; - virtual void drawLa__ (QPainter *qpaint,int x,int p) = 0; - virtual void drawSi (QPainter *qpaint,int x,int p) = 0; + void drawKeyboard(TQPainter *qpaint); + void drawPressedKeys(TQPainter *qpaint); + void drawKey(TQPainter *qpaint,int key); + + virtual void drawDo (TQPainter *qpaint,int x,int p) = 0; + virtual void drawDo__ (TQPainter *qpaint,int x,int p) = 0; + virtual void drawRe (TQPainter *qpaint,int x,int p) = 0; + virtual void drawRe__ (TQPainter *qpaint,int x,int p) = 0; + virtual void drawMi (TQPainter *qpaint,int x,int p) = 0; + virtual void drawFa (TQPainter *qpaint,int x,int p) = 0; + virtual void drawFa__ (TQPainter *qpaint,int x,int p) = 0; + virtual void drawSol (TQPainter *qpaint,int x,int p) = 0; + virtual void drawSol__(TQPainter *qpaint,int x,int p) = 0; + virtual void drawLa (TQPainter *qpaint,int x,int p) = 0; + virtual void drawLa__ (TQPainter *qpaint,int x,int p) = 0; + virtual void drawSi (TQPainter *qpaint,int x,int p) = 0; void noteOn(int key); void noteOff(int key); diff --git a/kmid/channel3d.cpp b/kmid/channel3d.cpp index afa0e638..d3bef7fd 100644 --- a/kmid/channel3d.cpp +++ b/kmid/channel3d.cpp @@ -23,13 +23,13 @@ ***************************************************************************/ #include "channel3d.h" -#include +#include -KMidChannel3D::KMidChannel3D (int chn,QWidget *parent) : KMidChannel(chn,parent) +KMidChannel3D::KMidChannel3D (int chn,TQWidget *parent) : KMidChannel(chn,parent) { } -void KMidChannel3D::drawDo(QPainter *qpaint,int x,int p) +void KMidChannel3D::drawDo(TQPainter *qpaint,int x,int p) { qpaint->setPen(p?(*penW):(*penB)); qpaint->drawLine(x,KEYBOARDY+43,x+6,KEYBOARDY+43); @@ -39,7 +39,7 @@ void KMidChannel3D::drawDo(QPainter *qpaint,int x,int p) qpaint->setPen(p?(*penB):(*penW)); qpaint->drawLine(x+7,KEYBOARDY+28,x+7,KEYBOARDY+42); } -void KMidChannel3D::drawDo__(QPainter *qpaint,int x,int p) +void KMidChannel3D::drawDo__(TQPainter *qpaint,int x,int p) { qpaint->setPen(p?(*penB):(*penW)); qpaint->drawLine(x+6,KEYBOARDY+2,x+6,KEYBOARDY+25); @@ -50,7 +50,7 @@ void KMidChannel3D::drawDo__(QPainter *qpaint,int x,int p) qpaint->drawPoint(x+10,KEYBOARDY+27); } -void KMidChannel3D::drawRe(QPainter *qpaint,int x,int p) +void KMidChannel3D::drawRe(TQPainter *qpaint,int x,int p) { qpaint->setPen(p?(*penW):(*penB)); qpaint->drawLine(x+9,KEYBOARDY+43,x+15,KEYBOARDY+43); @@ -60,7 +60,7 @@ void KMidChannel3D::drawRe(QPainter *qpaint,int x,int p) qpaint->setPen(p?(*penB):(*penW)); qpaint->drawLine(x+16,KEYBOARDY+28,x+16,KEYBOARDY+42); } -void KMidChannel3D::drawRe__(QPainter *qpaint,int x,int p) +void KMidChannel3D::drawRe__(TQPainter *qpaint,int x,int p) { qpaint->setPen(p?(*penB):(*penW)); qpaint->drawLine(x+15,KEYBOARDY+2,x+15,KEYBOARDY+25); @@ -70,7 +70,7 @@ void KMidChannel3D::drawRe__(QPainter *qpaint,int x,int p) qpaint->drawLine(x+20,KEYBOARDY+1,x+20,KEYBOARDY+27); qpaint->drawPoint(x+19,KEYBOARDY+27); } -void KMidChannel3D::drawMi(QPainter *qpaint,int x,int p) +void KMidChannel3D::drawMi(TQPainter *qpaint,int x,int p) { qpaint->setPen(p?(*penW):(*penB)); qpaint->drawLine(x+18,KEYBOARDY+43,x+24,KEYBOARDY+43); @@ -80,7 +80,7 @@ void KMidChannel3D::drawMi(QPainter *qpaint,int x,int p) qpaint->setPen(p?(*penB):(*penW)); qpaint->drawLine(x+25,KEYBOARDY+1,x+25,KEYBOARDY+42); } -void KMidChannel3D::drawFa(QPainter *qpaint,int x,int p) +void KMidChannel3D::drawFa(TQPainter *qpaint,int x,int p) { qpaint->setPen(p?(*penW):(*penB)); qpaint->drawLine(x+27,KEYBOARDY+43,x+33,KEYBOARDY+43); @@ -90,7 +90,7 @@ void KMidChannel3D::drawFa(QPainter *qpaint,int x,int p) qpaint->setPen(p?(*penB):(*penW)); qpaint->drawLine(x+34,KEYBOARDY+28,x+34,KEYBOARDY+42); } -void KMidChannel3D::drawFa__(QPainter *qpaint,int x,int p) +void KMidChannel3D::drawFa__(TQPainter *qpaint,int x,int p) { qpaint->setPen(p?(*penB):(*penW)); qpaint->drawLine(x+33,KEYBOARDY+2,x+33,KEYBOARDY+25); @@ -99,7 +99,7 @@ void KMidChannel3D::drawFa__(QPainter *qpaint,int x,int p) qpaint->drawLine(x+38,KEYBOARDY+1,x+38,KEYBOARDY+27); qpaint->drawPoint(x+37,KEYBOARDY+27); } -void KMidChannel3D::drawSol(QPainter *qpaint,int x,int p) +void KMidChannel3D::drawSol(TQPainter *qpaint,int x,int p) { qpaint->setPen(p?(*penW):(*penB)); qpaint->drawLine(x+36,KEYBOARDY+43,x+42,KEYBOARDY+43); @@ -109,7 +109,7 @@ void KMidChannel3D::drawSol(QPainter *qpaint,int x,int p) qpaint->setPen(p?(*penB):(*penW)); qpaint->drawLine(x+43,KEYBOARDY+28,x+43,KEYBOARDY+42); } -void KMidChannel3D::drawSol__(QPainter *qpaint,int x,int p) +void KMidChannel3D::drawSol__(TQPainter *qpaint,int x,int p) { qpaint->setPen(p?(*penB):(*penW)); qpaint->drawLine(x+42,KEYBOARDY+2,x+42,KEYBOARDY+25); @@ -118,7 +118,7 @@ void KMidChannel3D::drawSol__(QPainter *qpaint,int x,int p) qpaint->drawLine(x+47,KEYBOARDY+1,x+47,KEYBOARDY+27); qpaint->drawPoint(x+46,KEYBOARDY+27); } -void KMidChannel3D::drawLa(QPainter *qpaint,int x,int p) +void KMidChannel3D::drawLa(TQPainter *qpaint,int x,int p) { qpaint->setPen(p?(*penW):(*penB)); qpaint->drawLine(x+45,KEYBOARDY+43,x+51,KEYBOARDY+43); @@ -128,7 +128,7 @@ void KMidChannel3D::drawLa(QPainter *qpaint,int x,int p) qpaint->setPen(p?(*penB):(*penW)); qpaint->drawLine(x+52,KEYBOARDY+28,x+52,KEYBOARDY+42); } -void KMidChannel3D::drawLa__(QPainter *qpaint,int x,int p) +void KMidChannel3D::drawLa__(TQPainter *qpaint,int x,int p) { qpaint->setPen(p?(*penB):(*penW)); qpaint->drawLine(x+51,KEYBOARDY+2,x+51,KEYBOARDY+25); @@ -137,7 +137,7 @@ void KMidChannel3D::drawLa__(QPainter *qpaint,int x,int p) qpaint->drawLine(x+56,KEYBOARDY+1,x+56,KEYBOARDY+27); qpaint->drawPoint(x+55,KEYBOARDY+27); } -void KMidChannel3D::drawSi(QPainter *qpaint,int x,int p) +void KMidChannel3D::drawSi(TQPainter *qpaint,int x,int p) { qpaint->setPen(p?(*penW):(*penB)); qpaint->drawLine(x+54,KEYBOARDY+43,x+60,KEYBOARDY+43); diff --git a/kmid/channel3d.h b/kmid/channel3d.h index 2ef069ac..a8c81da0 100644 --- a/kmid/channel3d.h +++ b/kmid/channel3d.h @@ -30,21 +30,21 @@ class KMidChannel3D : public KMidChannel { public: - KMidChannel3D(int chn,QWidget *parent); - - - virtual void drawDo (QPainter *qpaint,int x,int p); - virtual void drawDo__ (QPainter *qpaint,int x,int p); - virtual void drawRe (QPainter *qpaint,int x,int p); - virtual void drawRe__ (QPainter *qpaint,int x,int p); - virtual void drawMi (QPainter *qpaint,int x,int p); - virtual void drawFa (QPainter *qpaint,int x,int p); - virtual void drawFa__ (QPainter *qpaint,int x,int p); - virtual void drawSol (QPainter *qpaint,int x,int p); - virtual void drawSol__(QPainter *qpaint,int x,int p); - virtual void drawLa (QPainter *qpaint,int x,int p); - virtual void drawLa__ (QPainter *qpaint,int x,int p); - virtual void drawSi (QPainter *qpaint,int x,int p); + KMidChannel3D(int chn,TQWidget *parent); + + + virtual void drawDo (TQPainter *qpaint,int x,int p); + virtual void drawDo__ (TQPainter *qpaint,int x,int p); + virtual void drawRe (TQPainter *qpaint,int x,int p); + virtual void drawRe__ (TQPainter *qpaint,int x,int p); + virtual void drawMi (TQPainter *qpaint,int x,int p); + virtual void drawFa (TQPainter *qpaint,int x,int p); + virtual void drawFa__ (TQPainter *qpaint,int x,int p); + virtual void drawSol (TQPainter *qpaint,int x,int p); + virtual void drawSol__(TQPainter *qpaint,int x,int p); + virtual void drawLa (TQPainter *qpaint,int x,int p); + virtual void drawLa__ (TQPainter *qpaint,int x,int p); + virtual void drawSi (TQPainter *qpaint,int x,int p); }; diff --git a/kmid/channel4d.cpp b/kmid/channel4d.cpp index c6ffb8b4..4f47c3ae 100644 --- a/kmid/channel4d.cpp +++ b/kmid/channel4d.cpp @@ -23,18 +23,18 @@ ***************************************************************************/ #include "channel4d.h" -#include +#include -KMidChannel4D::KMidChannel4D (int chn,QWidget *parent) : KMidChannel(chn,parent) +KMidChannel4D::KMidChannel4D (int chn,TQWidget *parent) : KMidChannel(chn,parent) { - brushR = new QBrush (red); - brushW = new QBrush (white); - brushB = new QBrush (black); - penR = new QPen (red); + brushR = new TQBrush (red); + brushW = new TQBrush (white); + brushB = new TQBrush (black); + penR = new TQPen (red); } -void KMidChannel4D::drawDo(QPainter *qpaint,int x,int p) +void KMidChannel4D::drawDo(TQPainter *qpaint,int x,int p) { qpaint->setPen(p?(*penR):(*penB)); @@ -51,7 +51,7 @@ void KMidChannel4D::drawDo(QPainter *qpaint,int x,int p) qpaint->setPen(p?(*penR):(*penW)); qpaint->drawPoint(x+5,KEYBOARDY+27); } -void KMidChannel4D::drawDo__(QPainter *qpaint,int x,int p) +void KMidChannel4D::drawDo__(TQPainter *qpaint,int x,int p) { qpaint->fillRect(x+6,KEYBOARDY+1,5,26,((p)?*brushR:*brushB)); @@ -68,7 +68,7 @@ void KMidChannel4D::drawDo__(QPainter *qpaint,int x,int p) } -void KMidChannel4D::drawRe(QPainter *qpaint,int x,int p) +void KMidChannel4D::drawRe(TQPainter *qpaint,int x,int p) { qpaint->setPen(p?(*penR):(*penB)); qpaint->drawLine(x+9,KEYBOARDY+43,x+15,KEYBOARDY+43); @@ -86,7 +86,7 @@ void KMidChannel4D::drawRe(QPainter *qpaint,int x,int p) } -void KMidChannel4D::drawRe__(QPainter *qpaint,int x,int p) +void KMidChannel4D::drawRe__(TQPainter *qpaint,int x,int p) { qpaint->fillRect(x+15,KEYBOARDY+1,5,26,((p)?*brushR:*brushB)); @@ -103,7 +103,7 @@ void KMidChannel4D::drawRe__(QPainter *qpaint,int x,int p) } -void KMidChannel4D::drawMi(QPainter *qpaint,int x,int p) +void KMidChannel4D::drawMi(TQPainter *qpaint,int x,int p) { qpaint->setPen(p?(*penR):(*penB)); qpaint->drawLine(x+18,KEYBOARDY+43,x+24,KEYBOARDY+43); @@ -119,7 +119,7 @@ void KMidChannel4D::drawMi(QPainter *qpaint,int x,int p) qpaint->drawPoint(x+20,KEYBOARDY+27); } -void KMidChannel4D::drawFa(QPainter *qpaint,int x,int p) +void KMidChannel4D::drawFa(TQPainter *qpaint,int x,int p) { qpaint->setPen(p?(*penR):(*penB)); qpaint->drawLine(x+27,KEYBOARDY+43,x+33,KEYBOARDY+43); @@ -135,7 +135,7 @@ void KMidChannel4D::drawFa(QPainter *qpaint,int x,int p) qpaint->drawPoint(x+32,KEYBOARDY+27); } -void KMidChannel4D::drawFa__(QPainter *qpaint,int x,int p) +void KMidChannel4D::drawFa__(TQPainter *qpaint,int x,int p) { qpaint->fillRect(x+33,KEYBOARDY+1,5,26,((p)?*brushR:*brushB)); if (!p) @@ -150,7 +150,7 @@ void KMidChannel4D::drawFa__(QPainter *qpaint,int x,int p) } -void KMidChannel4D::drawSol(QPainter *qpaint,int x,int p) +void KMidChannel4D::drawSol(TQPainter *qpaint,int x,int p) { qpaint->setPen(p?(*penR):(*penB)); qpaint->drawLine(x+36,KEYBOARDY+43,x+42,KEYBOARDY+43); @@ -168,7 +168,7 @@ void KMidChannel4D::drawSol(QPainter *qpaint,int x,int p) } -void KMidChannel4D::drawSol__(QPainter *qpaint,int x,int p) +void KMidChannel4D::drawSol__(TQPainter *qpaint,int x,int p) { qpaint->fillRect(x+42,KEYBOARDY+1,5,26,((p)?*brushR:*brushB)); @@ -184,7 +184,7 @@ void KMidChannel4D::drawSol__(QPainter *qpaint,int x,int p) } -void KMidChannel4D::drawLa(QPainter *qpaint,int x,int p) +void KMidChannel4D::drawLa(TQPainter *qpaint,int x,int p) { qpaint->setPen(p?(*penR):(*penB)); qpaint->drawLine(x+45,KEYBOARDY+43,x+51,KEYBOARDY+43); @@ -200,7 +200,7 @@ void KMidChannel4D::drawLa(QPainter *qpaint,int x,int p) qpaint->drawPoint(x+47,KEYBOARDY+27); qpaint->drawPoint(x+50,KEYBOARDY+27); } -void KMidChannel4D::drawLa__(QPainter *qpaint,int x,int p) +void KMidChannel4D::drawLa__(TQPainter *qpaint,int x,int p) { qpaint->fillRect(x+51,KEYBOARDY+1,5,26,((p)?*brushR:*brushB)); @@ -215,7 +215,7 @@ void KMidChannel4D::drawLa__(QPainter *qpaint,int x,int p) qpaint->drawPoint(x+55,KEYBOARDY+27); } -void KMidChannel4D::drawSi(QPainter *qpaint,int x,int p) +void KMidChannel4D::drawSi(TQPainter *qpaint,int x,int p) { qpaint->setPen(p?(*penR):(*penB)); qpaint->drawLine(x+54,KEYBOARDY+43,x+60,KEYBOARDY+43); diff --git a/kmid/channel4d.h b/kmid/channel4d.h index 501682e5..e6326f4a 100644 --- a/kmid/channel4d.h +++ b/kmid/channel4d.h @@ -30,27 +30,27 @@ class KMidChannel4D : public KMidChannel { private: - QBrush *brushR; - QBrush *brushW; - QBrush *brushB; - QPen *penR; + TQBrush *brushR; + TQBrush *brushW; + TQBrush *brushB; + TQPen *penR; public: - KMidChannel4D(int chn,QWidget *parent); - - - virtual void drawDo (QPainter *qpaint,int x,int p); - virtual void drawDo__ (QPainter *qpaint,int x,int p); - virtual void drawRe (QPainter *qpaint,int x,int p); - virtual void drawRe__ (QPainter *qpaint,int x,int p); - virtual void drawMi (QPainter *qpaint,int x,int p); - virtual void drawFa (QPainter *qpaint,int x,int p); - virtual void drawFa__ (QPainter *qpaint,int x,int p); - virtual void drawSol (QPainter *qpaint,int x,int p); - virtual void drawSol__(QPainter *qpaint,int x,int p); - virtual void drawLa (QPainter *qpaint,int x,int p); - virtual void drawLa__ (QPainter *qpaint,int x,int p); - virtual void drawSi (QPainter *qpaint,int x,int p); + KMidChannel4D(int chn,TQWidget *parent); + + + virtual void drawDo (TQPainter *qpaint,int x,int p); + virtual void drawDo__ (TQPainter *qpaint,int x,int p); + virtual void drawRe (TQPainter *qpaint,int x,int p); + virtual void drawRe__ (TQPainter *qpaint,int x,int p); + virtual void drawMi (TQPainter *qpaint,int x,int p); + virtual void drawFa (TQPainter *qpaint,int x,int p); + virtual void drawFa__ (TQPainter *qpaint,int x,int p); + virtual void drawSol (TQPainter *qpaint,int x,int p); + virtual void drawSol__(TQPainter *qpaint,int x,int p); + virtual void drawLa (TQPainter *qpaint,int x,int p); + virtual void drawLa__ (TQPainter *qpaint,int x,int p); + virtual void drawSi (TQPainter *qpaint,int x,int p); }; diff --git a/kmid/channelcfgdlg.cpp b/kmid/channelcfgdlg.cpp index 8ed5ee66..db320a28 100644 --- a/kmid/channelcfgdlg.cpp +++ b/kmid/channelcfgdlg.cpp @@ -1,6 +1,6 @@ -#include -#include -#include +#include +#include +#include #include #include @@ -9,25 +9,25 @@ #include "channelview.h" #include "channelcfgdlg.h" #include "version.h" -#include -#include +#include +#include -ChannelViewConfigDialog::ChannelViewConfigDialog(QWidget *parent,const char *name) : KDialogBase(parent,name,TRUE,i18n("Configure Channel View"),Ok|Cancel, Ok) +ChannelViewConfigDialog::ChannelViewConfigDialog(TQWidget *parent,const char *name) : KDialogBase(parent,name,TRUE,i18n("Configure Channel View"),Ok|Cancel, Ok) { - QWidget *page = new QWidget( this ); + TQWidget *page = new TQWidget( this ); setMainWidget(page); - QVBoxLayout *topLayout = new QVBoxLayout( page, 0, spacingHint() ); - qbg = new QVButtonGroup(i18n("Choose Look Mode"),page,"qbg"); + TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, spacingHint() ); + qbg = new TQVButtonGroup(i18n("Choose Look Mode"),page,"qbg"); - rb0=new QRadioButton(i18n("3D look"),qbg,"3d"); - rb1=new QRadioButton(i18n("3D - filled"),qbg,"4d"); + rb0=new TQRadioButton(i18n("3D look"),qbg,"3d"); + rb1=new TQRadioButton(i18n("3D - filled"),qbg,"4d"); qbg->setExclusive(TRUE); topLayout->addWidget( qbg ); ((ChannelView::lookMode()==0)?rb0:rb1)->setChecked(TRUE); - connect (qbg, SIGNAL(pressed(int)),this,SLOT(modeselected(int))); + connect (qbg, TQT_SIGNAL(pressed(int)),this,TQT_SLOT(modeselected(int))); } void ChannelViewConfigDialog::modeselected(int idx) diff --git a/kmid/channelcfgdlg.h b/kmid/channelcfgdlg.h index 37952924..ed088dd2 100644 --- a/kmid/channelcfgdlg.h +++ b/kmid/channelcfgdlg.h @@ -34,12 +34,12 @@ class ChannelViewConfigDialog : public KDialogBase public: - ChannelViewConfigDialog(QWidget *parent,const char *name); + ChannelViewConfigDialog(TQWidget *parent,const char *name); private: - QVButtonGroup *qbg; - QRadioButton *rb0; - QRadioButton *rb1; + TQVButtonGroup *qbg; + TQRadioButton *rb0; + TQRadioButton *rb1; public slots: void modeselected(int idx); diff --git a/kmid/channelview.cpp b/kmid/channelview.cpp index 805d4b9a..a349691a 100644 --- a/kmid/channelview.cpp +++ b/kmid/channelview.cpp @@ -40,12 +40,12 @@ ChannelView::ChannelView(void) : KMainWindow(0, "ChannelView") Channel[i]=new KMidChannel3D(i+1,this); else Channel[i]=new KMidChannel4D(i+1,this); - connect(Channel[i],SIGNAL(signalToKMidClient(int *)),this,SLOT(slottokmidclient(int *))); + connect(Channel[i],TQT_SIGNAL(signalToKMidClient(int *)),this,TQT_SLOT(slottokmidclient(int *))); Channel[i]->setGeometry(5,5+i*CHANNELHEIGHT,width()-20,CHANNELHEIGHT); Channel[i]->show(); } - scrollbar=new QScrollBar(1,16,1,1,1,QScrollBar::Vertical,this,"Channelscrollbar"); - connect(scrollbar,SIGNAL(valueChanged(int)),this,SLOT(ScrollChn(int))); + scrollbar=new TQScrollBar(1,16,1,1,1,TQScrollBar::Vertical,this,"Channelscrollbar"); + connect(scrollbar,TQT_SIGNAL(valueChanged(int)),this,TQT_SLOT(ScrollChn(int))); setScrollBarRange(); } @@ -54,13 +54,13 @@ ChannelView::~ChannelView() } -void ChannelView::closeEvent(QCloseEvent *e) +void ChannelView::closeEvent(TQCloseEvent *e) { emit destroyMe(); e->accept(); } -void ChannelView::resizeEvent(QResizeEvent *) +void ChannelView::resizeEvent(TQResizeEvent *) { scrollbar->setGeometry(width()-16,0,16,height()); for (int i=0;i<16;i++) @@ -150,7 +150,7 @@ void ChannelView::lookMode(int i) else Channel[i]=new KMidChannel4D(i+1,this); - connect(Channel[i],SIGNAL(signalToKMidClient(int *)),this,SLOT(slottokmidclient(int *))); + connect(Channel[i],TQT_SIGNAL(signalToKMidClient(int *)),this,TQT_SLOT(slottokmidclient(int *))); Channel[i]->setGeometry(5,5+(i-(scrollbar->value()-1))*CHANNELHEIGHT,width()-20,CHANNELHEIGHT); Channel[i]->loadState(tmp,&pgm); Channel[i]->show(); diff --git a/kmid/channelview.h b/kmid/channelview.h index 15963a2c..3eb51302 100644 --- a/kmid/channelview.h +++ b/kmid/channelview.h @@ -26,7 +26,7 @@ #define CHANNELVIEW_H #include -#include +#include #include "channel.h" @@ -37,8 +37,8 @@ private: KMidChannel *Channel[16]; int nvisiblechannels; - virtual void resizeEvent(QResizeEvent *); - virtual void closeEvent(QCloseEvent *e); + virtual void resizeEvent(TQResizeEvent *); + virtual void closeEvent(TQCloseEvent *e); public: ChannelView(void); @@ -66,7 +66,7 @@ signals: void signalToKMidClient(int *data); private: - QScrollBar *scrollbar; + TQScrollBar *scrollbar; static int lookmode; diff --git a/kmid/collectdlg.cpp b/kmid/collectdlg.cpp index 7b40d0a9..ab476bb6 100644 --- a/kmid/collectdlg.cpp +++ b/kmid/collectdlg.cpp @@ -21,9 +21,9 @@ or to Antonio Larrosa, Rio Arnoya, 10 5B, 29006 Malaga, Spain ***************************************************************************/ -#include -#include -#include +#include +#include +#include #include #include @@ -38,23 +38,23 @@ #include "songlist.h" #include "slman.h" -CollectionDialog::CollectionDialog(SLManager *slm,int selC,QWidget *parent,const char *name) : QDialog(parent,name,TRUE) +CollectionDialog::CollectionDialog(SLManager *slm,int selC,TQWidget *parent,const char *name) : TQDialog(parent,name,TRUE) { setCaption(i18n("Collections Manager")); ok=new KPushButton(KStdGuiItem::ok(),this); ok->setGeometry(140,200,100,30); -connect(ok,SIGNAL(clicked()),SLOT(accept()) ); +connect(ok,TQT_SIGNAL(clicked()),TQT_SLOT(accept()) ); cancel=new KPushButton(KStdGuiItem::cancel(),this); cancel->setGeometry(250,200,100,30); -connect(cancel,SIGNAL(clicked()),SLOT(reject()) ); +connect(cancel,TQT_SIGNAL(clicked()),TQT_SLOT(reject()) ); -label=new QLabel(i18n("Available collections:"),this); +label=new TQLabel(i18n("Available collections:"),this); label->adjustSize(); label->move(10,10); -collections=new QListBox(this,"collectionlist"); +collections=new TQListBox(this,"collectionlist"); collections->setGeometry(10,20+label->height(),340,90); -connect(collections,SIGNAL(highlighted(int)),SLOT(collectionselected(int))); -connect(collections,SIGNAL(selected(int)),SLOT(changeCollectionName(int))); +connect(collections,TQT_SIGNAL(highlighted(int)),TQT_SLOT(collectionselected(int))); +connect(collections,TQT_SIGNAL(selected(int)),TQT_SLOT(changeCollectionName(int))); slman=slm; for (int i=0;i<=slman->numberOfCollections();i++) { @@ -68,13 +68,13 @@ selectedC=selC; printf("selectedC : %d\n",selectedC); #endif -label2=new QLabel(i18n("Songs in selected collection:"),this); +label2=new TQLabel(i18n("Songs in selected collection:"),this); label2->adjustSize(); label2->move(10,collections->y()+collections->height()+10); -songs=new QListBox(this,"songlist"); +songs=new TQListBox(this,"songlist"); songs->setGeometry(10,label2->y()+label2->height()+10,340,120); -connect(songs,SIGNAL(highlighted(int)),SLOT(songselected(int))); +connect(songs,TQT_SIGNAL(highlighted(int)),TQT_SLOT(songselected(int))); currentsl=slman->getCollection(selectedC); if (slman->numberOfCollections()>0) { @@ -82,27 +82,27 @@ if (slman->numberOfCollections()>0) collections->centerCurrentItem(); }; //fillInSongList(); -newC=new QPushButton(i18n("&New..."),this); +newC=new TQPushButton(i18n("&New..."),this); newC->adjustSize(); newC->move(360,collections->y()+5); -connect(newC,SIGNAL(clicked()),SLOT(newCollection()) ); -copyC=new QPushButton(i18n("&Copy..."),this); +connect(newC,TQT_SIGNAL(clicked()),TQT_SLOT(newCollection()) ); +copyC=new TQPushButton(i18n("&Copy..."),this); copyC->adjustSize(); copyC->move(360,newC->y()+newC->height()+5); -connect(copyC,SIGNAL(clicked()),SLOT(copyCollection()) ); -deleteC=new QPushButton(i18n("Delete"),this); +connect(copyC,TQT_SIGNAL(clicked()),TQT_SLOT(copyCollection()) ); +deleteC=new TQPushButton(i18n("Delete"),this); deleteC->adjustSize(); deleteC->move(360,copyC->y()+copyC->height()+5); -connect(deleteC,SIGNAL(clicked()),SLOT(deleteCollection()) ); +connect(deleteC,TQT_SIGNAL(clicked()),TQT_SLOT(deleteCollection()) ); -addS=new QPushButton(i18n("&Add..."),this); +addS=new TQPushButton(i18n("&Add..."),this); addS->adjustSize(); addS->move(360,songs->y()+5); -connect(addS,SIGNAL(clicked()),SLOT(addSong()) ); -delS=new QPushButton(i18n("&Remove"),this); +connect(addS,TQT_SIGNAL(clicked()),TQT_SLOT(addSong()) ); +delS=new TQPushButton(i18n("&Remove"),this); delS->adjustSize(); delS->move(360,addS->y()+addS->height()+5); -connect(delS,SIGNAL(clicked()),SLOT(removeSong()) ); +connect(delS,TQT_SIGNAL(clicked()),TQT_SLOT(removeSong()) ); ok->move(ok->x(),songs->y()+songs->height()+10); cancel->move(ok->x()+ok->width()+5,ok->y()); @@ -123,7 +123,7 @@ fillInSongList(); void CollectionDialog::fillInSongList(void) { -QString qs; +TQString qs; songs->clear(); if (currentsl!=NULL) { @@ -131,7 +131,7 @@ if (currentsl!=NULL) int i=0; while (!currentsl->iteratorAtEnd()) { - qs=QString(currentsl->getIteratorName()); + qs=TQString(currentsl->getIteratorName()); //KURL::decode(qs); songs->insertItem(qs,i); currentsl->iteratorNext(); @@ -155,8 +155,8 @@ printf("Selected song: %d\n",selectedS); void CollectionDialog::newCollection() { bool ok; - QString name = KInputDialog::getText( i18n( "New Collection" ), - i18n( "Enter the name of the new collection:" ), QString::null, + TQString name = KInputDialog::getText( i18n( "New Collection" ), + i18n( "Enter the name of the new collection:" ), TQString::null, &ok, this ); if (ok) @@ -164,7 +164,7 @@ void CollectionDialog::newCollection() int i=slman->createCollection(name.ascii()); if (i==-1) { - QString s = i18n("The name '%1' is already used").arg(name); + TQString s = i18n("The name '%1' is already used").arg(name); KMessageBox::sorry(this, s); } else @@ -181,8 +181,8 @@ void CollectionDialog::copyCollection() SongList *src=currentsl; int i; bool ok; - QString name = KInputDialog::getText( i18n( "Copy Collection" ), - i18n( "Enter the name of the copy collection:" ), QString::null, + TQString name = KInputDialog::getText( i18n( "Copy Collection" ), + i18n( "Enter the name of the copy collection:" ), TQString::null, &ok, this ); if (ok) @@ -190,7 +190,7 @@ int i; i=slman->createCollection(name.ascii()); if (i==-1) { - QString s = i18n("The name '%1' is already used").arg(name); + TQString s = i18n("The name '%1' is already used").arg(name); KMessageBox::sorry(this, s); } else @@ -224,15 +224,15 @@ void CollectionDialog::changeCollectionName(int idx) if (idx==0) return; bool ok; - QString name = KInputDialog::getText( i18n( "Change Collection Name" ), - i18n( "Enter the name of the selected collection:" ), QString::null, + TQString name = KInputDialog::getText( i18n( "Change Collection Name" ), + i18n( "Enter the name of the selected collection:" ), TQString::null, &ok, this ); if (ok) { if (slman->getCollection(name.ascii())!=NULL) { - QString s = i18n("The name '%1' is already used").arg(name); + TQString s = i18n("The name '%1' is already used").arg(name); KMessageBox::sorry(this, s); } else @@ -248,7 +248,7 @@ void CollectionDialog::addSong(const KURL &url) if (currentsl==NULL) return; if( url.isEmpty()) return; - int id=currentsl->AddSong(QFile::encodeName(url.path())); + int id=currentsl->AddSong(TQFile::encodeName(url.path())); if (id==-1) { @@ -280,7 +280,7 @@ songs->removeItem(selectedS); songs->setCurrentItem(i); } -void CollectionDialog::resizeEvent(QResizeEvent *) +void CollectionDialog::resizeEvent(TQResizeEvent *) { int maxw=newC->width(); if (copyC->width()>maxw) maxw=copyC->width(); diff --git a/kmid/collectdlg.h b/kmid/collectdlg.h index 057e2e50..6283f4eb 100644 --- a/kmid/collectdlg.h +++ b/kmid/collectdlg.h @@ -24,7 +24,7 @@ #ifndef _collectdlg_h_ #define _collectdlg_h_ -#include +#include #include "songlist.h" #include "slman.h" @@ -42,13 +42,13 @@ private: protected: - virtual void resizeEvent(QResizeEvent *qre); + virtual void resizeEvent(TQResizeEvent *qre); void fillInSongList(void); //clear the songs list and insert in it // the songs in currentsl void addSong(const KURL &); public: - CollectionDialog(SLManager *slm,int selc,QWidget *parent,const char *name); + CollectionDialog(SLManager *slm,int selc,TQWidget *parent,const char *name); public slots: void collectionselected(int idx); @@ -61,17 +61,17 @@ public slots: void removeSong(); private: -QLabel *label; -QLabel *label2; +TQLabel *label; +TQLabel *label2; KPushButton *ok; KPushButton *cancel; -QListBox *collections; -QListBox *songs; -QPushButton *newC; -QPushButton *copyC; -QPushButton *deleteC; -QPushButton *addS; -QPushButton *delS; +TQListBox *collections; +TQListBox *songs; +TQPushButton *newC; +TQPushButton *copyC; +TQPushButton *deleteC; +TQPushButton *addS; +TQPushButton *delS; public: diff --git a/kmid/kdisptext.cpp b/kmid/kdisptext.cpp index 7d160c2f..cc1eb4d3 100644 --- a/kmid/kdisptext.cpp +++ b/kmid/kdisptext.cpp @@ -22,11 +22,11 @@ ***************************************************************************/ #include "kdisptext.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -40,7 +40,7 @@ //#define DRAW_BOUNDING_RECTS -KDisplayText::KDisplayText(QWidget *parent,const char *name) : QScrollView(parent,name) +KDisplayText::KDisplayText(TQWidget *parent,const char *name) : TQScrollView(parent,name) { first_line_[0]=first_line_[1]=NULL; linked_list_[0]=linked_list_[1]=NULL; @@ -54,15 +54,15 @@ KDisplayText::KDisplayText(QWidget *parent,const char *name) : QScrollView(paren nlines=0; lyrics_codec=KGlobal::locale()->codecForEncoding(); - viewport()->setBackgroundColor(QColor (110,110,110)); + viewport()->setBackgroundColor(TQColor (110,110,110)); // setBackgroundMode(NoBackground); KConfig *kcfg=KGlobal::instance()->config(); kcfg->setGroup("KMid"); typeoftextevents=kcfg->readNumEntry("TypeOfTextEvents",1); - QFont *qtextfontdefault=new QFont(KGlobalSettings::fixedFont().family(),22); - qtextfont=new QFont(kcfg->readFontEntry("KaraokeFont",qtextfontdefault)); + TQFont *qtextfontdefault=new TQFont(KGlobalSettings::fixedFont().family(),22); + qtextfont=new TQFont(kcfg->readFontEntry("KaraokeFont",qtextfontdefault)); delete qtextfontdefault; - qfmetr=new QFontMetrics(*qtextfont); + qfmetr=new TQFontMetrics(*qtextfont); nvisiblelines=height()/qfmetr->lineSpacing(); autoscrollv=0; } @@ -261,7 +261,7 @@ while (t!=NULL) return start; } -void KDisplayText::drawContents(QPainter *p, int /*clipx*/, int clipy, int /*clipw*/, int cliph) +void KDisplayText::drawContents(TQPainter *p, int /*clipx*/, int clipy, int /*clipw*/, int cliph) { p->setFont(*qtextfont); if (linked_list==NULL) return; @@ -320,9 +320,9 @@ void KDisplayText::drawContents(QPainter *p, int /*clipx*/, int clipy, int /*cli } -void KDisplayText::resizeEvent(QResizeEvent *e) +void KDisplayText::resizeEvent(TQResizeEvent *e) { - QScrollView::resizeEvent(e); + TQScrollView::resizeEvent(e); nvisiblelines=visibleHeight()/qfmetr->lineSpacing(); if ( (nlines>nvisiblelines) || (nvisiblelines==0) ) resizeContents(maxX[(typeoftextevents==1)?0:1],maxY[(typeoftextevents==1)?0:1]); @@ -492,7 +492,7 @@ void KDisplayText::gotomsec(ulong i) } } -QFont *KDisplayText::getFont(void) +TQFont *KDisplayText::getFont(void) { return qtextfont; } @@ -501,11 +501,11 @@ void KDisplayText::fontChanged(void) { KConfig *kcfg=KGlobal::instance()->config(); kcfg->setGroup("KMid"); - QFont *qtextfontdefault=new QFont(*qtextfont); + TQFont *qtextfontdefault=new TQFont(*qtextfont); delete qtextfont; - qtextfont=new QFont(kcfg->readFontEntry("KaraokeFont",qtextfontdefault)); + qtextfont=new TQFont(kcfg->readFontEntry("KaraokeFont",qtextfontdefault)); delete qtextfontdefault; - qfmetr=new QFontMetrics(*qtextfont); + qfmetr=new TQFontMetrics(*qtextfont); calculatePositions(); nvisiblelines=height()/qfmetr->lineSpacing(); viewport()->repaint(TRUE); @@ -587,7 +587,7 @@ void KDisplayText::saveLyrics(FILE *fh) } } -void KDisplayText::timerEvent(QTimerEvent *e) +void KDisplayText::timerEvent(TQTimerEvent *e) { int dy; if (autoscrollv>0) @@ -619,13 +619,13 @@ void KDisplayText::timerEvent(QTimerEvent *e) } -void KDisplayText::setLyricsEncoding(const QString &enc) +void KDisplayText::setLyricsEncoding(const TQString &enc) { - QTextCodec *newcodec; + TQTextCodec *newcodec; if (enc.isEmpty()) newcodec=KGlobal::locale()->codecForEncoding(); else - newcodec=QTextCodec::codecForName(enc.latin1()); + newcodec=TQTextCodec::codecForName(enc.latin1()); if (newcodec!=lyrics_codec) { diff --git a/kmid/kdisptext.h b/kmid/kdisptext.h index 7cc1d620..6470b904 100644 --- a/kmid/kdisptext.h +++ b/kmid/kdisptext.h @@ -24,15 +24,15 @@ #ifndef _kdisptext_h_ #define _kdisptext_h_ -#include -#include +#include +#include #include struct kdispt_ev { SpecialEvent *spev; int xpos; - class QRect r; + class TQRect r; kdispt_ev *next; }; @@ -48,14 +48,14 @@ class QFont; class QFontMetrics; class QScrollBar; -class KDisplayText : public QScrollView +class KDisplayText : public TQScrollView { Q_OBJECT private: - QTextCodec *lyrics_codec; + TQTextCodec *lyrics_codec; - QFontMetrics *qfmetr; - QFont *qtextfont; + TQFontMetrics *qfmetr; + TQFont *qtextfont; int typeoftextevents; @@ -78,7 +78,7 @@ private: void RemoveLinkedList(void); int IsLineFeed(char c,int type=0); - virtual void drawContents(QPainter *qpaint,int clipx,int clipy,int clipw,int cliph); + virtual void drawContents(TQPainter *qpaint,int clipx,int clipy,int clipw,int cliph); kdispt_line * searchYOffset(int y, kdispt_line *start); @@ -87,11 +87,11 @@ private: int autoscrollv; protected: - virtual void resizeEvent(QResizeEvent *qre); - virtual void timerEvent(QTimerEvent *e); + virtual void resizeEvent(TQResizeEvent *qre); + virtual void timerEvent(TQTimerEvent *e); public: - KDisplayText(QWidget *parent,const char *name); + KDisplayText(TQWidget *parent,const char *name); virtual ~KDisplayText(); void ClearEv(bool totally=true); @@ -105,14 +105,14 @@ public: void PaintIn(int type); void gotomsec(ulong i); - QFont *getFont(void); + TQFont *getFont(void); void fontChanged(void); void saveLyrics(FILE *fh); - void setLyricsEncoding(const QString &enc); + void setLyricsEncoding(const TQString &enc); -// QSize sizeHint(); +// TQSize sizeHint(); public slots: void ScrollDown(); diff --git a/kmid/klcdnumber.cpp b/kmid/klcdnumber.cpp index f06b9dd0..014188cc 100644 --- a/kmid/klcdnumber.cpp +++ b/kmid/klcdnumber.cpp @@ -22,14 +22,14 @@ ***************************************************************************/ #include "klcdnumber.h" -#include +#include #include #include "ktrianglebutton.h" #define BUTTONWIDTH 9 -KLCDNumber::KLCDNumber(int _numDigits,QWidget *parent,const char *name) - : QWidget(parent,name) +KLCDNumber::KLCDNumber(int _numDigits,TQWidget *parent,const char *name) + : TQWidget(parent,name) { initDigits(); setUserChangeValue=false; @@ -38,7 +38,7 @@ KLCDNumber::KLCDNumber(int _numDigits,QWidget *parent,const char *name) minValue=0; maxValue=1000; oldvalue=-1; - // setPalette( QPalette (QColor(0,0,0))); + // setPalette( TQPalette (TQColor(0,0,0))); upBtn=NULL; downBtn=NULL; setUserDefaultValue=false; @@ -47,8 +47,8 @@ KLCDNumber::KLCDNumber(int _numDigits,QWidget *parent,const char *name) setLCDColor(100,255,100); } -KLCDNumber::KLCDNumber(bool _setUserChangeValue,int _numDigits,QWidget *parent,const char *name) - : QWidget(parent,name) +KLCDNumber::KLCDNumber(bool _setUserChangeValue,int _numDigits,TQWidget *parent,const char *name) + : TQWidget(parent,name) { initDigits(); setUserChangeValue=_setUserChangeValue; @@ -57,8 +57,8 @@ KLCDNumber::KLCDNumber(bool _setUserChangeValue,int _numDigits,QWidget *parent,c minValue=0; maxValue=1000; oldvalue=-1; -// setBackgroundColor(QColor(0,0,0)); -// setPalette( QPalette (QColor(0,0,0))); +// setBackgroundColor(TQColor(0,0,0)); +// setPalette( TQPalette (TQColor(0,0,0))); upBtn=NULL; downBtn=NULL; setUserDefaultValue=false; @@ -71,10 +71,10 @@ KLCDNumber::KLCDNumber(bool _setUserChangeValue,int _numDigits,QWidget *parent,c downBtn=new KTriangleButton(KTriangleButton::Left,this,"Down"); upBtn->setGeometry(width()-BUTTONWIDTH,0,BUTTONWIDTH,height()); downBtn->setGeometry(0,0,BUTTONWIDTH,height()); - connect(upBtn,SIGNAL(clicked()),this,SLOT(increaseValue())); - connect(downBtn,SIGNAL(clicked()),this,SLOT(decreaseValue())); - connect(upBtn,SIGNAL(clickedQuickly()),this,SLOT(increaseValueFast())); - connect(downBtn,SIGNAL(clickedQuickly()),this,SLOT(decreaseValueFast())); + connect(upBtn,TQT_SIGNAL(clicked()),this,TQT_SLOT(increaseValue())); + connect(downBtn,TQT_SIGNAL(clicked()),this,TQT_SLOT(decreaseValue())); + connect(upBtn,TQT_SIGNAL(clickedQuickly()),this,TQT_SLOT(increaseValueFast())); + connect(downBtn,TQT_SIGNAL(clickedQuickly()),this,TQT_SLOT(decreaseValueFast())); }; } @@ -93,7 +93,7 @@ Digit[9] = digit(true,true,true,true,false,true,true); Digit[10] = digit(false,false,false,false,false,false,false); } -void KLCDNumber::resizeEvent ( QResizeEvent *) +void KLCDNumber::resizeEvent ( TQResizeEvent *) { if (setUserChangeValue) { @@ -102,7 +102,7 @@ void KLCDNumber::resizeEvent ( QResizeEvent *) } } -void KLCDNumber::drawVerticalBar(QPainter *qpaint,int x,int y,int w,int h,int d) +void KLCDNumber::drawVerticalBar(TQPainter *qpaint,int x,int y,int w,int h,int d) { /* If d is 0 it means that it is a bar on the left and if 1 it is on the right */ /* @@ -133,7 +133,7 @@ void KLCDNumber::drawVerticalBar(QPainter *qpaint,int x,int y,int w,int h,int d) } } -void KLCDNumber::drawHorizBar(QPainter *qpaint,int x,int y,int w,int h,int d) +void KLCDNumber::drawHorizBar(TQPainter *qpaint,int x,int y,int w,int h,int d) { // 0 is upper, 1 is bottom and 2 is the middle bar. x++; @@ -170,7 +170,7 @@ void KLCDNumber::drawHorizBar(QPainter *qpaint,int x,int y,int w,int h,int d) } -void KLCDNumber::drawDigit(QPainter *qpaint,int x,int y,int w,int h,digit d) +void KLCDNumber::drawDigit(TQPainter *qpaint,int x,int y,int w,int h,digit d) { if (d.nw) drawVerticalBar(qpaint,x,y,w/5,h/2,0); if (d.ne) drawVerticalBar(qpaint,x+w*4/5,y,w/5,h/2,1); @@ -206,13 +206,13 @@ void KLCDNumber::display (int v) } -void KLCDNumber::paintEvent ( QPaintEvent * ) +void KLCDNumber::paintEvent ( TQPaintEvent * ) { - QPainter qpaint(this); + TQPainter qpaint(this); qpaint.fillRect(0,0,width(),height(),backgcolor); qpaint.setPen(LCDcolor); - QString numStr; + TQString numStr; numStr.setNum((int) value); numStr = numStr.rightJustify( numDigits, ' ', true); @@ -285,19 +285,19 @@ void KLCDNumber::increaseValueFast() display( value+1 ); } -void KLCDNumber::mouseDoubleClickEvent (QMouseEvent *) +void KLCDNumber::mouseDoubleClickEvent (TQMouseEvent *) { doubleclicked=true; defaultValueClicked(); } -void KLCDNumber::mousePressEvent (QMouseEvent *e) +void KLCDNumber::mousePressEvent (TQMouseEvent *e) { startTimer(200); - QWidget::mousePressEvent(e); + TQWidget::mousePressEvent(e); } -void KLCDNumber::timerEvent(QTimerEvent *) +void KLCDNumber::timerEvent(TQTimerEvent *) { killTimers(); doubleclicked=false; @@ -316,13 +316,13 @@ void KLCDNumber::defaultValueClicked() void KLCDNumber::setLCDBackgroundColor(int r,int g,int b) { - backgcolor=QColor(r,g,b); + backgcolor=TQColor(r,g,b); repaint(FALSE); } void KLCDNumber::setLCDColor(int r,int g,int b) { - LCDcolor=QColor(r,g,b); + LCDcolor=TQColor(r,g,b); repaint(FALSE); } @@ -332,8 +332,8 @@ void KLCDNumber::setRange(double min, double max) maxValue=max; } -QSize KLCDNumber::sizeHint() +TQSize KLCDNumber::sizeHint() { - return QSize(83,28); + return TQSize(83,28); } #include "klcdnumber.moc" diff --git a/kmid/klcdnumber.h b/kmid/klcdnumber.h index 602ec055..99b21126 100644 --- a/kmid/klcdnumber.h +++ b/kmid/klcdnumber.h @@ -24,7 +24,7 @@ #ifndef _klcdnumber_h_ #define _klcdnumber_h_ -#include +#include class QPainter; class KTriangleButton; @@ -83,8 +83,8 @@ public: bool setUserDefaultValue; bool doubleclicked; - QColor backgcolor; - QColor LCDcolor; + TQColor backgcolor; + TQColor LCDcolor; double value; double oldvalue; @@ -93,15 +93,15 @@ public: double minValue; double maxValue; - void drawVerticalBar(QPainter *qpaint,int x,int y,int w,int h,int d); - void drawHorizBar(QPainter *qpaint,int x,int y,int w,int h,int d); - void drawDigit(QPainter *qpaint,int x,int y,int w,int h,digit d); + void drawVerticalBar(TQPainter *qpaint,int x,int y,int w,int h,int d); + void drawHorizBar(TQPainter *qpaint,int x,int y,int w,int h,int d); + void drawDigit(TQPainter *qpaint,int x,int y,int w,int h,digit d); void initDigits(void); public: - KLCDNumber(int _numDigits,QWidget *parent,const char *name); - KLCDNumber(bool _setUserChangeValue,int _numDigits,QWidget *parent,const char *name); + KLCDNumber(int _numDigits,TQWidget *parent,const char *name); + KLCDNumber(bool _setUserChangeValue,int _numDigits,TQWidget *parent,const char *name); void setUserSetDefaultValue(bool _userSetDefaultValue); void setDefaultValue(double v); @@ -120,16 +120,16 @@ public: void display (int v); void display (double v); - QSize sizeHint (); -// QSizePolicy sizePolicy(); + TQSize sizeHint (); +// TQSizePolicy sizePolicy(); protected: - virtual void paintEvent ( QPaintEvent *e ); - virtual void resizeEvent ( QResizeEvent *e); - virtual void mouseDoubleClickEvent (QMouseEvent *e); - virtual void mousePressEvent (QMouseEvent *e); - virtual void timerEvent(QTimerEvent *e); + virtual void paintEvent ( TQPaintEvent *e ); + virtual void resizeEvent ( TQResizeEvent *e); + virtual void mouseDoubleClickEvent (TQMouseEvent *e); + virtual void mousePressEvent (TQMouseEvent *e); + virtual void timerEvent(TQTimerEvent *e); void defaultValueClicked(); KTriangleButton *downBtn; diff --git a/kmid/kmidIface.h b/kmid/kmidIface.h index 75f2ca72..8bba2575 100644 --- a/kmid/kmidIface.h +++ b/kmid/kmidIface.h @@ -10,7 +10,7 @@ class KMidIface : virtual public DCOPObject k_dcop: // File - virtual int openURL( const QString s )=0; + virtual int openURL( const TQString s )=0; // Song virtual void play()=0; diff --git a/kmid/kmid_part.cpp b/kmid/kmid_part.cpp index 98241ac1..39b10603 100644 --- a/kmid/kmid_part.cpp +++ b/kmid/kmid_part.cpp @@ -5,12 +5,12 @@ #include #include #include -#include +#include #include #include "kmidclient.h" -#include +#include #include K_EXPORT_COMPONENT_FACTORY( libkmidpart, KMidFactory ) @@ -37,9 +37,9 @@ KMidFactory::~KMidFactory() s_instance = 0; } -KParts::Part *KMidFactory::createPartObject(QWidget *parentWidget, const char *widgetName, - QObject *parent, const char *name, const char*, - const QStringList& ) +KParts::Part *KMidFactory::createPartObject(TQWidget *parentWidget, const char *widgetName, + TQObject *parent, const char *name, const char*, + const TQStringList& ) { KParts::Part *obj = new KMidPart(parentWidget, widgetName, parent, name); return obj; @@ -65,34 +65,34 @@ KInstance *KMidFactory::instance() return s_instance; } - KMidPart::KMidPart(QWidget *parentWidget, const char *widgetName, - QObject *parent, const char *name) + KMidPart::KMidPart(TQWidget *parentWidget, const char *widgetName, + TQObject *parent, const char *name) : KParts::ReadOnlyPart(parent, name) { setInstance(KMidFactory::instance()); widget = new kmidClient(parentWidget, actionCollection()); widget->show(); - widget->setFocusPolicy(QWidget::ClickFocus); + widget->setFocusPolicy(TQWidget::ClickFocus); setWidget(widget); // create and connect our actions (void)new KAction(i18n("Play"), "player_play", 0, this, - SLOT(slotPlay()), actionCollection(), + TQT_SLOT(slotPlay()), actionCollection(), "play"); (void)new KAction(i18n("Stop"), "player_stop", 0, this, - SLOT(slotStop()), actionCollection(), + TQT_SLOT(slotStop()), actionCollection(), "stop"); (void)new KAction(i18n("Backward"), "2leftarrow", 0, this, - SLOT(slotBackward()), actionCollection(), + TQT_SLOT(slotBackward()), actionCollection(), "backward"); (void)new KAction(i18n("Forward"), "2rightarrow", 0, this, - SLOT(slotForward()), actionCollection(), + TQT_SLOT(slotForward()), actionCollection(), "forward"); m_extension = new KMidBrowserExtension(this); @@ -111,7 +111,7 @@ bool KMidPart::openFile() widget->openURL(m_file); widget->stop(); widget->show(); - QTimer::singleShot(2000, this, SLOT(slotPlay())); + TQTimer::singleShot(2000, this, TQT_SLOT(slotPlay())); return true; } diff --git a/kmid/kmid_part.h b/kmid/kmid_part.h index 4b02e099..5b0cbc0e 100644 --- a/kmid/kmid_part.h +++ b/kmid/kmid_part.h @@ -16,10 +16,10 @@ class KDE_EXPORT KMidFactory : public KParts::Factory KMidFactory(); virtual ~KMidFactory(); - virtual KParts::Part* createPartObject(QWidget *parentWidget, const char *widgetName, - QObject* parent = 0, const char* name = 0, - const char* classname = "QObject", - const QStringList &args = QStringList()); + virtual KParts::Part* createPartObject(TQWidget *parentWidget, const char *widgetName, + TQObject* parent = 0, const char* name = 0, + const char* classname = "TQObject", + const TQStringList &args = TQStringList()); static KInstance *instance(); @@ -32,8 +32,8 @@ class KMidPart: public KParts::ReadOnlyPart { Q_OBJECT public: - KMidPart(QWidget *parentWidget, const char *widgetName, - QObject *parent, const char *name); + KMidPart(TQWidget *parentWidget, const char *widgetName, + TQObject *parent, const char *name); virtual ~KMidPart(); diff --git a/kmid/kmidbutton.h b/kmid/kmidbutton.h index cda01f59..442b0fbd 100644 --- a/kmid/kmidbutton.h +++ b/kmid/kmidbutton.h @@ -1,13 +1,13 @@ -#include -#include +#include +#include class KMidButton : public QPushButton { protected: - QPixmap pixmap1,pixmap2; + TQPixmap pixmap1,pixmap2; - virtual void drawButton(QPainter *paint) + virtual void drawButton(TQPainter *paint) { if ((isOn())&&(!pixmap1.isNull())) paint->drawPixmap(0,0,pixmap1); else if ((!isOn())&&(!pixmap2.isNull())) paint->drawPixmap(0,0,pixmap2); @@ -15,7 +15,7 @@ protected: public: - KMidButton (QWidget *parent,const char *name) : QPushButton (parent,name) + KMidButton (TQWidget *parent,const char *name) : TQPushButton (parent,name) { }; @@ -23,7 +23,7 @@ public: { }; - void setPixmaps(const QPixmap& p1, const QPixmap& p2) + void setPixmaps(const TQPixmap& p1, const TQPixmap& p2) { pixmap1=p1; pixmap2=p2; diff --git a/kmid/kmidclient.cpp b/kmid/kmidclient.cpp index c9e596d7..94467098 100644 --- a/kmid/kmidclient.cpp +++ b/kmid/kmidclient.cpp @@ -29,13 +29,13 @@ #include // kill is declared on signal.h on bsd, not sys/signal.h #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -65,8 +65,8 @@ //#define TEMPHACK -kmidClient::kmidClient(QWidget *parent, KActionCollection *ac, const char *name) - : DCOPObject("KMidIface"), QWidget(parent,name) +kmidClient::kmidClient(TQWidget *parent, KActionCollection *ac, const char *name) + : DCOPObject("KMidIface"), TQWidget(parent,name) { actionCollection=ac; KConfig *cfg=kapp->config(); @@ -82,24 +82,24 @@ kmidClient::kmidClient(QWidget *parent, KActionCollection *ac, const char *name) KConfig *kconf=KGlobal::instance()->config(); kconf->setGroup("KMid"); - QString tmp2 = locateLocal("appdata", "collections"); + TQString tmp2 = locateLocal("appdata", "collections"); collectionsfile=kconf->readPathEntry("CollectionsFile",tmp2); slman=new SLManager(); - slman->loadConfig(QFile::encodeName(collectionsfile)); + slman->loadConfig(TQFile::encodeName(collectionsfile)); currentsl=NULL; // currentsl=slman->getCollection(activecollection); itsme=0; m_kMid.pid=0; - timebar = new QSlider(0,240000,30000,60000,QSlider::Horizontal, this); + timebar = new TQSlider(0,240000,30000,60000,TQSlider::Horizontal, this); timebar->setSteps(30000,60000); timebar->setValue(0); - connect (timebar,SIGNAL(valueChanged(int)),this,SLOT(slotSeek(int))); + connect (timebar,TQT_SIGNAL(valueChanged(int)),this,TQT_SLOT(slotSeek(int))); timetags = new QSliderTime(timebar,this); timetags->setMinimumSize(timetags->sizeHint()); - qlabelTempo= new QLabel(i18n("Tempo:"), this,"tempolabel", - QLabel::NoFrame); + qlabelTempo= new TQLabel(i18n("Tempo:"), this,"tempolabel", + TQLabel::NoFrame); tempoLCD = new KLCDNumber( true, 3, this, "TempoLCD"); tempoLCD->setValue(120); @@ -109,14 +109,14 @@ kmidClient::kmidClient(QWidget *parent, KActionCollection *ac, const char *name) tempoLCD->setDefaultValue(120); tempoLCD->setUserSetDefaultValue(true); tempoLCD->setMinimumSize(tempoLCD->sizeHint()); - connect(tempoLCD,SIGNAL(valueChanged(double)),this,SLOT(slotSetTempo(double))); + connect(tempoLCD,TQT_SIGNAL(valueChanged(double)),this,TQT_SLOT(slotSetTempo(double))); - comboSongs = new QComboBox(FALSE, this,"Songs"); - connect (comboSongs,SIGNAL(activated(int)),this,SLOT(slotSelectSong(int))); + comboSongs = new TQComboBox(FALSE, this,"Songs"); + connect (comboSongs,TQT_SIGNAL(activated(int)),this,TQT_SLOT(slotSelectSong(int))); comboSongs->setMinimumWidth(200); - comboEncodings = new QComboBox(FALSE, this, "Encodings"); - connect (comboEncodings,SIGNAL(activated(int)),this,SLOT(slotSelectEncoding(int))); + comboEncodings = new TQComboBox(FALSE, this, "Encodings"); + connect (comboEncodings,TQT_SIGNAL(activated(int)),this,TQT_SLOT(slotSelectEncoding(int))); comboEncodings->insertItem(i18n("Default")); comboEncodings->insertStringList( KGlobal::charsets()->descriptiveEncodingNames() ); comboEncodings->setCurrentItem(0); @@ -125,12 +125,12 @@ kmidClient::kmidClient(QWidget *parent, KActionCollection *ac, const char *name) rhythmview->setMaximumHeight(7); rhythmview->setMinimumHeight(7); - volumebar = new QSlider(0,200,10,100,QSlider::Vertical, this ); + volumebar = new TQSlider(0,200,10,100,TQSlider::Vertical, this ); volumebar->setSteps(10,20); volumebar->setValue(100); - volumebar->setTickmarks(QSlider::NoMarks); + volumebar->setTickmarks(TQSlider::NoMarks); volumebar->setTickInterval(50); - connect (volumebar,SIGNAL(valueChanged(int)),this,SLOT(slotSetVolume(int))); + connect (volumebar,TQT_SIGNAL(valueChanged(int)),this,TQT_SLOT(slotSetVolume(int))); visiblevolumebar=cfg->readNumEntry("ShowVolumeBar",0); if (visiblevolumebar) volumebar->show(); @@ -140,15 +140,15 @@ kmidClient::kmidClient(QWidget *parent, KActionCollection *ac, const char *name) kdispt=new KDisplayText( this, "KaraokeWindow"); kdispt->show(); - timer4timebar=new QTimer(this); - connect (timer4timebar,SIGNAL(timeout()),this,SLOT(timebarUpdate())); - timer4events=new QTimer(this); - connect (timer4events,SIGNAL(timeout()),this,SLOT(processSpecialEvent())); + timer4timebar=new TQTimer(this); + connect (timer4timebar,TQT_SIGNAL(timeout()),this,TQT_SLOT(timebarUpdate())); + timer4events=new TQTimer(this); + connect (timer4events,TQT_SIGNAL(timeout()),this,TQT_SLOT(processSpecialEvent())); - QString samplefile = + TQString samplefile = KGlobal::dirs()->findAllResources("appdata", "fm/*.o3").last(); samplefile.truncate(samplefile.findRev('/')); - FMOut::setFMPatchesDirectory(QFile::encodeName(samplefile)); + FMOut::setFMPatchesDirectory(TQFile::encodeName(samplefile)); m_kMid.pctlsmID=shmget(IPC_PRIVATE,sizeof(PlayerController),0666 | IPC_CREAT ); if (m_kMid.pctlsmID==-1) @@ -183,7 +183,7 @@ kmidClient::kmidClient(QWidget *parent, KActionCollection *ac, const char *name) player= new MidiPlayer(midi,m_kMid.pctl); kconf->setGroup("Midimapper"); - QCString qs=QFile::encodeName(kconf->readPathEntry("Loadfile","gm.map")); + TQCString qs=TQFile::encodeName(kconf->readPathEntry("Loadfile","gm.map")); #ifdef KMidDEBUG printf("Read Config file: %s\n",qs.data()); @@ -195,11 +195,11 @@ kmidClient::kmidClient(QWidget *parent, KActionCollection *ac, const char *name) setActiveCollection(kconf->readNumEntry("ActiveCollection",0)); initializing_songs=0; - QVBoxLayout *lv=new QVBoxLayout( this ); + TQVBoxLayout *lv=new TQVBoxLayout( this ); lv->addWidget( timebar ); lv->addWidget( timetags ); lv->addSpacing(5); - QHBoxLayout *lh=new QHBoxLayout( lv ); + TQHBoxLayout *lh=new TQHBoxLayout( lv ); lh->addWidget( qlabelTempo ); lh->addWidget( tempoLCD ); lh->addWidget( comboSongs, 6 ); @@ -208,12 +208,12 @@ kmidClient::kmidClient(QWidget *parent, KActionCollection *ac, const char *name) lv->addSpacing(5); lv->addWidget( rhythmview ); lv->addSpacing(2); - QHBoxLayout *lh2=new QHBoxLayout( lv ); + TQHBoxLayout *lh2=new TQHBoxLayout( lv ); lh2->addWidget( volumebar ); lh2->addWidget( kdispt ); } -/*void kmidClient::resizeEvent(QResizeEvent *) +/*void kmidClient::resizeEvent(TQResizeEvent *) { //timebar->resize(width()-5,timebar->height()); timebar->setGeometry(5,10,width()-5,timebar->height()); @@ -286,7 +286,7 @@ int kmidClient::openFile(const char *filename) player->setGenerateBeats(true); if ((r=player->loadSong(filename))!=0) { - QString errormsg; + TQString errormsg; switch (r) { case (-1) : errormsg = @@ -360,19 +360,19 @@ int kmidClient::openFile(const char *filename) return 0; } -int kmidClient::openURL(const QString _url) +int kmidClient::openURL(const TQString _url) { KURL u(_url); if (!u.isValid()) {printf("Malformed URL\n");return -1;}; - QString filename; + TQString filename; bool deleteFile=false; if (!u.isLocalFile()) { - filename = QString("/tmp/") + u.filename(); + filename = TQString("/tmp/") + u.filename(); KIO::Job *iojob = KIO::copy( u, KURL::fromPathOrURL( filename ) ); downloaded=false; - connect( iojob, SIGNAL( result( KIO::Job *) ), this, SLOT(downloadFinished( KIO::Job * ) ) ); + connect( iojob, TQT_SIGNAL( result( KIO::Job *) ), this, TQT_SLOT(downloadFinished( KIO::Job * ) ) ); if (!downloaded) kapp->enter_loop(); @@ -384,7 +384,7 @@ int kmidClient::openURL(const QString _url) filename=u.path(); } - QCString filename_8bit = QFile::encodeName(filename); + TQCString filename_8bit = TQFile::encodeName(filename); int r=-1; if (!filename_8bit.isEmpty()) { @@ -535,7 +535,7 @@ void kmidClient::slotPlay() #endif noteArray->iteratorBegin(); - QApplication::flushX(); + TQApplication::flushX(); if ((m_kMid.pid=fork())==0) { #ifdef KMidDEBUG @@ -645,7 +645,7 @@ void kmidClient::slotSeek(int i) m_kMid.pctl->gotomsec=i; m_kMid.pctl->message|=PLAYER_SETPOS; - QApplication::flushX(); + TQApplication::flushX(); if ((m_kMid.pid=fork())==0) { #ifdef KMidDEBUG @@ -866,7 +866,7 @@ void kmidClient::slotPause() m_kMid.pctl->gotomsec=pausedatmillisec; m_kMid.pctl->message|=PLAYER_SETPOS; - QApplication::flushX(); + TQApplication::flushX(); if ((m_kMid.pid=fork())==0) { #ifdef KMidDEBUG @@ -1156,7 +1156,7 @@ void kmidClient::setSongType(int i) } -QFont * kmidClient::getFont(void) +TQFont * kmidClient::getFont(void) { return kdispt->getFont(); } @@ -1176,7 +1176,7 @@ void kmidClient::setMidiMapFilename(const char *mapfilename) MidiMapper *map=new MidiMapper(mapfilename); if (map->ok()==-1) { - QString tmp = locate("appdata", QString("maps/") + mapfilename); + TQString tmp = locate("appdata", TQString("maps/") + mapfilename); delete map; map=new MidiMapper(tmp.local8Bit()); if (map->ok()!=1) @@ -1228,7 +1228,7 @@ void kmidClient::fillInComboSongs(void) currentsl->iteratorStart(); char temp[FILENAME_MAX]; char temp2[FILENAME_MAX]; - QString qs; + TQString qs; while (!currentsl->iteratorAtEnd()) { qs=currentsl->getIteratorName(); @@ -1326,7 +1326,7 @@ void kmidClient::saveCollections(void) #ifdef KMidDEBUG printf("Saving collections in: %s\n",collectionsfile.ascii()); #endif - slman->saveConfig(QFile::encodeName(collectionsfile)); + slman->saveConfig(TQFile::encodeName(collectionsfile)); } void kmidClient::saveLyrics(FILE *fh) @@ -1373,8 +1373,8 @@ void kmidClient::visibleChannelView(int i) } } channelView->show(); - connect(channelView,SIGNAL(signalToKMidClient(int *)),this,SLOT(communicationFromChannelView(int *))); - connect(kapp,SIGNAL(shutDown()),parentWidget(),SLOT(shuttingDown())); + connect(channelView,TQT_SIGNAL(signalToKMidClient(int *)),this,TQT_SLOT(communicationFromChannelView(int *))); + connect(kapp,TQT_SIGNAL(shutDown()),parentWidget(),TQT_SLOT(shuttingDown())); } else if ((channelView!=NULL)&&(i==0)) @@ -1522,15 +1522,15 @@ void kmidClient::downloadFinished(KIO::Job *) kapp->exit_loop(); } -QSize kmidClient::sizeHint() const +TQSize kmidClient::sizeHint() const { - QSize sh = QWidget::sizeHint(); - return sh.expandedTo(QSize(560,420)); + TQSize sh = TQWidget::sizeHint(); + return sh.expandedTo(TQSize(560,420)); } -QSizePolicy kmidClient::sizePolicy() +TQSizePolicy kmidClient::sizePolicy() { - return QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); + return TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding); } @@ -1599,7 +1599,7 @@ void kmidClient::setPlayListMode(int i) void kmidClient::slotSelectEncoding(int i) { if (i == 0) - kdispt->setLyricsEncoding(QString::null); // Default + kdispt->setLyricsEncoding(TQString::null); // Default else kdispt->setLyricsEncoding(KGlobal::charsets()->encodingForName(comboEncodings->text(i))); } diff --git a/kmid/kmidclient.h b/kmid/kmidclient.h index 70ddeb06..9444b34d 100644 --- a/kmid/kmidclient.h +++ b/kmid/kmidclient.h @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include #include @@ -52,7 +52,7 @@ class RhythmView; class ChannelView; class QString; -class kmidClient : public QWidget, virtual public KMidIface +class kmidClient : public TQWidget, virtual public KMidIface { Q_OBJECT private: @@ -65,8 +65,8 @@ private: struct kMidData m_kMid; - QTimer *timer4timebar; - QTimer *timer4events; + TQTimer *timer4timebar; + TQTimer *timer4events; ulong beginmillisec; ulong pausedatmillisec; @@ -87,7 +87,7 @@ private: SLManager *slman; int activecollection; - QString collectionsfile; + TQString collectionsfile; SongList *currentsl; int initializing_songs; int loopsong; @@ -105,7 +105,7 @@ private: int openFile(const char *filename); void allNotesOff(void); public: - kmidClient(QWidget *parent, KActionCollection *ac, const char *name=0); + kmidClient(TQWidget *parent, KActionCollection *ac, const char *name=0); ~kmidClient(); char *midiFileName(void) {return midifile_opened;}; @@ -114,14 +114,14 @@ public: int isPlaying(void) {return m_kMid.pctl->playing;}; int isPaused(void) {return (m_kMid.pctl->playing)&&(m_kMid.pctl->paused);}; - int openURL(const QString s); + int openURL(const TQString s); void repaintText(int typeoftextevents); static void kmidOutput(void); int ChooseTypeOfTextEvents(void); - QFont *getFont(void); + TQFont *getFont(void); void fontChanged(void); // The new font is already in KConfig SLManager *getSLManager(void) {return slman;}; @@ -151,7 +151,7 @@ public: void moveEventPointersTo(ulong ms); protected: -// void resizeEvent(QResizeEvent *qre); +// void resizeEvent(TQResizeEvent *qre); public slots: @@ -196,9 +196,9 @@ public: ChannelView *getChannelView(void) { return channelView; }; KDisplayText *getKDisplayText(void) { return kdispt; }; - QSizePolicy sizePolicy(); + TQSizePolicy sizePolicy(); - QComboBox *getComboSongs() { return comboSongs; }; + TQComboBox *getComboSongs() { return comboSongs; }; void play(); @@ -216,17 +216,17 @@ public: void setCurrentSong(int i); void setPlayListMode(int i); - QSize sizeHint() const; + TQSize sizeHint() const; private: - QSlider *timebar; + TQSlider *timebar; QSliderTime *timetags; - QSlider *volumebar; + TQSlider *volumebar; KLCDNumber *tempoLCD; KDisplayText *kdispt; - QLabel *qlabelTempo; - QComboBox *comboSongs; - QComboBox *comboEncodings; + TQLabel *qlabelTempo; + TQComboBox *comboSongs; + TQComboBox *comboEncodings; RhythmView *rhythmview; diff --git a/kmid/kmidframe.cpp b/kmid/kmidframe.cpp index 007f0b82..54f9d3c5 100644 --- a/kmid/kmidframe.cpp +++ b/kmid/kmidframe.cpp @@ -28,8 +28,8 @@ #include #include -#include -#include +#include +#include #include #include @@ -68,73 +68,73 @@ kmidFrame::kmidFrame(const char *name) /* kKeysAccel=new KAccel(this); kKeysAccel->insertItem(i18n("Play/Pause"),"Play/Pause", Key_Space); - kKeysAccel->connectItem("Play/Pause", this, SLOT(spacePressed())); + kKeysAccel->connectItem("Play/Pause", this, TQT_SLOT(spacePressed())); kKeysAccel->insertItem(i18n("Stop"),"Stop", Key_Backspace); - kKeysAccel->connectItem("Stop",kmidclient,SLOT(song_Stop())); + kKeysAccel->connectItem("Stop",kmidclient,TQT_SLOT(song_Stop())); kKeysAccel->insertItem(i18n("Previous Song"),"Previous Song", Key_Left); - kKeysAccel->connectItem("Previous Song",kmidclient,SLOT(song_PlayPrevSong())); + kKeysAccel->connectItem("Previous Song",kmidclient,TQT_SLOT(song_PlayPrevSong())); kKeysAccel->insertItem(i18n("Next Song"),"Next Song", Key_Right); - kKeysAccel->connectItem("Next Song",kmidclient,SLOT(song_PlayNextSong())); + kKeysAccel->connectItem("Next Song",kmidclient,TQT_SLOT(song_PlayNextSong())); kKeysAccel->insertItem(i18n("Scroll Down Karaoke"),"Scroll down karaoke",Key_Down); - kKeysAccel->connectItem("Scroll Down karaoke",kmidclient->getKDisplayText(),SLOT(ScrollDown())); + kKeysAccel->connectItem("Scroll Down karaoke",kmidclient->getKDisplayText(),TQT_SLOT(ScrollDown())); kKeysAccel->insertItem(i18n("Scroll Up Karaoke"),"Scroll up karaoke",Key_Up); - kKeysAccel->connectItem("Scroll Up Karaoke",kmidclient->getKDisplayText(),SLOT(ScrollUp())); + kKeysAccel->connectItem("Scroll Up Karaoke",kmidclient->getKDisplayText(),TQT_SLOT(ScrollUp())); kKeysAccel->insertItem(i18n("Scroll Page Down Karaoke"),"Scroll page down karaoke",Key_PageDown); - kKeysAccel->connectItem("Scroll Page Down Karaoke",kmidclient->getKDisplayText(),SLOT(ScrollPageDown())); + kKeysAccel->connectItem("Scroll Page Down Karaoke",kmidclient->getKDisplayText(),TQT_SLOT(ScrollPageDown())); kKeysAccel->insertItem(i18n("Scroll Page Up Karaoke"),"Scroll page up karaoke",Key_PageUp); - kKeysAccel->connectItem("Scroll Page Up Karaoke",kmidclient->getKDisplayText(),SLOT(ScrollPageUp())); + kKeysAccel->connectItem("Scroll Page Up Karaoke",kmidclient->getKDisplayText(),TQT_SLOT(ScrollPageUp())); kKeysAccel->readSettings(); */ - KStdAction::open(this, SLOT(file_Open()), actionCollection()); + KStdAction::open(this, TQT_SLOT(file_Open()), actionCollection()); (void)new KAction(i18n("&Save Lyrics..."), 0, this, - SLOT(file_SaveLyrics()), actionCollection(), "file_save_lyrics"); - KStdAction::quit(kapp, SLOT(quit()), actionCollection()); + TQT_SLOT(file_SaveLyrics()), actionCollection(), "file_save_lyrics"); + KStdAction::quit(kapp, TQT_SLOT(quit()), actionCollection()); (void)new KAction(i18n("&Play"), "player_play", Qt::Key_Space, - kmidclient, SLOT(slotPlay()), actionCollection(), "song_play"); + kmidclient, TQT_SLOT(slotPlay()), actionCollection(), "song_play"); (void)new KAction(i18n("P&ause"), "player_pause", Qt::Key_P, kmidclient, - SLOT(slotPause()), actionCollection(), "song_pause"); + TQT_SLOT(slotPause()), actionCollection(), "song_pause"); (void)new KAction(i18n("&Stop"), "player_stop", Qt::Key_Backspace, - kmidclient, SLOT(slotStop()), actionCollection(), "song_stop"); + kmidclient, TQT_SLOT(slotStop()), actionCollection(), "song_stop"); (void)new KAction(i18n("P&revious Song"), "player_start", Key_Left, - kmidclient, SLOT(slotPrevSong()), actionCollection(), + kmidclient, TQT_SLOT(slotPrevSong()), actionCollection(), "song_previous"); (void)new KAction(i18n("&Next Song"), "player_end", Key_Right, - kmidclient, SLOT(slotNextSong()), actionCollection(), + kmidclient, TQT_SLOT(slotNextSong()), actionCollection(), "song_next"); - (void)new KToggleAction(i18n("&Loop"), 0, this, SLOT(song_Loop()), + (void)new KToggleAction(i18n("&Loop"), 0, this, TQT_SLOT(song_Loop()), actionCollection(), "song_loop"); (void)new KAction(i18n("Rewind"), "2leftarrow", 0, kmidclient, - SLOT(slotRewind()), actionCollection(), "song_rewind"); + TQT_SLOT(slotRewind()), actionCollection(), "song_rewind"); (void)new KAction(i18n("Forward"), "2rightarrow", 0, kmidclient, - SLOT(slotForward()), actionCollection(), "song_forward"); + TQT_SLOT(slotForward()), actionCollection(), "song_forward"); - (void)new KAction(i18n("&Organize..."), 0, this, SLOT(collect_organize()), + (void)new KAction(i18n("&Organize..."), 0, this, TQT_SLOT(collect_organize()), actionCollection(), "collect_organize"); - QStringList playmodes; + TQStringList playmodes; playmodes.append(i18n("In Order")); playmodes.append(i18n("Shuffle")); - KSelectAction *act=new KSelectAction(i18n("Play Order"), 0, /*this, SLOT(collect_PlayOrder(int)),*/ + KSelectAction *act=new KSelectAction(i18n("Play Order"), 0, /*this, TQT_SLOT(collect_PlayOrder(int)),*/ actionCollection(), "play_order"); - connect(act,SIGNAL(activated(int)),this, SLOT(collect_PlayOrder(int))); + connect(act,TQT_SIGNAL(activated(int)),this, TQT_SLOT(collect_PlayOrder(int))); act->setItems(playmodes); (void)new KToggleAction(i18n("Auto-Add to Collection"), 0, this, - SLOT(collect_AutoAdd()), actionCollection(), "collect_autoadd"); + TQT_SLOT(collect_AutoAdd()), actionCollection(), "collect_autoadd"); playmodes.clear(); playmodes.append(i18n("&General MIDI")); playmodes.append(i18n("&MT-32")); - act=new KSelectAction(i18n("File Type"), 0,/* this, SLOT(options_FileType(int)),*/ + act=new KSelectAction(i18n("File Type"), 0,/* this, TQT_SLOT(options_FileType(int)),*/ actionCollection(), "file_type"); - connect(act,SIGNAL(activated(int)),this, SLOT(options_FileType(int))); + connect(act,TQT_SIGNAL(activated(int)),this, TQT_SLOT(options_FileType(int))); act->setItems(playmodes); playmodes.clear(); @@ -142,35 +142,35 @@ kmidFrame::kmidFrame(const char *name) playmodes.append(i18n("&Lyric Events")); act=new KSelectAction(i18n("Display Events"), Key_T, /*this, - SLOT(options_DisplayEvents(int)),*/ actionCollection(), + TQT_SLOT(options_DisplayEvents(int)),*/ actionCollection(), "display_events"); - connect(act,SIGNAL(activated(int)),this, SLOT(options_DisplayEvents(int))); + connect(act,TQT_SIGNAL(activated(int)),this, TQT_SLOT(options_DisplayEvents(int))); act->setItems(playmodes); (void)new KToggleAction(i18n("Automatic Text Chooser"), 0, this, - SLOT(options_AutomaticText()), actionCollection(), + TQT_SLOT(options_AutomaticText()), actionCollection(), "option_automatictext"); KToggleAction* togact = new KToggleAction(i18n("Show &Volume Bar"), "volume", - 0, this, SLOT(options_ShowVolumeBar()), actionCollection(), + 0, this, TQT_SLOT(options_ShowVolumeBar()), actionCollection(), "toggle_volumebar"); togact->setCheckedState(i18n("Hide &Volume Bar")); togact = new KToggleAction(i18n("Show &Channel View"), "piano", - 0, this, SLOT(options_ShowChannelView()), actionCollection(), + 0, this, TQT_SLOT(options_ShowChannelView()), actionCollection(), "toggle_channelview"); togact->setCheckedState(i18n("Hide &Channel View")); (void)new KAction(i18n("Channel View &Options..."), 0, this, - SLOT(options_ChannelViewOptions()), actionCollection(), + TQT_SLOT(options_ChannelViewOptions()), actionCollection(), "channelview_options"); (void)new KAction(i18n("&Font Change..."), 0, this, - SLOT(options_FontChange()), actionCollection(), + TQT_SLOT(options_FontChange()), actionCollection(), "change_font"); (void)new KAction(i18n("MIDI &Setup..."), 0, this, - SLOT(options_MidiSetup()), actionCollection(), "midi_setup"); + TQT_SLOT(options_MidiSetup()), actionCollection(), "midi_setup"); setupGUI((ToolBar | Keys | StatusBar | Save | Create ), "kmidui.rc" ); @@ -212,14 +212,14 @@ kmidFrame::kmidFrame(const char *name) setAcceptDrops(true); - connect( kmidclient, SIGNAL( mustRechooseTextEvent() ), - this, SLOT( rechooseTextEvent() ) ); + connect( kmidclient, TQT_SIGNAL( mustRechooseTextEvent() ), + this, TQT_SLOT( rechooseTextEvent() ) ); - connect( kmidclient, SIGNAL( stopPause() ), - this, SLOT( song_stopPause() ) ); + connect( kmidclient, TQT_SIGNAL( stopPause() ), + this, TQT_SLOT( song_stopPause() ) ); -// connect( kmidclient, SIGNAL( channelView_Destroyed() ), -// this, SLOT( channelViewDestroyed() ) ); +// connect( kmidclient, TQT_SIGNAL( channelView_Destroyed() ), +// this, TQT_SLOT( channelViewDestroyed() ) ); KCmdLineArgs * args = KCmdLineArgs::parsedArgs(); @@ -258,7 +258,7 @@ kmidFrame::kmidFrame(const char *name) /* kKeys->addKey("Play/Pause",Key_Space); kKeys->registerWidget("KMidFrame",this); - kKeys->connectFunction("KMidFrame","Play/Pause",this,SLOT(spacePressed())); + kKeys->connectFunction("KMidFrame","Play/Pause",this,TQT_SLOT(spacePressed())); */ // kKeysAccel->writeSettings(cfg); @@ -276,7 +276,7 @@ kmidFrame::~kmidFrame() void kmidFrame::file_Open() { - KURL url = KFileDialog::getOpenURL(QString::null, "*.kar *.mid *.kar.gz *.mid.gz\n*.kar *.kar.gz\n*.mid *.mid.gz\n*",this); + KURL url = KFileDialog::getOpenURL(TQString::null, "*.kar *.mid *.kar.gz *.mid.gz\n*.kar *.kar.gz\n*.mid *.mid.gz\n*",this); if( url.isEmpty() ) return; @@ -329,7 +329,7 @@ void kmidFrame::options_AutomaticText() void kmidFrame::options_FontChange() { KFontDialog *kfd=new KFontDialog(this); - QFont font; + TQFont font; font=*kmidclient->getFont(); kfd->getFont(font); delete kfd; @@ -340,7 +340,7 @@ void kmidFrame::options_FontChange() kmidclient->fontChanged(); } -int kmidFrame::autoAddSongToCollection(const QString& filename,int setactive) +int kmidFrame::autoAddSongToCollection(const TQString& filename,int setactive) { int r; SLManager *slman; @@ -354,7 +354,7 @@ int kmidFrame::autoAddSongToCollection(const QString& filename,int setactive) if (setactive) slman->createTemporaryCollection(); sl=slman->getCollection(0); if (filename==NULL) sl->AddSong(kmidclient->midiFileName()); - else sl->AddSong(QFile::encodeName(filename)); + else sl->AddSong(TQFile::encodeName(filename)); } else { @@ -364,7 +364,7 @@ int kmidFrame::autoAddSongToCollection(const QString& filename,int setactive) if (sl==NULL) return 0; int id; if (filename==NULL) id=sl->AddSong(kmidclient->midiFileName()); - else id=sl->AddSong(QFile::encodeName(filename)); + else id=sl->AddSong(TQFile::encodeName(filename)); if (setactive) { sl->setActiveSong(id); @@ -373,17 +373,17 @@ int kmidFrame::autoAddSongToCollection(const QString& filename,int setactive) return r; } -void kmidFrame::urlDrop_slot(QDropEvent* e) +void kmidFrame::urlDrop_slot(TQDropEvent* e) { dropEvent(e); } -void kmidFrame::dragEnterEvent(QDragEnterEvent* e) +void kmidFrame::dragEnterEvent(TQDragEnterEvent* e) { e->accept(KURLDrag::canDecode(e)); } -void kmidFrame::dropEvent( QDropEvent * event ) +void kmidFrame::dropEvent( TQDropEvent * event ) { KURL::List list; KURLDrag::decode(event, list); @@ -453,7 +453,7 @@ void kmidFrame::readProperties(KConfig *cfg) if ((activecol==0)&&(wasplaying)) // It was the temporary collection, { // surely the user would like to continue // hearing the song - QString s = cfg->readPathEntry("File"); + TQString s = cfg->readPathEntry("File"); int c=autoAddSongToCollection(s,1); kmidclient->setActiveCollection(c); } @@ -472,7 +472,7 @@ void kmidFrame::options_MidiSetup() MidiConfigDialog *dlg; dlg=new MidiConfigDialog(kmidclient->devman(),NULL,"MidiDialog"); - if (dlg->exec() == QDialog::Accepted) + if (dlg->exec() == TQDialog::Accepted) { KConfig *cfg=kapp->config(); cfg->setGroup("KMid"); @@ -480,7 +480,7 @@ void kmidFrame::options_MidiSetup() kmidclient->setMidiDevice(MidiConfigDialog::selecteddevice); cfg->setGroup("Midimapper"); cfg->writePathEntry("LoadFile", - (MidiConfigDialog::selectedmap==NULL)? QString::null:MidiConfigDialog::selectedmap); + (MidiConfigDialog::selectedmap==NULL)? TQString::null:MidiConfigDialog::selectedmap); kmidclient->setMidiMapFilename(MidiConfigDialog::selectedmap); } delete dlg; @@ -493,7 +493,7 @@ void kmidFrame::collect_organize() int idx=kmidclient->getActiveCollection(); dlg=new CollectionDialog(slman,idx,NULL,"MidiDialog"); - if (dlg->exec() == QDialog::Accepted) + if (dlg->exec() == TQDialog::Accepted) { kmidclient->setSLManager(slman); kmidclient->setActiveCollection(CollectionDialog::selectedC); @@ -551,7 +551,7 @@ void kmidFrame::collect_AutoAdd() void kmidFrame::file_SaveLyrics() { - KURL url = KFileDialog::getSaveURL(QString::null,"*",this); + KURL url = KFileDialog::getSaveURL(TQString::null,"*",this); if( url.isEmpty() ) return; @@ -562,17 +562,17 @@ void kmidFrame::file_SaveLyrics() return; } - QString filename = url.path(); + TQString filename = url.path(); struct stat statbuf; - if (stat(QFile::encodeName(filename), &statbuf)!=-1) + if (stat(TQFile::encodeName(filename), &statbuf)!=-1) { - QString s = i18n("File %1 already exists\nDo you want to overwrite it?").arg(filename); - if (KMessageBox::warningYesNo(this,s,QString::null,i18n("Overwrite"),KStdGuiItem::cancel())==1) + TQString s = i18n("File %1 already exists\nDo you want to overwrite it?").arg(filename); + if (KMessageBox::warningYesNo(this,s,TQString::null,i18n("Overwrite"),KStdGuiItem::cancel())==1) return; } - FILE *fh=fopen(QFile::encodeName(filename),"wt"); + FILE *fh=fopen(TQFile::encodeName(filename),"wt"); kmidclient->saveLyrics(fh); fclose(fh); } @@ -599,7 +599,7 @@ void kmidFrame::options_ShowChannelView() } else { kmidclient->visibleChannelView(1); - connect (kmidclient->getChannelView(),SIGNAL(destroyMe()),this,SLOT(channelViewDestroyed())); + connect (kmidclient->getChannelView(),TQT_SIGNAL(destroyMe()),this,TQT_SLOT(channelViewDestroyed())); } } @@ -615,7 +615,7 @@ void kmidFrame::options_ChannelViewOptions() ChannelViewConfigDialog *dlg; dlg=new ChannelViewConfigDialog(NULL,"ChannelViewConfigDialog"); - if (dlg->exec() == QDialog::Accepted) + if (dlg->exec() == TQDialog::Accepted) { if (kmidclient->getChannelView()) kmidclient->getChannelView()->lookMode( @@ -624,7 +624,7 @@ void kmidFrame::options_ChannelViewOptions() delete dlg; } -void kmidFrame::openURL( const QString url ) +void kmidFrame::openURL( const TQString url ) { int c=autoAddSongToCollection(url,1); kmidclient->setActiveCollection(c); diff --git a/kmid/kmidframe.h b/kmid/kmidframe.h index c24cfd52..8891720d 100644 --- a/kmid/kmidframe.h +++ b/kmid/kmidframe.h @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include class KApplication; @@ -55,24 +55,24 @@ private: int donttoggle; - QPopupMenu *m_file; - QPopupMenu *m_song; - QPopupMenu *m_collections; - QPopupMenu *m_options; - QPopupMenu *m_help; + TQPopupMenu *m_file; + TQPopupMenu *m_song; + TQPopupMenu *m_collections; + TQPopupMenu *m_options; + TQPopupMenu *m_help; */ KAccel *kKeysAccel; protected: - int autoAddSongToCollection(const QString& filename=QString::null,int setactive=1); + int autoAddSongToCollection(const TQString& filename=TQString::null,int setactive=1); virtual void saveProperties(KConfig *kcfg); virtual void readProperties(KConfig *kcfg); -// virtual void closeEvent(QCloseEvent *e); +// virtual void closeEvent(TQCloseEvent *e); - void dragEnterEvent(QDragEnterEvent* e); - void dropEvent ( QDropEvent * event ); + void dragEnterEvent(TQDragEnterEvent* e); + void dropEvent ( TQDropEvent * event ); public: @@ -100,7 +100,7 @@ public slots: void spacePressed(); - virtual void openURL( const QString s ); + virtual void openURL( const TQString s ); /* virtual void play(); virtual void pause(); virtual void stop(); @@ -119,7 +119,7 @@ public slots: virtual void setCollectionPlayMode(int i); virtual void setMidiDevice(int i); */ - void urlDrop_slot(class QDropEvent *); + void urlDrop_slot(class TQDropEvent *); void rechooseTextEvent(); diff --git a/kmid/ktrianglebutton.cpp b/kmid/ktrianglebutton.cpp index a4387ee5..1b31dade 100644 --- a/kmid/ktrianglebutton.cpp +++ b/kmid/ktrianglebutton.cpp @@ -26,12 +26,12 @@ ***************************************************************************/ #include "ktrianglebutton.h" -#include -#include -#include +#include +#include +#include -KTriangleButton::KTriangleButton( Direction d,QWidget *_parent, const char *name ) - : QButton( _parent , name) +KTriangleButton::KTriangleButton( Direction d,TQWidget *_parent, const char *name ) + : TQButton( _parent , name) { dir=d; raised = FALSE; @@ -42,7 +42,7 @@ KTriangleButton::~KTriangleButton() { } -void KTriangleButton::enterEvent( QEvent* ) +void KTriangleButton::enterEvent( TQEvent* ) { if ( isEnabled() ) { @@ -51,7 +51,7 @@ void KTriangleButton::enterEvent( QEvent* ) } } -void KTriangleButton::leaveEvent( QEvent * ) +void KTriangleButton::leaveEvent( TQEvent * ) { if( raised != FALSE ) { @@ -61,21 +61,21 @@ void KTriangleButton::leaveEvent( QEvent * ) } -void KTriangleButton::drawButton( QPainter *_painter ) +void KTriangleButton::drawButton( TQPainter *_painter ) { paint( _painter ); } -void KTriangleButton::drawButtonLabel( QPainter *_painter ) +void KTriangleButton::drawButtonLabel( TQPainter *_painter ) { paint( _painter ); } -void KTriangleButton::paint( QPainter *painter ) +void KTriangleButton::paint( TQPainter *painter ) { if ( isDown() || isOn() ) { - if ( style().styleHint(QStyle::SH_GUIStyle) == WindowsStyle ) + if ( style().styleHint(TQStyle::SH_GUIStyle) == WindowsStyle ) qDrawWinButton( painter, 0, 0, width(), height(), colorGroup(), TRUE ); else @@ -84,7 +84,7 @@ void KTriangleButton::paint( QPainter *painter ) } else if ( raised ) { - if ( style().styleHint(QStyle::SH_GUIStyle) == WindowsStyle ) + if ( style().styleHint(TQStyle::SH_GUIStyle) == WindowsStyle ) qDrawWinButton( painter, 0, 0, width(), height(), colorGroup(), FALSE ); else @@ -127,22 +127,22 @@ void KTriangleButton::paint( QPainter *painter ) } -void KTriangleButton::mousePressEvent(QMouseEvent *e) +void KTriangleButton::mousePressEvent(TQMouseEvent *e) { - QButton::mousePressEvent(e); + TQButton::mousePressEvent(e); usingTimer=true; startTimer(500); timeCount=0; } -void KTriangleButton::mouseReleaseEvent(QMouseEvent *e) +void KTriangleButton::mouseReleaseEvent(TQMouseEvent *e) { usingTimer=false; - QButton::mouseReleaseEvent(e); + TQButton::mouseReleaseEvent(e); } -void KTriangleButton::timerEvent(QTimerEvent *) +void KTriangleButton::timerEvent(TQTimerEvent *) { if (!usingTimer) {killTimers();return;}; if (timeCount==0) diff --git a/kmid/ktrianglebutton.h b/kmid/ktrianglebutton.h index 0ad4518d..3c951dec 100644 --- a/kmid/ktrianglebutton.h +++ b/kmid/ktrianglebutton.h @@ -28,7 +28,7 @@ #ifndef _ktrianglebutton_h_ #define _ktrianglebutton_h_ -#include +#include class KTriangleButton : public QButton { @@ -47,16 +47,16 @@ protected: int timeCount; public: - KTriangleButton( Direction d,QWidget *_parent = 0L, const char *name = 0L ); + KTriangleButton( Direction d,TQWidget *_parent = 0L, const char *name = 0L ); ~KTriangleButton(); - virtual void leaveEvent( QEvent *_ev ); - virtual void enterEvent( QEvent *_ev ); + virtual void leaveEvent( TQEvent *_ev ); + virtual void enterEvent( TQEvent *_ev ); - virtual void drawButton( QPainter *_painter ); - virtual void drawButtonLabel( QPainter *_painter ); + virtual void drawButton( TQPainter *_painter ); + virtual void drawButtonLabel( TQPainter *_painter ); - void paint( QPainter *_painter ); + void paint( TQPainter *_painter ); signals: void clickedQuickly(); @@ -64,9 +64,9 @@ signals: protected: bool raised; - virtual void mousePressEvent(QMouseEvent *e); - virtual void mouseReleaseEvent(QMouseEvent *e); - virtual void timerEvent(QTimerEvent *); + virtual void mousePressEvent(TQMouseEvent *e); + virtual void mouseReleaseEvent(TQMouseEvent *e); + virtual void timerEvent(TQTimerEvent *); }; diff --git a/kmid/main.cpp b/kmid/main.cpp index 719ecbb8..45cd1fab 100644 --- a/kmid/main.cpp +++ b/kmid/main.cpp @@ -25,8 +25,8 @@ #include #include -#include -#include +#include +#include #include #include @@ -45,7 +45,7 @@ int main(int argc, char **argv) printf("This is free software, and you are welcome to redistribute it\n"); printf("under certain conditions\n\n"); - QTextCodec::setCodecForCStrings(QTextCodec::codecForLocale()); + TQTextCodec::setCodecForCStrings(TQTextCodec::codecForLocale()); /* struct sigaction act; act.sa_handler = SIG_DFL; @@ -71,7 +71,7 @@ int main(int argc, char **argv) app.setMainWidget ( kmidframe ); - QObject::connect(&app,SIGNAL(shutDown()),kmidframe,SLOT(shuttingDown())); + TQObject::connect(&app,TQT_SIGNAL(shutDown()),kmidframe,TQT_SLOT(shuttingDown())); if (app.isRestored()) { diff --git a/kmid/midicfgdlg.cpp b/kmid/midicfgdlg.cpp index a10144a4..855de04a 100644 --- a/kmid/midicfgdlg.cpp +++ b/kmid/midicfgdlg.cpp @@ -21,10 +21,10 @@ or to Antonio Larrosa, Rio Arnoya, 10 5B, 29006 Malaga, Spain ***************************************************************************/ -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -38,25 +38,25 @@ #include MidiConfigDialog::MidiConfigDialog(DeviceManager *dm, - QWidget *parent,const char *name) : KDialogBase(parent,name,TRUE, + TQWidget *parent,const char *name) : KDialogBase(parent,name,TRUE, i18n("Configure MIDI Devices"), KDialogBase::Ok|KDialogBase::Cancel) { setMinimumSize(360,240); - QWidget *page = new QWidget( this ); + TQWidget *page = new TQWidget( this ); setMainWidget(page); - QVBoxLayout *topLayout=new QVBoxLayout(page, 0, spacingHint()); - QLabel *label=new QLabel(i18n("Select the MIDI device you want to use:"),page); + TQVBoxLayout *topLayout=new TQVBoxLayout(page, 0, spacingHint()); + TQLabel *label=new TQLabel(i18n("Select the MIDI device you want to use:"),page); topLayout->addWidget(label); - mididevices=new QListBox(page,"midideviceslist"); + mididevices=new TQListBox(page,"midideviceslist"); topLayout->addWidget(mididevices,3); - connect(mididevices,SIGNAL(highlighted(int)),SLOT(deviceselected(int))); + connect(mididevices,TQT_SIGNAL(highlighted(int)),TQT_SLOT(deviceselected(int))); devman=dm; - QString temp; + TQString temp; for (int i=0;imidiPorts()+devman->synthDevices();i++) { if (strcmp(devman->type(i),"")!=0) - temp = QString("%1 - %2").arg(devman->name(i)).arg(devman->type(i)); + temp = TQString("%1 - %2").arg(devman->name(i)).arg(devman->type(i)); else temp = devman->name(i); @@ -65,7 +65,7 @@ MidiConfigDialog::MidiConfigDialog(DeviceManager *dm, selecteddevice=devman->defaultDevice(); mididevices->setCurrentItem(selecteddevice); - QLabel *label2=new QLabel(i18n("Use the MIDI map:"),page); + TQLabel *label2=new TQLabel(i18n("Use the MIDI map:"),page); topLayout->addWidget(label2); @@ -78,20 +78,20 @@ MidiConfigDialog::MidiConfigDialog(DeviceManager *dm, strcpy(selectedmap,devman->midiMapFilename()); } - if (selectedmap!=NULL) maplabel=new QLabel(selectedmap,page); - else maplabel=new QLabel(i18n("None"),page); + if (selectedmap!=NULL) maplabel=new TQLabel(selectedmap,page); + else maplabel=new TQLabel(i18n("None"),page); topLayout->addWidget(maplabel); - QHBoxLayout *hbox=new QHBoxLayout(topLayout); + TQHBoxLayout *hbox=new TQHBoxLayout(topLayout); hbox->addStretch(1); - mapbrowse=new QPushButton(i18n("Browse..."),page); + mapbrowse=new TQPushButton(i18n("Browse..."),page); hbox->addWidget(mapbrowse); - connect(mapbrowse,SIGNAL(clicked()),SLOT(browseMap()) ); + connect(mapbrowse,TQT_SIGNAL(clicked()),TQT_SLOT(browseMap()) ); - mapnone=new QPushButton(i18n("None"),page); + mapnone=new TQPushButton(i18n("None"),page); hbox->addWidget(mapnone); - connect(mapnone,SIGNAL(clicked()),SLOT(noMap()) ); + connect(mapnone,TQT_SIGNAL(clicked()),TQT_SLOT(noMap()) ); topLayout->addStretch(1); @@ -104,7 +104,7 @@ void MidiConfigDialog::deviceselected(int idx) void MidiConfigDialog::browseMap() { - QString path = KGlobal::dirs()->findAllResources("appdata", "maps/*.map").last(); + TQString path = KGlobal::dirs()->findAllResources("appdata", "maps/*.map").last(); path.truncate(path.findRev('/')); KURL url = KFileDialog::getOpenURL(path,"*.map",this); @@ -118,11 +118,11 @@ void MidiConfigDialog::browseMap() return; } - QString filename = url.path(); + TQString filename = url.path(); delete selectedmap; selectedmap=new char[filename.length()+1]; - strcpy(selectedmap,QFile::encodeName(filename)); + strcpy(selectedmap,TQFile::encodeName(filename)); maplabel->setText(selectedmap); } diff --git a/kmid/midicfgdlg.h b/kmid/midicfgdlg.h index 0921d608..820a67d1 100644 --- a/kmid/midicfgdlg.h +++ b/kmid/midicfgdlg.h @@ -37,7 +37,7 @@ class MidiConfigDialog : public KDialogBase public: - MidiConfigDialog(DeviceManager *dm,QWidget *parent,const char *name); + MidiConfigDialog(DeviceManager *dm,TQWidget *parent,const char *name); public slots: void deviceselected(int idx); @@ -45,10 +45,10 @@ public slots: void noMap(); private: - QLabel *maplabel; - QListBox *mididevices; - QPushButton *mapbrowse; - QPushButton *mapnone; + TQLabel *maplabel; + TQListBox *mididevices; + TQPushButton *mapbrowse; + TQPushButton *mapnone; DeviceManager *devman; diff --git a/kmid/qslidertime.cpp b/kmid/qslidertime.cpp index 20349980..09975e25 100644 --- a/kmid/qslidertime.cpp +++ b/kmid/qslidertime.cpp @@ -22,19 +22,19 @@ ***************************************************************************/ #include "qslidertime.h" -#include -#include +#include +#include #include #define ARROW_LENGTH 13 -QSliderTime::QSliderTime( QSlider *ksl, QWidget *parent, const char *name) - : QWidget (parent,name) +QSliderTime::QSliderTime( TQSlider *ksl, TQWidget *parent, const char *name) + : TQWidget (parent,name) { kslider=ksl; -QPainter painter; -QFontMetrics qfmt(painter.font()); +TQPainter painter; +TQFontMetrics qfmt(painter.font()); fontheight=qfmt.height(); } @@ -50,9 +50,9 @@ char *QSliderTime::formatMillisecs(int ms,char *tmp) return tmp; } -void QSliderTime::paintEvent( QPaintEvent * ) +void QSliderTime::paintEvent( TQPaintEvent * ) { - QPainter painter(this); + TQPainter painter(this); // erase(); drawTimeMarks(&painter); @@ -70,12 +70,12 @@ if (t<=2000) t=2000; return t; } -void QSliderTime::drawTimeMarks(QPainter *painter) +void QSliderTime::drawTimeMarks(TQPainter *painter) { if (kslider==NULL) return; int i; int maxV = kslider->maxValue(); - QFontMetrics qfmt(painter->font()); + TQFontMetrics qfmt(painter->font()); fontheight=qfmt.height(); int ntimetags = width()/(qfmt.width("-88:88-")); int timestep; @@ -108,13 +108,13 @@ if (kslider==NULL) return; } -QSize QSliderTime::sizeHint() +TQSize QSliderTime::sizeHint() { - return QSize(10,fontheight+2); + return TQSize(10,fontheight+2); } -QSizePolicy QSliderTime::sizePolicy() +TQSizePolicy QSliderTime::sizePolicy() { - return QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Fixed); + return TQSizePolicy(TQSizePolicy::Expanding,TQSizePolicy::Fixed); } #include "qslidertime.moc" diff --git a/kmid/qslidertime.h b/kmid/qslidertime.h index 2c052720..31614b5c 100644 --- a/kmid/qslidertime.h +++ b/kmid/qslidertime.h @@ -24,7 +24,7 @@ #ifndef _kslidertime_h_ #define _kslidertime_h_ -#include +#include class QWidget; @@ -33,22 +33,22 @@ class QSliderTime : public QWidget Q_OBJECT private: - QSlider *kslider; + TQSlider *kslider; int fontheight; public: - QSliderTime( QSlider *ksl, QWidget *parent = NULL, const char *name = NULL ); + QSliderTime( TQSlider *ksl, TQWidget *parent = NULL, const char *name = NULL ); int getFontHeight(void) {return fontheight;}; - QSize sizeHint(); - QSizePolicy sizePolicy(); + TQSize sizeHint(); + TQSizePolicy sizePolicy(); private: - virtual void paintEvent( QPaintEvent * ); - void drawTimeMarks(QPainter *painter); + virtual void paintEvent( TQPaintEvent * ); + void drawTimeMarks(TQPainter *painter); char *formatMillisecs(int ms,char *tmp); }; diff --git a/kmid/rhythmview.cpp b/kmid/rhythmview.cpp index 7bcfc608..0358620d 100644 --- a/kmid/rhythmview.cpp +++ b/kmid/rhythmview.cpp @@ -23,7 +23,7 @@ ***************************************************************************/ #include "rhythmview.h" -RhythmView::RhythmView (QWidget *parent, const char *name) : QWidget (parent,name) +RhythmView::RhythmView (TQWidget *parent, const char *name) : TQWidget (parent,name) { lamps=NULL; setRhythm(4,4); @@ -83,7 +83,7 @@ void RhythmView::Beat(void) } -void RhythmView::resizeEvent(QResizeEvent *) +void RhythmView::resizeEvent(TQResizeEvent *) { int w=width()/num; int x=0; @@ -95,14 +95,14 @@ void RhythmView::resizeEvent(QResizeEvent *) } } -QSize RhythmView::sizeHint() +TQSize RhythmView::sizeHint() { - return QSize(10,10); + return TQSize(10,10); } -QSizePolicy RhythmView::sizePolicy() +TQSizePolicy RhythmView::sizePolicy() { -// return QWidget::sizePolicy(); - return QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Minimum); +// return TQWidget::sizePolicy(); + return TQSizePolicy(TQSizePolicy::Expanding,TQSizePolicy::Minimum); } diff --git a/kmid/rhythmview.h b/kmid/rhythmview.h index 96cbed55..c157e9d8 100644 --- a/kmid/rhythmview.h +++ b/kmid/rhythmview.h @@ -24,7 +24,7 @@ #ifndef _rhythmview_h_ #define _rhythmview_h_ -#include +#include #include class RhythmView : public QWidget @@ -34,7 +34,7 @@ class RhythmView : public QWidget KLed **lamps; public: - RhythmView (QWidget *parent, const char *name); + RhythmView (TQWidget *parent, const char *name); ~RhythmView(); void setRhythm(int numerator,int denominator); @@ -43,11 +43,11 @@ public: void Beat(void); // Just increase the beat - QSize sizeHint(); - QSizePolicy sizePolicy(); + TQSize sizeHint(); + TQSizePolicy sizePolicy(); private: - void resizeEvent(QResizeEvent *); + void resizeEvent(TQResizeEvent *); }; diff --git a/kmix/KMixApp.cpp b/kmix/KMixApp.cpp index d99d56a2..d1df895b 100644 --- a/kmix/KMixApp.cpp +++ b/kmix/KMixApp.cpp @@ -47,7 +47,7 @@ KMixApp::newInstance() else { m_kmix = new KMixWindow; - connect(this, SIGNAL(stopUpdatesOnVisibility()), m_kmix, SLOT(stopVisibilityUpdates())); + connect(this, TQT_SIGNAL(stopUpdatesOnVisibility()), m_kmix, TQT_SLOT(stopVisibilityUpdates())); if ( isRestored() && KMainWindow::canBeRestored(0) ) { m_kmix->restore(0, FALSE); diff --git a/kmix/dialogselectmaster.cpp b/kmix/dialogselectmaster.cpp index a19419ad..a201f33a 100644 --- a/kmix/dialogselectmaster.cpp +++ b/kmix/dialogselectmaster.cpp @@ -19,14 +19,14 @@ * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -57,26 +57,26 @@ DialogSelectMaster::~DialogSelectMaster() */ void DialogSelectMaster::createWidgets(Mixer *ptr_mixer) { - QFrame *m_mainFrame = plainPage(); - _layout = new QVBoxLayout(m_mainFrame,0,-1, "_layout" ); + TQFrame *m_mainFrame = plainPage(); + _layout = new TQVBoxLayout(m_mainFrame,0,-1, "_layout" ); if ( Mixer::mixers().count() > 1 ) { //kdDebug(67100) << "DialogSelectMaster::createPage count()>1" << "\n"; // More than one Mixer => show Combo-Box to select Mixer // Mixer widget line - QHBoxLayout* mixerNameLayout = new QHBoxLayout( _layout ); + TQHBoxLayout* mixerNameLayout = new TQHBoxLayout( _layout ); //widgetsLayout->setStretchFactor( mixerNameLayout, 0 ); - //QSizePolicy qsp( QSizePolicy::Ignored, QSizePolicy::Maximum); + //TQSizePolicy qsp( TQSizePolicy::Ignored, TQSizePolicy::Maximum); //mixerNameLayout->setSizePolicy(qsp); mixerNameLayout->setSpacing(KDialog::spacingHint()); - QLabel *qlbl = new QLabel( i18n("Current Mixer"), m_mainFrame ); + TQLabel *qlbl = new TQLabel( i18n("Current Mixer"), m_mainFrame ); mixerNameLayout->addWidget(qlbl); qlbl->setFixedHeight(qlbl->sizeHint().height()); m_cMixer = new KComboBox( FALSE, m_mainFrame, "mixerCombo" ); m_cMixer->setFixedHeight(m_cMixer->sizeHint().height()); - connect( m_cMixer, SIGNAL( activated( int ) ), this, SLOT( createPageByID( int ) ) ); + connect( m_cMixer, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( createPageByID( int ) ) ); //int id=1; for ( Mixer *mixer = Mixer::mixers().first(); mixer !=0; mixer = Mixer::mixers().next() ) { @@ -88,23 +88,23 @@ void DialogSelectMaster::createWidgets(Mixer *ptr_mixer) //id++; } // end for all_Mixers - QToolTip::add( m_cMixer, i18n("Current mixer" ) ); + TQToolTip::add( m_cMixer, i18n("Current mixer" ) ); mixerNameLayout->addWidget(m_cMixer); } // end if (more_than_1_Mixer) - QLabel *qlbl = new QLabel( i18n("Select the channel representing the master volume:"), m_mainFrame ); + TQLabel *qlbl = new TQLabel( i18n("Select the channel representing the master volume:"), m_mainFrame ); _layout->addWidget(qlbl); - m_scrollableChannelSelector = new QScrollView(m_mainFrame, "scrollableChannelSelector"); + m_scrollableChannelSelector = new TQScrollView(m_mainFrame, "scrollableChannelSelector"); m_scrollableChannelSelector->viewport()->setBackgroundMode(Qt::PaletteBackground); _layout->add(m_scrollableChannelSelector); - m_buttonGroupForScrollView = new QButtonGroup(this); // invisible QButtonGroup + m_buttonGroupForScrollView = new TQButtonGroup(this); // invisible QButtonGroup m_buttonGroupForScrollView->hide(); createPage(ptr_mixer); - connect( this, SIGNAL(okClicked()) , this, SLOT(apply()) ); + connect( this, TQT_SIGNAL(okClicked()) , this, TQT_SLOT(apply()) ); } /** @@ -138,10 +138,10 @@ void DialogSelectMaster::createPage(Mixer* mixer) m_mixerPKs.clear(); /** Reset page end -------------------------------------------------- */ - m_vboxForScrollView = new QVBox(m_scrollableChannelSelector->viewport()); + m_vboxForScrollView = new TQVBox(m_scrollableChannelSelector->viewport()); m_scrollableChannelSelector->addChild(m_vboxForScrollView); - QString masterKey = "----noMaster---"; // Use a non-matching name as default + TQString masterKey = "----noMaster---"; // Use a non-matching name as default MixDevice* master = mixer->masterDevice(); if ( master != 0 ) masterKey = master->getPK(); @@ -152,9 +152,9 @@ void DialogSelectMaster::createPage(Mixer* mixer) // Create a RadioButton for each MixDevice (excluding Enum's) if ( ! md->isEnum() && ! md->isSwitch() ) { //kdDebug(67100) << "DialogSelectMaster::createPage() mset append qrb" << endl; - QString mdName = md->name(); - mdName.replace('&', "&&"); // Quoting the '&' needed, to prevent QRadioButton creating an accelerator - QRadioButton* qrb = new QRadioButton( mdName, m_vboxForScrollView); + TQString mdName = md->name(); + mdName.replace('&', "&&"); // Quoting the '&' needed, to prevent TQRadioButton creating an accelerator + TQRadioButton* qrb = new TQRadioButton( mdName, m_vboxForScrollView); m_buttonGroupForScrollView->insert(qrb); //(qrb, md->num()); //_qEnabledCB.append(qrb); m_mixerPKs.push_back(md->getPK()); diff --git a/kmix/dialogselectmaster.h b/kmix/dialogselectmaster.h index 912d870d..71ee1d57 100644 --- a/kmix/dialogselectmaster.h +++ b/kmix/dialogselectmaster.h @@ -2,9 +2,9 @@ #define DIALOGSELECTMASTER_H class QButtonGroup; -#include +#include class QScrollView; -#include +#include class QVBox; class QVBoxLayout; @@ -21,7 +21,7 @@ class DialogSelectMaster : public KDialogBase ~DialogSelectMaster(); signals: - void newMasterSelected(int, QString& ); + void newMasterSelected(int, TQString& ); public slots: void apply(); @@ -29,12 +29,12 @@ class DialogSelectMaster : public KDialogBase private: void createWidgets(Mixer*); void createPage(Mixer*); - QVBoxLayout* _layout; + TQVBoxLayout* _layout; KComboBox* m_cMixer; - QScrollView* m_scrollableChannelSelector; - QVBox *m_vboxForScrollView; - QButtonGroup *m_buttonGroupForScrollView; - QStringList m_mixerPKs; + TQScrollView* m_scrollableChannelSelector; + TQVBox *m_vboxForScrollView; + TQButtonGroup *m_buttonGroupForScrollView; + TQStringList m_mixerPKs; private slots: void createPageByID(int mixerId); diff --git a/kmix/dialogviewconfiguration.cpp b/kmix/dialogviewconfiguration.cpp index f6c035e9..09e88d23 100644 --- a/kmix/dialogviewconfiguration.cpp +++ b/kmix/dialogviewconfiguration.cpp @@ -19,10 +19,10 @@ * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -33,25 +33,25 @@ #include "mixdevice.h" -DialogViewConfiguration::DialogViewConfiguration( QWidget*, ViewBase& view) +DialogViewConfiguration::DialogViewConfiguration( TQWidget*, ViewBase& view) : KDialogBase( Plain, i18n( "Configure" ), Ok|Cancel, Ok ), _view(view) { - QPtrList &mdws = view._mdws; - _layout = new QVBoxLayout(plainPage(),0,-1, "_layout" ); + TQPtrList &mdws = view._mdws; + _layout = new TQVBoxLayout(plainPage(),0,-1, "_layout" ); // kdDebug(67100) << "DialogViewConfiguration::DialogViewConfiguration add header" << "\n"; - QLabel* qlb = new QLabel( i18n("Configure"), plainPage() ); - //QLabel* qlb = new QLabel( i18n("Show"), plainPage() ); + TQLabel* qlb = new TQLabel( i18n("Configure"), plainPage() ); + //TQLabel* qlb = new TQLabel( i18n("Show"), plainPage() ); _layout->addWidget(qlb); - for ( QWidget *qw = mdws.first(); qw != 0; qw = mdws.next()) + for ( TQWidget *qw = mdws.first(); qw != 0; qw = mdws.next()) { if ( qw->inherits("MixDeviceWidget") ) { MixDeviceWidget *mdw = static_cast(qw); - QString mdName = mdw->mixDevice()->name(); - mdName.replace('&', "&&"); // Quoting the '&' needed, to prevent QCheckBox creating an accelerator - QCheckBox* cb = new QCheckBox( mdName, plainPage() ); + TQString mdName = mdw->mixDevice()->name(); + mdName.replace('&', "&&"); // Quoting the '&' needed, to prevent TQCheckBox creating an accelerator + TQCheckBox* cb = new TQCheckBox( mdName, plainPage() ); _qEnabledCB.append(cb); cb->setChecked( !mdw->isDisabled() ); //mdw->isVisible() ); _layout->addWidget(cb); @@ -59,7 +59,7 @@ DialogViewConfiguration::DialogViewConfiguration( QWidget*, ViewBase& view) } _layout->activate(); resize(_layout->sizeHint() ); - connect( this, SIGNAL(okClicked()) , this, SLOT(apply()) ); + connect( this, TQT_SIGNAL(okClicked()) , this, TQT_SLOT(apply()) ); } DialogViewConfiguration::~DialogViewConfiguration() @@ -68,13 +68,13 @@ DialogViewConfiguration::~DialogViewConfiguration() void DialogViewConfiguration::apply() { - QPtrList &mdws = _view._mdws; + TQPtrList &mdws = _view._mdws; // --- 2-Step Apply --- // --- Step 1: Show and Hide Widgets --- - QCheckBox *cb = _qEnabledCB.first(); - for ( QWidget *qw = mdws.first(); qw != 0; qw = mdws.next()) + TQCheckBox *cb = _qEnabledCB.first(); + for ( TQWidget *qw = mdws.first(); qw != 0; qw = mdws.next()) { if ( qw->inherits("MixDeviceWidget") ) { MixDeviceWidget *mdw = static_cast(qw); @@ -93,7 +93,7 @@ void DialogViewConfiguration::apply() _view.configurationUpdate(); } -QSize DialogViewConfiguration::sizeHint() const { +TQSize DialogViewConfiguration::sizeHint() const { // kdDebug(67100) << "DialogViewConfiguration::sizeHint() is (100,500)\n"; return _layout->sizeHint(); } diff --git a/kmix/dialogviewconfiguration.h b/kmix/dialogviewconfiguration.h index d63d1031..5ad17ba8 100644 --- a/kmix/dialogviewconfiguration.h +++ b/kmix/dialogviewconfiguration.h @@ -1,8 +1,8 @@ #ifndef DIALOGVIEWCONFIGURATION_H #define DIALOGVIEWCONFIGURATION_H -#include -#include +#include +#include class QVBoxLayout; #include @@ -14,17 +14,17 @@ class DialogViewConfiguration : public KDialogBase { Q_OBJECT public: - DialogViewConfiguration(QWidget* parent, ViewBase& view); + DialogViewConfiguration(TQWidget* parent, ViewBase& view); ~DialogViewConfiguration(); - QSize sizeHint() const; + TQSize sizeHint() const; public slots: void apply(); private: - QVBoxLayout* _layout; + TQVBoxLayout* _layout; ViewBase& _view; - QPtrList _qEnabledCB; + TQPtrList _qEnabledCB; }; #endif diff --git a/kmix/kledbutton.cpp b/kmix/kledbutton.cpp index f788f8ea..e0a7bff1 100644 --- a/kmix/kledbutton.cpp +++ b/kmix/kledbutton.cpp @@ -19,12 +19,12 @@ * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include +#include #include "kledbutton.h" -KLedButton::KLedButton(const QColor &col, QWidget *parent, const char *name) +KLedButton::KLedButton(const TQColor &col, TQWidget *parent, const char *name) : KLed( col, parent, name ) { // KLed and thus KLedButtung does not do proper positioning in QLayout's. @@ -32,8 +32,8 @@ KLedButton::KLedButton(const QColor &col, QWidget *parent, const char *name) installEventFilter(parent); } -KLedButton::KLedButton(const QColor& col, KLed::State st, KLed::Look look, - KLed::Shape shape, QWidget *parent, const char *name) +KLedButton::KLedButton(const TQColor& col, KLed::State st, KLed::Look look, + KLed::Shape shape, TQWidget *parent, const char *name) : KLed( col, st, look, shape, parent, name ) { } @@ -42,7 +42,7 @@ KLedButton::~KLedButton() { } -void KLedButton::mousePressEvent( QMouseEvent *e ) +void KLedButton::mousePressEvent( TQMouseEvent *e ) { if (e->button() == LeftButton) { @@ -51,12 +51,12 @@ void KLedButton::mousePressEvent( QMouseEvent *e ) } } -bool KLedButton::eventFilter( QObject* /*obj*/ , QEvent* /*ev*/ ) { +bool KLedButton::eventFilter( TQObject* /*obj*/ , TQEvent* /*ev*/ ) { // KLed and thus KLedButtung does not do proper positioning in QLayout's. // Thus I listen to my parents resize events and do it here ... OUCH, that's ugly /* No, this cannot work ! - if ( ev->type() == QEvent::Resize ) { - QResizeEvent* qre = (QResizeEvent*)ev; + if ( ev->type() == TQEvent::Resize ) { + TQResizeEvent* qre = (TQResizeEvent*)ev; this->move( qre->size().width() - width()/2, qre->size().height() - height()/2 ); } @@ -66,14 +66,14 @@ bool KLedButton::eventFilter( QObject* /*obj*/ , QEvent* /*ev*/ ) { } -QSize KLedButton::sizeHint() const +TQSize KLedButton::sizeHint() const { return size(); } -QSizePolicy KLedButton::sizePolicy () const +TQSizePolicy KLedButton::sizePolicy () const { - return QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); + return TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); } #include "kledbutton.moc" diff --git a/kmix/kledbutton.h b/kmix/kledbutton.h index 8ea33aba..e8d562af 100644 --- a/kmix/kledbutton.h +++ b/kmix/kledbutton.h @@ -22,7 +22,7 @@ #ifndef KLEDBUTTON_H #define KLEDBUTTON_H -#include +#include #include @@ -33,21 +33,21 @@ class KLedButton : public KLed { Q_OBJECT public: - KLedButton(const QColor &col=Qt::green, QWidget *parent=0, const char *name=0); - KLedButton(const QColor& col, KLed::State st, KLed::Look look, KLed::Shape shape, - QWidget *parent=0, const char *name=0); + KLedButton(const TQColor &col=Qt::green, TQWidget *parent=0, const char *name=0); + KLedButton(const TQColor& col, KLed::State st, KLed::Look look, KLed::Shape shape, + TQWidget *parent=0, const char *name=0); ~KLedButton(); - QSize sizeHint () const; - QSizePolicy sizePolicy () const; + TQSize sizeHint () const; + TQSizePolicy sizePolicy () const; signals: void stateChanged( bool newState ); protected: - void mousePressEvent ( QMouseEvent *e ); + void mousePressEvent ( TQMouseEvent *e ); private: - bool eventFilter( QObject*, QEvent* ); + bool eventFilter( TQObject*, TQEvent* ); }; #endif diff --git a/kmix/kmix-platforms.cpp b/kmix/kmix-platforms.cpp index 222119eb..d0c4d1d5 100644 --- a/kmix/kmix-platforms.cpp +++ b/kmix/kmix-platforms.cpp @@ -24,7 +24,7 @@ #include -#include +#include #include "mixer_backend.h" @@ -107,7 +107,7 @@ */ typedef Mixer_Backend *getMixerFunc( int device ); -typedef QString getDriverNameFunc( ); +typedef TQString getDriverNameFunc( ); typedef DevIterator* getDevIteratorFunc( ); struct MixerFactory { diff --git a/kmix/kmix.cpp b/kmix/kmix.cpp index cc603aed..85a3d39e 100644 --- a/kmix/kmix.cpp +++ b/kmix/kmix.cpp @@ -20,13 +20,13 @@ */ // include files for QT -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include // include files for KDE #include @@ -93,7 +93,7 @@ KMixWindow::KMixWindow() { hide(); } - connect( kapp, SIGNAL( aboutToQuit()), SLOT( saveSettings()) ); + connect( kapp, TQT_SIGNAL( aboutToQuit()), TQT_SLOT( saveSettings()) ); } @@ -107,25 +107,25 @@ void KMixWindow::initActions() { // file menu - KStdAction::quit( this, SLOT(quit()), actionCollection()); + KStdAction::quit( this, TQT_SLOT(quit()), actionCollection()); // settings menu - KStdAction::showMenubar( this, SLOT(toggleMenuBar()), actionCollection()); - KStdAction::preferences( this, SLOT(showSettings()), actionCollection()); + KStdAction::showMenubar( this, TQT_SLOT(toggleMenuBar()), actionCollection()); + KStdAction::preferences( this, TQT_SLOT(showSettings()), actionCollection()); new KAction( i18n( "Configure &Global Shortcuts..." ), "configure_shortcuts", 0, this, - SLOT( configureGlobalShortcuts() ), actionCollection(), "settings_global" ); - KStdAction::keyBindings( guiFactory(), SLOT(configureShortcuts()), actionCollection()); + TQT_SLOT( configureGlobalShortcuts() ), actionCollection(), "settings_global" ); + KStdAction::keyBindings( guiFactory(), TQT_SLOT(configureShortcuts()), actionCollection()); - (void) new KAction( i18n( "Hardware &Information" ), 0, this, SLOT( slotHWInfo() ), actionCollection(), "hwinfo" ); - (void) new KAction( i18n( "Hide Mixer Window" ), Key_Escape, this, SLOT(hide()), actionCollection(), "hide_kmixwindow" ); + (void) new KAction( i18n( "Hardware &Information" ), 0, this, TQT_SLOT( slotHWInfo() ), actionCollection(), "hwinfo" ); + (void) new KAction( i18n( "Hide Mixer Window" ), Key_Escape, this, TQT_SLOT(hide()), actionCollection(), "hide_kmixwindow" ); m_globalAccel = new KGlobalAccel( this ); - m_globalAccel->insert( "Increase volume", i18n( "Increase Volume of Master Channel"), QString::null, - KShortcut(), KShortcut(), this, SLOT( increaseVolume() ) ); - m_globalAccel->insert( "Decrease volume", i18n( "Decrease Volume of Master Channel"), QString::null, - KShortcut(), KShortcut(), this, SLOT( decreaseVolume() ) ); - m_globalAccel->insert( "Toggle mute", i18n( "Toggle Mute of Master Channel"), QString::null, - KShortcut(), KShortcut(), this, SLOT( toggleMuted() ) ); + m_globalAccel->insert( "Increase volume", i18n( "Increase Volume of Master Channel"), TQString::null, + KShortcut(), KShortcut(), this, TQT_SLOT( increaseVolume() ) ); + m_globalAccel->insert( "Decrease volume", i18n( "Decrease Volume of Master Channel"), TQString::null, + KShortcut(), KShortcut(), this, TQT_SLOT( decreaseVolume() ) ); + m_globalAccel->insert( "Toggle mute", i18n( "Toggle Mute of Master Channel"), TQString::null, + KShortcut(), KShortcut(), this, TQT_SLOT( toggleMuted() ) ); m_globalAccel->readSettings(); m_globalAccel->updateConnections(); @@ -137,8 +137,8 @@ void KMixWindow::initPrefDlg() { m_prefDlg = new KMixPrefDlg( this ); - connect( m_prefDlg, SIGNAL(signalApplied(KMixPrefDlg *)), - this, SLOT(applyPrefs(KMixPrefDlg *)) ); + connect( m_prefDlg, TQT_SIGNAL(signalApplied(KMixPrefDlg *)), + this, TQT_SLOT(applyPrefs(KMixPrefDlg *)) ); } @@ -146,30 +146,30 @@ void KMixWindow::initWidgets() { // Main widget and layout - setCentralWidget( new QWidget( this, "qt_central_widget" ) ); + setCentralWidget( new TQWidget( this, "qt_central_widget" ) ); // Widgets layout - widgetsLayout = new QVBoxLayout( centralWidget(), 0, 0, "widgetsLayout" ); - widgetsLayout->setResizeMode(QLayout::Minimum); // works fine + widgetsLayout = new TQVBoxLayout( centralWidget(), 0, 0, "widgetsLayout" ); + widgetsLayout->setResizeMode(TQLayout::Minimum); // works fine // Mixer widget line - mixerNameLayout = new QHBox( centralWidget(), "mixerNameLayout" ); + mixerNameLayout = new TQHBox( centralWidget(), "mixerNameLayout" ); widgetsLayout->setStretchFactor( mixerNameLayout, 0 ); - QSizePolicy qsp( QSizePolicy::Ignored, QSizePolicy::Maximum); + TQSizePolicy qsp( TQSizePolicy::Ignored, TQSizePolicy::Maximum); mixerNameLayout->setSizePolicy(qsp); mixerNameLayout->setSpacing(KDialog::spacingHint()); - QLabel *qlbl = new QLabel( i18n("Current mixer:"), mixerNameLayout ); + TQLabel *qlbl = new TQLabel( i18n("Current mixer:"), mixerNameLayout ); qlbl->setFixedHeight(qlbl->sizeHint().height()); m_cMixer = new KComboBox( FALSE, mixerNameLayout, "mixerCombo" ); m_cMixer->setFixedHeight(m_cMixer->sizeHint().height()); - connect( m_cMixer, SIGNAL( activated( int ) ), this, SLOT( showSelectedMixer( int ) ) ); - QToolTip::add( m_cMixer, i18n("Current mixer" ) ); + connect( m_cMixer, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( showSelectedMixer( int ) ) ); + TQToolTip::add( m_cMixer, i18n("Current mixer" ) ); // Add first layout to widgets widgetsLayout->addWidget( mixerNameLayout ); - m_wsMixers = new QWidgetStack( centralWidget(), "MixerWidgetStack" ); + m_wsMixers = new TQWidgetStack( centralWidget(), "MixerWidgetStack" ); widgetsLayout->setStretchFactor( m_wsMixers, 10 ); widgetsLayout->addWidget( m_wsMixers ); @@ -213,7 +213,7 @@ KMixWindow::updateDocking() * Preparation for fixing Bug #55078 - scheduled for KDE3.4.1 . * This text will be plugged into the dock-icon popup menu. */ - QString selectChannel = i18n("Select Channel"); // This text will be used in KDE3.4.1 !!! + TQString selectChannel = i18n("Select Channel"); // This text will be used in KDE3.4.1 !!! m_dockWidget->show(); } @@ -276,7 +276,7 @@ KMixWindow::saveConfig() { if ( mw->mixer()->isOpen() ) { // protect from unplugged devices (better do *not* save them) - QString grp; + TQString grp; grp.sprintf( "%i", mw->id() ); mw->saveConfig( config, grp ); } @@ -297,17 +297,17 @@ KMixWindow::loadConfig() m_hideOnClose = config->readBoolEntry("HideOnClose", true); m_showTicks = config->readBoolEntry("Tickmarks", true); m_showLabels = config->readBoolEntry("Labels", true); - const QString& valueStyleString = config->readEntry("ValueStyle", "None"); + const TQString& valueStyleString = config->readEntry("ValueStyle", "None"); m_onLogin = config->readBoolEntry("startkdeRestore", true ); m_dockIconMuting = config->readBoolEntry( "DockIconMuting", false); m_startVisible = config->readBoolEntry("Visible", true); m_multiDriverMode = config->readBoolEntry("MultiDriver", false); m_surroundView = config->readBoolEntry("Experimental-ViewSurround", false ); m_gridView = config->readBoolEntry("Experimental-ViewGrid", false ); - const QString& orientationString = config->readEntry("Orientation", "Horizontal"); - QString mixerMasterCard = config->readEntry( "MasterMixer", "" ); + const TQString& orientationString = config->readEntry("Orientation", "Horizontal"); + TQString mixerMasterCard = config->readEntry( "MasterMixer", "" ); Mixer::setMasterCard(mixerMasterCard); - QString masterDev = config->readEntry( "MasterMixerDevice", "" ); + TQString masterDev = config->readEntry( "MasterMixerDevice", "" ); Mixer::setMasterCardDevice(masterDev); if ( valueStyleString == "Absolute" ) @@ -331,12 +331,12 @@ KMixWindow::loadConfig() // restore window size and position if ( !kapp->isRestored() ) // done by the session manager otherwise { - QSize defSize( minimumWidth(), height() ); - QSize size = config->readSizeEntry("Size", &defSize ); + TQSize defSize( minimumWidth(), height() ); + TQSize size = config->readSizeEntry("Size", &defSize ); if(!size.isEmpty()) resize(size); - QPoint defPos = pos(); - QPoint pos = config->readPointEntry("Position", &defPos); + TQPoint defPos = pos(); + TQPoint pos = config->readPointEntry("Position", &defPos); move(pos); } } @@ -381,7 +381,7 @@ KMixWindow::initMixerWidgets() m_cMixer->insertItem( mixer->mixerName() ); m_wsMixers->addWidget( mw, id ); - QString grp; + TQString grp; grp.sprintf( "%i", mw->id() ); mw->loadConfig( kapp->config(), grp ); @@ -514,11 +514,11 @@ KMixWindow::applyPrefs( KMixPrefDlg *prefDlg ) ( prefDlg->_rbVertical->isChecked() && m_toplevelOrientation == Qt::Horizontal ) || ( prefDlg->_rbHorizontal->isChecked() && m_toplevelOrientation == Qt::Vertical ); if ( toplevelOrientationHasChanged ) { - QString msg = i18n("The change of orientation will be adopted on the next start of KMix."); + TQString msg = i18n("The change of orientation will be adopted on the next start of KMix."); KMessageBox::information(0,msg); } if ( prefDlg->_rbVertical->isChecked() ) { - //QString "For a change of language to take place, quit and restart KDiff3."; + //TQString "For a change of language to take place, quit and restart KDiff3."; //kdDebug(67100) << "KMix should change to Vertical layout\n"; m_toplevelOrientation = Qt::Vertical; } @@ -568,7 +568,7 @@ KMixWindow::toggleMenuBar() } void -KMixWindow::showEvent( QShowEvent * ) +KMixWindow::showEvent( TQShowEvent * ) { if ( m_visibilityUpdateAllowed ) m_isVisible = isVisible(); @@ -576,7 +576,7 @@ KMixWindow::showEvent( QShowEvent * ) } void -KMixWindow::hideEvent( QHideEvent * ) +KMixWindow::hideEvent( TQHideEvent * ) { if ( m_visibilityUpdateAllowed ) { diff --git a/kmix/kmix.h b/kmix/kmix.h index d5c2a0d0..4404e7f5 100644 --- a/kmix/kmix.h +++ b/kmix/kmix.h @@ -28,8 +28,8 @@ #endif // include files for Qt -#include -#include +#include +#include class QHBox; class QWidgetStack; @@ -75,8 +75,8 @@ KMixWindow : public KMainWindow void updateDocking(); bool queryClose(); - void showEvent( QShowEvent * ); - void hideEvent( QHideEvent * ); + void showEvent( TQShowEvent * ); + void hideEvent( TQHideEvent * ); public slots: void quit(); @@ -92,9 +92,9 @@ KMixWindow : public KMainWindow private: KAccel *m_keyAccel; KGlobalAccel *m_globalAccel; - QPopupMenu *m_fileMenu; - QPopupMenu *m_viewMenu; - QPopupMenu *m_helpMenu; + TQPopupMenu *m_fileMenu; + TQPopupMenu *m_viewMenu; + TQPopupMenu *m_helpMenu; bool m_showDockWidget; bool m_volumeWidget; @@ -113,15 +113,15 @@ KMixWindow : public KMainWindow bool m_gridView; // Experimental. Off by default Qt::Orientation m_toplevelOrientation; - QPtrList m_mixerWidgets; + TQPtrList m_mixerWidgets; - QHBox* mixerNameLayout; + TQHBox* mixerNameLayout; KComboBox *m_cMixer; - QWidgetStack *m_wsMixers; + TQWidgetStack *m_wsMixers; KMixPrefDlg *m_prefDlg; KMixDockWidget *m_dockWidget; - QString m_hwInfoString; - QVBoxLayout *widgetsLayout; + TQString m_hwInfoString; + TQVBoxLayout *widgetsLayout; private slots: //void removeMixerWidget( KMixerWidget *mw ); diff --git a/kmix/kmixapplet.cpp b/kmix/kmixapplet.cpp index 92e94682..c0fed889 100644 --- a/kmix/kmixapplet.cpp +++ b/kmix/kmixapplet.cpp @@ -24,14 +24,14 @@ #include // QT -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include // KDE @@ -66,7 +66,7 @@ extern "C" { - KDE_EXPORT KPanelApplet* init(QWidget *parent, const QString& configFile) + KDE_EXPORT KPanelApplet* init(TQWidget *parent, const TQString& configFile) { KGlobal::locale()->insertCatalogue("kmix"); return new KMixApplet(configFile, KPanelApplet::Normal, @@ -77,21 +77,21 @@ extern "C" int KMixApplet::s_instCount = 0; // KMixApplet::Mixer::mixers(); -static const QColor highColor = KGlobalSettings::baseColor(); -static const QColor lowColor = KGlobalSettings::highlightColor(); -static const QColor backColor = "#000000"; -static const QColor mutedHighColor = "#FFFFFF"; -static const QColor mutedLowColor = "#808080"; -static const QColor mutedBackColor = "#000000"; +static const TQColor highColor = KGlobalSettings::baseColor(); +static const TQColor lowColor = KGlobalSettings::highlightColor(); +static const TQColor backColor = "#000000"; +static const TQColor mutedHighColor = "#FFFFFF"; +static const TQColor mutedLowColor = "#808080"; +static const TQColor mutedBackColor = "#000000"; -AppletConfigDialog::AppletConfigDialog( QWidget * parent, const char * name ) - : KDialogBase( KDialogBase::Plain, QString::null, +AppletConfigDialog::AppletConfigDialog( TQWidget * parent, const char * name ) + : KDialogBase( KDialogBase::Plain, TQString::null, KDialogBase::Ok | KDialogBase::Apply | KDialogBase::Cancel, KDialogBase::Ok, parent, name, false, true) { setPlainCaption(i18n("Configure - Mixer Applet")); - QFrame* page = plainPage(); - QVBoxLayout *topLayout = new QVBoxLayout(page); + TQFrame* page = plainPage(); + TQVBoxLayout *topLayout = new TQVBoxLayout(page); colorWidget = new ColorWidget(page); topLayout->addWidget(colorWidget); setUseCustomColors(false); @@ -108,28 +108,28 @@ void AppletConfigDialog::slotApply() emit applied(); } -void AppletConfigDialog::setActiveColors(const QColor& high, const QColor& low, const QColor& back) +void AppletConfigDialog::setActiveColors(const TQColor& high, const TQColor& low, const TQColor& back) { colorWidget->activeHigh->setColor(high); colorWidget->activeLow->setColor(low); colorWidget->activeBack->setColor(back); } -void AppletConfigDialog::activeColors(QColor& high, QColor& low, QColor& back) const +void AppletConfigDialog::activeColors(TQColor& high, TQColor& low, TQColor& back) const { high = colorWidget->activeHigh->color(); low = colorWidget->activeLow->color(); back = colorWidget->activeBack->color(); } -void AppletConfigDialog::setMutedColors(const QColor& high, const QColor& low, const QColor& back) +void AppletConfigDialog::setMutedColors(const TQColor& high, const TQColor& low, const TQColor& back) { colorWidget->mutedHigh->setColor(high); colorWidget->mutedLow->setColor(low); colorWidget->mutedBack->setColor(back); } -void AppletConfigDialog::mutedColors(QColor& high, QColor& low, QColor& back) const +void AppletConfigDialog::mutedColors(TQColor& high, TQColor& low, TQColor& back) const { high = colorWidget->mutedHigh->color(); low = colorWidget->mutedLow->color(); @@ -149,8 +149,8 @@ bool AppletConfigDialog::useCustomColors() const } -KMixApplet::KMixApplet( const QString& configFile, Type t, - QWidget *parent, const char *name ) +KMixApplet::KMixApplet( const TQString& configFile, Type t, + TQWidget *parent, const char *name ) : KPanelApplet( configFile, t, KPanelApplet::Preferences | KPanelApplet::ReportBug | KPanelApplet::About, parent, name ), m_mixerWidget(0), m_errorLabel(0), m_pref(0), @@ -161,12 +161,12 @@ KMixApplet::KMixApplet( const QString& configFile, Type t, setBackgroundOrigin(AncestorOrigin); kdDebug(67100) << "KMixApplet::KMixApplet instancing Applet. Old s_instCount="<< s_instCount << " configfile=" << configFile << endl; //kdDebug(67100) << "KMixApplet::KMixApplet()" << endl; - _layout = new QHBoxLayout(this); // it will always only be one item in it, so we don't care whether it is HBox or VBox + _layout = new TQHBoxLayout(this); // it will always only be one item in it, so we don't care whether it is HBox or VBox // init static vars if ( s_instCount == 0) { Mixer::mixers().setAutoDelete( TRUE ); - QString dummyStringHwinfo; + TQString dummyStringHwinfo; MixerToolBox::initMixer(Mixer::mixers(), false, dummyStringHwinfo); } s_instCount++; @@ -204,10 +204,10 @@ KMixApplet::KMixApplet( const QString& configFile, Type t, { // No mixer set by user (kmixappletrc_*) and more than one to choose // We do NOT know which mixer to use => ask the User - m_errorLabel = new QPushButton( i18n("Select Mixer"), this ); + m_errorLabel = new TQPushButton( i18n("Select Mixer"), this ); m_errorLabel->setGeometry(0, 0, m_errorLabel->sizeHint().width(), m_errorLabel->sizeHint().height() ); resize( m_errorLabel->sizeHint() ); - connect( m_errorLabel, SIGNAL(clicked()), this, SLOT(selectMixer()) ); + connect( m_errorLabel, TQT_SIGNAL(clicked()), this, TQT_SLOT(selectMixer()) ); } else { // We know which mixer to use: Call positionChange(), which does all the creating @@ -266,7 +266,7 @@ void KMixApplet::loadConfig() cfg->setGroup(0); _mixerId = cfg->readEntry( "Mixer", "undef" ); - _mixerName = cfg->readEntry( "MixerName", QString::null ); + _mixerName = cfg->readEntry( "MixerName", TQString::null ); _customColors = cfg->readBoolEntry( "ColorCustom", false ); @@ -282,7 +282,7 @@ void KMixApplet::loadConfig() } -void KMixApplet::loadConfig( KConfig *config, const QString &grp ) +void KMixApplet::loadConfig( KConfig *config, const TQString &grp ) { if ( m_mixerWidget ) { //config->setGroup( grp ); @@ -291,7 +291,7 @@ void KMixApplet::loadConfig( KConfig *config, const QString &grp ) } -void KMixApplet::saveConfig( KConfig *config, const QString &grp ) +void KMixApplet::saveConfig( KConfig *config, const TQString &grp ) { if ( m_mixerWidget ) { config->setGroup( grp ); @@ -308,19 +308,19 @@ void KMixApplet::saveConfig( KConfig *config, const QString &grp ) */ void KMixApplet::selectMixer() { - QStringList lst; + TQStringList lst; int n=1; for (Mixer *mixer=Mixer::mixers().first(); mixer!=0; mixer=Mixer::mixers().next()) { - QString s; + TQString s; s.sprintf("%i. %s", n, mixer->mixerName().ascii()); lst << s; n++; } bool ok = FALSE; - QString res = KInputDialog::getItem( i18n("Mixers"), + TQString res = KInputDialog::getItem( i18n("Mixers"), i18n("Available mixers:"), lst, 1, FALSE, &ok, this ); if ( ok ) @@ -356,7 +356,7 @@ void KMixApplet::help() void KMixApplet::positionChange(Position pos) { orientationChange( orientation() ); - QResizeEvent e( size(), size() ); // from KPanelApplet::positionChange + TQResizeEvent e( size(), size() ); // from KPanelApplet::positionChange resizeEvent( &e ); // from KPanelApplet::positionChange if ( m_errorLabel == 0) { @@ -367,7 +367,7 @@ void KMixApplet::positionChange(Position pos) { delete m_mixerWidget; } m_mixerWidget = new ViewApplet( this, _mixer->name(), _mixer, 0, pos ); - connect ( m_mixerWidget, SIGNAL(appletContentChanged()), this, SLOT(updateGeometrySlot()) ); + connect ( m_mixerWidget, TQT_SIGNAL(appletContentChanged()), this, TQT_SLOT(updateGeometrySlot()) ); m_mixerWidget->createDeviceWidgets(); _layout->add(m_mixerWidget); _layout->activate(); @@ -375,19 +375,19 @@ void KMixApplet::positionChange(Position pos) { loadConfig(); setColors(); - const QSize panelAppletConstrainedSize = sizeHint(); + const TQSize panelAppletConstrainedSize = sizeHint(); m_mixerWidget->setGeometry( 0, 0, panelAppletConstrainedSize.width(), panelAppletConstrainedSize.height() ); resize( panelAppletConstrainedSize.width(), panelAppletConstrainedSize.height() ); //setFixedSize(panelAppletConstrainedSize.width(), panelAppletConstrainedSize.height() ); //kdDebug(67100) << "KMixApplet::positionChange(). New MDW is at " << panelAppletConstrainedSize << endl; m_mixerWidget->show(); - //connect( _mixer, SIGNAL(newVolumeLevels()), m_mixerWidget, SLOT(refreshVolumeLevels()) ); + //connect( _mixer, TQT_SIGNAL(newVolumeLevels()), m_mixerWidget, TQT_SLOT(refreshVolumeLevels()) ); } } /************* GEOMETRY STUFF START ********************************/ -void KMixApplet::resizeEvent(QResizeEvent *e) +void KMixApplet::resizeEvent(TQResizeEvent *e) { //kdDebug(67100) << "KMixApplet::resizeEvent(). New MDW is at " << e->size() << endl; @@ -414,9 +414,9 @@ void KMixApplet::updateGeometrySlot() { } -QSize KMixApplet::sizeHint() const { +TQSize KMixApplet::sizeHint() const { //kdDebug(67100) << "KMixApplet::sizeHint()\n"; - QSize qsz; + TQSize qsz; if ( m_errorLabel !=0 ) { qsz = m_errorLabel->sizeHint(); } @@ -448,15 +448,15 @@ int KMixApplet::heightForWidth(int) const { -QSizePolicy KMixApplet::sizePolicy() const { - // return QSizePolicy(QSizePolicy::Preferred,QSizePolicy::Preferred); +TQSizePolicy KMixApplet::sizePolicy() const { + // return TQSizePolicy(TQSizePolicy::Preferred,TQSizePolicy::Preferred); if ( orientation() == Qt::Vertical ) { //kdDebug(67100) << "KMixApplet::sizePolicy=(Ignored,Fixed)\n"; - return QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); + return TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed); } else { //kdDebug(67100) << "KMixApplet::sizePolicy=(Fixed,Ignored)\n"; - return QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred); + return TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Preferred); } } @@ -477,8 +477,8 @@ void KMixApplet::preferences() if ( !m_pref ) { m_pref = new AppletConfigDialog( this ); - connect(m_pref, SIGNAL(finished()), SLOT(preferencesDone())); - connect( m_pref, SIGNAL(applied()), SLOT(applyPreferences()) ); + connect(m_pref, TQT_SIGNAL(finished()), TQT_SLOT(preferencesDone())); + connect( m_pref, TQT_SIGNAL(applied()), TQT_SLOT(applyPreferences()) ); m_pref->setActiveColors(_colors.high , _colors.low , _colors.back); m_pref->setMutedColors (_colors.mutedHigh, _colors.mutedLow, _colors.mutedBack); @@ -511,17 +511,17 @@ void KMixApplet::applyPreferences() return; /* - QSize si = m_mixerWidget->size(); + TQSize si = m_mixerWidget->size(); m_mixerWidget->resize( si ); */ setColors(); saveConfig(); } -void KMixApplet::paletteChange ( const QPalette &) { +void KMixApplet::paletteChange ( const TQPalette &) { if ( ! _customColors ) { // We take over Colors from paletteChange(), if the user has not set custom colors. - // ignore the given QPalette and use the values from KGlobalSettings instead + // ignore the given TQPalette and use the values from KGlobalSettings instead _colors.high = KGlobalSettings::highlightColor(); _colors.low = KGlobalSettings::baseColor(); _colors.back = backColor; @@ -551,8 +551,8 @@ void KMixApplet::setColors( const Colors &color ) // can happen for example after a paletteChange() return; } - QPtrList &mdws = m_mixerWidget->_mdws; - for ( QWidget* qmdw=mdws.first(); qmdw != 0; qmdw=mdws.next() ) { + TQPtrList &mdws = m_mixerWidget->_mdws; + for ( TQWidget* qmdw=mdws.first(); qmdw != 0; qmdw=mdws.next() ) { if ( qmdw->inherits("MixDeviceWidget") ) { // -<- temporary check. Later we *know* that it is correct static_cast(qmdw)->setColors( color.high, color.low, color.back ); static_cast(qmdw)->setMutedColors( color.mutedHigh, color.mutedLow, color.mutedBack ); diff --git a/kmix/kmixapplet.h b/kmix/kmixapplet.h index 3962b711..561a596f 100644 --- a/kmix/kmixapplet.h +++ b/kmix/kmixapplet.h @@ -23,9 +23,9 @@ #define KMIXAPPLET_H // Qt -#include -#include -#include +#include +#include +#include // KDE #include @@ -44,14 +44,14 @@ class AppletConfigDialog : public KDialogBase { Q_OBJECT public: - AppletConfigDialog( QWidget * parent=0, const char * name=0 ); + AppletConfigDialog( TQWidget * parent=0, const char * name=0 ); virtual ~AppletConfigDialog() {}; - void setActiveColors(const QColor& high, const QColor& low, const QColor& back); - void activeColors(QColor& high, QColor& low, QColor& back) const; + void setActiveColors(const TQColor& high, const TQColor& low, const TQColor& back); + void activeColors(TQColor& high, TQColor& low, TQColor& back) const; - void setMutedColors(const QColor& high, const QColor& low, const QColor& back); - void mutedColors(QColor& high, QColor& low, QColor& back) const; + void setMutedColors(const TQColor& high, const TQColor& low, const TQColor& back); + void mutedColors(TQColor& high, TQColor& low, TQColor& back) const; void setUseCustomColors(bool); bool useCustomColors() const; @@ -72,22 +72,22 @@ class KMixApplet : public KPanelApplet Q_OBJECT public: - KMixApplet( const QString& configFile, Type t = Normal, - QWidget *parent = 0, const char *name = 0 ); + KMixApplet( const TQString& configFile, Type t = Normal, + TQWidget *parent = 0, const char *name = 0 ); virtual ~KMixApplet(); struct Colors { - QColor high, low, back, mutedHigh, mutedLow, mutedBack; + TQColor high, low, back, mutedHigh, mutedLow, mutedBack; }; void about(); void help(); void preferences(); void reportBug(); - void paletteChange ( const QPalette & oldPalette ); + void paletteChange ( const TQPalette & oldPalette ); - QSize sizeHint() const; - QSizePolicy sizePolicy() const; + TQSize sizeHint() const; + TQSizePolicy sizePolicy() const; int widthForHeight(int) const; int heightForWidth(int) const; @@ -98,11 +98,11 @@ protected slots: void updateGeometrySlot(); protected: - void resizeEvent( QResizeEvent * ); + void resizeEvent( TQResizeEvent * ); void saveConfig(); - void saveConfig( KConfig *config, const QString &grp ); + void saveConfig( KConfig *config, const TQString &grp ); void loadConfig(); - void loadConfig( KConfig *config, const QString &grp ); + void loadConfig( KConfig *config, const TQString &grp ); private: void positionChange(Position); @@ -110,7 +110,7 @@ private: void setColors( const Colors &color ); ViewApplet *m_mixerWidget; - QPushButton *m_errorLabel; + TQPushButton *m_errorLabel; AppletConfigDialog *m_pref; static int s_instCount; @@ -119,10 +119,10 @@ private: KMixApplet::Colors _colors; bool _customColors; - QLayout* _layout; + TQLayout* _layout; - QString _mixerId; - QString _mixerName; + TQString _mixerId; + TQString _mixerName; KAboutData m_aboutData; }; diff --git a/kmix/kmixctrl.cpp b/kmix/kmixctrl.cpp index 159df432..17d9bd8c 100644 --- a/kmix/kmixctrl.cpp +++ b/kmix/kmixctrl.cpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include "kmixtoolbox.h" #include "mixer.h" @@ -66,7 +66,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char *argv[]) delete config; // create mixers - QString dummyStringHwinfo; + TQString dummyStringHwinfo; MixerToolBox::initMixer(Mixer::mixers(), false, dummyStringHwinfo); // load volumes diff --git a/kmix/kmixdockwidget.cpp b/kmix/kmixdockwidget.cpp index 19ef03e9..ae80ec49 100644 --- a/kmix/kmixdockwidget.cpp +++ b/kmix/kmixdockwidget.cpp @@ -34,9 +34,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include @@ -47,7 +47,7 @@ #include "kwin.h" #include "viewdockareapopup.h" -KMixDockWidget::KMixDockWidget( Mixer *mixer, QWidget *parent, const char *name, bool volumePopup, bool dockIconMuting ) +KMixDockWidget::KMixDockWidget( Mixer *mixer, TQWidget *parent, const char *name, bool volumePopup, bool dockIconMuting ) : KSystemTray( parent, name ), m_mixer(mixer), _dockAreaPopup(0L), @@ -68,7 +68,7 @@ KMixDockWidget::KMixDockWidget( Mixer *mixer, QWidget *parent, const char *name, } createActions(); createMasterVolWidget(); - connect(this, SIGNAL(quitSelected()), kapp, SLOT(quitExtended())); + connect(this, TQT_SIGNAL(quitSelected()), kapp, TQT_SLOT(quitExtended())); } KMixDockWidget::~KMixDockWidget() @@ -80,7 +80,7 @@ KMixDockWidget::~KMixDockWidget() void KMixDockWidget::createActions() { // Put "Mute" selector in context menu - (void)new KToggleAction( i18n( "M&ute" ), 0, this, SLOT( dockMute() ), + (void)new KToggleAction( i18n( "M&ute" ), 0, this, TQT_SLOT( dockMute() ), actionCollection(), "dock_mute" ); KAction *a = actionCollection()->action( "dock_mute" ); KPopupMenu *popupMenu = contextMenu(); @@ -88,7 +88,7 @@ void KMixDockWidget::createActions() // Put "Select Master Channel" dialog in context menu if ( m_mixer != 0 ) { - (void)new KAction( i18n("Select Master Channel..."), 0, this, SLOT(selectMaster()), + (void)new KAction( i18n("Select Master Channel..."), 0, this, TQT_SLOT(selectMaster()), actionCollection(), "select_master"); KAction *a2 = actionCollection()->action( "select_master" ); if (a2) a2->plug( popupMenu ); @@ -120,10 +120,10 @@ KMixDockWidget::createMasterVolWidget() _dockAreaPopup = new ViewDockAreaPopup(0, "dockArea", m_mixer, 0, this); _dockAreaPopup->createDeviceWidgets(); m_mixer->readSetFromHWforceUpdate(); // after changing the master device, make sure to re-read (otherwise no "changed()" signals might get sent by the Mixer - /* With the recently introduced QSocketNotifier stuff, we can't rely on regular timer updates + /* With the recently introduced TQSocketNotifier stuff, we can't rely on regular timer updates any longer. Also the readSetFromHWforceUpdate() won't be enough. As a workaround, we trigger all "repaints" manually here. - The call to m_mixer->readSetFromHWforceUpdate() is most likely superfluous, even if we don't use QSocketNotifier (e.g. in backends OSS, Solaris, ...) + The call to m_mixer->readSetFromHWforceUpdate() is most likely superfluous, even if we don't use TQSocketNotifier (e.g. in backends OSS, Solaris, ...) */ setVolumeTip(); updatePixmap(false); @@ -133,9 +133,9 @@ KMixDockWidget::createMasterVolWidget() * Refreshing the Icon * */ - // connect( m_mixer, SIGNAL(newVolumeLevels()), _dockAreaPopup, SLOT(refreshVolumeLevels()) ); - connect( m_mixer, SIGNAL(newVolumeLevels()), this, SLOT(setVolumeTip() ) ); - connect( m_mixer, SIGNAL(newVolumeLevels()), this, SLOT(slotUpdatePixmap() ) ); + // connect( m_mixer, TQT_SIGNAL(newVolumeLevels()), _dockAreaPopup, TQT_SLOT(refreshVolumeLevels()) ); + connect( m_mixer, TQT_SIGNAL(newVolumeLevels()), this, TQT_SLOT(setVolumeTip() ) ); + connect( m_mixer, TQT_SIGNAL(newVolumeLevels()), this, TQT_SLOT(slotUpdatePixmap() ) ); } void KMixDockWidget::slotUpdatePixmap() @@ -146,13 +146,13 @@ void KMixDockWidget::slotUpdatePixmap() void KMixDockWidget::selectMaster() { DialogSelectMaster* dsm = new DialogSelectMaster(m_mixer); - connect ( dsm, SIGNAL(newMasterSelected(int, QString&)), SLOT( handleNewMaster(int,QString&)) ); + connect ( dsm, TQT_SIGNAL(newMasterSelected(int, TQString&)), TQT_SLOT( handleNewMaster(int,TQString&)) ); dsm->show(); // !! The dialog is modal. Does it delete itself? } -void KMixDockWidget::handleNewMaster(int soundcard_id, QString& channel_id) // !! @todo rework parameters +void KMixDockWidget::handleNewMaster(int soundcard_id, TQString& channel_id) // !! @todo rework parameters { //kdDebug(67100) << "KMixDockWidget::handleNewMaster() soundcard_id=" << soundcard_id << " , channel_id=" << channel_id << endl; Mixer *mixer = Mixer::mixers().at(soundcard_id); @@ -174,7 +174,7 @@ KMixDockWidget::setVolumeTip() if ( _dockAreaPopup != 0 ) { md = _dockAreaPopup->dockDevice(); } - QString tip = ""; + TQString tip = ""; int newToolTipValue = 0; if ( md == 0 ) @@ -204,9 +204,9 @@ KMixDockWidget::setVolumeTip() // changed (or completely new tooltip) if ( _oldToolTipValue >= 0 ) { // there was an old Tooltip: remove it - QToolTip::remove(this); + TQToolTip::remove(this); } - QToolTip::add(this, tip); + TQToolTip::add(this, tip); } _oldToolTipValue = newToolTipValue; } @@ -235,9 +235,9 @@ KMixDockWidget::updatePixmap(bool force) if (( newPixmapType != _oldPixmapType ) || (force == true)) { // Pixmap must be changed => do so // Honor Free Desktop specifications that allow for arbitrary system tray icon sizes - QPixmap origpixmap; - QPixmap scaledpixmap; - QImage newIcon; + TQPixmap origpixmap; + TQPixmap scaledpixmap; + TQImage newIcon; switch ( newPixmapType ) { case 'e': origpixmap = loadSizedIcon( "kmixdocked_error", width() ); break; case 'm': origpixmap = loadSizedIcon( "kmixdocked_mute" , width() ); break; @@ -252,13 +252,13 @@ KMixDockWidget::updatePixmap(bool force) } } -void KMixDockWidget::resizeEvent ( QResizeEvent * ) +void KMixDockWidget::resizeEvent ( TQResizeEvent * ) { updatePixmap(true); } void -KMixDockWidget::mousePressEvent(QMouseEvent *me) +KMixDockWidget::mousePressEvent(TQMouseEvent *me) { if ( _dockAreaPopup == 0 ) { return KSystemTray::mousePressEvent(me); @@ -284,8 +284,8 @@ KMixDockWidget::mousePressEvent(QMouseEvent *me) } int h = _dockAreaPopup->height(); - int x = this->mapToGlobal( QPoint( 0, 0 ) ).x() + this->width()/2 - _dockAreaPopup->width()/2; - int y = this->mapToGlobal( QPoint( 0, 0 ) ).y() - h; + int x = this->mapToGlobal( TQPoint( 0, 0 ) ).x() + this->width()/2 - _dockAreaPopup->width()/2; + int y = this->mapToGlobal( TQPoint( 0, 0 ) ).y() - h; if ( y < 0 ) y = y + h + this->height(); @@ -293,8 +293,8 @@ KMixDockWidget::mousePressEvent(QMouseEvent *me) // Now handle Multihead displays. And also make sure that the dialog is not // moved out-of-the screen on the right (see Bug 101742). - QDesktopWidget* vdesktop = QApplication::desktop(); - const QRect& vScreenSize = vdesktop->screenGeometry(_dockAreaPopup); + TQDesktopWidget* vdesktop = TQApplication::desktop(); + const TQRect& vScreenSize = vdesktop->screenGeometry(_dockAreaPopup); if ( (x+_dockAreaPopup->width()) > (vScreenSize.width() + vScreenSize.x()) ) { // move horizontally, so that it is completely visible _dockAreaPopup->move(vScreenSize.width() + vScreenSize.x() - _dockAreaPopup->width() -1 , y); @@ -307,7 +307,7 @@ KMixDockWidget::mousePressEvent(QMouseEvent *me) _dockAreaPopup->show(); KWin::setState(_dockAreaPopup->winId(), NET::StaysOnTop | NET::SkipTaskbar | NET::SkipPager ); - QWidget::mousePressEvent(me); // KSystemTray's shouldn't do the default action for this + TQWidget::mousePressEvent(me); // KSystemTray's shouldn't do the default action for this return; } // LeftMouseButton pressed else if ( me->button() == MidButton ) { @@ -325,14 +325,14 @@ KMixDockWidget::mousePressEvent(QMouseEvent *me) } void -KMixDockWidget::mouseReleaseEvent( QMouseEvent *me ) +KMixDockWidget::mouseReleaseEvent( TQMouseEvent *me ) { KSystemTray::mouseReleaseEvent(me); } void -KMixDockWidget::wheelEvent(QWheelEvent *e) +KMixDockWidget::wheelEvent(TQWheelEvent *e) { MixDevice *md = 0; if ( _dockAreaPopup != 0 ) { @@ -360,7 +360,7 @@ KMixDockWidget::wheelEvent(QWheelEvent *e) // Mhhh, it doesn't work. Qt does not show it again. setVolumeTip(); // Simulate a mouse move to make Qt show the tooltip again - QApplication::postEvent( this, new QMouseEvent( QEvent::MouseMove, QCursor::pos(), Qt::NoButton, Qt::NoButton ) ); + TQApplication::postEvent( this, new TQMouseEvent( TQEvent::MouseMove, TQCursor::pos(), Qt::NoButton, Qt::NoButton ) ); } } diff --git a/kmix/kmixdockwidget.h b/kmix/kmixdockwidget.h index 680d3115..ee4eb89e 100644 --- a/kmix/kmixdockwidget.h +++ b/kmix/kmixdockwidget.h @@ -25,8 +25,8 @@ class QFrame; class QString; -#include -#include +#include +#include #include @@ -43,7 +43,7 @@ class KMixDockWidget : public KSystemTray { friend class KMixWindow; public: - KMixDockWidget(Mixer *, QWidget *parent=0, const char *name=0, bool volumePopup=true, bool dockIconMuting=false); + KMixDockWidget(Mixer *, TQWidget *parent=0, const char *name=0, bool volumePopup=true, bool dockIconMuting=false); ~KMixDockWidget(); void setErrorPixmap(); @@ -62,12 +62,12 @@ class KMixDockWidget : public KSystemTray { protected: void createMasterVolWidget(); void createActions(); - void mousePressEvent(QMouseEvent *); - void mouseReleaseEvent(QMouseEvent *); - void wheelEvent(QWheelEvent *); + void mousePressEvent(TQMouseEvent *); + void mouseReleaseEvent(TQMouseEvent *); + void wheelEvent(TQWheelEvent *); void contextMenuAboutToShow( KPopupMenu* menu ); void toggleMinimizeRestore(); - void resizeEvent ( QResizeEvent * ); + void resizeEvent ( TQResizeEvent * ); private: bool _playBeepOnVolumeChange; @@ -79,7 +79,7 @@ class KMixDockWidget : public KSystemTray { private slots: void dockMute(); void selectMaster(); - void handleNewMaster(int soundcard_id, QString& channel_id); + void handleNewMaster(int soundcard_id, TQString& channel_id); }; #endif diff --git a/kmix/kmixerwidget.cpp b/kmix/kmixerwidget.cpp index f75191a3..45fbbf31 100644 --- a/kmix/kmixerwidget.cpp +++ b/kmix/kmixerwidget.cpp @@ -20,12 +20,12 @@ // Qt -#include -#include -#include -#include -#include -#include // for QApplication::revsreseLayout() +#include +#include +#include +#include +#include +#include // for TQApplication::revsreseLayout() // KDE #include @@ -55,10 +55,10 @@ (c) A balancing slider (d) A label containg the mixer name */ -KMixerWidget::KMixerWidget( int _id, Mixer *mixer, const QString &mixerName, +KMixerWidget::KMixerWidget( int _id, Mixer *mixer, const TQString &mixerName, MixDevice::DeviceCategory categoryMask, - QWidget * parent, const char * name, ViewBase::ViewFlags vflags ) - : QWidget( parent, name ), _mixer(mixer), m_balanceSlider(0), + TQWidget * parent, const char * name, ViewBase::ViewFlags vflags ) + : TQWidget( parent, name ), _mixer(mixer), m_balanceSlider(0), m_topLayout(0), m_id( _id ), _iconsEnabled( true ), _labelsEnabled( false ), _ticksEnabled( false ), @@ -76,12 +76,12 @@ KMixerWidget::KMixerWidget( int _id, Mixer *mixer, const QString &mixerName, { // No mixer found // !! Fix this: This is actually never shown! - QBoxLayout *layout = new QHBoxLayout( this ); - QString s = i18n("Invalid mixer"); + TQBoxLayout *layout = new TQHBoxLayout( this ); + TQString s = i18n("Invalid mixer"); if ( !mixerName.isEmpty() ) s.append(" \"").append(mixerName).append("\""); - QLabel *errorLabel = new QLabel( s, this ); - errorLabel->setAlignment( QLabel::AlignCenter | QLabel::WordBreak ); + TQLabel *errorLabel = new TQLabel( s, this ); + errorLabel->setAlignment( TQLabel::AlignCenter | TQLabel::WordBreak ); layout->addWidget( errorLabel ); } } @@ -104,7 +104,7 @@ void KMixerWidget::createLayout(ViewBase::ViewFlags vflags) } // create main layout - m_topLayout = new QVBoxLayout( this, 0, 3, "m_topLayout" ); + m_topLayout = new TQVBoxLayout( this, 0, 3, "m_topLayout" ); // Create tabs of input + output + [...] m_ioTab = new KTabWidget( this, "ioTab" ); @@ -131,15 +131,15 @@ void KMixerWidget::createLayout(ViewBase::ViewFlags vflags) // *** Lower part: Slider and Mixer Name ************************************************ - QHBoxLayout *balanceAndDetail = new QHBoxLayout( m_topLayout, 8, "balanceAndDetail"); + TQHBoxLayout *balanceAndDetail = new TQHBoxLayout( m_topLayout, 8, "balanceAndDetail"); // Create the left-right-slider - m_balanceSlider = new QSlider( -100, 100, 25, 0, QSlider::Horizontal, this, "RightLeft" ); - m_balanceSlider->setTickmarks( QSlider::Below ); + m_balanceSlider = new TQSlider( -100, 100, 25, 0, TQSlider::Horizontal, this, "RightLeft" ); + m_balanceSlider->setTickmarks( TQSlider::Below ); m_balanceSlider->setTickInterval( 25 ); m_balanceSlider->setMinimumSize( m_balanceSlider->sizeHint() ); m_balanceSlider->setFixedHeight( m_balanceSlider->sizeHint().height() ); - QLabel *mixerName = new QLabel(this, "mixerName"); + TQLabel *mixerName = new TQLabel(this, "mixerName"); mixerName->setText( _mixer->mixerName() ); balanceAndDetail->addSpacing( 10 ); @@ -148,8 +148,8 @@ void KMixerWidget::createLayout(ViewBase::ViewFlags vflags) balanceAndDetail->addWidget( mixerName ); balanceAndDetail->addSpacing( 10 ); - connect( m_balanceSlider, SIGNAL(valueChanged(int)), this, SLOT(balanceChanged(int)) ); - QToolTip::add( m_balanceSlider, i18n("Left/Right balancing") ); + connect( m_balanceSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(balanceChanged(int)) ); + TQToolTip::add( m_balanceSlider, i18n("Left/Right balancing") ); // --- "MenuBar" toggling from the various View's --- @@ -167,7 +167,7 @@ void KMixerWidget::possiblyAddView(ViewBase* vbase) _views.push_back(vbase); vbase ->createDeviceWidgets(); m_ioTab->addTab( vbase , vbase->caption() ); - connect( vbase, SIGNAL(toggleMenuBar()), parentWidget(), SLOT(toggleMenuBar()) ); + connect( vbase, TQT_SIGNAL(toggleMenuBar()), parentWidget(), TQT_SLOT(toggleMenuBar()) ); } } @@ -219,12 +219,12 @@ void KMixerWidget::setValueStyle( int vs ) /** * @todo : Is the view list already filled, when loadConfig() is called? */ -void KMixerWidget::loadConfig( KConfig *config, const QString &grp ) +void KMixerWidget::loadConfig( KConfig *config, const TQString &grp ) { for ( std::vector::iterator it = _views.begin(); it != _views.end(); it++) { ViewBase* mixerWidget = *it; - QString viewPrefix = "View."; + TQString viewPrefix = "View."; viewPrefix += mixerWidget->name(); KMixToolBox::loadConfig(mixerWidget->_mdws, config, grp, viewPrefix ); mixerWidget->configurationUpdate(); @@ -233,7 +233,7 @@ void KMixerWidget::loadConfig( KConfig *config, const QString &grp ) -void KMixerWidget::saveConfig( KConfig *config, const QString &grp ) +void KMixerWidget::saveConfig( KConfig *config, const TQString &grp ) { config->setGroup( grp ); // Write mixer name. It cannot be changed in the Mixer instance, @@ -242,7 +242,7 @@ void KMixerWidget::saveConfig( KConfig *config, const QString &grp ) for ( std::vector::iterator it = _views.begin(); it != _views.end(); it++) { ViewBase* mixerWidget = *it; - QString viewPrefix = "View."; + TQString viewPrefix = "View."; viewPrefix += mixerWidget->name(); KMixToolBox::saveConfig(mixerWidget->_mdws, config, grp, viewPrefix ); } // for all tabs @@ -257,7 +257,7 @@ void KMixerWidget::toggleMenuBarSlot() { // hack arround it before calling _mixer->setBalance() void KMixerWidget::balanceChanged(int balance) { - if (QApplication::reverseLayout()) + if (TQApplication::reverseLayout()) balance = -balance; _mixer->setBalance( balance ); diff --git a/kmix/kmixerwidget.h b/kmix/kmixerwidget.h index d7e378bc..b6733c02 100644 --- a/kmix/kmixerwidget.h +++ b/kmix/kmixerwidget.h @@ -24,8 +24,8 @@ #include -#include -#include +#include +#include class QString; class QGridLayout; @@ -56,14 +56,14 @@ class ViewGrid; class ViewSurround; -class KMixerWidget : public QWidget +class KMixerWidget : public TQWidget { Q_OBJECT public: - KMixerWidget( int _id, Mixer *mixer, const QString &mixerName, + KMixerWidget( int _id, Mixer *mixer, const TQString &mixerName, MixDevice::DeviceCategory categoryMask = MixDevice::ALL , - QWidget *parent=0, const char *name=0, ViewBase::ViewFlags vflags=0 ); + TQWidget *parent=0, const char *name=0, ViewBase::ViewFlags vflags=0 ); ~KMixerWidget(); enum KMixerWidgetIO { OUTPUT=0, INPUT }; @@ -86,8 +86,8 @@ class KMixerWidget : public QWidget void setValueStyle( int vs ); void toggleMenuBarSlot(); - void saveConfig( KConfig *config, const QString &grp ); - void loadConfig( KConfig *config, const QString &grp ); + void saveConfig( KConfig *config, const TQString &grp ); + void loadConfig( KConfig *config, const TQString &grp ); private slots: //void updateBalance(); @@ -95,8 +95,8 @@ class KMixerWidget : public QWidget private: Mixer *_mixer; - QSlider *m_balanceSlider; - QVBoxLayout *m_topLayout; // contains the Card selector, TabWidget and balance slider + TQSlider *m_balanceSlider; + TQVBoxLayout *m_topLayout; // contains the Card selector, TabWidget and balance slider KTabWidget* m_ioTab; diff --git a/kmix/kmixprefdlg.cpp b/kmix/kmixprefdlg.cpp index 27a09238..6e25cb63 100644 --- a/kmix/kmixprefdlg.cpp +++ b/kmix/kmixprefdlg.cpp @@ -20,12 +20,12 @@ * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include // For "kapp" @@ -36,49 +36,49 @@ #include "kmixerwidget.h" -KMixPrefDlg::KMixPrefDlg( QWidget *parent ) +KMixPrefDlg::KMixPrefDlg( TQWidget *parent ) : KDialogBase( Plain, i18n( "Configure" ), Ok|Cancel|Apply, Ok, parent ) { // general buttons m_generalTab = plainPage( /* i18n("&General") */ ); - QBoxLayout *layout = new QVBoxLayout( m_generalTab ); + TQBoxLayout *layout = new TQVBoxLayout( m_generalTab ); layout->setSpacing( KDialog::spacingHint() ); - m_dockingChk = new QCheckBox( i18n("&Dock into panel"), m_generalTab ); + m_dockingChk = new TQCheckBox( i18n("&Dock into panel"), m_generalTab ); layout->addWidget( m_dockingChk ); - QWhatsThis::add(m_dockingChk, i18n("Docks the mixer into the KDE panel")); + TQWhatsThis::add(m_dockingChk, i18n("Docks the mixer into the KDE panel")); - m_volumeChk = new QCheckBox(i18n("Enable system tray &volume control"), + m_volumeChk = new TQCheckBox(i18n("Enable system tray &volume control"), m_generalTab); layout->addWidget(m_volumeChk); - m_showTicks = new QCheckBox( i18n("Show &tickmarks"), m_generalTab ); + m_showTicks = new TQCheckBox( i18n("Show &tickmarks"), m_generalTab ); layout->addWidget( m_showTicks ); - QWhatsThis::add(m_showTicks, + TQWhatsThis::add(m_showTicks, i18n("Enable/disable tickmark scales on the sliders")); - m_showLabels = new QCheckBox( i18n("Show &labels"), m_generalTab ); + m_showLabels = new TQCheckBox( i18n("Show &labels"), m_generalTab ); layout->addWidget( m_showLabels ); - QWhatsThis::add(m_showLabels, + TQWhatsThis::add(m_showLabels, i18n("Enables/disables description labels above the sliders")); - m_onLogin = new QCheckBox( i18n("Restore volumes on login"), m_generalTab ); + m_onLogin = new TQCheckBox( i18n("Restore volumes on login"), m_generalTab ); layout->addWidget( m_onLogin ); - m_dockIconMuting = new QCheckBox( + m_dockIconMuting = new TQCheckBox( i18n("Middle click on system tray icon toggles muting"), m_generalTab ); layout->addWidget( m_dockIconMuting ); - QBoxLayout *numbersLayout = new QHBoxLayout( layout ); - QButtonGroup *numbersGroup = new QButtonGroup( 3, Qt::Horizontal, i18n("Numbers"), m_generalTab ); + TQBoxLayout *numbersLayout = new TQHBoxLayout( layout ); + TQButtonGroup *numbersGroup = new TQButtonGroup( 3, Qt::Horizontal, i18n("Numbers"), m_generalTab ); numbersGroup->setRadioButtonExclusive(true); - QLabel* qlbl = new QLabel( i18n("Volume Values: "), m_generalTab ); - _rbNone = new QRadioButton( i18n("&None"), m_generalTab ); - _rbAbsolute = new QRadioButton( i18n("A&bsolute"), m_generalTab ); - _rbRelative = new QRadioButton( i18n("&Relative"), m_generalTab ); + TQLabel* qlbl = new TQLabel( i18n("Volume Values: "), m_generalTab ); + _rbNone = new TQRadioButton( i18n("&None"), m_generalTab ); + _rbAbsolute = new TQRadioButton( i18n("A&bsolute"), m_generalTab ); + _rbRelative = new TQRadioButton( i18n("&Relative"), m_generalTab ); numbersGroup->insert(_rbNone); numbersGroup->insert(_rbAbsolute); numbersGroup->insert(_rbRelative); @@ -90,13 +90,13 @@ KMixPrefDlg::KMixPrefDlg( QWidget *parent ) numbersLayout->add(_rbRelative); numbersLayout->addStretch(); - QBoxLayout *orientationLayout = new QHBoxLayout( layout ); - QButtonGroup* orientationGroup = new QButtonGroup( 2, Qt::Horizontal, i18n("Orientation"), m_generalTab ); + TQBoxLayout *orientationLayout = new TQHBoxLayout( layout ); + TQButtonGroup* orientationGroup = new TQButtonGroup( 2, Qt::Horizontal, i18n("Orientation"), m_generalTab ); //orientationLayout->add(orientationGroup); orientationGroup->setRadioButtonExclusive(true); - QLabel* qlb = new QLabel( i18n("Slider Orientation: "), m_generalTab ); - _rbHorizontal = new QRadioButton(i18n("&Horizontal"), m_generalTab ); - _rbVertical = new QRadioButton(i18n("&Vertical" ), m_generalTab ); + TQLabel* qlb = new TQLabel( i18n("Slider Orientation: "), m_generalTab ); + _rbHorizontal = new TQRadioButton(i18n("&Horizontal"), m_generalTab ); + _rbVertical = new TQRadioButton(i18n("&Vertical" ), m_generalTab ); orientationGroup->insert(_rbHorizontal); orientationGroup->insert(_rbVertical); orientationGroup->hide(); @@ -111,8 +111,8 @@ KMixPrefDlg::KMixPrefDlg( QWidget *parent ) layout->addStretch(); enableButtonSeparator(true); - connect( this, SIGNAL(applyClicked()), this, SLOT(apply()) ); - connect( this, SIGNAL(okClicked()), this, SLOT(apply()) ); + connect( this, TQT_SIGNAL(applyClicked()), this, TQT_SLOT(apply()) ); + connect( this, TQT_SIGNAL(okClicked()), this, TQT_SLOT(apply()) ); } KMixPrefDlg::~KMixPrefDlg() diff --git a/kmix/kmixprefdlg.h b/kmix/kmixprefdlg.h index 0e153d78..13b6a761 100644 --- a/kmix/kmixprefdlg.h +++ b/kmix/kmixprefdlg.h @@ -37,7 +37,7 @@ KMixPrefDlg : public KDialogBase friend class KMixWindow; public: - KMixPrefDlg( QWidget *parent ); + KMixPrefDlg( TQWidget *parent ); ~KMixPrefDlg(); signals: @@ -47,22 +47,22 @@ KMixPrefDlg : public KDialogBase void apply(); private: - QFrame *m_generalTab; + TQFrame *m_generalTab; KMixApp *m_mixApp; KMixPrefWidget *m_mixPrefTab; - QCheckBox *m_dockingChk; - QCheckBox *m_volumeChk; - QCheckBox *m_hideOnCloseChk; - QCheckBox *m_showTicks; - QCheckBox *m_showLabels; - QCheckBox *m_onLogin; - QCheckBox *m_dockIconMuting; - QRadioButton *_rbVertical; - QRadioButton *_rbHorizontal; - QRadioButton *_rbNone; - QRadioButton *_rbAbsolute; - QRadioButton *_rbRelative; + TQCheckBox *m_dockingChk; + TQCheckBox *m_volumeChk; + TQCheckBox *m_hideOnCloseChk; + TQCheckBox *m_showTicks; + TQCheckBox *m_showLabels; + TQCheckBox *m_onLogin; + TQCheckBox *m_dockIconMuting; + TQRadioButton *_rbVertical; + TQRadioButton *_rbHorizontal; + TQRadioButton *_rbNone; + TQRadioButton *_rbAbsolute; + TQRadioButton *_rbRelative; }; #endif diff --git a/kmix/kmixtoolbox.cpp b/kmix/kmixtoolbox.cpp index d28e1858..02292a89 100644 --- a/kmix/kmixtoolbox.cpp +++ b/kmix/kmixtoolbox.cpp @@ -20,9 +20,9 @@ */ -#include "qcolor.h" -#include "qwidget.h" -#include "qstring.h" +#include "tqcolor.h" +#include "tqwidget.h" +#include "tqstring.h" //#include #include @@ -44,16 +44,16 @@ This means: Shared GUI stuff goes into the KMixToolBox class , non-GUI stuff goes into the MixerToolBox class. ***********************************************************************************/ -void KMixToolBox::setIcons(QPtrList &mdws, bool on ) { - for ( QWidget *qmdw=mdws.first(); qmdw!=0; qmdw=mdws.next() ) { +void KMixToolBox::setIcons(TQPtrList &mdws, bool on ) { + for ( TQWidget *qmdw=mdws.first(); qmdw!=0; qmdw=mdws.next() ) { if ( qmdw->inherits("MixDeviceWidget") ) { // -<- play safe here static_cast(qmdw)->setIcons( on ); } } } -void KMixToolBox::setLabels(QPtrList &mdws, bool on ) { - QWidget *qmdw; +void KMixToolBox::setLabels(TQPtrList &mdws, bool on ) { + TQWidget *qmdw; for ( qmdw=mdws.first(); qmdw != 0; qmdw=mdws.next() ) { if ( qmdw->inherits("MixDeviceWidget") ) { // -<- play safe here static_cast(qmdw)->setLabeled( on ); @@ -61,8 +61,8 @@ void KMixToolBox::setLabels(QPtrList &mdws, bool on ) { } } -void KMixToolBox::setTicks(QPtrList &mdws, bool on ) { - QWidget *qmdw; +void KMixToolBox::setTicks(TQPtrList &mdws, bool on ) { + TQWidget *qmdw; for ( qmdw=mdws.first(); qmdw != 0; qmdw=mdws.next() ) { if ( qmdw->inherits("MixDeviceWidget") ) { // -<- in reality it is only in MDWSlider static_cast(qmdw)->setTicks( on ); @@ -70,8 +70,8 @@ void KMixToolBox::setTicks(QPtrList &mdws, bool on ) { } } -void KMixToolBox::setValueStyle(QPtrList &mdws, int vs ) { - QWidget *qmdw; +void KMixToolBox::setValueStyle(TQPtrList &mdws, int vs ) { + TQWidget *qmdw; for ( qmdw=mdws.first(); qmdw != 0; qmdw=mdws.next() ) { if ( qmdw->inherits("MixDeviceWidget") ) { // -<- in reality it is only in MDWSlider static_cast(qmdw)->setValueStyle( (MixDeviceWidget::ValueStyle) vs ); @@ -79,15 +79,15 @@ void KMixToolBox::setValueStyle(QPtrList &mdws, int vs ) { } } -void KMixToolBox::loadConfig(QPtrList &mdws, KConfig *config, const QString &grp, const QString &viewPrefix) { +void KMixToolBox::loadConfig(TQPtrList &mdws, KConfig *config, const TQString &grp, const TQString &viewPrefix) { int n = 0; config->setGroup( grp ); int num = config->readNumEntry( viewPrefix + ".Devs", 0); - for ( QWidget *qmdw=mdws.first(); qmdw!=0 && ninherits("MixDeviceWidget") ) { // -<- play safe here MixDeviceWidget* mdw = static_cast(qmdw); - QString devgrp; + TQString devgrp; /* * Compatibility config loader! We use the old config group only, if the @@ -116,7 +116,7 @@ void KMixToolBox::loadConfig(QPtrList &mdws, KConfig *config, const QSt The name should have been set in the backend class, but we REALLY cannot do this for KDE3.5.x. !! This issue will be fixed in KDE4 by the great config cleanup. */ - QString devgrpTmp(devgrp); + TQString devgrpTmp(devgrp); devgrpTmp.append(".Capture"); if ( config->hasGroup(devgrpTmp) ) { // Group for capture device exists => take over the name @@ -145,7 +145,7 @@ void KMixToolBox::loadConfig(QPtrList &mdws, KConfig *config, const QSt KGlobalAccel *keys=mdw->keys(); if ( keys ) { - QString devgrpkeys; + TQString devgrpkeys; devgrpkeys.sprintf( "%s.%s.Dev%i.keys", viewPrefix.ascii(), grp.ascii(), n ); //kdDebug(67100) << "KMixToolBox::loadConfig() load Keys " << devgrpkeys << endl; @@ -161,16 +161,16 @@ void KMixToolBox::loadConfig(QPtrList &mdws, KConfig *config, const QSt } -void KMixToolBox::saveConfig(QPtrList &mdws, KConfig *config, const QString &grp, const QString &viewPrefix) { +void KMixToolBox::saveConfig(TQPtrList &mdws, KConfig *config, const TQString &grp, const TQString &viewPrefix) { config->setGroup( grp ); config->writeEntry( viewPrefix + ".Devs", mdws.count() ); int n=0; - for ( QWidget *qmdw=mdws.first(); qmdw!=0; qmdw=mdws.next() ) { + for ( TQWidget *qmdw=mdws.first(); qmdw!=0; qmdw=mdws.next() ) { if ( qmdw->inherits("MixDeviceWidget") ) { // -<- play safe here MixDeviceWidget* mdw = static_cast(qmdw); - QString devgrp; + TQString devgrp; devgrp.sprintf( "%s.%s.Dev%i", viewPrefix.ascii(), grp.ascii(), n ); if ( ! config->hasGroup(devgrp) ) { // old-Style configuration (KMix2.1 and earlier => remove now unused group @@ -202,7 +202,7 @@ void KMixToolBox::saveConfig(QPtrList &mdws, KConfig *config, const QSt */ KGlobalAccel *keys=mdw->keys(); if (keys) { - QString devgrpkeys; + TQString devgrpkeys; devgrpkeys.sprintf( "%s.%s.Dev%i.keys", viewPrefix.ascii(), grp.ascii(), n ); //kdDebug(67100) << "KMixToolBox::saveConfig() save Keys " << devgrpkeys << endl; keys->setConfigGroup(devgrpkeys); diff --git a/kmix/kmixtoolbox.h b/kmix/kmixtoolbox.h index 4cb5dd8f..f39dd5a1 100644 --- a/kmix/kmixtoolbox.h +++ b/kmix/kmixtoolbox.h @@ -1,8 +1,8 @@ #ifndef KMIXTOOLBOX_H #define KMIXTOOLBOX_H -#include "qptrlist.h" -#include "qwidget.h" +#include "tqptrlist.h" +#include "tqwidget.h" class Mixer; @@ -16,12 +16,12 @@ class KConfig; class KMixToolBox { public: - static void setIcons (QPtrList &mdws, bool on ); - static void setLabels (QPtrList &mdws, bool on ); - static void setTicks (QPtrList &mdws, bool on ); - static void setValueStyle (QPtrList &mdws, int vs ); - static void loadConfig(QPtrList &mdws, KConfig *config, const QString &grp, const QString &viewPrefix ); - static void saveConfig(QPtrList &mdws, KConfig *config, const QString &grp, const QString &viewPrefix ); + static void setIcons (TQPtrList &mdws, bool on ); + static void setLabels (TQPtrList &mdws, bool on ); + static void setTicks (TQPtrList &mdws, bool on ); + static void setValueStyle (TQPtrList &mdws, int vs ); + static void loadConfig(TQPtrList &mdws, KConfig *config, const TQString &grp, const TQString &viewPrefix ); + static void saveConfig(TQPtrList &mdws, KConfig *config, const TQString &grp, const TQString &viewPrefix ); }; diff --git a/kmix/ksmallslider.cpp b/kmix/ksmallslider.cpp index e63f2d29..e10c46c8 100644 --- a/kmix/ksmallslider.cpp +++ b/kmix/ksmallslider.cpp @@ -21,38 +21,38 @@ #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "kglobalsettings.h" #include "ksmallslider.h" /* -static const QColor mutedHighColor2 = "#FFFFFF"; -static const QColor mutedLowColor2 = "#808080"; -static const QColor backColor2 = "#000000"; +static const TQColor mutedHighColor2 = "#FFFFFF"; +static const TQColor mutedLowColor2 = "#808080"; +static const TQColor backColor2 = "#000000"; */ -KSmallSlider::KSmallSlider( QWidget *parent, const char *name ) - : QWidget( parent, name ), _orientation( Qt::Vertical ) +KSmallSlider::KSmallSlider( TQWidget *parent, const char *name ) + : TQWidget( parent, name ), _orientation( Qt::Vertical ) { init(); } -KSmallSlider::KSmallSlider( Qt::Orientation orientation, QWidget *parent, const char *name ) - : QWidget( parent, name ), _orientation( orientation ) +KSmallSlider::KSmallSlider( Qt::Orientation orientation, TQWidget *parent, const char *name ) + : TQWidget( parent, name ), _orientation( orientation ) { init(); } KSmallSlider::KSmallSlider( int minValue, int maxValue, int pageStep, int value, Qt::Orientation orientation, - QWidget *parent, const char *name ) - : QWidget( parent, name ), - QRangeControl( minValue, maxValue, 1, pageStep, value ), _orientation( orientation) + TQWidget *parent, const char *name ) + : TQWidget( parent, name ), + TQRangeControl( minValue, maxValue, 1, pageStep, value ), _orientation( orientation) { init(); // sliderVal = value; @@ -70,13 +70,13 @@ void KSmallSlider::init() grayed = false; setFocusPolicy( TabFocus ); - colHigh = QColor(0,255,0); - colLow = QColor(255,0,0); - colBack = QColor(0,0,0); + colHigh = TQColor(0,255,0); + colLow = TQColor(255,0,0); + colBack = TQColor(0,0,0); - grayHigh = QColor(255,255,255); - grayLow = QColor(128,128,128); - grayBack = QColor(0,0,0); + grayHigh = TQColor(255,255,255); + grayLow = TQColor(128,128,128); + grayBack = TQColor(0,0,0); } /* void KSmallSlider::setTracking( bool enable ) @@ -86,7 +86,7 @@ void KSmallSlider::setTracking( bool enable ) */ int KSmallSlider::positionFromValue( int v ) const { - return QRangeControl::positionFromValue( v, available() ); + return TQRangeControl::positionFromValue( v, available() ); } int KSmallSlider::valueFromPosition( int p ) const @@ -95,18 +95,18 @@ int KSmallSlider::valueFromPosition( int p ) const // Coordiante System starts at TopLeft, but the slider values increase from Bottom to Top // Thus "revert" the position int avail = available(); - return QRangeControl::valueFromPosition( avail - p, avail ); + return TQRangeControl::valueFromPosition( avail - p, avail ); } else { // Horizontal everything is fine. Slider values match with Coordinate System - return QRangeControl::valueFromPosition( p, available() ); + return TQRangeControl::valueFromPosition( p, available() ); } } void KSmallSlider::rangeChange() { /* - int newPos = positionFromValue( QRangeControl::value() ); + int newPos = positionFromValue( TQRangeControl::value() ); if ( newPos != sliderPos ) { sliderPos = newPos; } @@ -120,20 +120,20 @@ void KSmallSlider::valueChange() update(); emit valueChanged(value()); /* - if ( sliderVal != QRangeControl::value() ) { - //int newPos = positionFromValue( QRangeControl::value() ); + if ( sliderVal != TQRangeControl::value() ) { + //int newPos = positionFromValue( TQRangeControl::value() ); //sliderPos = newPos; - sliderVal = QRangeControl::value(); + sliderVal = TQRangeControl::value(); update(); emit valueChanged(value()); } */ } -void KSmallSlider::resizeEvent( QResizeEvent * ) +void KSmallSlider::resizeEvent( TQResizeEvent * ) { update(); - //QWidget::resizeEvent( ev ); + //TQWidget::resizeEvent( ev ); } // Returns the really available space for the slider. If there is no space, 0 is returned; @@ -160,7 +160,7 @@ int KSmallSlider::available() const namespace { -void gradient( QPainter &p, bool hor, const QRect &rect, const QColor &ca, const QColor &cb, int /*ncols*/) +void gradient( TQPainter &p, bool hor, const TQRect &rect, const TQColor &ca, const TQColor &cb, int /*ncols*/) { int rDiff, gDiff, bDiff; int rca, gca, bca, rcb, gcb, bcb; @@ -190,7 +190,7 @@ void gradient( QPainter &p, bool hor, const QRect &rect, const QColor &ca, const gl += gcdelta; bl += bcdelta; - p.setPen(QColor(rl>>16, gl>>16, bl>>16)); + p.setPen(TQColor(rl>>16, gl>>16, bl>>16)); p.drawLine(rect.left(), y, rect.right(), y); } } else @@ -200,16 +200,16 @@ void gradient( QPainter &p, bool hor, const QRect &rect, const QColor &ca, const gl += gcdelta; bl += bcdelta; - p.setPen(QColor(rl>>16, gl>>16, bl>>16)); + p.setPen(TQColor(rl>>16, gl>>16, bl>>16)); p.drawLine(x, rect.top(), x, rect.bottom()); } } } -QColor interpolate( QColor low, QColor high, int percent ) { +TQColor interpolate( TQColor low, TQColor high, int percent ) { if ( percent<=0 ) return low; else if ( percent>=100 ) return high; else - return QColor( + return TQColor( low.red() + (high.red()-low.red()) * percent/100, low.green() + (high.green()-low.green()) * percent/100, low.blue() + (high.blue()-low.blue()) * percent/100 ); @@ -217,22 +217,22 @@ QColor interpolate( QColor low, QColor high, int percent ) { } -void KSmallSlider::paintEvent( QPaintEvent * ) +void KSmallSlider::paintEvent( TQPaintEvent * ) { // kdDebug(67100) << "KSmallSlider::paintEvent: width() = " << width() << ", height() = " << height() << endl; - QPainter p( this ); + TQPainter p( this ); - int sliderPos = positionFromValue( QRangeControl::value() ); + int sliderPos = positionFromValue( TQRangeControl::value() ); // ------------------------ draw 3d border --------------------------------------------- - style().drawPrimitive ( QStyle::PE_Panel, &p, QRect( 0, 0, width(), height() ), colorGroup(), TRUE ); + style().drawPrimitive ( TQStyle::PE_Panel, &p, TQRect( 0, 0, width(), height() ), colorGroup(), TRUE ); // ------------------------ draw lower/left part ---------------------------------------- if ( width()>2 && height()>2 ) { if ( _orientation == Qt::Horizontal ) { - QRect outer = QRect( 1, 1, sliderPos, height() - 2 ); + TQRect outer = TQRect( 1, 1, sliderPos, height() - 2 ); // kdDebug(67100) << "KSmallSlider::paintEvent: outer = " << outer << endl; if ( grayed ) @@ -245,7 +245,7 @@ void KSmallSlider::paintEvent( QPaintEvent * ) 32 ); } else { - QRect outer = QRect( 1, height()-sliderPos-1, width() - 2, sliderPos-1 ); + TQRect outer = TQRect( 1, height()-sliderPos-1, width() - 2, sliderPos-1 ); /* kdDebug(67100) << "KSmallSlider::paintEvent: sliderPos=" << sliderPos << "height()=" << height() @@ -263,12 +263,12 @@ void KSmallSlider::paintEvent( QPaintEvent * ) } // -------- draw upper/right part -------------------------------------------------- - QRect inner; + TQRect inner; if ( _orientation == Qt::Vertical ) { - inner = QRect( 1, 1, width() - 2, height() - 2 -sliderPos ); + inner = TQRect( 1, 1, width() - 2, height() - 2 -sliderPos ); } else { - inner = QRect( sliderPos + 1, 1, width() - 2 - sliderPos, height() - 2 ); + inner = TQRect( sliderPos + 1, 1, width() - 2 - sliderPos, height() - 2 ); } if ( grayed ) { @@ -282,7 +282,7 @@ void KSmallSlider::paintEvent( QPaintEvent * ) } } -void KSmallSlider::mousePressEvent( QMouseEvent *e ) +void KSmallSlider::mousePressEvent( TQMouseEvent *e ) { //resetState(); @@ -297,7 +297,7 @@ void KSmallSlider::mousePressEvent( QMouseEvent *e ) moveSlider( pos ); } -void KSmallSlider::mouseMoveEvent( QMouseEvent *e ) +void KSmallSlider::mouseMoveEvent( TQMouseEvent *e ) { /* if ( state != Dragging ) @@ -307,7 +307,7 @@ void KSmallSlider::mouseMoveEvent( QMouseEvent *e ) moveSlider( pos ); } -void KSmallSlider::wheelEvent( QWheelEvent * e) +void KSmallSlider::wheelEvent( TQWheelEvent * e) { // kdDebug(67100) << "KSmallslider::wheelEvent()" << endl; /* Unfortunately KSmallSlider is no MixDeviceWidget, so we don't have access to @@ -319,17 +319,17 @@ void KSmallSlider::wheelEvent( QWheelEvent * e) //kdDebug(67100) << "KSmallslider::wheelEvent() inc=" << inc << "delta=" << e->delta() << endl; if ( e->delta() > 0 ) { - QRangeControl::setValue( QRangeControl::value() + inc ); + TQRangeControl::setValue( TQRangeControl::value() + inc ); } else { - QRangeControl::setValue( QRangeControl::value() - inc ); + TQRangeControl::setValue( TQRangeControl::value() - inc ); } e->accept(); // Accept the event // Hint: Qt autmatically triggers a valueChange() when we do setValue() } -void KSmallSlider::mouseReleaseEvent( QMouseEvent * ) +void KSmallSlider::mouseReleaseEvent( TQMouseEvent * ) { //resetState(); } @@ -343,9 +343,9 @@ void KSmallSlider::moveSlider( int pos ) int newPos = QMIN( a, QMAX( 0, pos ) ); // keep it inside the available bounds of the slider int newVal = valueFromPosition( newPos ); - if ( newVal != QRangeControl::value() ) { - //QRangeControl::directSetValue( sliderVal ); - QRangeControl::setValue( newVal ); + if ( newVal != TQRangeControl::value() ) { + //TQRangeControl::directSetValue( sliderVal ); + TQRangeControl::setValue( newVal ); emit valueChanged( value() ); // Only for external use } update(); @@ -356,7 +356,7 @@ void KSmallSlider::resetState() { switch ( state ) { case Dragging: { - QRangeControl::setValue( valueFromPosition( sliderPos ) ); + TQRangeControl::setValue( valueFromPosition( sliderPos ) ); emit sliderReleased(); break; } @@ -372,7 +372,7 @@ void KSmallSlider::resetState() void KSmallSlider::setValue( int value ) { - QRangeControl::setValue( value ); + TQRangeControl::setValue( value ); } void KSmallSlider::addStep() @@ -385,7 +385,7 @@ void KSmallSlider::subtractStep() subtractPage(); } -int KSmallSlider::goodPart( const QPoint &p ) const +int KSmallSlider::goodPart( const TQPoint &p ) const { if ( _orientation == Qt::Vertical ) { return p.y() - 1; @@ -396,36 +396,36 @@ int KSmallSlider::goodPart( const QPoint &p ) const } /***************** SIZE STUFF START ***************/ -QSize KSmallSlider::sizeHint() const +TQSize KSmallSlider::sizeHint() const { //constPolish(); const int length = 25; const int thick = 10; if ( _orientation == Qt::Vertical ) - return QSize( thick, length ); + return TQSize( thick, length ); else - return QSize( length, thick ); + return TQSize( length, thick ); } -QSize KSmallSlider::minimumSizeHint() const +TQSize KSmallSlider::minimumSizeHint() const { - QSize s(10,10); + TQSize s(10,10); return s; } -QSizePolicy KSmallSlider::sizePolicy() const +TQSizePolicy KSmallSlider::sizePolicy() const { if ( _orientation == Qt::Vertical ) { //kdDebug(67100) << "KSmallSlider::sizePolicy() vertical value=(Fixed,MinimumExpanding)\n"; - return QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Expanding ); + return TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Expanding ); } else { //kdDebug(67100) << "KSmallSlider::sizePolicy() horizontal value=(MinimumExpanding,Fixed)\n"; - return QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ); + return TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ); } } /***************** SIZE STUFF END ***************/ @@ -433,22 +433,22 @@ QSizePolicy KSmallSlider::sizePolicy() const int KSmallSlider::minValue() const { - return QRangeControl::minValue(); + return TQRangeControl::minValue(); } int KSmallSlider::maxValue() const { - return QRangeControl::maxValue(); + return TQRangeControl::maxValue(); } int KSmallSlider::lineStep() const { - return QRangeControl::lineStep(); + return TQRangeControl::lineStep(); } int KSmallSlider::pageStep() const { - return QRangeControl::pageStep(); + return TQRangeControl::pageStep(); } void KSmallSlider::setLineStep( int i ) @@ -461,20 +461,20 @@ void KSmallSlider::setPageStep( int i ) setSteps( lineStep(), i ); } -// Only for external acces. You MUST use QRangeControl::value() internally. +// Only for external acces. You MUST use TQRangeControl::value() internally. int KSmallSlider::value() const { - return QRangeControl::value(); + return TQRangeControl::value(); } /* -void KSmallSlider::paletteChange ( const QPalette &) { +void KSmallSlider::paletteChange ( const TQPalette &) { if ( grayed ) { setColors(mutedLowColor2, mutedHighColor2, backColor2 ); } else { - // ignore the QPalette and use the values from KGlobalSettings instead - //const QColorGroup& qcg = palette().active(); + // ignore the TQPalette and use the values from KGlobalSettings instead + //const TQColorGroup& qcg = palette().active(); setColors(KGlobalSettings::baseColor(), KGlobalSettings::highlightColor(), backColor2 ); } } @@ -495,7 +495,7 @@ bool KSmallSlider::gray() const return grayed; } -void KSmallSlider::setColors( QColor high, QColor low, QColor back ) +void KSmallSlider::setColors( TQColor high, TQColor low, TQColor back ) { colHigh = high; colLow = low; @@ -504,7 +504,7 @@ void KSmallSlider::setColors( QColor high, QColor low, QColor back ) //repaint(); } -void KSmallSlider::setGrayColors( QColor high, QColor low, QColor back ) +void KSmallSlider::setGrayColors( TQColor high, TQColor low, TQColor back ) { grayHigh = high; grayLow = low; diff --git a/kmix/ksmallslider.h b/kmix/ksmallslider.h index b26a238a..62849f7b 100644 --- a/kmix/ksmallslider.h +++ b/kmix/ksmallslider.h @@ -25,25 +25,25 @@ #include -#include -#include -#include +#include +#include +#include -class KSmallSlider : public QWidget, public QRangeControl +class KSmallSlider : public TQWidget, public QRangeControl { Q_OBJECT public: - KSmallSlider( QWidget *parent, const char *name=0 ); - KSmallSlider( Qt::Orientation, QWidget *parent, const char *name=0 ); + KSmallSlider( TQWidget *parent, const char *name=0 ); + KSmallSlider( Qt::Orientation, TQWidget *parent, const char *name=0 ); KSmallSlider( int minValue, int maxValue, int pageStep, int value, - Qt::Orientation, QWidget *parent, const char *name=0 ); + Qt::Orientation, TQWidget *parent, const char *name=0 ); //virtual void setTracking( bool enable ); //bool tracking() const; - QSize sizeHint() const; - QSizePolicy sizePolicy() const; - QSize minimumSizeHint() const; + TQSize sizeHint() const; + TQSizePolicy sizePolicy() const; + TQSize minimumSizeHint() const; int minValue() const; int maxValue() const; @@ -55,7 +55,7 @@ class KSmallSlider : public QWidget, public QRangeControl void setPageStep( int ); int value() const; - //void paletteChange ( const QPalette & oldPalette ); + //void paletteChange ( const TQPalette & oldPalette ); bool gray() const; public slots: @@ -64,8 +64,8 @@ public slots: void subtractStep(); void setGray( bool value ); - void setColors( QColor high, QColor low, QColor back ); - void setGrayColors( QColor high, QColor low, QColor back ); + void setColors( TQColor high, TQColor low, TQColor back ); + void setGrayColors( TQColor high, TQColor low, TQColor back ); signals: void valueChanged( int value ); @@ -74,13 +74,13 @@ public slots: void sliderReleased(); protected: - void resizeEvent( QResizeEvent * ); - void paintEvent( QPaintEvent * ); + void resizeEvent( TQResizeEvent * ); + void paintEvent( TQPaintEvent * ); - void mousePressEvent( QMouseEvent * ); - void mouseReleaseEvent( QMouseEvent * ); - void mouseMoveEvent( QMouseEvent * ); - void wheelEvent( QWheelEvent * ); + void mousePressEvent( TQMouseEvent * ); + void mouseReleaseEvent( TQMouseEvent * ); + void mouseMoveEvent( TQMouseEvent * ); + void wheelEvent( TQWheelEvent * ); void valueChange(); void rangeChange(); @@ -96,7 +96,7 @@ public slots: // int slideLength() const; int available() const; - int goodPart( const QPoint& ) const; + int goodPart( const TQPoint& ) const; //void initTicks(); //QCOORD sliderPos; @@ -105,8 +105,8 @@ public slots: //bool track; bool grayed; Qt::Orientation _orientation; - QColor colHigh, colLow, colBack; - QColor grayHigh, grayLow, grayBack; + TQColor colHigh, colLow, colBack; + TQColor grayHigh, grayLow, grayBack; }; diff --git a/kmix/mdwenum.cpp b/kmix/mdwenum.cpp index 3cf0533e..35ec4de8 100644 --- a/kmix/mdwenum.cpp +++ b/kmix/mdwenum.cpp @@ -19,11 +19,11 @@ * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -46,22 +46,22 @@ */ MDWEnum::MDWEnum(Mixer *mixer, MixDevice* md, Qt::Orientation orientation, - QWidget* parent, ViewBase* mw, const char* name) : + TQWidget* parent, ViewBase* mw, const char* name) : MixDeviceWidget(mixer,md,false,orientation,parent,mw,name), _label(0), _enumCombo(0), _layout(0) { // create actions (on _mdwActions, see MixDeviceWidget) // KStdAction::showMenubar() is in MixDeviceWidget now - new KToggleAction( i18n("&Hide"), 0, this, SLOT(setDisabled()), _mdwActions, "hide" ); - new KAction( i18n("C&onfigure Shortcuts..."), 0, this, SLOT(defineKeys()), _mdwActions, "keys" ); + new KToggleAction( i18n("&Hide"), 0, this, TQT_SLOT(setDisabled()), _mdwActions, "hide" ); + new KAction( i18n("C&onfigure Shortcuts..."), 0, this, TQT_SLOT(defineKeys()), _mdwActions, "keys" ); // create widgets createWidgets(); /* !!! remove this for production version */ - m_keys->insert( "Next Value", i18n( "Next Value" ), QString::null, - KShortcut(), KShortcut(), this, SLOT( nextEnumId() ) ); + m_keys->insert( "Next Value", i18n( "Next Value" ), TQString::null, + KShortcut(), KShortcut(), this, TQT_SLOT( nextEnumId() ) ); installEventFilter( this ); // filter for popup } @@ -74,20 +74,20 @@ MDWEnum::~MDWEnum() void MDWEnum::createWidgets() { if ( _orientation == Qt::Vertical ) { - _layout = new QVBoxLayout( this ); + _layout = new TQVBoxLayout( this ); _layout->setAlignment(Qt::AlignHCenter); } else { - _layout = new QHBoxLayout( this ); + _layout = new TQHBoxLayout( this ); _layout->setAlignment(Qt::AlignVCenter); } - QToolTip::add( this, m_mixdevice->name() ); + TQToolTip::add( this, m_mixdevice->name() ); //this->setStretchFactor( _layout, 0 ); - //QSizePolicy qsp( QSizePolicy::Ignored, QSizePolicy::Maximum); + //TQSizePolicy qsp( TQSizePolicy::Ignored, TQSizePolicy::Maximum); //_layout->setSizePolicy(qsp); //_layout->setSpacing(KDialog::spacingHint()); - _label = new QLabel( m_mixdevice->name(), this); + _label = new TQLabel( m_mixdevice->name(), this); _layout->addWidget(_label); _label->setFixedHeight(_label->sizeHint().height()); _enumCombo = new KComboBox( FALSE, this, "mixerCombo" ); @@ -99,8 +99,8 @@ void MDWEnum::createWidgets() // ------------ fill ComboBox end -------------- _layout->addWidget(_enumCombo); _enumCombo->setFixedHeight(_enumCombo->sizeHint().height()); - connect( _enumCombo, SIGNAL( activated( int ) ), this, SLOT( setEnumId( int ) ) ); - QToolTip::add( _enumCombo, m_mixdevice->name() ); + connect( _enumCombo, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( setEnumId( int ) ) ); + TQToolTip::add( _enumCombo, m_mixdevice->name() ); //_layout->addSpacing( 4 ); } @@ -123,17 +123,17 @@ void MDWEnum::showContextMenu() KPopupMenu *menu = m_mixerwidget->getPopup(); - QPoint pos = QCursor::pos(); + TQPoint pos = TQCursor::pos(); menu->popup( pos ); } -QSize MDWEnum::sizeHint() const { +TQSize MDWEnum::sizeHint() const { if ( _layout != 0 ) { return _layout->sizeHint(); } else { // layout not (yet) created - return QWidget::sizeHint(); + return TQWidget::sizeHint(); } } @@ -191,16 +191,16 @@ void MDWEnum::setDisabled( bool value ) { * An event filter for the various QWidgets. We watch for Mouse press Events, so * that we can popup the context menu. */ -bool MDWEnum::eventFilter( QObject* obj, QEvent* e ) +bool MDWEnum::eventFilter( TQObject* obj, TQEvent* e ) { - if (e->type() == QEvent::MouseButtonPress) { - QMouseEvent *qme = static_cast(e); + if (e->type() == TQEvent::MouseButtonPress) { + TQMouseEvent *qme = static_cast(e); if (qme->button() == Qt::RightButton) { showContextMenu(); return true; } } - return QWidget::eventFilter(obj,e); + return TQWidget::eventFilter(obj,e); } #include "mdwenum.moc" diff --git a/kmix/mdwenum.h b/kmix/mdwenum.h index ba57a8e2..17fea239 100644 --- a/kmix/mdwenum.h +++ b/kmix/mdwenum.h @@ -23,7 +23,7 @@ #ifndef MDWENUM_H #define MDWENUM_H -#include +#include #include "volume.h" class QBoxLayout; @@ -46,12 +46,12 @@ class MDWEnum : public MixDeviceWidget public: MDWEnum( Mixer *mixer, MixDevice* md, Qt::Orientation orientation, - QWidget* parent = 0, ViewBase* mw = 0, const char* name = 0); + TQWidget* parent = 0, ViewBase* mw = 0, const char* name = 0); ~MDWEnum(); void addActionToPopup( KAction *action ); - QSize sizeHint() const; - bool eventFilter( QObject* obj, QEvent* e ); + TQSize sizeHint() const; + bool eventFilter( TQObject* obj, TQEvent* e ); public slots: // GUI hide and show @@ -69,9 +69,9 @@ public slots: private: void createWidgets(); - QLabel *_label; + TQLabel *_label; KComboBox *_enumCombo; - QBoxLayout *_layout; + TQBoxLayout *_layout; }; #endif diff --git a/kmix/mdwslider.cpp b/kmix/mdwslider.cpp index ea936e6a..9062c408 100644 --- a/kmix/mdwslider.cpp +++ b/kmix/mdwslider.cpp @@ -29,14 +29,14 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include "mdwslider.h" #include "mixer.h" @@ -51,42 +51,42 @@ * Used in KMix main window and DockWidget and PanelApplet. * It can be configured to include or exclude the recordLED and the muteLED. * The direction (horizontal, vertical) can be configured and whether it should - * be "small" (uses KSmallSlider instead of QSlider then). + * be "small" (uses KSmallSlider instead of TQSlider then). * * Due to the many options, this is the most complicated MixDeviceWidget subclass. */ MDWSlider::MDWSlider(Mixer *mixer, MixDevice* md, bool showMuteLED, bool showRecordLED, bool small, Qt::Orientation orientation, - QWidget* parent, ViewBase* mw, const char* name) : + TQWidget* parent, ViewBase* mw, const char* name) : MixDeviceWidget(mixer,md,small,orientation,parent,mw,name), m_linked(true), m_valueStyle( NNONE), m_iconLabel( 0 ), m_muteLED( 0 ), m_recordLED( 0 ), m_label( 0 ), _layout(0) { // create actions (on _mdwActions, see MixDeviceWidget) - new KToggleAction( i18n("&Split Channels"), 0, this, SLOT(toggleStereoLinked()), + new KToggleAction( i18n("&Split Channels"), 0, this, TQT_SLOT(toggleStereoLinked()), _mdwActions, "stereo" ); - new KToggleAction( i18n("&Hide"), 0, this, SLOT(setDisabled()), _mdwActions, "hide" ); + new KToggleAction( i18n("&Hide"), 0, this, TQT_SLOT(setDisabled()), _mdwActions, "hide" ); KToggleAction *a = new KToggleAction(i18n("&Muted"), 0, 0, 0, _mdwActions, "mute" ); - connect( a, SIGNAL(toggled(bool)), SLOT(toggleMuted()) ); + connect( a, TQT_SIGNAL(toggled(bool)), TQT_SLOT(toggleMuted()) ); if( m_mixdevice->isRecordable() ) { a = new KToggleAction( i18n("Set &Record Source"), 0, 0, 0, _mdwActions, "recsrc" ); - connect( a, SIGNAL(toggled(bool)), SLOT( toggleRecsrc()) ); + connect( a, TQT_SIGNAL(toggled(bool)), TQT_SLOT( toggleRecsrc()) ); } - new KAction( i18n("C&onfigure Global Shortcuts..."), 0, this, SLOT(defineKeys()), _mdwActions, "keys" ); + new KAction( i18n("C&onfigure Global Shortcuts..."), 0, this, TQT_SLOT(defineKeys()), _mdwActions, "keys" ); // create widgets createWidgets( showMuteLED, showRecordLED ); - m_keys->insert( "Increase volume", i18n( "Increase Volume of '%1'" ).arg(m_mixdevice->name().utf8().data()), QString::null, - KShortcut(), KShortcut(), this, SLOT( increaseVolume() ) ); - m_keys->insert( "Decrease volume", i18n( "Decrease Volume of '%1'" ).arg(m_mixdevice->name().utf8().data()), QString::null, - KShortcut(), KShortcut(), this, SLOT( decreaseVolume() ) ); - m_keys->insert( "Toggle mute", i18n( "Toggle Mute of '%1'" ).arg(m_mixdevice->name().utf8().data()), QString::null, - KShortcut(), KShortcut(), this, SLOT( toggleMuted() ) ); + m_keys->insert( "Increase volume", i18n( "Increase Volume of '%1'" ).arg(m_mixdevice->name().utf8().data()), TQString::null, + KShortcut(), KShortcut(), this, TQT_SLOT( increaseVolume() ) ); + m_keys->insert( "Decrease volume", i18n( "Decrease Volume of '%1'" ).arg(m_mixdevice->name().utf8().data()), TQString::null, + KShortcut(), KShortcut(), this, TQT_SLOT( decreaseVolume() ) ); + m_keys->insert( "Toggle mute", i18n( "Toggle Mute of '%1'" ).arg(m_mixdevice->name().utf8().data()), TQString::null, + KShortcut(), KShortcut(), this, TQT_SLOT( toggleMuted() ) ); installEventFilter( this ); // filter for popup @@ -94,13 +94,13 @@ MDWSlider::MDWSlider(Mixer *mixer, MixDevice* md, } -QSizePolicy MDWSlider::sizePolicy() const +TQSizePolicy MDWSlider::sizePolicy() const { if ( _orientation == Qt::Vertical ) { - return QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Expanding ); + return TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Expanding ); } else { - return QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ); + return TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ); } } @@ -114,22 +114,22 @@ QSizePolicy MDWSlider::sizePolicy() const void MDWSlider::createWidgets( bool showMuteLED, bool showRecordLED ) { if ( _orientation == Qt::Vertical ) { - _layout = new QVBoxLayout( this ); + _layout = new TQVBoxLayout( this ); _layout->setAlignment(Qt::AlignCenter); } else { - _layout = new QHBoxLayout( this ); + _layout = new TQHBoxLayout( this ); _layout->setAlignment(Qt::AlignCenter); } // -- MAIN SLIDERS LAYOUT --- - QBoxLayout *slidersLayout; + TQBoxLayout *slidersLayout; if ( _orientation == Qt::Vertical ) { - slidersLayout = new QHBoxLayout( _layout ); + slidersLayout = new TQHBoxLayout( _layout ); slidersLayout->setAlignment(Qt::AlignVCenter); } else { - slidersLayout = new QVBoxLayout( _layout ); + slidersLayout = new TQVBoxLayout( _layout ); slidersLayout->setAlignment(Qt::AlignHCenter); } @@ -142,24 +142,24 @@ void MDWSlider::createWidgets( bool showMuteLED, bool showRecordLED ) // -- LABEL LAYOUT TO POSITION - QBoxLayout *labelLayout; + TQBoxLayout *labelLayout; if ( _orientation == Qt::Vertical ) { - labelLayout = new QVBoxLayout( slidersLayout ); + labelLayout = new TQVBoxLayout( slidersLayout ); labelLayout->setAlignment(Qt::AlignHCenter); } else { - labelLayout = new QHBoxLayout( slidersLayout ); + labelLayout = new TQHBoxLayout( slidersLayout ); labelLayout->setAlignment(Qt::AlignVCenter); } if ( _orientation == Qt::Vertical ) { m_label = new VerticalText( this, m_mixdevice->name().utf8().data() ); - QToolTip::add( m_label, m_mixdevice->name() ); + TQToolTip::add( m_label, m_mixdevice->name() ); } else { - m_label = new QLabel(this); - static_cast(m_label) ->setText(m_mixdevice->name()); - QToolTip::add( m_label, m_mixdevice->name() ); + m_label = new TQLabel(this); + static_cast(m_label) ->setText(m_mixdevice->name()); + TQToolTip::add( m_label, m_mixdevice->name() ); } m_label->hide(); @@ -180,24 +180,24 @@ void MDWSlider::createWidgets( bool showMuteLED, bool showRecordLED ) */ // -- SLIDERS, LEDS AND ICON - QBoxLayout *sliLayout; + TQBoxLayout *sliLayout; if ( _orientation == Qt::Vertical ) { - sliLayout = new QVBoxLayout( slidersLayout ); + sliLayout = new TQVBoxLayout( slidersLayout ); sliLayout->setAlignment(Qt::AlignHCenter); } else { - sliLayout = new QHBoxLayout( slidersLayout ); + sliLayout = new TQHBoxLayout( slidersLayout ); sliLayout->setAlignment(Qt::AlignVCenter); } // --- ICON ---------------------------- - QBoxLayout *iconLayout; + TQBoxLayout *iconLayout; if ( _orientation == Qt::Vertical ) { - iconLayout = new QHBoxLayout( sliLayout ); + iconLayout = new TQHBoxLayout( sliLayout ); iconLayout->setAlignment(Qt::AlignVCenter); } else { - iconLayout = new QVBoxLayout( sliLayout ); + iconLayout = new TQVBoxLayout( sliLayout ); iconLayout->setAlignment(Qt::AlignHCenter); } @@ -213,13 +213,13 @@ void MDWSlider::createWidgets( bool showMuteLED, bool showRecordLED ) // --- MUTE LED if ( showMuteLED ) { - QBoxLayout *ledlayout; + TQBoxLayout *ledlayout; if ( _orientation == Qt::Vertical ) { - ledlayout = new QHBoxLayout( sliLayout ); + ledlayout = new TQHBoxLayout( sliLayout ); ledlayout->setAlignment(Qt::AlignVCenter); } else { - ledlayout = new QVBoxLayout( sliLayout ); + ledlayout = new TQVBoxLayout( sliLayout ); ledlayout->setAlignment(Qt::AlignHCenter); } @@ -229,19 +229,19 @@ void MDWSlider::createWidgets( bool showMuteLED, bool showRecordLED ) // create mute LED m_muteLED = new KLedButton( Qt::green, KLed::On, KLed::Sunken, KLed::Circular, this, "MuteLED" ); - m_muteLED->setFixedSize( QSize(16, 16) ); - m_muteLED->resize( QSize(16, 16) ); + m_muteLED->setFixedSize( TQSize(16, 16) ); + m_muteLED->resize( TQSize(16, 16) ); ledlayout->addWidget( m_muteLED ); - QToolTip::add( m_muteLED, i18n( "Mute" ) ); - connect( m_muteLED, SIGNAL(stateChanged(bool)), this, SLOT(toggleMuted()) ); + TQToolTip::add( m_muteLED, i18n( "Mute" ) ); + connect( m_muteLED, TQT_SIGNAL(stateChanged(bool)), this, TQT_SLOT(toggleMuted()) ); m_muteLED->installEventFilter( this ); ledlayout->addStretch(); } // has Mute LED else { // we don't have a MUTE LED. We create a dummy widget // !! possibly not neccesary any more (we are layouted) - QWidget *qw = new QWidget(this, "Spacer"); - qw->setFixedSize( QSize(16, 16) ); + TQWidget *qw = new TQWidget(this, "Spacer"); + qw->setFixedSize( TQSize(16, 16) ); ledlayout->addWidget(qw); qw->installEventFilter( this ); } // has no Mute LED @@ -250,18 +250,18 @@ void MDWSlider::createWidgets( bool showMuteLED, bool showRecordLED ) } // showMuteLED // --- SLIDERS --------------------------- - QBoxLayout *volLayout; + TQBoxLayout *volLayout; if ( _orientation == Qt::Vertical ) { - volLayout = new QHBoxLayout( sliLayout ); + volLayout = new TQHBoxLayout( sliLayout ); volLayout->setAlignment(Qt::AlignVCenter); } else { - volLayout = new QVBoxLayout( sliLayout ); + volLayout = new TQVBoxLayout( sliLayout ); volLayout->setAlignment(Qt::AlignHCenter); } // Sliders and volume number indication - QBoxLayout *slinumLayout; + TQBoxLayout *slinumLayout; for( int i = 0; i < m_mixdevice->getVolume().count(); i++ ) { Volume::ChannelID chid = Volume::ChannelID(i); @@ -272,34 +272,34 @@ void MDWSlider::createWidgets( bool showMuteLED, bool showRecordLED ) int minvol = m_mixdevice->getVolume().minVolume(); if ( _orientation == Qt::Vertical ) { - slinumLayout = new QVBoxLayout( volLayout ); + slinumLayout = new TQVBoxLayout( volLayout ); slinumLayout->setAlignment(Qt::AlignHCenter); } else { - slinumLayout = new QHBoxLayout( volLayout ); + slinumLayout = new TQHBoxLayout( volLayout ); slinumLayout->setAlignment(Qt::AlignVCenter); } // create labels to hold volume values (taken from qamix/kamix) - QLabel *number = new QLabel( "100", this ); + TQLabel *number = new TQLabel( "100", this ); slinumLayout->addWidget( number ); - number->setFrameStyle( QFrame::Panel | QFrame::Sunken ); + number->setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); number->setLineWidth( 2 ); number->setMinimumWidth( number->sizeHint().width() ); - number->setPaletteBackgroundColor( QColor(190, 250, 190) ); + number->setPaletteBackgroundColor( TQColor(190, 250, 190) ); // don't show the value by default number->hide(); updateValue( number, chid ); _numbers.append( number ); - QWidget* slider; + TQWidget* slider; if ( m_small ) { slider = new KSmallSlider( minvol, maxvol, maxvol/10, m_mixdevice->getVolume( chid ), _orientation, this, m_mixdevice->name().ascii() ); } else { - slider = new QSlider( 0, maxvol, maxvol/10, + slider = new TQSlider( 0, maxvol, maxvol/10, maxvol - m_mixdevice->getVolume( chid ), _orientation, this, m_mixdevice->name().ascii() ); slider->setMinimumSize( slider->sizeHint() ); @@ -307,7 +307,7 @@ void MDWSlider::createWidgets( bool showMuteLED, bool showRecordLED ) slider->setBackgroundOrigin(AncestorOrigin); slider->installEventFilter( this ); - QToolTip::add( slider, m_mixdevice->name() ); + TQToolTip::add( slider, m_mixdevice->name() ); if( i>0 && isStereoLinked() ) { // show only one (the first) slider, when the user wants it so @@ -317,7 +317,7 @@ void MDWSlider::createWidgets( bool showMuteLED, bool showRecordLED ) slinumLayout->addWidget( slider ); // add to layout m_sliders.append ( slider ); // add to list _slidersChids.append(chid); // Remember slider-chid association - connect( slider, SIGNAL(valueChanged(int)), SLOT(volumeChange(int)) ); + connect( slider, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(volumeChange(int)) ); } // for all channels of this device @@ -327,13 +327,13 @@ void MDWSlider::createWidgets( bool showMuteLED, bool showRecordLED ) sliLayout->addSpacing( 5 ); // --- LED LAYOUT TO CENTER --- - QBoxLayout *reclayout; + TQBoxLayout *reclayout; if ( _orientation == Qt::Vertical ) { - reclayout = new QHBoxLayout( sliLayout ); + reclayout = new TQHBoxLayout( sliLayout ); reclayout->setAlignment(Qt::AlignVCenter); } else { - reclayout = new QVBoxLayout( sliLayout ); + reclayout = new TQVBoxLayout( sliLayout ); reclayout->setAlignment(Qt::AlignHCenter); } @@ -342,19 +342,19 @@ void MDWSlider::createWidgets( bool showMuteLED, bool showRecordLED ) m_recordLED = new KLedButton( Qt::red, m_mixdevice->isRecSource()?KLed::On:KLed::Off, KLed::Sunken, KLed::Circular, this, "RecordLED" ); - m_recordLED->setFixedSize( QSize(16, 16) ); + m_recordLED->setFixedSize( TQSize(16, 16) ); reclayout->addWidget( m_recordLED ); - connect(m_recordLED, SIGNAL(stateChanged(bool)), this, SLOT(setRecsrc(bool))); + connect(m_recordLED, TQT_SIGNAL(stateChanged(bool)), this, TQT_SLOT(setRecsrc(bool))); m_recordLED->installEventFilter( this ); - QToolTip::add( m_recordLED, i18n( "Record" ) ); + TQToolTip::add( m_recordLED, i18n( "Record" ) ); reclayout->addStretch(); } else { // we don't have a RECORD LED. We create a dummy widget // !! possibly not neccesary any more (we are layouted) - QWidget *qw = new QWidget(this, "Spacer"); - qw->setFixedSize( QSize(16, 16) ); + TQWidget *qw = new TQWidget(this, "Spacer"); + qw->setFixedSize( TQSize(16, 16) ); reclayout->addWidget(qw); qw->installEventFilter( this ); } // has no Record LED @@ -367,7 +367,7 @@ void MDWSlider::createWidgets( bool showMuteLED, bool showRecordLED ) QPixmap MDWSlider::icon( int icontype ) { - QPixmap miniDevPM; + TQPixmap miniDevPM; switch (icontype) { case MixDevice::AUDIO: miniDevPM = UserIcon("mix_audio"); break; @@ -415,18 +415,18 @@ MDWSlider::setIcon( int icontype ) { if( !m_iconLabel ) { - m_iconLabel = new QLabel(this); + m_iconLabel = new TQLabel(this); m_iconLabel->setBackgroundOrigin(AncestorOrigin); installEventFilter( m_iconLabel ); } - QPixmap miniDevPM = icon( icontype ); + TQPixmap miniDevPM = icon( icontype ); if ( !miniDevPM.isNull() ) { if ( m_small ) { // scale icon - QWMatrix t; + TQWMatrix t; t = t.scale( 10.0/miniDevPM.width(), 10.0/miniDevPM.height() ); m_iconLabel->setPixmap( miniDevPM.xForm( t ) ); m_iconLabel->resize( 10, 10 ); @@ -461,9 +461,9 @@ MDWSlider::setStereoLinked(bool value) { m_linked = value; - QWidget *slider = m_sliders.first(); - QLabel *number = _numbers.first(); - QString qs = number->text(); + TQWidget *slider = m_sliders.first(); + TQLabel *number = _numbers.first(); + TQString qs = number->text(); /*********************************************************** Remember value of first slider, so that it can be copied @@ -471,8 +471,8 @@ MDWSlider::setStereoLinked(bool value) ***********************************************************/ int firstSliderValue = 0; bool firstSliderValueValid = false; - if (slider->isA("QSlider") ) { - QSlider *sld = static_cast(slider); + if (slider->isA("TQSlider") ) { + TQSlider *sld = static_cast(slider); firstSliderValue = sld->value(); firstSliderValueValid = true; } @@ -492,10 +492,10 @@ MDWSlider::setStereoLinked(bool value) // This might not be entirely true, but better than showing the random value // that was used to be shown before hot-fixing this. !! must be revised if ( firstSliderValueValid ) { - // Remark: firstSlider== 0 could happen, if the static_cast above fails. + // Remark: firstSlider== 0 could happen, if the static_cast above fails. // It's a safety measure, if we got other Slider types in the future. - if (slider->isA("QSlider") ) { - QSlider *sld = static_cast(slider); + if (slider->isA("TQSlider") ) { + TQSlider *sld = static_cast(slider); sld->setValue( firstSliderValue ); } if (slider->isA("KSmallSlider") ) { @@ -511,7 +511,7 @@ MDWSlider::setStereoLinked(bool value) } slider = m_sliders.last(); - if( slider && static_cast(slider)->tickmarks() ) + if( slider && static_cast(slider)->tickmarks() ) setTicks( true ); layout()->activate(); @@ -535,26 +535,26 @@ MDWSlider::setLabeled(bool value) void MDWSlider::setTicks( bool ticks ) { - QWidget* slider; + TQWidget* slider; slider = m_sliders.first(); - if ( slider->inherits( "QSlider" ) ) + if ( slider->inherits( "TQSlider" ) ) { if( ticks ) if( isStereoLinked() ) - static_cast(slider)->setTickmarks( QSlider::Right ); + static_cast(slider)->setTickmarks( TQSlider::Right ); else { - static_cast(slider)->setTickmarks( QSlider::NoMarks ); + static_cast(slider)->setTickmarks( TQSlider::NoMarks ); slider = m_sliders.last(); - static_cast(slider)->setTickmarks( QSlider::Left ); + static_cast(slider)->setTickmarks( TQSlider::Left ); } else { - static_cast(slider)->setTickmarks( QSlider::NoMarks ); + static_cast(slider)->setTickmarks( TQSlider::NoMarks ); slider = m_sliders.last(); - static_cast(slider)->setTickmarks( QSlider::NoMarks ); + static_cast(slider)->setTickmarks( TQSlider::NoMarks ); } } @@ -567,8 +567,8 @@ MDWSlider::setValueStyle( ValueStyle valueStyle ) m_valueStyle = valueStyle; int i = 0; - QValueList::Iterator it = _slidersChids.begin(); - for(QLabel *number = _numbers.first(); number!=0; number = _numbers.next(), ++i, ++it) { + TQValueList::Iterator it = _slidersChids.begin(); + for(TQLabel *number = _numbers.first(); number!=0; number = _numbers.next(), ++i, ++it) { Volume::ChannelID chid = *it; switch ( m_valueStyle ) { case NNONE: number->hide(); break; @@ -598,26 +598,26 @@ MDWSlider::setIcons(bool value) } void -MDWSlider::setColors( QColor high, QColor low, QColor back ) +MDWSlider::setColors( TQColor high, TQColor low, TQColor back ) { - for( QWidget *slider=m_sliders.first(); slider!=0; slider=m_sliders.next() ) { + for( TQWidget *slider=m_sliders.first(); slider!=0; slider=m_sliders.next() ) { KSmallSlider *smallSlider = dynamic_cast(slider); if ( smallSlider ) smallSlider->setColors( high, low, back ); } } void -MDWSlider::setMutedColors( QColor high, QColor low, QColor back ) +MDWSlider::setMutedColors( TQColor high, TQColor low, TQColor back ) { - for( QWidget *slider=m_sliders.first(); slider!=0; slider=m_sliders.next() ) { + for( TQWidget *slider=m_sliders.first(); slider!=0; slider=m_sliders.next() ) { KSmallSlider *smallSlider = dynamic_cast(slider); if ( smallSlider ) smallSlider->setGrayColors( high, low, back ); } } void -MDWSlider::updateValue( QLabel *value, Volume::ChannelID chid ) { - QString qs; +MDWSlider::updateValue( TQLabel *value, Volume::ChannelID chid ) { + TQString qs; Volume& vol = m_mixdevice->getVolume(); if (m_valueStyle == NABSOLUTE ) @@ -637,7 +637,7 @@ void MDWSlider::volumeChange( int ) // --- Step 2: Change the volumes directly in the Volume object to reflect the Sliders --- if ( isStereoLinked() ) { - QWidget *slider = m_sliders.first(); + TQWidget *slider = m_sliders.first(); Volume::ChannelID chid = _slidersChids.first(); int sliderValue = 0; @@ -649,7 +649,7 @@ void MDWSlider::volumeChange( int ) } } else { - QSlider *slider = dynamic_cast(m_sliders.first()); + TQSlider *slider = dynamic_cast(m_sliders.first()); if (slider) { if ( _orientation == Qt::Vertical ) sliderValue= slider->maxValue() - slider->value(); @@ -676,9 +676,9 @@ void MDWSlider::volumeChange( int ) } // joined else { int n = 0; - QValueList::Iterator it = _slidersChids.begin(); - QLabel *number = _numbers.first(); - for( QWidget *slider=m_sliders.first(); slider!=0 && number!=0; slider=m_sliders.next(), number=_numbers.next(), ++it ) + TQValueList::Iterator it = _slidersChids.begin(); + TQLabel *number = _numbers.first(); + for( TQWidget *slider=m_sliders.first(); slider!=0 && number!=0; slider=m_sliders.next(), number=_numbers.next(), ++it ) { Volume::ChannelID chid = *it; if ( slider->inherits( "KSmallSlider" ) ) @@ -689,7 +689,7 @@ void MDWSlider::volumeChange( int ) } else { - QSlider *bigSlider = dynamic_cast(slider); + TQSlider *bigSlider = dynamic_cast(slider); if (bigSlider) if ( _orientation == Qt::Vertical ) vol.setVolume( chid, bigSlider->maxValue() - bigSlider->value() ); @@ -791,7 +791,7 @@ void MDWSlider::decreaseVolume() /** This is called whenever there are volume updates pending from the hardware for this MDW. - At the moment it is called regulary via a QTimer (implicitely). + At the moment it is called regulary via a TQTimer (implicitely). */ void MDWSlider::update() { @@ -799,11 +799,11 @@ void MDWSlider::update() Volume vol = m_mixdevice->getVolume(); if( isStereoLinked() ) { - QValueList::Iterator it = _slidersChids.begin(); + TQValueList::Iterator it = _slidersChids.begin(); long avgVol = vol.getAvgVolume( Volume::MMAIN ); - QWidget *slider = m_sliders.first(); + TQWidget *slider = m_sliders.first(); if ( slider == 0 ) { return; // !!! Development version, check this !!! } @@ -817,7 +817,7 @@ void MDWSlider::update() } } // small slider else { - QSlider *bigSlider = dynamic_cast(slider); + TQSlider *bigSlider = dynamic_cast(slider); if (bigSlider) { // In case of stereo linked and single slider, slider must @@ -835,9 +835,9 @@ void MDWSlider::update() slider->blockSignals( false ); } // only 1 slider (stereo-linked) else { - QValueList::Iterator it = _slidersChids.begin(); + TQValueList::Iterator it = _slidersChids.begin(); for( int i=0; i(slider); + TQSlider *bigSlider = dynamic_cast(slider); if (bigSlider) if ( _orientation == Qt::Vertical ) { bigSlider->setValue( vol.maxVolume() - vol[i] ); @@ -930,17 +930,17 @@ void MDWSlider::showContextMenu() a->plug( menu ); } - QPoint pos = QCursor::pos(); + TQPoint pos = TQCursor::pos(); menu->popup( pos ); } -QSize MDWSlider::sizeHint() const { +TQSize MDWSlider::sizeHint() const { if ( _layout != 0 ) { return _layout->sizeHint(); } else { // layout not (yet) created - return QWidget::sizeHint(); + return TQWidget::sizeHint(); } } @@ -948,18 +948,18 @@ QSize MDWSlider::sizeHint() const { * An event filter for the various QWidgets. We watch for Mouse press Events, so * that we can popup the context menu. */ -bool MDWSlider::eventFilter( QObject* obj, QEvent* e ) +bool MDWSlider::eventFilter( TQObject* obj, TQEvent* e ) { - if (e->type() == QEvent::MouseButtonPress) { - QMouseEvent *qme = static_cast(e); + if (e->type() == TQEvent::MouseButtonPress) { + TQMouseEvent *qme = static_cast(e); if (qme->button() == Qt::RightButton) { showContextMenu(); return true; } } // Attention: We don't filter WheelEvents for KSmallSlider, because it handles WheelEvents itself - else if ( (e->type() == QEvent::Wheel) && !obj->isA("KSmallSlider") ) { - QWheelEvent *qwe = static_cast(e); + else if ( (e->type() == TQEvent::Wheel) && !obj->isA("KSmallSlider") ) { + TQWheelEvent *qwe = static_cast(e); if (qwe->delta() > 0) { increaseVolume(); } @@ -968,7 +968,7 @@ bool MDWSlider::eventFilter( QObject* obj, QEvent* e ) } return true; } - return QWidget::eventFilter(obj,e); + return TQWidget::eventFilter(obj,e); } #include "mdwslider.moc" diff --git a/kmix/mdwslider.h b/kmix/mdwslider.h index 01dd13aa..f55667ae 100644 --- a/kmix/mdwslider.h +++ b/kmix/mdwslider.h @@ -25,12 +25,12 @@ #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include class QBoxLayout; class QLabel; @@ -61,7 +61,7 @@ public: MDWSlider( Mixer *mixer, MixDevice* md, bool showMuteLED, bool showRecordLED, bool small, Qt::Orientation, - QWidget* parent = 0, ViewBase* mw = 0, const char* name = 0); + TQWidget* parent = 0, ViewBase* mw = 0, const char* name = 0); ~MDWSlider() {} void addActionToPopup( KAction *action ); @@ -74,11 +74,11 @@ public: void setTicks( bool ticks ); void setIcons( bool value ); void setValueStyle( ValueStyle valueStyle ); - void setColors( QColor high, QColor low, QColor back ); - void setMutedColors( QColor high, QColor low, QColor back ); - QSize sizeHint() const; - bool eventFilter( QObject* obj, QEvent* e ); - QSizePolicy sizePolicy() const; + void setColors( TQColor high, TQColor low, TQColor back ); + void setMutedColors( TQColor high, TQColor low, TQColor back ); + TQSize sizeHint() const; + bool eventFilter( TQObject* obj, TQEvent* e ); + TQSizePolicy sizePolicy() const; public slots: void toggleRecsrc(); @@ -107,22 +107,22 @@ private slots: void decreaseVolume(); private: - QPixmap icon( int icontype ); + TQPixmap icon( int icontype ); void setIcon( int icontype ); void createWidgets( bool showMuteLED, bool showRecordLED ); - void updateValue( QLabel *value, Volume::ChannelID chid ); + void updateValue( TQLabel *value, Volume::ChannelID chid ); bool m_linked; ValueStyle m_valueStyle; - QLabel *m_iconLabel; + TQLabel *m_iconLabel; KLedButton *m_muteLED; KLedButton *m_recordLED; - QWidget *m_label; // is either QLabel or VerticalText - QBoxLayout *_layout; - QPtrList m_sliders; - QValueList _slidersChids; - QPtrList _numbers; - // QValueList _numbersChids; + TQWidget *m_label; // is either TQLabel or VerticalText + TQBoxLayout *_layout; + TQPtrList m_sliders; + TQValueList _slidersChids; + TQPtrList _numbers; + // TQValueList _numbersChids; }; #endif diff --git a/kmix/mdwswitch.cpp b/kmix/mdwswitch.cpp index 3e630c18..ee590146 100644 --- a/kmix/mdwswitch.cpp +++ b/kmix/mdwswitch.cpp @@ -19,12 +19,12 @@ * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -43,25 +43,25 @@ /** * Class that represents a single Switch * The orientation (horizontal, vertical) can be configured and whether it should - * be "small" (uses KSmallSlider instead of QSlider then). + * be "small" (uses KSmallSlider instead of TQSlider then). */ MDWSwitch::MDWSwitch(Mixer *mixer, MixDevice* md, bool small, Qt::Orientation orientation, - QWidget* parent, ViewBase* mw, const char* name) : + TQWidget* parent, ViewBase* mw, const char* name) : MixDeviceWidget(mixer,md,small,orientation,parent,mw,name), _label(0) , _labelV(0) , _switchLED(0), _layout(0) { // create actions (on _mdwActions, see MixDeviceWidget) // KStdAction::showMenubar() is in MixDeviceWidget now - new KToggleAction( i18n("&Hide"), 0, this, SLOT(setDisabled()), _mdwActions, "hide" ); - new KAction( i18n("C&onfigure Shortcuts..."), 0, this, SLOT(defineKeys()), _mdwActions, "keys" ); + new KToggleAction( i18n("&Hide"), 0, this, TQT_SLOT(setDisabled()), _mdwActions, "hide" ); + new KAction( i18n("C&onfigure Shortcuts..."), 0, this, TQT_SLOT(defineKeys()), _mdwActions, "keys" ); // create widgets createWidgets(); - m_keys->insert( "Toggle switch", i18n( "Toggle Switch" ), QString::null, - KShortcut(), KShortcut(), this, SLOT( toggleSwitch() ) ); + m_keys->insert( "Toggle switch", i18n( "Toggle Switch" ), TQString::null, + KShortcut(), KShortcut(), this, TQT_SLOT( toggleSwitch() ) ); // The keys are loaded in KMixerWidget::loadConfig, see kmixerwidget.cpp (now: kmixtoolbox.cpp) //m_keys->readSettings(); @@ -78,14 +78,14 @@ MDWSwitch::~MDWSwitch() void MDWSwitch::createWidgets() { if ( _orientation == Qt::Vertical ) { - _layout = new QVBoxLayout( this ); + _layout = new TQVBoxLayout( this ); _layout->setAlignment(Qt::AlignHCenter); } else { - _layout = new QHBoxLayout( this ); + _layout = new TQHBoxLayout( this ); _layout->setAlignment(Qt::AlignVCenter); } - QToolTip::add( this, m_mixdevice->name() ); + TQToolTip::add( this, m_mixdevice->name() ); _layout->addSpacing( 4 ); @@ -116,7 +116,7 @@ void MDWSwitch::createWidgets() else _switchLED = new KLedButton( Qt::yellow, KLed::On, KLed::Sunken, KLed::Circular, this, "SwitchLED" ); _switchLED->setFixedSize(16,16); - _label = new QLabel(m_mixdevice->name(), this, "SwitchName"); + _label = new TQLabel(m_mixdevice->name(), this, "SwitchName"); _layout->addWidget( _switchLED ); _layout->addSpacing( 1 ); @@ -124,7 +124,7 @@ void MDWSwitch::createWidgets() _switchLED->installEventFilter( this ); _label->installEventFilter( this ); } - connect( _switchLED, SIGNAL(stateChanged(bool)), this, SLOT(toggleSwitch()) ); + connect( _switchLED, TQT_SIGNAL(stateChanged(bool)), this, TQT_SLOT(toggleSwitch()) ); _layout->addSpacing( 4 ); } @@ -160,17 +160,17 @@ void MDWSwitch::showContextMenu() KPopupMenu *menu = m_mixerwidget->getPopup(); - QPoint pos = QCursor::pos(); + TQPoint pos = TQCursor::pos(); menu->popup( pos ); } -QSize MDWSwitch::sizeHint() const { +TQSize MDWSwitch::sizeHint() const { if ( _layout != 0 ) { return _layout->sizeHint(); } else { // layout not (yet) created - return QWidget::sizeHint(); + return TQWidget::sizeHint(); } } @@ -216,16 +216,16 @@ void MDWSwitch::setDisabled( bool value ) { * An event filter for the various QWidgets. We watch for Mouse press Events, so * that we can popup the context menu. */ -bool MDWSwitch::eventFilter( QObject* obj, QEvent* e ) +bool MDWSwitch::eventFilter( TQObject* obj, TQEvent* e ) { - if (e->type() == QEvent::MouseButtonPress) { - QMouseEvent *qme = static_cast(e); + if (e->type() == TQEvent::MouseButtonPress) { + TQMouseEvent *qme = static_cast(e); if (qme->button() == Qt::RightButton) { showContextMenu(); return true; } } - return QWidget::eventFilter(obj,e); + return TQWidget::eventFilter(obj,e); } #include "mdwswitch.moc" diff --git a/kmix/mdwswitch.h b/kmix/mdwswitch.h index 80116399..44ddaa79 100644 --- a/kmix/mdwswitch.h +++ b/kmix/mdwswitch.h @@ -25,11 +25,11 @@ #include -#include +#include #include "volume.h" -#include -#include -#include +#include +#include +#include class QBoxLayout; class QLabel; @@ -56,13 +56,13 @@ class MDWSwitch : public MixDeviceWidget public: MDWSwitch( Mixer *mixer, MixDevice* md, bool small, Qt::Orientation orientation, - QWidget* parent = 0, ViewBase* mw = 0, const char* name = 0); + TQWidget* parent = 0, ViewBase* mw = 0, const char* name = 0); ~MDWSwitch(); void addActionToPopup( KAction *action ); - QSize sizeHint() const; + TQSize sizeHint() const; void setBackgroundMode(BackgroundMode m); - bool eventFilter( QObject* obj, QEvent* e ); + bool eventFilter( TQObject* obj, TQEvent* e ); public slots: // GUI hide and show @@ -79,10 +79,10 @@ public slots: private: void createWidgets(); - QLabel *_label; + TQLabel *_label; VerticalText *_labelV; KLedButton *_switchLED; - QBoxLayout *_layout; + TQBoxLayout *_layout; }; #endif diff --git a/kmix/mixdevice.cpp b/kmix/mixdevice.cpp index efa48184..d5c9f9c2 100644 --- a/kmix/mixdevice.cpp +++ b/kmix/mixdevice.cpp @@ -36,7 +36,7 @@ * Volume objects, one for Output (Playback volume) and one for Input (Record volume). */ MixDevice::MixDevice( int num, Volume &vol, bool recordable, bool mute, - QString name, ChannelType type, DeviceCategory category ) : + TQString name, ChannelType type, DeviceCategory category ) : _volume( vol ), _type( type ), _num( num ), _recordable( recordable ), _mute( mute ), _category( category ) { @@ -55,7 +55,7 @@ MixDevice::MixDevice( int num, Volume &vol, bool recordable, bool mute, _switch = true; } -MixDevice::MixDevice(const MixDevice &md) : QObject() +MixDevice::MixDevice(const MixDevice &md) : TQObject() { _name = md._name; _volume = md._volume; @@ -105,7 +105,7 @@ unsigned int MixDevice::enumId() return _enumCurrentId; } -QPtrList& MixDevice::enumValues() { +TQPtrList& MixDevice::enumValues() { return _enumValues; } @@ -116,11 +116,11 @@ void MixDevice::setVolume( int channel, int volume ) _volume.setVolume( (Volume::ChannelID)channel /* ARGH! */, volume ); } -QString& MixDevice::getPK() { +TQString& MixDevice::getPK() { return _pk; } -void MixDevice::setPK(QString &PK) { +void MixDevice::setPK(TQString &PK) { _pk = PK; // The key is used in the config file. It should not contain spaces _pk.replace(' ', '_'); @@ -133,9 +133,9 @@ void MixDevice::setPK(QString &PK) { * because we need to read the minimum and maximum volume levels. * (Another solutien would be to "equip" volFromConfig with maxInt and minInt values). */ -void MixDevice::read( KConfig *config, const QString& grp ) +void MixDevice::read( KConfig *config, const TQString& grp ) { - QString devgrp; + TQString devgrp; devgrp.sprintf( "%s.Dev%i", grp.ascii(), _num ); config->setGroup( devgrp ); //kdDebug(67100) << "MixDevice::read() of group devgrp=" << devgrp << endl; @@ -193,9 +193,9 @@ void MixDevice::read( KConfig *config, const QString& grp ) /** * called on "kmixctrl --save" and from the GUI's (currently only on exit) */ -void MixDevice::write( KConfig *config, const QString& grp ) +void MixDevice::write( KConfig *config, const TQString& grp ) { - QString devgrp; + TQString devgrp; devgrp.sprintf( "%s.Dev%i", grp.ascii(), _num ); config->setGroup(devgrp); // kdDebug(67100) << "MixDevice::write() of group devgrp=" << devgrp << endl; diff --git a/kmix/mixdevice.h b/kmix/mixdevice.h index 89ec052c..8683ce2b 100644 --- a/kmix/mixdevice.h +++ b/kmix/mixdevice.h @@ -2,10 +2,10 @@ #define MixDevice_h #include "volume.h" -#include +#include #include -#include -#include +#include +#include // ! @todo : CONSIDER MERGING OF MixDevice and Volume classes: // Not easy possible, because Volume is used in the driver backends @@ -35,26 +35,26 @@ class MixDevice : public QObject MixDevice(int num, Volume &vol, bool recordable, bool mute, - QString name, ChannelType type = UNKNOWN, DeviceCategory category = + TQString name, ChannelType type = UNKNOWN, DeviceCategory category = SLIDER ); MixDevice(const MixDevice &md); ~MixDevice(); int num() { return _num; }; - QString name() { return _name; }; + TQString name() { return _name; }; /** * Returns an unique ID of this MixDevice. By default the number * 'num' from the constructor is returned. It is recommended that * a better ID is set directly after constructing the MixDevice using * the setUniqueID(). */ - QString& getPK(); + TQString& getPK(); /** * Set a suitable PK for this MixDevice. It is used in looking up * the keys in kmixrc. It is advised to set a nice name, like * 'PCM_2', which would mean "2nd PCM device of the sound card". */ - void setPK(QString &id); + void setPK(TQString &id); bool isRecordable() { return _recordable; }; bool isRecSource() { return _recSource; }; bool isSwitch() { return _switch; } // !! change to _category == MixDevice::SWITCH @@ -72,10 +72,10 @@ SLIDER ); void setEnumId(int); unsigned int enumId(); - QPtrList& enumValues(); + TQPtrList& enumValues(); - void read( KConfig *config, const QString& grp ); - void write( KConfig *config, const QString& grp ); + void read( KConfig *config, const TQString& grp ); + void write( KConfig *config, const TQString& grp ); void setType( ChannelType channeltype ) { _type = channeltype; }; ChannelType type() { return _type; }; @@ -102,10 +102,10 @@ SLIDER ); bool _mute; // Available mute option bool _recSource; // Current rec status DeviceCategory _category; // category - QString _name; // Ascii channel name - QString _pk; // Primary key, used as part in config file keys + TQString _name; // Ascii channel name + TQString _pk; // Primary key, used as part in config file keys // A MixDevice, that is an ENUM, has these _enumValues - QPtrList _enumValues; + TQPtrList _enumValues; int _enumCurrentId; }; diff --git a/kmix/mixdevicewidget.cpp b/kmix/mixdevicewidget.cpp index 7885cb92..b5418303 100644 --- a/kmix/mixdevicewidget.cpp +++ b/kmix/mixdevicewidget.cpp @@ -29,14 +29,14 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include "mixer.h" #include "mixdevicewidget.h" @@ -50,12 +50,12 @@ * Used in KMix main window and DockWidget and PanelApplet. * It can be configured to include or exclude the recordLED and the muteLED. * The direction (horizontal, vertical) can be configured and whether it should - * be "small" (uses KSmallSlider instead of QSlider then). + * be "small" (uses KSmallSlider instead of TQSlider then). */ MixDeviceWidget::MixDeviceWidget(Mixer *mixer, MixDevice* md, bool small, Qt::Orientation orientation, - QWidget* parent, ViewBase* mw, const char* name) : - QWidget( parent, name ), m_mixer(mixer), m_mixdevice( md ), m_mixerwidget( mw ), + TQWidget* parent, ViewBase* mw, const char* name) : + TQWidget( parent, name ), m_mixer(mixer), m_mixdevice( md ), m_mixerwidget( mw ), m_disabled( false ), _orientation( orientation ), m_small( small ) { _mdwActions = new KActionCollection( this ); @@ -99,20 +99,20 @@ void MixDeviceWidget::setVolume( int /*channel*/, int /*vol*/ ) { /* is virtual void MixDeviceWidget::setVolume( Volume /*vol*/ ) { /* is virtual */ } void MixDeviceWidget::update() { /* is virtual */ } void MixDeviceWidget::showContextMenu() { /* is virtual */ } -void MixDeviceWidget::setColors( QColor , QColor , QColor ) { /* is virtual */ } +void MixDeviceWidget::setColors( TQColor , TQColor , TQColor ) { /* is virtual */ } void MixDeviceWidget::setIcons( bool ) { /* is virtual */ } void MixDeviceWidget::setLabeled( bool ) { /* is virtual */ } -void MixDeviceWidget::setMutedColors( QColor , QColor , QColor ) { /* is virtual */ } +void MixDeviceWidget::setMutedColors( TQColor , TQColor , TQColor ) { /* is virtual */ } -void MixDeviceWidget::mousePressEvent( QMouseEvent *e ) +void MixDeviceWidget::mousePressEvent( TQMouseEvent *e ) { if ( e->button()==RightButton ) showContextMenu(); else { - QWidget::mousePressEvent(e); + TQWidget::mousePressEvent(e); } } diff --git a/kmix/mixdevicewidget.h b/kmix/mixdevicewidget.h index d6d4057d..1f5fa0fc 100644 --- a/kmix/mixdevicewidget.h +++ b/kmix/mixdevicewidget.h @@ -27,11 +27,11 @@ #include -#include +#include #include "volume.h" -#include -#include -#include +#include +#include +#include class QBoxLayout; class QLabel; @@ -60,7 +60,7 @@ public: MixDeviceWidget( Mixer *mixer, MixDevice* md, bool small, Qt::Orientation orientation, - QWidget* parent = 0, ViewBase* mw = 0, const char* name = 0); + TQWidget* parent = 0, ViewBase* mw = 0, const char* name = 0); ~MixDeviceWidget(); void addActionToPopup( KAction *action ); @@ -68,9 +68,9 @@ public: virtual bool isDisabled() const; MixDevice* mixDevice() { return m_mixdevice; }; - virtual void setColors( QColor high, QColor low, QColor back ); + virtual void setColors( TQColor high, TQColor low, TQColor back ); virtual void setIcons( bool value ); - virtual void setMutedColors( QColor high, QColor low, QColor back ); + virtual void setMutedColors( TQColor high, TQColor low, TQColor back ); virtual bool isStereoLinked() const { return false; }; //virtual bool isLabeled() const { return false; }; @@ -109,7 +109,7 @@ protected: bool m_small; private: - void mousePressEvent( QMouseEvent *e ); + void mousePressEvent( TQMouseEvent *e ); }; #endif diff --git a/kmix/mixer.cpp b/kmix/mixer.cpp index 116e6c23..0e7c36fc 100644 --- a/kmix/mixer.cpp +++ b/kmix/mixer.cpp @@ -20,7 +20,7 @@ * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include +#include #include #include @@ -47,9 +47,9 @@ #undef KMIX_DCOP_OBJID_TEST int Mixer::_dcopID = 0; -QPtrList Mixer::s_mixers; -QString Mixer::_masterCard; -QString Mixer::_masterCardDevice; +TQPtrList Mixer::s_mixers; +TQString Mixer::_masterCard; +TQString Mixer::_masterCardDevice; int Mixer::numDrivers() { @@ -67,7 +67,7 @@ int Mixer::numDrivers() /* * Returns a reference of the current mixer list. */ -QPtrList& Mixer::mixers() +TQPtrList& Mixer::mixers() { return s_mixers; } @@ -88,10 +88,10 @@ Mixer::Mixer( int driver, int device ) : DCOPObject( "Mixer" ) m_balance = 0; m_profiles.setAutoDelete( true ); - _pollingTimer = new QTimer(); // will be started on open() and stopped on close() - connect( _pollingTimer, SIGNAL(timeout()), this, SLOT(readSetFromHW())); + _pollingTimer = new TQTimer(); // will be started on open() and stopped on close() + connect( _pollingTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(readSetFromHW())); - QCString objid; + TQCString objid; #ifndef KMIX_DCOP_OBJID_TEST objid.setNum(_mixerBackend->m_devnum); #else @@ -114,14 +114,14 @@ void Mixer::volumeSave( KConfig *config ) { // kdDebug(67100) << "Mixer::volumeSave()" << endl; readSetFromHW(); - QString grp("Mixer"); + TQString grp("Mixer"); grp.append(mixerName()); _mixerBackend->m_mixDevices.write( config, grp ); } void Mixer::volumeLoad( KConfig *config ) { - QString grp("Mixer"); + TQString grp("Mixer"); grp.append(mixerName()); if ( ! config->hasGroup(grp) ) { // no such group. Volumes (of this mixer) were never saved beforehand. @@ -133,7 +133,7 @@ void Mixer::volumeLoad( KConfig *config ) _mixerBackend->m_mixDevices.read( config, grp ); // set new settings - QPtrListIterator it( _mixerBackend->m_mixDevices ); + TQPtrListIterator it( _mixerBackend->m_mixDevices ); for(MixDevice *md=it.toFirst(); md!=0; md=++it ) { // kdDebug(67100) << "Mixer::volumeLoad() writeVolumeToHW(" << md->num() << ", "<< md->getVolume() << ")" << endl; @@ -173,7 +173,7 @@ int Mixer::open() } else { kdError(67100) << "Mixer::open() no master detected." << endl; - QString noMaster = "---no-master-detected---"; + TQString noMaster = "---no-master-detected---"; setMasterDevice(noMaster); // no master } /* @@ -207,7 +207,7 @@ int Mixer::open() else { _mixerBackend->prepareSignalling(this); // poll once to give the GUI a chance to rebuild it's info - QTimer::singleShot( 50, this, SLOT( readSetFromHW() ) ); + TQTimer::singleShot( 50, this, TQT_SLOT( readSetFromHW() ) ); } return err; } @@ -342,7 +342,7 @@ void Mixer::setBalance(int balance) emit newBalance( vol ); } -QString Mixer::mixerName() +TQString Mixer::mixerName() { return _mixerBackend->m_mixerName; } @@ -352,7 +352,7 @@ int Mixer::devnum() return _mixerBackend->m_devnum; } -QString Mixer::driverName( int driver ) +TQString Mixer::driverName( int driver ) { getDriverNameFunc *f = g_mixerFactories[driver].getDriverName; if( f!=0 ) @@ -361,18 +361,18 @@ QString Mixer::driverName( int driver ) return "unknown"; } -void Mixer::setID(QString& ref_id) +void Mixer::setID(TQString& ref_id) { _id = ref_id; } -QString& Mixer::id() +TQString& Mixer::id() { return _id; } -void Mixer::setMasterCard(QString& ref_id) +void Mixer::setMasterCard(TQString& ref_id) { // The value is taken over without checking on existance. This allows the User to define // a MasterCard that is not always available (e.g. it is an USB hotplugging device). @@ -400,7 +400,7 @@ Mixer* Mixer::masterCard() return mixer; } -void Mixer::setMasterCardDevice(QString& ref_id) +void Mixer::setMasterCardDevice(TQString& ref_id) { // The value is taken over without checking on existance. This allows the User to define // a MasterCard that is not always available (e.g. it is an USB hotplugging device). @@ -477,13 +477,13 @@ MixDevice* Mixer::masterDevice() return find( _masterDevicePK ); } -void Mixer::setMasterDevice(QString &devPK) +void Mixer::setMasterDevice(TQString &devPK) { _masterDevicePK = devPK; } -MixDevice* Mixer::find(QString& devPK) +MixDevice* Mixer::find(TQString& devPK) { MixDevice* md = 0; for( md = _mixerBackend->m_mixDevices.first(); md != 0; md = _mixerBackend->m_mixDevices.next() ) { diff --git a/kmix/mixer.h b/kmix/mixer.h index 1a94dba6..80bd24ae 100644 --- a/kmix/mixer.h +++ b/kmix/mixer.h @@ -26,11 +26,11 @@ #ifndef MIXER_H #define MIXER_H -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "volume.h" class Mixer_Backend; @@ -41,7 +41,7 @@ class Mixer_Backend; class Volume; class KConfig; -class Mixer : public QObject, virtual public MixerIface +class Mixer : public TQObject, virtual public MixerIface { Q_OBJECT @@ -54,7 +54,7 @@ class Mixer : public QObject, virtual public MixerIface static int numDrivers(); - MixDevice* find(QString& devPK); + MixDevice* find(TQString& devPK); void volumeSave( KConfig *config ); void volumeLoad( KConfig *config ); @@ -79,27 +79,27 @@ class Mixer : public QObject, virtual public MixerIface virtual int close(); /// Returns a detailed state message after errors. Only for diagnostic purposes, no i18n. - QString& stateMessage() const; + TQString& stateMessage() const; - virtual QString mixerName(); + virtual TQString mixerName(); virtual int devnum(); // Returns the name of the driver, e.g. "OSS" or "ALSA0.9" - static QString driverName(int num); + static TQString driverName(int num); /// Returns an unique ID of the Mixer. It currently looks like ":@" - QString& id(); + TQString& id(); /// The owner/creator of the Mixer can set an unique name here. This key should never displayed to /// the user, but can be used for referencing configuration items and such. - void setID(QString& ref_id); + void setID(TQString& ref_id); /// The KMix global master card. Please note that KMix and KMixPanelApplet can have a /// different MasterCard's at the moment (but actually KMixPanelApplet does not read/save this yet). /// At the moment it is only used for selecting the Mixer to use in KMix's DockIcon. - static void setMasterCard(QString& ref_id); + static void setMasterCard(TQString& ref_id); static Mixer* masterCard(); /// The global Master Device inside the current MasterCard (as returned by masterCard()). - static void setMasterCardDevice(QString& ref_id); + static void setMasterCardDevice(TQString& ref_id); static MixDevice* masterCardDevice(); @@ -109,7 +109,7 @@ class Mixer : public QObject, virtual public MixerIface /// Returns the master volume device (doesn't work out :-(. See masterCard() and masterCardDevice() instead) MixDevice* masterDevice(); /// Sets the master volume device (doesn't work out :-(. See setMasterCard() and setMasterCardDevice() instead) - void setMasterDevice(QString&); + void setMasterDevice(TQString&); /// DCOP oriented methods (look at mixerIface.h for the descriptions) virtual void setVolume( int deviceidx, int percentage ); @@ -151,25 +151,25 @@ class Mixer : public QObject, virtual public MixerIface void newVolumeLevels(void); protected: - QTimer* _pollingTimer; + TQTimer* _pollingTimer; int m_balance; // from -100 (just left) to 100 (just right) - QPtrList m_profiles; - static QPtrList s_mixers; + TQPtrList m_profiles; + static TQPtrList s_mixers; public: int setupMixer( MixSet set ); - static QPtrList& mixers(); + static TQPtrList& mixers(); private: Mixer_Backend *_mixerBackend; mutable bool _readSetFromHWforceUpdate; static int _dcopID; - QString _id; - QString _masterDevicePK; - static QString _masterCard; - static QString _masterCardDevice; + TQString _id; + TQString _masterDevicePK; + static TQString _masterCard; + static TQString _masterCardDevice; }; #endif diff --git a/kmix/mixerIface.h b/kmix/mixerIface.h index 6c8da9fd..ef8bbbf5 100644 --- a/kmix/mixerIface.h +++ b/kmix/mixerIface.h @@ -114,7 +114,7 @@ k_dcop: /** Returns the name of the mixer. */ - virtual QString mixerName()=0; + virtual TQString mixerName()=0; /** * Open/grab the mixer for further intraction diff --git a/kmix/mixer_alsa.h b/kmix/mixer_alsa.h index 0d73dc77..5773181b 100644 --- a/kmix/mixer_alsa.h +++ b/kmix/mixer_alsa.h @@ -2,7 +2,7 @@ #define MIXER_ALSA_H // QT includes -#include +#include // Forward QT includes class QString; @@ -35,17 +35,17 @@ class Mixer_ALSA : public Mixer_Backend snd_mixer_elem_t* getMixerElem(int devnum); void removeSignalling(); - virtual QString errorText(int mixer_error); - typedef QValueListAlsaMixerSidList; + virtual TQString errorText(int mixer_error); + typedef TQValueListAlsaMixerSidList; AlsaMixerSidList mixer_sid_list; - typedef QValueList AlsaMixerElemList; // !! remove + typedef TQValueList AlsaMixerElemList; // !! remove AlsaMixerElemList mixer_elem_list; // !! remove bool _initialUpdate; snd_mixer_t *_handle; - QString devName; + TQString devName; struct pollfd *m_fds; - QSocketNotifier **m_sns; + TQSocketNotifier **m_sns; int m_count; }; diff --git a/kmix/mixer_alsa9.cpp b/kmix/mixer_alsa9.cpp index 751d5f9e..effcd006 100644 --- a/kmix/mixer_alsa9.cpp +++ b/kmix/mixer_alsa9.cpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include extern "C" { @@ -70,7 +70,7 @@ Mixer_ALSA::~Mixer_ALSA() int Mixer_ALSA::identify( snd_mixer_selem_id_t *sid ) { - QString name = snd_mixer_selem_id_get_name( sid ); + TQString name = snd_mixer_selem_id_get_name( sid ); if ( name == "Master" ) return MixDevice::VOLUME; if ( name == "Capture" ) return MixDevice::RECMONITOR; @@ -115,9 +115,9 @@ Mixer_ALSA::open() // Card information if ((unsigned)m_devnum > 31) m_devnum = -1; - devName = m_devnum == -1 ? "default" : QString("hw:%1").arg(m_devnum); + devName = m_devnum == -1 ? "default" : TQString("hw:%1").arg(m_devnum); - QString probeMessage; + TQString probeMessage; if (virginOpen) probeMessage += "Trying ALSA Device '" + devName + "': "; @@ -224,7 +224,7 @@ Mixer_ALSA::open() //kdDebug() << "--- Loop: name=" << snd_mixer_selem_id_get_name( sid ) << " , mixerIdx=" << mixerIdx << "------------" << endl; Volume* volPlay = 0, *volCapture = 0; - QPtrList enumList; + TQPtrList enumList; if ( snd_mixer_selem_is_enumerated(elem) ) { cc = MixDevice::ENUM; volPlay = new Volume(); // Dummy, unused @@ -240,7 +240,7 @@ Mixer_ALSA::open() char buffer[100]; int ret = snd_mixer_selem_get_enum_item_name(elem, iEnum, 99, buffer); if ( ret == 0 ) { - QString* enumName = new QString(buffer); + TQString* enumName = new TQString(buffer); //enumName->append(buffer); enumList.append( enumName); } // enumName could be read succesfully @@ -335,7 +335,7 @@ Mixer_ALSA::open() if ( enumList.count() > 0 ) { int maxEnumId= enumList.count(); - QPtrList& enumValuesRef = md->enumValues(); // retrieve a ref + TQPtrList& enumValuesRef = md->enumValues(); // retrieve a ref for (int i=0; iconnect(m_sns[i], SIGNAL(activated(int)), mixer, SLOT(readSetFromHW())); + m_sns[i] = new TQSocketNotifier(m_fds[i].fd, TQSocketNotifier::Read); + mixer->connect(m_sns[i], TQT_SIGNAL(activated(int)), mixer, TQT_SLOT(readSetFromHW())); } } @@ -798,7 +798,7 @@ Mixer_ALSA::writeVolumeToHW( int devnum, Volume& volume ) QString Mixer_ALSA::errorText( int mixer_error ) { - QString l_s_errmsg; + TQString l_s_errmsg; switch ( mixer_error ) { case Mixer::ERR_PERM: diff --git a/kmix/mixer_backend.cpp b/kmix/mixer_backend.cpp index 0ad262b7..4f15a564 100644 --- a/kmix/mixer_backend.cpp +++ b/kmix/mixer_backend.cpp @@ -97,14 +97,14 @@ unsigned int Mixer_Backend::enumIdHW(int) { void Mixer_Backend::errormsg(int mixer_error) { - QString l_s_errText; + TQString l_s_errText; l_s_errText = errorText(mixer_error); kdError() << l_s_errText << "\n"; } -QString Mixer_Backend::errorText(int mixer_error) +TQString Mixer_Backend::errorText(int mixer_error) { - QString l_s_errmsg; + TQString l_s_errmsg; switch (mixer_error) { case Mixer::ERR_PERM: diff --git a/kmix/mixer_backend.h b/kmix/mixer_backend.h index f9823a78..d5a9ed18 100644 --- a/kmix/mixer_backend.h +++ b/kmix/mixer_backend.h @@ -80,7 +80,7 @@ protected: * Subclasses can override this method to produce platform * specific error descriptions. */ - virtual QString errorText(int mixer_error); + virtual TQString errorText(int mixer_error); /// Prints out a translated error text for the given error number on stderr void errormsg(int mixer_error); @@ -88,7 +88,7 @@ protected: int m_devnum; /// User friendly name of the Mixer (e.g. "IRIX Audio Mixer"). If your mixer API /// gives you a usable name, use that name. - QString m_mixerName; + TQString m_mixerName; // All mix devices of this phyisical device. MixSet m_mixDevices; diff --git a/kmix/mixer_hpux.cpp b/kmix/mixer_hpux.cpp index 3a4dbe5b..20ef91f3 100644 --- a/kmix/mixer_hpux.cpp +++ b/kmix/mixer_hpux.cpp @@ -225,9 +225,9 @@ printf("WRITE - Devnum: %d, Left: %d, Right: %d\n", devnum, vl, vr); } -QString Mixer_HPUX::errorText(int mixer_error) +TQString Mixer_HPUX::errorText(int mixer_error) { - QString l_s_errmsg; + TQString l_s_errmsg; if (mixer_error >= HPUX_ERROR_OFFSET) { char errorstr[200]; AGetErrorText(audio, (AError) (mixer_error-HPUX_ERROR_OFFSET), @@ -251,7 +251,7 @@ QString Mixer_HPUX::errorText(int mixer_error) return l_s_errmsg; } -QString HPUX_getDriverName() { +TQString HPUX_getDriverName() { return "HPUX"; } diff --git a/kmix/mixer_hpux.h b/kmix/mixer_hpux.h index bdc0d3d7..410758c9 100644 --- a/kmix/mixer_hpux.h +++ b/kmix/mixer_hpux.h @@ -15,7 +15,7 @@ public: Mixer_HPUX(int devnum); virtual ~Mixer_HPUX(); - virtual QString errorText(int mixer_error); + virtual TQString errorText(int mixer_error); virtual int readVolumeFromHW( int devnum, Volume &vol ); virtual int writeVolumeToHW( int devnum, Volume &vol ); diff --git a/kmix/mixer_irix.cpp b/kmix/mixer_irix.cpp index 1ba89c8a..eb407567 100644 --- a/kmix/mixer_irix.cpp +++ b/kmix/mixer_irix.cpp @@ -127,7 +127,7 @@ int Mixer_IRIX::writeVolumeToHW( int devnum, int volLeft, int volRight ) return 0; } -QString IRIX_getDriverName() { +TQString IRIX_getDriverName() { return "IRIX"; } diff --git a/kmix/mixer_none.cpp b/kmix/mixer_none.cpp index 94dddbc8..c1986522 100644 --- a/kmix/mixer_none.cpp +++ b/kmix/mixer_none.cpp @@ -72,7 +72,7 @@ bool Mixer_None::isRecsrcHW( int devnum ) return false; } -QString NONE_getDriverName() { +TQString NONE_getDriverName() { return "None"; } diff --git a/kmix/mixer_oss.cpp b/kmix/mixer_oss.cpp index c39c05b1..7fcfb38e 100644 --- a/kmix/mixer_oss.cpp +++ b/kmix/mixer_oss.cpp @@ -174,37 +174,37 @@ int Mixer_OSS::close() } -QString Mixer_OSS::deviceName(int devnum) +TQString Mixer_OSS::deviceName(int devnum) { switch (devnum) { case 0: - return QString("/dev/mixer"); + return TQString("/dev/mixer"); break; default: - QString devname("/dev/mixer"); + TQString devname("/dev/mixer"); devname += ('0'+devnum); return devname; } } -QString Mixer_OSS::deviceNameDevfs(int devnum) +TQString Mixer_OSS::deviceNameDevfs(int devnum) { switch (devnum) { case 0: - return QString("/dev/sound/mixer"); + return TQString("/dev/sound/mixer"); break; default: - QString devname("/dev/sound/mixer"); + TQString devname("/dev/sound/mixer"); devname += ('0'+devnum); return devname; } } -QString Mixer_OSS::errorText(int mixer_error) +TQString Mixer_OSS::errorText(int mixer_error) { - QString l_s_errmsg; + TQString l_s_errmsg; switch (mixer_error) { case Mixer::ERR_PERM: @@ -324,7 +324,7 @@ int Mixer_OSS::writeVolumeToHW( int devnum, Volume &vol ) return 0; } -QString OSS_getDriverName() { +TQString OSS_getDriverName() { return "OSS"; } diff --git a/kmix/mixer_oss.h b/kmix/mixer_oss.h index 592802ea..7bedf7f5 100644 --- a/kmix/mixer_oss.h +++ b/kmix/mixer_oss.h @@ -3,7 +3,7 @@ #ifndef MIXER_OSS_H #define MIXER_OSS_H -#include +#include #include "mixer_backend.h" @@ -13,7 +13,7 @@ public: Mixer_OSS(int device = -1); virtual ~Mixer_OSS(); - virtual QString errorText(int mixer_error); + virtual TQString errorText(int mixer_error); virtual int readVolumeFromHW( int devnum, Volume &vol ); virtual int writeVolumeToHW( int devnum, Volume &vol ); @@ -24,10 +24,10 @@ protected: virtual int open(); virtual int close(); - virtual QString deviceName( int ); - virtual QString deviceNameDevfs( int ); + virtual TQString deviceName( int ); + virtual TQString deviceNameDevfs( int ); int m_fd; - QString m_deviceName; + TQString m_deviceName; }; #endif diff --git a/kmix/mixer_oss4.cpp b/kmix/mixer_oss4.cpp index ff1525b3..01b167aa 100644 --- a/kmix/mixer_oss4.cpp +++ b/kmix/mixer_oss4.cpp @@ -29,7 +29,7 @@ #include #include -#include +#include #include // Since we're guaranteed an OSS setup here, let's make life easier @@ -72,10 +72,10 @@ bool Mixer_OSS4::isRecsrcHW(int ctrlnum) } //classifies mixexts according to their name, last classification wins -MixDevice::ChannelType Mixer_OSS4::classifyAndRename(QString &name, int flags) +MixDevice::ChannelType Mixer_OSS4::classifyAndRename(TQString &name, int flags) { MixDevice::ChannelType cType = MixDevice::UNKNOWN; - QStringList classes = QStringList::split ( QRegExp ( "[-,.]" ), name ); + TQStringList classes = TQStringList::split ( TQRegExp ( "[-,.]" ), name ); if ( flags & MIXF_PCMVOL || @@ -85,7 +85,7 @@ MixDevice::ChannelType Mixer_OSS4::classifyAndRename(QString &name, int flags) cType = MixDevice::VOLUME; } - for ( QStringList::Iterator it = classes.begin(); it != classes.end(); ++it ) + for ( TQStringList::Iterator it = classes.begin(); it != classes.end(); ++it ) { if ( *it == "line" ) { @@ -143,13 +143,13 @@ MixDevice::ChannelType Mixer_OSS4::classifyAndRename(QString &name, int flags) } else if ( (*it).endsWith("vol") ) { - QChar &ref = (*it).ref(0); + TQChar &ref = (*it).ref(0); ref = ref.upper(); cType = MixDevice::VOLUME; } else { - QChar &ref = (*it).ref(0); + TQChar &ref = (*it).ref(0); ref = ref.upper(); } } @@ -224,7 +224,7 @@ int Mixer_OSS4::open() return 0; } - QString name = ext.extname; + TQString name = ext.extname; //skip vmix volume controls and mute controls if ( (name.find("vmix") > -1 && name.find( "pcm") > -1) || @@ -318,8 +318,8 @@ int Mixer_OSS4::open() name, MixDevice::UNKNOWN, MixDevice::ENUM); - QPtrList &enumValuesRef = md->enumValues(); - QString thisElement; + TQPtrList &enumValuesRef = md->enumValues(); + TQString thisElement; for ( int i = 0; i < ei.nvalues; i++ ) { @@ -327,9 +327,9 @@ int Mixer_OSS4::open() if ( thisElement.isEmpty() ) { - thisElement = QString::number(i); + thisElement = TQString::number(i); } - enumValuesRef.append( new QString(thisElement) ); + enumValuesRef.append( new TQString(thisElement) ); } m_mixDevices.append(md); } @@ -354,9 +354,9 @@ int Mixer_OSS4::close() return l_i_ret; } -QString Mixer_OSS4::errorText(int mixer_error) +TQString Mixer_OSS4::errorText(int mixer_error) { - QString l_s_errmsg; + TQString l_s_errmsg; switch( mixer_error ) { @@ -663,7 +663,7 @@ int Mixer_OSS4::wrapIoctl(int ioctlRet) } -QString OSS4_getDriverName() +TQString OSS4_getDriverName() { return "OSS4"; } diff --git a/kmix/mixer_oss4.h b/kmix/mixer_oss4.h index 07a927d0..40f14785 100644 --- a/kmix/mixer_oss4.h +++ b/kmix/mixer_oss4.h @@ -3,7 +3,7 @@ #ifndef MIXER_OSS4_H #define MIXER_OSS4_H -#include +#include #include "mixer_backend.h" #include @@ -14,7 +14,7 @@ public: Mixer_OSS4(int device = -1); virtual ~Mixer_OSS4(); - virtual QString errorText(int mixer_error); + virtual TQString errorText(int mixer_error); virtual int readVolumeFromHW( int ctrlnum, Volume &vol ); virtual int writeVolumeToHW( int ctrlnum, Volume &vol ); virtual void setEnumIdHW(int ctrlnum, unsigned int idx); @@ -24,7 +24,7 @@ public: protected: - MixDevice::ChannelType classifyAndRename(QString &name, int flags); + MixDevice::ChannelType classifyAndRename(TQString &name, int flags); int wrapIoctl(int ioctlRet); @@ -37,6 +37,6 @@ protected: int m_fd; int m_numExtensions; int m_numMixers; - QString m_deviceName; + TQString m_deviceName; }; #endif diff --git a/kmix/mixer_sun.cpp b/kmix/mixer_sun.cpp index 4b90f4fd..12806bda 100644 --- a/kmix/mixer_sun.cpp +++ b/kmix/mixer_sun.cpp @@ -105,7 +105,7 @@ const uint_t MixerSunPortMasks[] = //====================================================================== -// FUNCTION/METHOD DEFINITIONS +// FUNCTION/TQT_METHOD DEFINITIONS //====================================================================== @@ -155,7 +155,7 @@ int Mixer_SUN::open() // // Open the mixer hardware driver // - QCString audiodev(getenv("AUDIODEV")); + TQCString audiodev(getenv("AUDIODEV")); if(audiodev.isNull()) audiodev = "/dev/audio"; audiodev += "ctl"; @@ -179,7 +179,7 @@ int Mixer_SUN::open() Volume vol( 2, AUDIO_MAX_GAIN ); readVolumeFromHW( idx, vol ); MixDevice* md = new MixDevice( idx, vol, false, true, - QString(MixerDevNames[idx]), MixerChannelTypes[idx]); + TQString(MixerDevNames[idx]), MixerChannelTypes[idx]); md->setRecSource( isRecsrcHW( idx ) ); m_mixDevices.append( md ); } @@ -218,9 +218,9 @@ int Mixer_SUN::close() // FUNCTION : Mixer::errorText // DESCRIPTION : Convert an error code enum to a text string. //====================================================================== -QString Mixer_SUN::errorText( int mixer_error ) +TQString Mixer_SUN::errorText( int mixer_error ) { - QString errmsg; + TQString errmsg; switch (mixer_error) { case Mixer::ERR_PERM: @@ -467,7 +467,7 @@ void Mixer_SUN::GainBalanceToVolume( uint_t& gain, uchar_t& balance, Volume& vol } } -QString SUN_getDriverName() { +TQString SUN_getDriverName() { return "SUNAudio"; } diff --git a/kmix/mixer_sun.h b/kmix/mixer_sun.h index 32b85cbe..f9380fe1 100644 --- a/kmix/mixer_sun.h +++ b/kmix/mixer_sun.h @@ -23,7 +23,7 @@ #ifndef MIXER_SUN_H #define MIXER_SUN_H -#include +#include #include "mixer_backend.h" @@ -33,7 +33,7 @@ public: Mixer_SUN(int devnum); virtual ~Mixer_SUN(); - virtual QString errorText(int mixer_error); + virtual TQString errorText(int mixer_error); virtual int readVolumeFromHW( int devnum, Volume& volume ); virtual int writeVolumeToHW( int devnum, Volume& volume ); bool setRecsrcHW( int devnum, bool on ); diff --git a/kmix/mixertoolbox.cpp b/kmix/mixertoolbox.cpp index 38b404ac..857f8d79 100644 --- a/kmix/mixertoolbox.cpp +++ b/kmix/mixertoolbox.cpp @@ -20,8 +20,8 @@ */ -#include "qwidget.h" -#include "qstring.h" +#include "tqwidget.h" +#include "tqstring.h" //#include #include @@ -49,23 +49,23 @@ * 'true' means to scan all backends. 'false' means: After scanning the * current backend the next backend is only scanned if no Mixers were found yet. */ -void MixerToolBox::initMixer(QPtrList &mixers, bool multiDriverMode, QString& ref_hwInfoString) +void MixerToolBox::initMixer(TQPtrList &mixers, bool multiDriverMode, TQString& ref_hwInfoString) { //kdDebug(67100) << "IN MixerToolBox::initMixer()"< mixerNums; + TQMap mixerNums; int drvNum = Mixer::numDrivers(); int driverWithMixer = -1; bool multipleDriversActive = false; - QString driverInfo = ""; - QString driverInfoUsed = ""; + TQString driverInfo = ""; + TQString driverInfoUsed = ""; for( int drv1=0; drv1 0 ) driverInfo += " + "; driverInfo += driverName; @@ -86,7 +86,7 @@ void MixerToolBox::initMixer(QPtrList &mixers, bool multiDriverMode, QStr bool autodetectionFinished = false; for( int drv=0; drv &mixers, bool multiDriverMode, QStr * %2, the mixer name, is typically coming from an OS driver. It could contain colons. * %3, the mixer number, is a number: it does not contain colons. */ - QString mixerName = mixer->mixerName(); + TQString mixerName = mixer->mixerName(); mixerName.replace(":","_"); - QString primaryKeyOfMixer = QString("%1::%2:%3") + TQString primaryKeyOfMixer = TQString("%1::%2:%3") .arg(driverName) .arg(mixerName) .arg(mixerNums[mixer->mixerName()]); @@ -170,7 +170,7 @@ void MixerToolBox::initMixer(QPtrList &mixers, bool multiDriverMode, QStr if ( !drvInfoAppended ) { drvInfoAppended = true; - QString driverName = Mixer::driverName(drv); + TQString driverName = Mixer::driverName(drv); if ( drv!= 0 && mixers.count() > 0) { driverInfoUsed += " + "; } diff --git a/kmix/mixertoolbox.h b/kmix/mixertoolbox.h index 1af4f22c..884471ef 100644 --- a/kmix/mixertoolbox.h +++ b/kmix/mixertoolbox.h @@ -1,8 +1,8 @@ #ifndef MIXERTOOLBOX_H #define MIXERTOOLBOX_H -#include -#include +#include +#include class Mixer; @@ -14,7 +14,7 @@ class Mixer; */ class MixerToolBox { public: - static void initMixer(QPtrList&, bool, QString&); + static void initMixer(TQPtrList&, bool, TQString&); static void deinitMixer(); }; diff --git a/kmix/mixset.cpp b/kmix/mixset.cpp index 8d3273cb..63f87c84 100644 --- a/kmix/mixset.cpp +++ b/kmix/mixset.cpp @@ -20,7 +20,7 @@ */ -#include +#include #include #include @@ -38,7 +38,7 @@ void MixSet::clone( MixSet &set ) } } -void MixSet::read( KConfig *config, const QString& grp ) +void MixSet::read( KConfig *config, const TQString& grp ) { kdDebug(67100) << "MixSet::read() of group " << grp << endl; config->setGroup(grp); @@ -51,7 +51,7 @@ void MixSet::read( KConfig *config, const QString& grp ) } } -void MixSet::write( KConfig *config, const QString& grp ) +void MixSet::write( KConfig *config, const TQString& grp ) { kdDebug(67100) << "MixSet::write() of group " << grp << endl; config->setGroup(grp); @@ -64,7 +64,7 @@ void MixSet::write( KConfig *config, const QString& grp ) } } -void MixSet::setName( const QString &name ) +void MixSet::setName( const TQString &name ) { m_name = name; } diff --git a/kmix/mixset.h b/kmix/mixset.h index 24448883..f66692b2 100644 --- a/kmix/mixset.h +++ b/kmix/mixset.h @@ -3,19 +3,19 @@ #include "mixdevice.h" -class MixSet : public QPtrList +class MixSet : public TQPtrList { public: - void read( KConfig *config, const QString& grp ); - void write( KConfig *config, const QString& grp ); + void read( KConfig *config, const TQString& grp ); + void write( KConfig *config, const TQString& grp ); void clone( MixSet &orig ); - QString name() { return m_name; }; - void setName( const QString &name ); + TQString name() { return m_name; }; + void setName( const TQString &name ); private: - QString m_name; + TQString m_name; }; #endif diff --git a/kmix/verticaltext.cpp b/kmix/verticaltext.cpp index e6c0e42d..77bda1af 100644 --- a/kmix/verticaltext.cpp +++ b/kmix/verticaltext.cpp @@ -20,11 +20,11 @@ */ #include "verticaltext.h" -#include +#include #include -VerticalText::VerticalText(QWidget * parent, const char * name, WFlags f) : QWidget(parent,name,f) +VerticalText::VerticalText(TQWidget * parent, const char * name, WFlags f) : TQWidget(parent,name,f) { resize(20,100 /*parent->height() */ ); setMinimumSize(20,10); // neccesary for smooth integration into layouts (we only care for the widths). @@ -34,24 +34,24 @@ VerticalText::~VerticalText() { } -void VerticalText::paintEvent ( QPaintEvent * /*event*/ ) { +void VerticalText::paintEvent ( TQPaintEvent * /*event*/ ) { //kdDebug(67100) << "paintEvent(). height()=" << height() << "\n"; - QPainter paint(this); + TQPainter paint(this); paint.rotate(270); paint.translate(0,-4); // Silly "solution" to make underlengths work // Fix for bug 72520 //- paint.drawText(-height()+2,width(),name()); - //+ paint.drawText( -height()+2, width(), QString::fromUtf8(name()) ); - paint.drawText( -height()+2, width(), QString::fromUtf8(name()) ); + //+ paint.drawText( -height()+2, width(), TQString::fromUtf8(name()) ); + paint.drawText( -height()+2, width(), TQString::fromUtf8(name()) ); } -QSize VerticalText::sizeHint() const { - return QSize(20,100); // !! UGLY. Should be reworked +TQSize VerticalText::sizeHint() const { + return TQSize(20,100); // !! UGLY. Should be reworked } -QSizePolicy VerticalText::sizePolicy () const +TQSizePolicy VerticalText::sizePolicy () const { - return QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred); + return TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Preferred); } diff --git a/kmix/verticaltext.h b/kmix/verticaltext.h index 7b1c07e0..f68df4f4 100644 --- a/kmix/verticaltext.h +++ b/kmix/verticaltext.h @@ -1,19 +1,19 @@ #ifndef VerticalText_h #define VerticalText_h -#include +#include class VerticalText : public QWidget { public: - VerticalText(QWidget * parent, const char * name, WFlags f = 0); + VerticalText(TQWidget * parent, const char * name, WFlags f = 0); ~VerticalText(); - QSize sizeHint() const; - QSizePolicy sizePolicy () const; + TQSize sizeHint() const; + TQSizePolicy sizePolicy () const; protected: - void paintEvent ( QPaintEvent * event ); + void paintEvent ( TQPaintEvent * event ); }; #endif diff --git a/kmix/viewapplet.cpp b/kmix/viewapplet.cpp index c4edbfb0..3948e60e 100644 --- a/kmix/viewapplet.cpp +++ b/kmix/viewapplet.cpp @@ -21,9 +21,9 @@ #include "viewapplet.h" // Qt -#include -#include -#include +#include +#include +#include // KDE #include @@ -36,13 +36,13 @@ #include "mdwslider.h" #include "mixer.h" -ViewApplet::ViewApplet(QWidget* parent, const char* name, Mixer* mixer, ViewBase::ViewFlags vflags, KPanelApplet::Position position ) - : ViewBase(parent, name, QString::null, mixer, WStyle_Customize|WStyle_NoBorder, vflags) +ViewApplet::ViewApplet(TQWidget* parent, const char* name, Mixer* mixer, ViewBase::ViewFlags vflags, KPanelApplet::Position position ) + : ViewBase(parent, name, TQString::null, mixer, WStyle_Customize|WStyle_NoBorder, vflags) { setBackgroundOrigin(AncestorOrigin); // remove the menu bar action, that is put by the "ViewBase" constructor in _actions. - //KToggleAction *m = static_cast(KStdAction::showMenubar( this, SLOT(toggleMenuBarSlot()), _actions )); - _actions->remove( KStdAction::showMenubar(this, SLOT(toggleMenuBarSlot()), _actions) ); + //KToggleAction *m = static_cast(KStdAction::showMenubar( this, TQT_SLOT(toggleMenuBarSlot()), _actions )); + _actions->remove( KStdAction::showMenubar(this, TQT_SLOT(toggleMenuBarSlot()), _actions) ); if ( position == KPanelApplet::pLeft || position == KPanelApplet::pRight ) { @@ -55,16 +55,16 @@ ViewApplet::ViewApplet(QWidget* parent, const char* name, Mixer* mixer, ViewBase } if ( _viewOrientation == Qt::Horizontal ) { - _layoutMDW = new QHBoxLayout( this ); - setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred); + _layoutMDW = new TQHBoxLayout( this ); + setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Preferred); } else { - _layoutMDW = new QVBoxLayout( this ); - setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); + _layoutMDW = new TQVBoxLayout( this ); + setSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed); } - //_layoutMDW->setResizeMode(QLayout::Fixed); + //_layoutMDW->setResizeMode(TQLayout::Fixed); init(); } @@ -98,7 +98,7 @@ int ViewApplet::advice() { -QWidget* ViewApplet::add(MixDevice *md) +TQWidget* ViewApplet::add(MixDevice *md) { /** Slider orientation is exactly the other way round. If the applet stretches horzontally, @@ -139,25 +139,25 @@ void ViewApplet::constructionFinished() { } -QSize ViewApplet::sizeHint() const { +TQSize ViewApplet::sizeHint() const { // Basically out main layout knows very good what the sizes should be - QSize qsz = _layoutMDW->sizeHint(); + TQSize qsz = _layoutMDW->sizeHint(); //kdDebug(67100) << "ViewApplet::sizeHint(): NewSize is " << qsz << "\n"; return qsz; } -QSizePolicy ViewApplet::sizePolicy() const { +TQSizePolicy ViewApplet::sizePolicy() const { if ( _viewOrientation == Qt::Horizontal ) { //kdDebug(67100) << "ViewApplet::sizePolicy=(Fixed,Expanding)\n"; - return QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding); + return TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Expanding); } else { //kdDebug(67100) << "ViewApplet::sizePolicy=(Expanding,Fixed)\n"; - return QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); + return TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed); } } -bool ViewApplet::shouldShowIcons(QSize qsz) { +bool ViewApplet::shouldShowIcons(TQSize qsz) { bool showIcons = false; if ( _viewOrientation == Qt::Horizontal ) { if ( qsz.height() >= 32 ) { @@ -174,13 +174,13 @@ bool ViewApplet::shouldShowIcons(QSize qsz) { return showIcons; } -void ViewApplet::resizeEvent(QResizeEvent *qre) +void ViewApplet::resizeEvent(TQResizeEvent *qre) { //kdDebug(67100) << "ViewApplet::resizeEvent() size=" << qre->size() << "\n"; // decide whether we have to show or hide all icons bool showIcons = shouldShowIcons(qre->size()); - for ( QWidget *mdw = _mdws.first(); mdw != 0; mdw = _mdws.next() ) { + for ( TQWidget *mdw = _mdws.first(); mdw != 0; mdw = _mdws.next() ) { if ( mdw == 0 ) { kdError(67100) << "ViewApplet::resizeEvent(): mdw == 0\n"; break; // sanity check (normally the lists are set up correctly) @@ -194,7 +194,7 @@ void ViewApplet::resizeEvent(QResizeEvent *qre) } } // kdDebug(67100) << "ViewApplet::resizeEvent(). SHOULD resize _layoutMDW to " << qre->size() << endl; - //QWidget::resizeEvent(qre); + //TQWidget::resizeEvent(qre); // resizing changes our own sizeHint(), because we must take the new PanelSize in account. // So updateGeometry() is amust for us. @@ -205,7 +205,7 @@ void ViewApplet::resizeEvent(QResizeEvent *qre) void ViewApplet::refreshVolumeLevels() { //kdDebug(67100) << "ViewApplet::refreshVolumeLevels()\n"; - QWidget *mdw = _mdws.first(); + TQWidget *mdw = _mdws.first(); MixDevice* md; for ( md = _mixSet->first(); md != 0; md = _mixSet->next() ) { if ( mdw == 0 ) { diff --git a/kmix/viewapplet.h b/kmix/viewapplet.h index a03d90e2..7fd35b31 100644 --- a/kmix/viewapplet.h +++ b/kmix/viewapplet.h @@ -14,19 +14,19 @@ class ViewApplet : public ViewBase { Q_OBJECT public: - ViewApplet(QWidget* parent, const char* name, Mixer* mixer, ViewBase::ViewFlags vflags, KPanelApplet::Position pos); + ViewApplet(TQWidget* parent, const char* name, Mixer* mixer, ViewBase::ViewFlags vflags, KPanelApplet::Position pos); ~ViewApplet(); virtual int count(); virtual int advice(); virtual void setMixSet(MixSet *mixset); - virtual QWidget* add(MixDevice *mdw); + virtual TQWidget* add(MixDevice *mdw); virtual void constructionFinished(); virtual void configurationUpdate(); - QSize sizeHint() const; - QSizePolicy sizePolicy() const; - virtual void resizeEvent(QResizeEvent*); + TQSize sizeHint() const; + TQSizePolicy sizePolicy() const; + virtual void resizeEvent(TQResizeEvent*); signals: void appletContentChanged(); @@ -35,8 +35,8 @@ public slots: virtual void refreshVolumeLevels(); private: - bool shouldShowIcons(QSize); - QBoxLayout* _layoutMDW; + bool shouldShowIcons(TQSize); + TQBoxLayout* _layoutMDW; // Position of the applet (pLeft, pRight, pTop, pBottom) //KPanelApplet::Position _KMIXposition; // Orientation of the applet (horizontal or vertical) diff --git a/kmix/viewbase.cpp b/kmix/viewbase.cpp index 97816534..5d23860d 100644 --- a/kmix/viewbase.cpp +++ b/kmix/viewbase.cpp @@ -22,8 +22,8 @@ #include "viewbase.h" // QT -#include -#include +#include +#include // KDE #include @@ -37,8 +37,8 @@ #include "mixer.h" -ViewBase::ViewBase(QWidget* parent, const char* name, const QString & caption, Mixer* mixer, WFlags f, ViewBase::ViewFlags vflags) - : QWidget(parent, name, f), _vflags(vflags), _caption(caption) +ViewBase::ViewBase(TQWidget* parent, const char* name, const TQString & caption, Mixer* mixer, WFlags f, ViewBase::ViewFlags vflags) + : TQWidget(parent, name, f), _vflags(vflags), _caption(caption) { _mixer = mixer; _mixSet = new MixSet(); @@ -51,7 +51,7 @@ ViewBase::ViewBase(QWidget* parent, const char* name, const QString & caption, M // Plug in the "showMenubar" action, if the caller wants it. Typically this is only neccesary for views in the KMix main window. if ( vflags & ViewBase::HasMenuBar ) { - KToggleAction *m = static_cast(KStdAction::showMenubar( this, SLOT(toggleMenuBarSlot()), _actions )); + KToggleAction *m = static_cast(KStdAction::showMenubar( this, TQT_SLOT(toggleMenuBarSlot()), _actions )); if ( vflags & ViewBase::MenuBarVisible ) { m->setChecked(true); } @@ -59,8 +59,8 @@ ViewBase::ViewBase(QWidget* parent, const char* name, const QString & caption, M m->setChecked(false); } } - new KAction(i18n("&Channels"), 0, this, SLOT(configureView()), _actions, "toggle_channels"); - connect ( _mixer, SIGNAL(newVolumeLevels()), this, SLOT(refreshVolumeLevels()) ); + new KAction(i18n("&Channels"), 0, this, TQT_SLOT(configureView()), _actions, "toggle_channels"); + connect ( _mixer, TQT_SIGNAL(newVolumeLevels()), this, TQT_SLOT(refreshVolumeLevels()) ); } ViewBase::~ViewBase() { @@ -80,8 +80,8 @@ void ViewBase::setMixSet(MixSet *) /** * Dummy implementation for add(). */ -QWidget* ViewBase::add(MixDevice* mdw) { - QWidget* label = new QLabel( mdw->name(), this, mdw->name().latin1()); +TQWidget* ViewBase::add(MixDevice* mdw) { + TQWidget* label = new TQLabel( mdw->name(), this, mdw->name().latin1()); label->move(0, mdw->num()*12); return label; } @@ -102,7 +102,7 @@ void ViewBase::createDeviceWidgets() MixDevice *mixDevice; for ( mixDevice = _mixSet->first(); mixDevice != 0; mixDevice = _mixSet->next()) { - QWidget* mdw = add(mixDevice); + TQWidget* mdw = add(mixDevice); _mdws.append(mdw); } // allow view to "polish" itself @@ -110,7 +110,7 @@ void ViewBase::createDeviceWidgets() } // ---------- Popup stuff START --------------------- -void ViewBase::mousePressEvent( QMouseEvent *e ) +void ViewBase::mousePressEvent( TQMouseEvent *e ) { if ( e->button()==RightButton ) showContextMenu(); @@ -151,7 +151,7 @@ void ViewBase::showContextMenu() //kdDebug(67100) << "ViewBase::showContextMenu()" << endl; popupReset(); - QPoint pos = QCursor::pos(); + TQPoint pos = TQCursor::pos(); _popMenu->popup( pos ); } diff --git a/kmix/viewbase.h b/kmix/viewbase.h index 50d92b10..581ac39e 100644 --- a/kmix/viewbase.h +++ b/kmix/viewbase.h @@ -2,7 +2,7 @@ #define ViewBase_h // QT -#include "qwidget.h" +#include "tqwidget.h" // KDE class KActionCollection; @@ -31,7 +31,7 @@ public: Experimental_GridView = 0x2000 }; - ViewBase(QWidget* parent, const char* name, const QString & caption, Mixer* mixer, WFlags=0, ViewFlags vflags=0); + ViewBase(TQWidget* parent, const char* name, const TQString & caption, Mixer* mixer, WFlags=0, ViewFlags vflags=0); virtual ~ViewBase(); // Subclasses must define this method. It is called by the ViewBase() constuctor. @@ -72,7 +72,7 @@ public: * Creates a suitable representation for the given MixDevice. * The default implementation creates a label */ - virtual QWidget* add(MixDevice *); + virtual TQWidget* add(MixDevice *); /** * Popup stuff @@ -89,9 +89,9 @@ public: * Hint: The new ViewSurround class shows that a 1:1 relationship does not work in a general scenario. * I actually DID expect this. The solution is unclear yet, probably there will be a virtual mapper method. */ - QPtrList _mdws; // this obsoletes the former Channel class + TQPtrList _mdws; // this obsoletes the former Channel class - QString caption() const { return _caption; } + TQString caption() const { return _caption; } protected: void init(); @@ -108,13 +108,13 @@ public slots: void toggleMenuBarSlot(); protected slots: - void mousePressEvent( QMouseEvent *e ); + void mousePressEvent( TQMouseEvent *e ); signals: void toggleMenuBar(); private: - QString _caption; + TQString _caption; }; #endif diff --git a/kmix/viewdockareapopup.cpp b/kmix/viewdockareapopup.cpp index 0063313f..60289aad 100644 --- a/kmix/viewdockareapopup.cpp +++ b/kmix/viewdockareapopup.cpp @@ -22,12 +22,12 @@ #include "viewdockareapopup.h" // Qt -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include // KDE #include @@ -43,18 +43,18 @@ // !! Do NOT remove or mask out "WType_Popup" // Users will not be able to close the Popup without opening the KMix main window then. // See Bug #93443, #96332 and #96404 for further details. -- esken -ViewDockAreaPopup::ViewDockAreaPopup(QWidget* parent, const char* name, Mixer* mixer, ViewBase::ViewFlags vflags, KMixDockWidget *dockW ) - : ViewBase(parent, name, QString::null, mixer, WStyle_Customize | WType_Popup | Qt::WStyle_DialogBorder, vflags), _mdw(0), _dock(dockW) +ViewDockAreaPopup::ViewDockAreaPopup(TQWidget* parent, const char* name, Mixer* mixer, ViewBase::ViewFlags vflags, KMixDockWidget *dockW ) + : ViewBase(parent, name, TQString::null, mixer, WStyle_Customize | WType_Popup | Qt::WStyle_DialogBorder, vflags), _mdw(0), _dock(dockW) { - QBoxLayout *layout = new QHBoxLayout( this ); - _frame = new QFrame( this ); + TQBoxLayout *layout = new TQHBoxLayout( this ); + _frame = new TQFrame( this ); layout->addWidget( _frame ); - _frame->setFrameStyle( QFrame::PopupPanel | QFrame::Raised ); + _frame->setFrameStyle( TQFrame::PopupPanel | TQFrame::Raised ); _frame->setLineWidth( 1 ); - _layoutMDW = new QGridLayout( _frame, 1, 1, 2, 1, "KmixPopupLayout" ); - _hideTimer = new QTime(); + _layoutMDW = new TQGridLayout( _frame, 1, 1, 2, 1, "KmixPopupLayout" ); + _hideTimer = new TQTime(); init(); } @@ -63,7 +63,7 @@ ViewDockAreaPopup::~ViewDockAreaPopup() { -void ViewDockAreaPopup::mousePressEvent(QMouseEvent *) +void ViewDockAreaPopup::mousePressEvent(TQMouseEvent *) { // kdDebug() << "Teste pres mouse" << endl; /** @@ -71,7 +71,7 @@ void ViewDockAreaPopup::mousePressEvent(QMouseEvent *) This should work automatically, when the user clicks outside the bounds of this popup: Alas - it does not work. Why it does not work, I do not know: this->isPopup() returns "true", so Qt should - properly take care of it in QWidget. + properly take care of it in TQWidget. */ if ( ! this->hasMouse() ) { _hideTimer->start(); @@ -85,10 +85,10 @@ bool ViewDockAreaPopup::justHidden() return _hideTimer->elapsed() < 300; } -void ViewDockAreaPopup::wheelEvent ( QWheelEvent * e ) { +void ViewDockAreaPopup::wheelEvent ( TQWheelEvent * e ) { // Pass wheel event from "border widget" to child if ( _mdw != 0 ) { - QApplication::sendEvent( _mdw, e); + TQApplication::sendEvent( _mdw, e); } } @@ -118,7 +118,7 @@ void ViewDockAreaPopup::setMixSet(MixSet *) _mixSet->append(_dockDevice); } -QWidget* ViewDockAreaPopup::add(MixDevice *md) +TQWidget* ViewDockAreaPopup::add(MixDevice *md) { _mdw = new MDWSlider( @@ -131,13 +131,13 @@ QWidget* ViewDockAreaPopup::add(MixDevice *md) _frame, // parent 0, // Is "NULL", so that there is no RMB-popup _dockDevice->name().latin1() ); - _layoutMDW->addItem( new QSpacerItem( 5, 20 ), 0, 2 ); - _layoutMDW->addItem( new QSpacerItem( 5, 20 ), 0, 0 ); + _layoutMDW->addItem( new TQSpacerItem( 5, 20 ), 0, 2 ); + _layoutMDW->addItem( new TQSpacerItem( 5, 20 ), 0, 0 ); _layoutMDW->addWidget( _mdw, 0, 1 ); // Add button to show main panel - _showPanelBox = new QPushButton( i18n("Mixer"), _frame, "MixerPanel" ); - connect ( _showPanelBox, SIGNAL( clicked() ), SLOT( showPanelSlot() ) ); + _showPanelBox = new TQPushButton( i18n("Mixer"), _frame, "MixerPanel" ); + connect ( _showPanelBox, TQT_SIGNAL( clicked() ), TQT_SLOT( showPanelSlot() ) ); _layoutMDW->addMultiCellWidget( _showPanelBox, 1, 1, 0, 2 ); return _mdw; @@ -163,7 +163,7 @@ int ViewDockAreaPopup::advice() { } } -QSize ViewDockAreaPopup::sizeHint() const { +TQSize ViewDockAreaPopup::sizeHint() const { // kdDebug(67100) << "ViewDockAreaPopup::sizeHint(): NewSize is " << _mdw->sizeHint() << "\n"; return( _mdw->sizeHint() ); } @@ -181,7 +181,7 @@ void ViewDockAreaPopup::constructionFinished() { void ViewDockAreaPopup::refreshVolumeLevels() { // kdDebug(67100) << "ViewDockAreaPopup::refreshVolumeLevels()\n"; - QWidget* mdw = _mdws.first(); + TQWidget* mdw = _mdws.first(); if ( mdw == 0 ) { kdError(67100) << "ViewDockAreaPopup::refreshVolumeLevels(): mdw == 0\n"; // sanity check (normally the lists are set up correctly) diff --git a/kmix/viewdockareapopup.h b/kmix/viewdockareapopup.h index 4205e831..1ba283f9 100644 --- a/kmix/viewdockareapopup.h +++ b/kmix/viewdockareapopup.h @@ -19,34 +19,34 @@ class ViewDockAreaPopup : public ViewBase { Q_OBJECT public: - ViewDockAreaPopup(QWidget* parent, const char* name, Mixer* mixer, ViewBase::ViewFlags vflags, KMixDockWidget *dockW); + ViewDockAreaPopup(TQWidget* parent, const char* name, Mixer* mixer, ViewBase::ViewFlags vflags, KMixDockWidget *dockW); ~ViewDockAreaPopup(); MixDevice* dockDevice(); virtual int count(); virtual int advice(); virtual void setMixSet(MixSet *mixset); - virtual QWidget* add(MixDevice *mdw); + virtual TQWidget* add(MixDevice *mdw); virtual void constructionFinished(); virtual void refreshVolumeLevels(); virtual void showContextMenu(); - QSize sizeHint() const; + TQSize sizeHint() const; bool justHidden(); protected: MixDeviceWidget *_mdw; KMixDockWidget *_dock; MixDevice *_dockDevice; - QPushButton *_showPanelBox; + TQPushButton *_showPanelBox; - void mousePressEvent(QMouseEvent *e); - void wheelEvent ( QWheelEvent * e ); + void mousePressEvent(TQMouseEvent *e); + void wheelEvent ( TQWheelEvent * e ); private: - QGridLayout* _layoutMDW; - QFrame *_frame; - QTime *_hideTimer; + TQGridLayout* _layoutMDW; + TQFrame *_frame; + TQTime *_hideTimer; private slots: void showPanelSlot(); diff --git a/kmix/viewgrid.cpp b/kmix/viewgrid.cpp index dd4ede97..59f03906 100644 --- a/kmix/viewgrid.cpp +++ b/kmix/viewgrid.cpp @@ -22,7 +22,7 @@ #include "viewgrid.h" // Qt -#include +#include // KDE #include @@ -35,17 +35,17 @@ /** */ -ViewGrid::ViewGrid(QWidget* parent, const char* name, const QString & caption, Mixer* mixer, ViewBase::ViewFlags vflags) +ViewGrid::ViewGrid(TQWidget* parent, const char* name, const TQString & caption, Mixer* mixer, ViewBase::ViewFlags vflags) : ViewBase(parent, name, caption, mixer, WStyle_Customize|WStyle_NoBorder, vflags) { m_spacingHorizontal = 5; m_spacingVertical = 5; if ( _vflags & ViewBase::Vertical ) { - //_layoutMDW = new QVBoxLayout(this); + //_layoutMDW = new TQVBoxLayout(this); } else { - //_layoutMDW = new QHBoxLayout(this); + //_layoutMDW = new TQHBoxLayout(this); } init(); } @@ -80,7 +80,7 @@ int ViewGrid::advice() { } } -QWidget* ViewGrid::add(MixDevice *md) +TQWidget* ViewGrid::add(MixDevice *md) { MixDeviceWidget *mdw = 0; if ( md->isEnum() ) { @@ -126,7 +126,7 @@ QWidget* ViewGrid::add(MixDevice *md) return mdw; } -QSize ViewGrid::sizeHint() const { +TQSize ViewGrid::sizeHint() const { // kdDebug(67100) << "ViewGrid::sizeHint(): NewSize is " << _layoutMDW->sizeHint() << "\n"; return( m_sizeHint); } @@ -147,7 +147,7 @@ void ViewGrid::refreshVolumeLevels() { m_testingX = 0; m_testingY = 0; - QWidget *mdw = _mdws.first(); + TQWidget *mdw = _mdws.first(); MixDevice* md; for ( md = _mixSet->first(); md != 0; md = _mixSet->next() ) { if ( mdw == 0 ) { @@ -188,7 +188,7 @@ void ViewGrid::configurationUpdate() { m_testingX = 0; m_testingY = 0; - for (QWidget *qw = _mdws.first(); qw !=0; qw = _mdws.next() ) { + for (TQWidget *qw = _mdws.first(); qw !=0; qw = _mdws.next() ) { if ( qw->inherits("MixDeviceWidget")) { MixDeviceWidget* mdw = static_cast(qw); diff --git a/kmix/viewgrid.h b/kmix/viewgrid.h index f57cdc59..c9440cdf 100644 --- a/kmix/viewgrid.h +++ b/kmix/viewgrid.h @@ -2,7 +2,7 @@ #define ViewGrid_h class QBoxLayout; -#include "qsize.h" +#include "tqsize.h" class QWidget; class Mixer; @@ -12,17 +12,17 @@ class ViewGrid : public ViewBase { Q_OBJECT public: - ViewGrid(QWidget* parent, const char* name, const QString & caption, Mixer* mixer, ViewBase::ViewFlags vflags); + ViewGrid(TQWidget* parent, const char* name, const TQString & caption, Mixer* mixer, ViewBase::ViewFlags vflags); ~ViewGrid(); virtual int count(); virtual int advice(); virtual void setMixSet(MixSet *mixset); - virtual QWidget* add(MixDevice *mdw); + virtual TQWidget* add(MixDevice *mdw); virtual void configurationUpdate(); virtual void constructionFinished(); - QSize sizeHint() const; + TQSize sizeHint() const; public slots: virtual void refreshVolumeLevels(); @@ -32,7 +32,7 @@ private: unsigned int m_spacingVertical; // m_maxX and m_maxY are the highest coordiantes encountered - QSize m_sizeHint; + TQSize m_sizeHint; unsigned int m_testingX; unsigned int m_testingY; diff --git a/kmix/viewinput.cpp b/kmix/viewinput.cpp index 1e71976d..eeadc61b 100644 --- a/kmix/viewinput.cpp +++ b/kmix/viewinput.cpp @@ -20,16 +20,16 @@ */ #include "viewinput.h" -#include +#include #include "mixer.h" #include "mixdevicewidget.h" -ViewInput::ViewInput(QWidget* parent, const char* name, const QString & caption, Mixer* mixer, ViewBase::ViewFlags vflags) +ViewInput::ViewInput(TQWidget* parent, const char* name, const TQString & caption, Mixer* mixer, ViewBase::ViewFlags vflags) : ViewSliders(parent, name, caption, mixer, vflags) { init(); - connect ( _mixer, SIGNAL(newRecsrc()) , this, SLOT(refreshVolumeLevels()) ); // only the input widget has record sources + connect ( _mixer, TQT_SIGNAL(newRecsrc()) , this, TQT_SLOT(refreshVolumeLevels()) ); // only the input widget has record sources } ViewInput::~ViewInput() { diff --git a/kmix/viewinput.h b/kmix/viewinput.h index 1b5d5be8..c8d0f663 100644 --- a/kmix/viewinput.h +++ b/kmix/viewinput.h @@ -9,7 +9,7 @@ class ViewInput : public ViewSliders { Q_OBJECT public: - ViewInput(QWidget* parent, const char* name, const QString & caption, Mixer* mixer, ViewBase::ViewFlags vflags); + ViewInput(TQWidget* parent, const char* name, const TQString & caption, Mixer* mixer, ViewBase::ViewFlags vflags); ~ViewInput(); virtual void setMixSet(MixSet *mixset); diff --git a/kmix/viewoutput.cpp b/kmix/viewoutput.cpp index 0f396fc0..9550b1d1 100644 --- a/kmix/viewoutput.cpp +++ b/kmix/viewoutput.cpp @@ -20,12 +20,12 @@ */ #include "viewoutput.h" -#include +#include #include "mixer.h" #include "mixdevicewidget.h" -ViewOutput::ViewOutput(QWidget* parent, const char* name, const QString & caption, Mixer* mixer, ViewBase::ViewFlags vflags) +ViewOutput::ViewOutput(TQWidget* parent, const char* name, const TQString & caption, Mixer* mixer, ViewBase::ViewFlags vflags) : ViewSliders(parent, name, caption, mixer, vflags) { init(); diff --git a/kmix/viewoutput.h b/kmix/viewoutput.h index 439aa7d8..aa297a51 100644 --- a/kmix/viewoutput.h +++ b/kmix/viewoutput.h @@ -9,7 +9,7 @@ class ViewOutput : public ViewSliders { Q_OBJECT public: - ViewOutput(QWidget* parent, const char* name, const QString & caption, Mixer* mixer, ViewBase::ViewFlags vflags); + ViewOutput(TQWidget* parent, const char* name, const TQString & caption, Mixer* mixer, ViewBase::ViewFlags vflags); ~ViewOutput(); virtual void setMixSet(MixSet *mixset); diff --git a/kmix/viewsliders.cpp b/kmix/viewsliders.cpp index 87d1eb4f..80142f5c 100644 --- a/kmix/viewsliders.cpp +++ b/kmix/viewsliders.cpp @@ -22,8 +22,8 @@ #include "viewsliders.h" // Qt -#include -#include +#include +#include // KDE #include @@ -37,14 +37,14 @@ * correctly because init() does not get called. * See ViewInput and ViewOutput for "real" implementations. */ -ViewSliders::ViewSliders(QWidget* parent, const char* name, const QString & caption, Mixer* mixer, ViewBase::ViewFlags vflags) +ViewSliders::ViewSliders(TQWidget* parent, const char* name, const TQString & caption, Mixer* mixer, ViewBase::ViewFlags vflags) : ViewBase(parent, name, caption, mixer, WStyle_Customize|WStyle_NoBorder, vflags) { if ( _vflags & ViewBase::Vertical ) { - _layoutMDW = new QVBoxLayout(this); + _layoutMDW = new TQVBoxLayout(this); } else { - _layoutMDW = new QHBoxLayout(this); + _layoutMDW = new TQHBoxLayout(this); } /* * Do not call init(). Call init() only for "end usage" classes. @@ -83,7 +83,7 @@ int ViewSliders::advice() { } } -QWidget* ViewSliders::add(MixDevice *md) +TQWidget* ViewSliders::add(MixDevice *md) { Qt::Orientation orientation = (_vflags & ViewBase::Vertical) ? Qt::Horizontal : Qt::Vertical; MixDeviceWidget *mdw = @@ -102,7 +102,7 @@ QWidget* ViewSliders::add(MixDevice *md) return mdw; } -QSize ViewSliders::sizeHint() const { +TQSize ViewSliders::sizeHint() const { // kdDebug(67100) << "ViewSliders::sizeHint(): NewSize is " << _layoutMDW->sizeHint() << "\n"; return( _layoutMDW->sizeHint() ); } @@ -114,7 +114,7 @@ void ViewSliders::constructionFinished() { void ViewSliders::refreshVolumeLevels() { // kdDebug(67100) << "ViewSliders::refreshVolumeLevels()\n"; - QWidget *mdw = _mdws.first(); + TQWidget *mdw = _mdws.first(); MixDevice* md; for ( md = _mixSet->first(); md != 0; md = _mixSet->next() ) { if ( mdw == 0 ) { diff --git a/kmix/viewsliders.h b/kmix/viewsliders.h index ea108ee3..43877758 100644 --- a/kmix/viewsliders.h +++ b/kmix/viewsliders.h @@ -11,22 +11,22 @@ class ViewSliders : public ViewBase { Q_OBJECT public: - ViewSliders(QWidget* parent, const char* name, const QString & caption, Mixer* mixer, ViewBase::ViewFlags vflags); + ViewSliders(TQWidget* parent, const char* name, const TQString & caption, Mixer* mixer, ViewBase::ViewFlags vflags); ~ViewSliders(); virtual int count(); virtual int advice(); virtual void setMixSet(MixSet *mixset); - virtual QWidget* add(MixDevice *mdw); + virtual TQWidget* add(MixDevice *mdw); virtual void constructionFinished(); - QSize sizeHint() const; + TQSize sizeHint() const; public slots: virtual void refreshVolumeLevels(); private: - QBoxLayout* _layoutMDW; + TQBoxLayout* _layoutMDW; }; #endif diff --git a/kmix/viewsurround.cpp b/kmix/viewsurround.cpp index 95e63405..02a7aace 100644 --- a/kmix/viewsurround.cpp +++ b/kmix/viewsurround.cpp @@ -22,9 +22,9 @@ #include "viewsurround.h" // Qt -#include -#include -#include +#include +#include +#include // KDE #include @@ -39,21 +39,21 @@ * Demonstration verion of a "surround view" * Not really usable right now. */ -ViewSurround::ViewSurround(QWidget* parent, const char* name, const QString & caption, Mixer* mixer, ViewBase::ViewFlags vflags) +ViewSurround::ViewSurround(TQWidget* parent, const char* name, const TQString & caption, Mixer* mixer, ViewBase::ViewFlags vflags) : ViewBase(parent, name, caption, mixer, WStyle_Customize|WStyle_NoBorder, vflags) { _mdSurroundFront = 0; _mdSurroundBack = 0; - _layoutMDW = new QHBoxLayout(this); + _layoutMDW = new TQHBoxLayout(this); _layoutMDW->setMargin(8); // Create switch buttonGroup if ( _vflags & ViewBase::Vertical ) { - _layoutSliders = new QVBoxLayout(_layoutMDW); + _layoutSliders = new TQVBoxLayout(_layoutMDW); } else { - _layoutSliders = new QHBoxLayout(_layoutMDW); + _layoutSliders = new TQHBoxLayout(_layoutMDW); } - _layoutSurround = new QGridLayout(_layoutMDW,3,5); + _layoutSurround = new TQGridLayout(_layoutMDW,3,5); // _layoutMDW->setMargin(8); init(); } @@ -99,7 +99,7 @@ int ViewSurround::advice() { } } -QWidget* ViewSurround::add(MixDevice *md) +TQWidget* ViewSurround::add(MixDevice *md) { bool small = false; Qt::Orientation orientation = Qt::Vertical; @@ -162,18 +162,18 @@ QWidget* ViewSurround::add(MixDevice *md) return mdw; } -QSize ViewSurround::sizeHint() const { +TQSize ViewSurround::sizeHint() const { // kdDebug(67100) << "ViewSurround::sizeHint(): NewSize is " << _layoutMDW->sizeHint() << "\n"; return( _layoutMDW->sizeHint() ); } void ViewSurround::constructionFinished() { - QLabel* personLabel = new QLabel("Listener", this); - QPixmap icon = UserIcon( "Listener" ); + TQLabel* personLabel = new TQLabel("Listener", this); + TQPixmap icon = UserIcon( "Listener" ); if ( ! icon.isNull()) personLabel->setPixmap(icon); personLabel->setLineWidth( 4 ); personLabel->setMidLineWidth( 3 ); - personLabel->setFrameStyle( QFrame::Panel | QFrame::Sunken ); + personLabel->setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); int rowOfSpeaker = 0; if ( _mdSurroundBack != 0 ) { // let the speaker "sit" in the rear of the room, if there is @@ -187,12 +187,12 @@ void ViewSurround::constructionFinished() { _layoutSurround->addWidget(mdw,0,4, Qt::AlignBottom | Qt::AlignRight); _mdws.append(mdw); - QLabel* speakerIcon = new QLabel("Speaker", this); + TQLabel* speakerIcon = new TQLabel("Speaker", this); icon = UserIcon( "SpeakerFrontLeft" ); if ( ! icon.isNull()) speakerIcon->setPixmap(icon); _layoutSurround->addWidget(speakerIcon,0,1, Qt::AlignTop | Qt::AlignLeft); - speakerIcon = new QLabel("Speaker", this); + speakerIcon = new TQLabel("Speaker", this); icon = UserIcon( "SpeakerFrontRight" ); if ( ! icon.isNull()) speakerIcon->setPixmap(icon); _layoutSurround->addWidget(speakerIcon,0,3, Qt::AlignTop | Qt::AlignRight); @@ -204,12 +204,12 @@ void ViewSurround::constructionFinished() { _layoutSurround->addWidget(mdw,2,4, Qt::AlignTop | Qt::AlignRight); _mdws.append(mdw); - QLabel* speakerIcon = new QLabel("Speaker", this); + TQLabel* speakerIcon = new TQLabel("Speaker", this); icon = UserIcon( "SpeakerRearLeft" ); if ( ! icon.isNull()) speakerIcon->setPixmap(icon); _layoutSurround->addWidget(speakerIcon,2,1, Qt::AlignBottom | Qt::AlignLeft); - speakerIcon = new QLabel("Speaker", this); + speakerIcon = new TQLabel("Speaker", this); icon = UserIcon( "SpeakerRearRight" ); if ( ! icon.isNull()) speakerIcon->setPixmap(icon); _layoutSurround->addWidget(speakerIcon,2,3, Qt::AlignBottom | Qt::AlignRight); @@ -228,7 +228,7 @@ void ViewSurround::constructionFinished() { void ViewSurround::refreshVolumeLevels() { // kdDebug(67100) << "ViewSurround::refreshVolumeLevels()\n"; - QWidget *mdw = _mdws.first(); + TQWidget *mdw = _mdws.first(); MixDevice* md; for ( md = _mixSet->first(); md != 0; md = _mixSet->next() ) { if ( mdw == 0 ) { diff --git a/kmix/viewsurround.h b/kmix/viewsurround.h index 1427f41d..9eea6138 100644 --- a/kmix/viewsurround.h +++ b/kmix/viewsurround.h @@ -14,16 +14,16 @@ class ViewSurround : public ViewBase { Q_OBJECT public: - ViewSurround(QWidget* parent, const char* name, const QString & caption, Mixer* mixer, ViewBase::ViewFlags vflags); + ViewSurround(TQWidget* parent, const char* name, const TQString & caption, Mixer* mixer, ViewBase::ViewFlags vflags); ~ViewSurround(); virtual int count(); virtual int advice(); virtual void setMixSet(MixSet *mixset); - virtual QWidget* add(MixDevice *mdw); + virtual TQWidget* add(MixDevice *mdw); virtual void constructionFinished(); - QSize sizeHint() const; + TQSize sizeHint() const; public slots: virtual void refreshVolumeLevels(); @@ -33,9 +33,9 @@ private: MixDevice *_mdSurroundFront; MixDevice *_mdSurroundBack; - QBoxLayout* _layoutMDW; - QBoxLayout* _layoutSliders; - QGridLayout* _layoutSurround; + TQBoxLayout* _layoutMDW; + TQBoxLayout* _layoutSliders; + TQGridLayout* _layoutSurround; }; #endif diff --git a/kmix/viewswitches.cpp b/kmix/viewswitches.cpp index 6a5c96cc..15b555ac 100644 --- a/kmix/viewswitches.cpp +++ b/kmix/viewswitches.cpp @@ -21,8 +21,8 @@ #include "viewswitches.h" -#include -#include +#include +#include #include #include @@ -31,23 +31,23 @@ #include "mdwenum.h" #include "mixer.h" -ViewSwitches::ViewSwitches(QWidget* parent, const char* name, const QString & caption, Mixer* mixer, ViewBase::ViewFlags vflags) +ViewSwitches::ViewSwitches(TQWidget* parent, const char* name, const TQString & caption, Mixer* mixer, ViewBase::ViewFlags vflags) : ViewBase(parent, name, caption, mixer, 0, vflags) { // Create switch buttonGroup if ( _vflags & ViewBase::Vertical ) { - _layoutMDW = new QVBoxLayout(this); - _layoutSwitch = new QVBoxLayout(_layoutMDW); - _layoutEnum = new QVBoxLayout(_layoutMDW); // always vertical! + _layoutMDW = new TQVBoxLayout(this); + _layoutSwitch = new TQVBoxLayout(_layoutMDW); + _layoutEnum = new TQVBoxLayout(_layoutMDW); // always vertical! } else { - _layoutMDW = new QHBoxLayout(this); - _layoutSwitch = new QHBoxLayout(_layoutMDW); + _layoutMDW = new TQHBoxLayout(this); + _layoutSwitch = new TQHBoxLayout(_layoutMDW); // Place enums right from the switches: This is done, so that there will be no // ugly space on the left side, when no Switch is shown. // Actually it is not really clear yet, why there is empty space at all: There are 0 items in // the _layoutEnum, so it might be a sizeHint() or some other subtle layout issue. - _layoutEnum = new QVBoxLayout(_layoutMDW); + _layoutEnum = new TQVBoxLayout(_layoutMDW); } init(); } @@ -83,7 +83,7 @@ int ViewSwitches::advice() { } } -QWidget* ViewSwitches::add(MixDevice *md) +TQWidget* ViewSwitches::add(MixDevice *md) { MixDeviceWidget *mdw; @@ -118,7 +118,7 @@ QWidget* ViewSwitches::add(MixDevice *md) return mdw; } -QSize ViewSwitches::sizeHint() const { +TQSize ViewSwitches::sizeHint() const { //kdDebug(67100) << "ViewSwitches::sizeHint(): NewSize is " << _layoutMDW->sizeHint() << "\n"; return( _layoutMDW->sizeHint() ); } @@ -129,7 +129,7 @@ void ViewSwitches::constructionFinished() { void ViewSwitches::refreshVolumeLevels() { //kdDebug(67100) << "ViewSwitches::refreshVolumeLevels()\n"; - QWidget *mdw = _mdws.first(); + TQWidget *mdw = _mdws.first(); MixDevice* md; for ( md = _mixSet->first(); md != 0; md = _mixSet->next() ) { if ( mdw == 0 ) { @@ -162,7 +162,7 @@ void ViewSwitches::refreshVolumeLevels() { */ void ViewSwitches::configurationUpdate() { bool backGoundModeToggler = true; - for (QWidget *qw = _mdws.first(); qw !=0; qw = _mdws.next() ) { + for (TQWidget *qw = _mdws.first(); qw !=0; qw = _mdws.next() ) { if ( qw->inherits("MDWSwitch")) { MixDeviceWidget* mdw = static_cast(qw); if ( ! mdw->isDisabled() ) { diff --git a/kmix/viewswitches.h b/kmix/viewswitches.h index 043fce07..f58ba750 100644 --- a/kmix/viewswitches.h +++ b/kmix/viewswitches.h @@ -11,25 +11,25 @@ class ViewSwitches : public ViewBase { Q_OBJECT public: - ViewSwitches(QWidget* parent, const char* name, const QString & caption, Mixer* mixer, ViewBase::ViewFlags vflags); + ViewSwitches(TQWidget* parent, const char* name, const TQString & caption, Mixer* mixer, ViewBase::ViewFlags vflags); ~ViewSwitches(); virtual int count(); virtual int advice(); virtual void setMixSet(MixSet *mixset); - virtual QWidget* add(MixDevice *mdw); + virtual TQWidget* add(MixDevice *mdw); virtual void constructionFinished(); virtual void configurationUpdate(); - QSize sizeHint() const; + TQSize sizeHint() const; public slots: virtual void refreshVolumeLevels(); private: - QLayout* _layoutMDW; - QLayout* _layoutEnum; - QLayout* _layoutSwitch; + TQLayout* _layoutMDW; + TQLayout* _layoutEnum; + TQLayout* _layoutSwitch; }; #endif diff --git a/krec/krecconfig_files.cpp b/krec/krecconfig_files.cpp index a741c8e9..4b62ed9c 100644 --- a/krec/krecconfig_files.cpp +++ b/krec/krecconfig_files.cpp @@ -18,33 +18,33 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include #include -typedef KGenericFactory KRecConfigFilesFactory; +typedef KGenericFactory KRecConfigFilesFactory; K_EXPORT_COMPONENT_FACTORY( kcm_krec_files, KRecConfigFilesFactory( "krec" ) ) -KRecConfigFiles::KRecConfigFiles( QWidget* p, const char*, const QStringList& s ) +KRecConfigFiles::KRecConfigFiles( TQWidget* p, const char*, const TQStringList& s ) : KCModule( KRecConfigFilesFactory::instance(), p, s ) , _layout( 0 ) , _filewidget( 0 ) { - _layout = new QBoxLayout( this, QBoxLayout::TopToBottom ); + _layout = new TQBoxLayout( this, TQBoxLayout::TopToBottom ); _layout->addSpacing( 10 ); _filewidget = new KRecConfigFilesWidget( this ); - connect( _filewidget, SIGNAL( sRateChanged( int ) ), this, SLOT( ratechanged( int ) ) ); - connect( _filewidget, SIGNAL( sChannelsChanged( int ) ), this, SLOT( channelschanged( int ) ) ); - connect( _filewidget, SIGNAL( sBitsChanged( int ) ), this, SLOT( bitschanged( int ) ) ); - connect( _filewidget, SIGNAL( sUseDefaultsChanged( bool ) ), this, SLOT( usedefaultschanged( bool ) ) ); + connect( _filewidget, TQT_SIGNAL( sRateChanged( int ) ), this, TQT_SLOT( ratechanged( int ) ) ); + connect( _filewidget, TQT_SIGNAL( sChannelsChanged( int ) ), this, TQT_SLOT( channelschanged( int ) ) ); + connect( _filewidget, TQT_SIGNAL( sBitsChanged( int ) ), this, TQT_SLOT( bitschanged( int ) ) ); + connect( _filewidget, TQT_SIGNAL( sUseDefaultsChanged( bool ) ), this, TQT_SLOT( usedefaultschanged( bool ) ) ); _layout->addWidget( _filewidget ); _layout->addStretch( 100 ); diff --git a/krec/krecconfig_files.h b/krec/krecconfig_files.h index 0ef74b49..dcf474c7 100644 --- a/krec/krecconfig_files.h +++ b/krec/krecconfig_files.h @@ -15,8 +15,8 @@ #define KREC_CONFIGURE_FILES_H #include -#include -#include +#include +#include class QBoxLayout; class QRadioButton; @@ -30,7 +30,7 @@ class KRecConfigFilesWidget; class KRecConfigFiles : public KCModule { Q_OBJECT public: - KRecConfigFiles( QWidget*, const char* =0, const QStringList& = QStringList() ); + KRecConfigFiles( TQWidget*, const char* =0, const TQStringList& = TQStringList() ); ~KRecConfigFiles(); void load(); @@ -43,7 +43,7 @@ private slots: void usedefaultschanged( bool ); private: - QBoxLayout *_layout; + TQBoxLayout *_layout; KRecConfigFilesWidget *_filewidget; }; diff --git a/krec/krecconfig_fileswidget.cpp b/krec/krecconfig_fileswidget.cpp index 5df6693d..206eda1b 100644 --- a/krec/krecconfig_fileswidget.cpp +++ b/krec/krecconfig_fileswidget.cpp @@ -17,18 +17,18 @@ #include "krecglobal.h" #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include -#include +#include -KRecConfigFilesWidget::KRecConfigFilesWidget( QWidget* p, const char* n ) - : QVBox( p,n ) - , _hbox( new QHBox( this ) ) +KRecConfigFilesWidget::KRecConfigFilesWidget( TQWidget* p, const char* n ) + : TQVBox( p,n ) + , _hbox( new TQHBox( this ) ) , _ratebox( 0 ), _channelsbox( 0 ), _bitsbox( 0 ) , _rate48( 0 ), _rate44( 0 ), _rate22( 0 ), _rate11( 0 ), _rateother( 0 ) , _rateotherbox( 0 ), _rateotherlabel( 0 ), _rateotherline( 0 ) @@ -36,32 +36,32 @@ KRecConfigFilesWidget::KRecConfigFilesWidget( QWidget* p, const char* n ) , _bits16( 0 ), _bits8( 0 ) , _samplingRate( 44100 ), _channels( 2 ), _bits( 16 ) { - _ratebox = new QButtonGroup( 1, Qt::Horizontal, i18n( "Sampling Rate" ), _hbox ); - connect( _ratebox, SIGNAL( clicked( int ) ), this, SLOT( ratechanged( int ) ) ); - _rate48 = new QRadioButton( i18n( "48000 Hz" ), _ratebox ); - _rate44 = new QRadioButton( i18n( "44100 Hz" ), _ratebox ); - _rate22 = new QRadioButton( i18n( "22050 Hz" ), _ratebox ); - _rate11 = new QRadioButton( i18n( "11025 Hz" ), _ratebox ); - _rateother = new QRadioButton( i18n( "Other" ), _ratebox ); - _rateotherbox = new QHBox( _ratebox ); + _ratebox = new TQButtonGroup( 1, Qt::Horizontal, i18n( "Sampling Rate" ), _hbox ); + connect( _ratebox, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( ratechanged( int ) ) ); + _rate48 = new TQRadioButton( i18n( "48000 Hz" ), _ratebox ); + _rate44 = new TQRadioButton( i18n( "44100 Hz" ), _ratebox ); + _rate22 = new TQRadioButton( i18n( "22050 Hz" ), _ratebox ); + _rate11 = new TQRadioButton( i18n( "11025 Hz" ), _ratebox ); + _rateother = new TQRadioButton( i18n( "Other" ), _ratebox ); + _rateotherbox = new TQHBox( _ratebox ); _rateotherbox->setSpacing( 2 ); - _rateotherlabel = new QLabel( i18n( "Other:" ), _rateotherbox ); - _rateotherline = new QLineEdit( _rateotherbox ); + _rateotherlabel = new TQLabel( i18n( "Other:" ), _rateotherbox ); + _rateotherline = new TQLineEdit( _rateotherbox ); _rateotherline->setMaxLength( 10 ); _rateotherline->setFrame( true ); _rateotherbox->setEnabled( false ); - connect( _rateotherline, SIGNAL( textChanged( const QString& ) ), this, SLOT( rateotherchanged( const QString& ) ) ); - _channelsbox = new QButtonGroup( 1, Qt::Horizontal, i18n( "Channels" ), _hbox ); - connect( _channelsbox, SIGNAL( clicked( int ) ), this, SLOT( channelschanged( int ) ) ); - _channels2 = new QRadioButton( i18n( "Stereo (2 channels)" ), _channelsbox ); - _channels1 = new QRadioButton( i18n( "Mono (1 channel)" ), _channelsbox ); - _bitsbox = new QButtonGroup( 1, Qt::Horizontal, i18n( "Bits" ), _hbox ); - connect( _bitsbox, SIGNAL( clicked( int ) ), this, SLOT( bitschanged( int ) ) ); - _bits16 = new QRadioButton( i18n( "16 bit" ), _bitsbox ); - _bits8 = new QRadioButton( i18n( "8 bit" ), _bitsbox ); + connect( _rateotherline, TQT_SIGNAL( textChanged( const TQString& ) ), this, TQT_SLOT( rateotherchanged( const TQString& ) ) ); + _channelsbox = new TQButtonGroup( 1, Qt::Horizontal, i18n( "Channels" ), _hbox ); + connect( _channelsbox, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( channelschanged( int ) ) ); + _channels2 = new TQRadioButton( i18n( "Stereo (2 channels)" ), _channelsbox ); + _channels1 = new TQRadioButton( i18n( "Mono (1 channel)" ), _channelsbox ); + _bitsbox = new TQButtonGroup( 1, Qt::Horizontal, i18n( "Bits" ), _hbox ); + connect( _bitsbox, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( bitschanged( int ) ) ); + _bits16 = new TQRadioButton( i18n( "16 bit" ), _bitsbox ); + _bits8 = new TQRadioButton( i18n( "8 bit" ), _bitsbox ); - _usedefaults = new QCheckBox( i18n( "Use defaults for creating new files" ), this ); - connect( _usedefaults, SIGNAL( toggled( bool ) ), this, SLOT( usedefaultschanged( bool ) ) ); + _usedefaults = new TQCheckBox( i18n( "Use defaults for creating new files" ), this ); + connect( _usedefaults, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( usedefaultschanged( bool ) ) ); setSpacing( 5 ); @@ -84,7 +84,7 @@ kdDebug( 60005 ) << k_funcinfo << endl; default: _rateother->setChecked( true ); _rateotherbox->setEnabled( true ); - _rateotherline->setText( QString::number( _samplingRate ) ); + _rateotherline->setText( TQString::number( _samplingRate ) ); break; }; _channels = kapp->config()->readNumEntry( "Channels", 2 ); @@ -127,7 +127,7 @@ void KRecConfigFilesWidget::ratechanged( int index ) { if ( _ratebox->find( index ) == _rate11 ) _samplingRate = 11025; emit sRateChanged( _samplingRate ); } -void KRecConfigFilesWidget::rateotherchanged( const QString& text ) { +void KRecConfigFilesWidget::rateotherchanged( const TQString& text ) { _samplingRate = text.toInt(); emit sRateChanged( _samplingRate ); } diff --git a/krec/krecconfig_fileswidget.h b/krec/krecconfig_fileswidget.h index 2095ce33..2dfb1b36 100644 --- a/krec/krecconfig_fileswidget.h +++ b/krec/krecconfig_fileswidget.h @@ -16,10 +16,10 @@ #ifndef KREC_CONFIGURE_FILESWIDGET_H #define KREC_CONFIGURE_FILESWIDGET_H -#include -#include -#include -#include +#include +#include +#include +#include class QRadioButton; class QCheckBox; @@ -27,10 +27,10 @@ class QButtonGroup; class QLineEdit; class QLabel; -class KRecConfigFilesWidget : public QVBox { +class KRecConfigFilesWidget : public TQVBox { Q_OBJECT public: - KRecConfigFilesWidget( QWidget*, const char* =0 ); + KRecConfigFilesWidget( TQWidget*, const char* =0 ); ~KRecConfigFilesWidget(); void load(); @@ -43,22 +43,22 @@ signals: void sUseDefaultsChanged( bool ); private slots: void ratechanged( int ); - void rateotherchanged( const QString& ); + void rateotherchanged( const TQString& ); void channelschanged( int ); void bitschanged( int ); void usedefaultschanged( bool ); private: - QHBox *_hbox; - QButtonGroup *_ratebox, *_channelsbox, *_bitsbox; - QRadioButton *_rate48, *_rate44, *_rate22, *_rate11, *_rateother; - QHBox *_rateotherbox; - QLabel *_rateotherlabel; - QLineEdit *_rateotherline; - QRadioButton *_channels2, *_channels1; - QRadioButton *_bits16, *_bits8; + TQHBox *_hbox; + TQButtonGroup *_ratebox, *_channelsbox, *_bitsbox; + TQRadioButton *_rate48, *_rate44, *_rate22, *_rate11, *_rateother; + TQHBox *_rateotherbox; + TQLabel *_rateotherlabel; + TQLineEdit *_rateotherline; + TQRadioButton *_channels2, *_channels1; + TQRadioButton *_bits16, *_bits8; - QCheckBox *_usedefaults; + TQCheckBox *_usedefaults; int _samplingRate, _channels, _bits; }; diff --git a/krec/krecconfigure.cpp b/krec/krecconfigure.cpp index 76d949f4..c29d6b4a 100644 --- a/krec/krecconfigure.cpp +++ b/krec/krecconfigure.cpp @@ -18,23 +18,23 @@ #include #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include #include #include #include -typedef KGenericFactory KRecConfigGeneralFactory; +typedef KGenericFactory KRecConfigGeneralFactory; K_EXPORT_COMPONENT_FACTORY( kcm_krec, KRecConfigGeneralFactory( "krec" ) ) -KRecConfigGeneral::KRecConfigGeneral( QWidget* p, const char*, const QStringList& s ) +KRecConfigGeneral::KRecConfigGeneral( TQWidget* p, const char*, const TQStringList& s ) : KCModule( KRecConfigGeneralFactory::instance(), p, s ) , _layout( 0 ), _layout_display( 0 ) , _display_title( 0 ) @@ -44,54 +44,54 @@ KRecConfigGeneral::KRecConfigGeneral( QWidget* p, const char*, const QStringList , _framebaseotherbox( 0 ), _framebaseotherlabel( 0 ), _framebaseotherline( 0 ) , _displaymode( 0 ), _framebase( 25 ) { - _layout = new QBoxLayout( this, QBoxLayout::TopToBottom ); + _layout = new TQBoxLayout( this, TQBoxLayout::TopToBottom ); _layout->addSpacing( 10 ); - _display_title = new QLabel( i18n( "Timedisplay Related Settings" ), this ); + _display_title = new TQLabel( i18n( "Timedisplay Related Settings" ), this ); _layout->addWidget( _display_title, -100 ); - _layout_display = new QBoxLayout( _layout, QBoxLayout::LeftToRight ); + _layout_display = new TQBoxLayout( _layout, TQBoxLayout::LeftToRight ); _layout->setStretchFactor( _layout_display, -100 ); - _displaybox = new QButtonGroup( 1, Qt::Horizontal, i18n( "Timedisplay Style" ), this ); + _displaybox = new TQButtonGroup( 1, Qt::Horizontal, i18n( "Timedisplay Style" ), this ); _layout_display->addWidget( _displaybox, 100 ); - connect( _displaybox, SIGNAL( clicked( int ) ), this, SLOT( displaychanged( int ) ) ); - _display0 = new QRadioButton( i18n( "Plain samples" ), _displaybox ); - _display1 = new QRadioButton( i18n( "[hours:]mins:secs:samples" ), _displaybox ); - _display2 = new QRadioButton( i18n( "[hours:]mins:secs:frames" ), _displaybox ); - _display3 = new QRadioButton( i18n( "MByte.KByte" ), _displaybox ); - _framebasebox = new QButtonGroup( 1, Qt::Horizontal, i18n( "Framebase" ), this ); + connect( _displaybox, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( displaychanged( int ) ) ); + _display0 = new TQRadioButton( i18n( "Plain samples" ), _displaybox ); + _display1 = new TQRadioButton( i18n( "[hours:]mins:secs:samples" ), _displaybox ); + _display2 = new TQRadioButton( i18n( "[hours:]mins:secs:frames" ), _displaybox ); + _display3 = new TQRadioButton( i18n( "MByte.KByte" ), _displaybox ); + _framebasebox = new TQButtonGroup( 1, Qt::Horizontal, i18n( "Framebase" ), this ); _layout_display->addWidget( _framebasebox, 100 ); - connect( _framebasebox, SIGNAL( clicked( int ) ), this, SLOT( framebasechanged( int ) ) ); - _framebase30 = new QRadioButton( i18n( "30 frames per second (American TV)" ), _framebasebox ); - _framebase25 = new QRadioButton( i18n( "25 frames per second (European TV)" ), _framebasebox ); - _framebase75 = new QRadioButton( i18n( "75 frames per second (CD)" ), _framebasebox ); - _framebaseother = new QRadioButton( i18n( "Other" ), _framebasebox ); - _framebaseotherbox = new QHBox( _framebasebox ); + connect( _framebasebox, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( framebasechanged( int ) ) ); + _framebase30 = new TQRadioButton( i18n( "30 frames per second (American TV)" ), _framebasebox ); + _framebase25 = new TQRadioButton( i18n( "25 frames per second (European TV)" ), _framebasebox ); + _framebase75 = new TQRadioButton( i18n( "75 frames per second (CD)" ), _framebasebox ); + _framebaseother = new TQRadioButton( i18n( "Other" ), _framebasebox ); + _framebaseotherbox = new TQHBox( _framebasebox ); _framebaseotherbox->setSpacing( 2 ); - _framebaseotherlabel = new QLabel( i18n( "Other" ), _framebaseotherbox ); - _framebaseotherline = new QLineEdit( _framebaseotherbox ); + _framebaseotherlabel = new TQLabel( i18n( "Other" ), _framebaseotherbox ); + _framebaseotherline = new TQLineEdit( _framebaseotherbox ); _framebaseotherline->setMaxLength( 10 ); _framebaseotherbox->setEnabled( false ); - connect( _framebaseotherline, SIGNAL( textChanged( const QString& ) ), this, SLOT( framebaseotherchanged( const QString& ) ) ); + connect( _framebaseotherline, TQT_SIGNAL( textChanged( const TQString& ) ), this, TQT_SLOT( framebaseotherchanged( const TQString& ) ) ); _layout->addSpacing( 5 ); - _verboseDisplayMode = new QCheckBox( i18n( "Show verbose times ( XXmins:XXsecs:XXframes instead of XX:XX::XX )" ), this ); - connect( _verboseDisplayMode, SIGNAL( toggled( bool ) ), this, SLOT( verboseDisplayChanged( bool ) ) ); + _verboseDisplayMode = new TQCheckBox( i18n( "Show verbose times ( XXmins:XXsecs:XXframes instead of XX:XX::XX )" ), this ); + connect( _verboseDisplayMode, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( verboseDisplayChanged( bool ) ) ); _layout->addWidget( _verboseDisplayMode ); _layout->addSpacing( 10 ); - _other_title = new QLabel( i18n( "Miscellaneous Settings" ), this ); + _other_title = new TQLabel( i18n( "Miscellaneous Settings" ), this ); _layout->addWidget( _other_title ); - _tipofday = new QCheckBox( i18n( "Show tip of the day at startup" ), this ); - connect( _tipofday, SIGNAL( toggled( bool ) ), this, SLOT( tipofdaychanged( bool ) ) ); + _tipofday = new TQCheckBox( i18n( "Show tip of the day at startup" ), this ); + connect( _tipofday, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( tipofdaychanged( bool ) ) ); _layout->addWidget( _tipofday ); - QBoxLayout* _tmplayout = new QBoxLayout( this, QBoxLayout::LeftToRight ); + TQBoxLayout* _tmplayout = new TQBoxLayout( this, TQBoxLayout::LeftToRight ); _enableAllMessages = new KPushButton( i18n( "Enable All Hidden Messages" ), this ); - connect( _enableAllMessages, SIGNAL( clicked() ), this, SLOT( enableallmessagesclicked() ) ); + connect( _enableAllMessages, TQT_SIGNAL( clicked() ), this, TQT_SLOT( enableallmessagesclicked() ) ); _tmplayout->addWidget( _enableAllMessages ); - QLabel* _tmplbl = new QLabel( i18n( "All messages with the \"Don't show this message again\" option are shown again after selecting this button." ), this ); + TQLabel* _tmplbl = new TQLabel( i18n( "All messages with the \"Don't show this message again\" option are shown again after selecting this button." ), this ); _tmplayout->addWidget( _tmplbl ); _layout->addLayout( _tmplayout ); @@ -124,7 +124,7 @@ kdDebug( 60005 ) << k_funcinfo << endl; default: _framebaseother->setChecked( true ); _framebaseotherbox->setEnabled( true ); - _framebaseotherline->setText( QString::number( _framebase ) ); + _framebaseotherline->setText( TQString::number( _framebase ) ); break; }; kapp->config()->setGroup( "TipOfDay" ); @@ -169,7 +169,7 @@ kdDebug(60005) << k_funcinfo << "Framebase=" << _framebase << endl; _framebaseotherbox->setEnabled( false ); emit changed( true ); } -void KRecConfigGeneral::framebaseotherchanged( const QString& text ) { +void KRecConfigGeneral::framebaseotherchanged( const TQString& text ) { _framebase = text.toInt(); kdDebug(60005) << k_funcinfo << "Framebase=" << _framebase << endl; emit changed( true ); diff --git a/krec/krecconfigure.h b/krec/krecconfigure.h index 13416c44..00d1317e 100644 --- a/krec/krecconfigure.h +++ b/krec/krecconfigure.h @@ -15,8 +15,8 @@ #define KREC_CONFIGURE_H #include -#include -#include +#include +#include class QBoxLayout; class QRadioButton; @@ -30,7 +30,7 @@ class KPushButton; class KRecConfigGeneral : public KCModule { Q_OBJECT public: - KRecConfigGeneral( QWidget*, const char* =0, const QStringList& = QStringList() ); + KRecConfigGeneral( TQWidget*, const char* =0, const TQStringList& = TQStringList() ); ~KRecConfigGeneral(); void load(); @@ -40,22 +40,22 @@ private slots: void displaychanged( int ); void framebasechanged( int ); - void framebaseotherchanged( const QString& ); + void framebaseotherchanged( const TQString& ); void verboseDisplayChanged( bool ); void tipofdaychanged( bool ); void enableallmessagesclicked(); private: - QBoxLayout *_layout, *_layout_display; - QLabel *_display_title, *_other_title; - QButtonGroup *_displaybox, *_framebasebox; - QRadioButton *_display0, *_display1, *_display2, *_display3; - QRadioButton *_framebase30, *_framebase25, *_framebase75, *_framebaseother; - QHBox *_framebaseotherbox; - QLabel *_framebaseotherlabel; - QLineEdit *_framebaseotherline; + TQBoxLayout *_layout, *_layout_display; + TQLabel *_display_title, *_other_title; + TQButtonGroup *_displaybox, *_framebasebox; + TQRadioButton *_display0, *_display1, *_display2, *_display3; + TQRadioButton *_framebase30, *_framebase25, *_framebase75, *_framebaseother; + TQHBox *_framebaseotherbox; + TQLabel *_framebaseotherlabel; + TQLineEdit *_framebaseotherline; - QCheckBox *_tipofday, *_verboseDisplayMode; + TQCheckBox *_tipofday, *_verboseDisplayMode; KPushButton *_enableAllMessages; int _displaymode, _framebase; diff --git a/krec/krecexport_template.cpp b/krec/krecexport_template.cpp index 43fa023c..3569268d 100644 --- a/krec/krecexport_template.cpp +++ b/krec/krecexport_template.cpp @@ -16,10 +16,10 @@ #include "krecglobal.h" -#include +#include #include -KRecExportItem::KRecExportItem( QObject* p, const char* n, const QStringList& ) : QObject( p,n ), _running( false ) { +KRecExportItem::KRecExportItem( TQObject* p, const char* n, const TQStringList& ) : TQObject( p,n ), _running( false ) { //kdDebug( 60005 ) << k_funcinfo << endl; } KRecExportItem::~KRecExportItem() { @@ -57,7 +57,7 @@ kdDebug( 60005 ) << k_funcinfo << endl; if ( !running() ) { if ( process() ) { _running = true; - QTimer::singleShot( 0, this, SLOT( process() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( process() ) ); emit running( running() ); } return true; diff --git a/krec/krecexport_template.h b/krec/krecexport_template.h index 8a1c4a03..aac9dac2 100644 --- a/krec/krecexport_template.h +++ b/krec/krecexport_template.h @@ -14,11 +14,11 @@ #ifndef KREC_EXPORT_TEMPLATE_H #define KREC_EXPORT_TEMPLATE_H -#include +#include -#include -#include -#include +#include +#include +#include #include /** @@ -29,14 +29,14 @@ * * @author Arnold Krille */ -class KRecExportItem : public QObject { +class KRecExportItem : public TQObject { Q_OBJECT private: /// Controls wether an export is running, or not... bool _running; int _samplingRate, _bits, _channels; protected: - KRecExportItem( QObject*, const char* =0, const QStringList& =0 ); + KRecExportItem( TQObject*, const char* =0, const TQStringList& =0 ); /** * This registers this class at the KRecGlobal. @@ -60,22 +60,22 @@ public: virtual KRecExportItem* newItem()=0; /// Returns a list with the extensions. - virtual QStringList extensions()=0; + virtual TQStringList extensions()=0; /// Returns the export format. - virtual QString exportFormat()=0; + virtual TQString exportFormat()=0; bool running() const { return _running; } public slots: /** * Initializes the sound-settings. - * Has to be called before the initialize( const QString & ) function. + * Has to be called before the initialize( const TQString & ) function. */ void initialize( int samplingRate, int bits, int channels ); /// Initializes the export. - virtual bool initialize( const QString &filename )=0; + virtual bool initialize( const TQString &filename )=0; /** * Start the real export (including the emission of @see getData() while running=true). - * Best way to do this is to use @see QTimer::singleShot() since then the events are + * Best way to do this is to use @see TQTimer::singleShot() since then the events are * put at the end of the EventLoop not blocking the gui and everything else. */ bool start(); @@ -85,10 +85,10 @@ public slots: void stop(); /// Finish the export. virtual bool finalize()=0; - //virtual void data( QByteArray& ); + //virtual void data( TQByteArray& ); signals: /// Is emitted when this Item wants data to export. - void getData( QByteArray& ); + void getData( TQByteArray& ); void running( bool ); }; diff --git a/krec/krecexport_wave.cpp b/krec/krecexport_wave.cpp index 80ea63d7..6224283e 100644 --- a/krec/krecexport_wave.cpp +++ b/krec/krecexport_wave.cpp @@ -18,15 +18,15 @@ #include #include -#include -#include +#include +#include #include K_EXPORT_COMPONENT_FACTORY( libkrecexport_wave, KGenericFactory ) KRecExport_Wave krecExportWave( 0 ); -KRecExport_Wave::KRecExport_Wave( QObject* p, const char* n, const QStringList& ) +KRecExport_Wave::KRecExport_Wave( TQObject* p, const char* n, const TQStringList& ) : KRecExportItem( p,n ) , _file( 0 ) { @@ -43,17 +43,17 @@ kdDebug( 60005 ) << k_funcinfo << endl; return new KRecExport_Wave( 0 ); } -QStringList KRecExport_Wave::extensions() { +TQStringList KRecExport_Wave::extensions() { //kdDebug( 60005 ) << k_funcinfo << endl; - QStringList tmp; + TQStringList tmp; tmp << "*.wav" << "*.WAV"; return tmp; } -bool KRecExport_Wave::initialize( const QString &filename ) { +bool KRecExport_Wave::initialize( const TQString &filename ) { kdDebug( 60005 ) << k_funcinfo << endl; if ( !_file ) { - _file = new QFile( filename ); + _file = new TQFile( filename ); if ( _file->open( IO_Raw|IO_WriteOnly ) ) { /// Write an empty Wave-header... for ( int i=0; i<44; i++ ) @@ -66,10 +66,10 @@ bool KRecExport_Wave::process() { //kdDebug( 60005 ) << k_funcinfo << running << endl; if ( _file ) { if ( running() ) { - QByteArray bytearray( 4096 ); + TQByteArray bytearray( 4096 ); emit getData( bytearray ); _file->writeBlock( bytearray ); - QTimer::singleShot( 10, this, SLOT( process() ) ); + TQTimer::singleShot( 10, this, TQT_SLOT( process() ) ); } return true; } else return false; diff --git a/krec/krecexport_wave.h b/krec/krecexport_wave.h index f1336970..664ad35a 100644 --- a/krec/krecexport_wave.h +++ b/krec/krecexport_wave.h @@ -22,20 +22,20 @@ class QFile; class KRecExport_Wave : public KRecExportItem { Q_OBJECT public: - KRecExport_Wave( QObject*, const char* =0, const QStringList& =0 ); + KRecExport_Wave( TQObject*, const char* =0, const TQStringList& =0 ); ~KRecExport_Wave(); KRecExport_Wave* newItem(); - QStringList extensions(); - QString exportFormat() { return QString( "Wave" ); } + TQStringList extensions(); + TQString exportFormat() { return TQString( "Wave" ); } public slots: - bool initialize( const QString & ); + bool initialize( const TQString & ); bool process(); bool finalize(); private: - QFile* _file; + TQFile* _file; }; #endif diff --git a/krec/krecfile.cpp b/krec/krecfile.cpp index 6e4b2b8f..a588d126 100644 --- a/krec/krecfile.cpp +++ b/krec/krecfile.cpp @@ -26,25 +26,25 @@ #include #include #include -#include -#include +#include +#include #include -#include +#include -#include +#include #include void KRecFile::init() { _pos = 0; _size = 0; - _filename = QString::null; + _filename = TQString::null; _currentBuffer = 0; _dir = new KTempDir(); _config = new KSimpleConfig( _dir->name()+"project.rc", false ); } -KRecFile::KRecFile( QObject* p, const char* n ) - : QObject( p,n ) +KRecFile::KRecFile( TQObject* p, const char* n ) + : TQObject( p,n ) , _saved( false ) { init(); @@ -65,8 +65,8 @@ KRecFile::KRecFile( QObject* p, const char* n ) delete dialog; } -KRecFile::KRecFile( const QString &filename, QObject* p, const char* n ) - : QObject( p,n ) +KRecFile::KRecFile( const TQString &filename, TQObject* p, const char* n ) + : TQObject( p,n ) , _saved( true ) { init(); @@ -77,7 +77,7 @@ KRecFile::KRecFile( const QString &filename, QObject* p, const char* n ) KTar *tar = new KTar( _filename, "application/x-gzip" ); tar->open( IO_ReadOnly ); int i=0; while ( _filename.find( '/', i ) != -1 ) i++; // Find last '/' - QString basename = _filename.right( _filename.length()-i ); + TQString basename = _filename.right( _filename.length()-i ); basename = basename.left( basename.length()-5 ); const KArchiveDirectory *dir = dynamic_cast( tar->directory()->entry( basename ) ); @@ -91,7 +91,7 @@ KRecFile::KRecFile( const QString &filename, QObject* p, const char* n ) //kdDebug( 60005 ) << c << " Files to load" << endl; for ( int i=0; isetGroup( "File-" + QString::number( i ) ); + _config->setGroup( "File-" + TQString::number( i ) ); newBuffer( KRecBuffer::fromConfig( _config, _dir->qDir(), this ) ); } KRecGlobal::the()->message( i18n( "\'%1\' loaded." ).arg( filename ) ); @@ -103,7 +103,7 @@ KRecFile::KRecFile( const QString &filename, QObject* p, const char* n ) } KRecFile::~KRecFile() { kdDebug( 60005 ) << k_funcinfo << endl; - QValueList::iterator it; + TQValueList::iterator it; for ( it = _buffers.begin(); it != _buffers.end(); ++it ) delete ( *it ); _buffers.clear(); @@ -112,8 +112,8 @@ KRecFile::~KRecFile() { //kdDebug( 60005 ) << k_funcinfo << "done." << endl; } -QString KRecFile::filename() { return _filename; } -void KRecFile::filename( const QString &n ) { +TQString KRecFile::filename() { return _filename; } +void KRecFile::filename( const TQString &n ) { if ( _filename!=n ) { _filename = n; emit filenameChanged( _filename ); @@ -123,18 +123,18 @@ void KRecFile::filename( const QString &n ) { void KRecFile::writeData( Arts::mcopbyte* /*data*/, uint /*length*/ ) { kdDebug( 60005 ) << k_funcinfo << endl; } -void KRecFile::writeData( QByteArray* data ) { +void KRecFile::writeData( TQByteArray* data ) { kdDebug( 60005 ) << k_funcinfo << endl; if ( _currentBuffer!=-1 ) _buffers[ _currentBuffer ]->writeData( data ); _saved = false; } -void KRecFile::writeData( QByteArray& data ) { +void KRecFile::writeData( TQByteArray& data ) { if ( _currentBuffer!=-1 ) _buffers[ _currentBuffer ]->writeData( data ); _saved = false; } -void KRecFile::save( const QString &fname ) { - QString filetosave = fname; +void KRecFile::save( const TQString &fname ) { + TQString filetosave = fname; //kdDebug( 60005 ) << k_funcinfo << filename << endl; if ( saved() ) { @@ -144,7 +144,7 @@ void KRecFile::save( const QString &fname ) { KRecGlobal::the()->message( i18n( "Saving in progress..." ) ); filename( fname ); - QString tmpname; + TQString tmpname; { KTempFile *tmp = new KTempFile(); tmp->setAutoDelete( true ); @@ -156,7 +156,7 @@ void KRecFile::save( const QString &fname ) { KTar *tar = new KTar( tmpname, "application/x-gzip" ); tar->open( IO_WriteOnly ); int i=0; while ( fname.find( '/', i ) != -1 ) i++; // Find last '/' - QString basename = fname.right( fname.length()-i ); + TQString basename = fname.right( fname.length()-i ); if ( basename.endsWith( ".krec" ) ) basename = basename.left( basename.length()-5 ); else { @@ -172,16 +172,16 @@ void KRecFile::save( const QString &fname ) { _saved = true; } -void KRecFile::exportwave( const QString &filename ) { +void KRecFile::exportwave( const TQString &filename ) { kdDebug( 60005 ) << k_funcinfo << filename << endl; } -QByteArray* KRecFile::getData( int ) { +TQByteArray* KRecFile::getData( int ) { kdDebug( 60005 ) << k_funcinfo << endl; return 0; } -void KRecFile::getData( QByteArray& data ) { +void KRecFile::getData( TQByteArray& data ) { KRecBuffer* current = getTopBuffer_buffer( _pos ); if ( current ) { //kdDebug( 60005 ) << "_pos=" << _pos << "(" << samplesToOffset( _pos ) << ") current->startpos()=" << current->startpos() << "(" << samplesToOffset( current->startpos() ) << ") that is " << samplesToOffset( _pos - current->startpos() ) << endl; @@ -203,10 +203,10 @@ void KRecFile::newPos( int p ) { emit posChanged( _pos ); } } -void KRecFile::newPos( KRecBuffer* buffer, QIODevice::Offset p ) { +void KRecFile::newPos( KRecBuffer* buffer, TQIODevice::Offset p ) { newPos( buffer->startpos() + offsetToSamples( p ) ); } -void KRecFile::newSize( KRecBuffer* buffer, QIODevice::Offset p ) { +void KRecFile::newSize( KRecBuffer* buffer, TQIODevice::Offset p ) { if ( buffer->startpos() + offsetToSamples( p ) > _size ) { _size = buffer->startpos() + offsetToSamples( p ); } @@ -215,13 +215,13 @@ void KRecFile::newSize( KRecBuffer* buffer, QIODevice::Offset p ) { /// * * * Frames <-> Offset and more * * * -int KRecFile::offsetToSamples( QIODevice::Offset n ) const { +int KRecFile::offsetToSamples( TQIODevice::Offset n ) const { int out = n / channels(); if ( bits() == 16 ) out /= 2; return out; } -QIODevice::Offset KRecFile::samplesToOffset( int n ) const { - QIODevice::Offset out = n * channels(); +TQIODevice::Offset KRecFile::samplesToOffset( int n ) const { + TQIODevice::Offset out = n * channels(); if ( bits() == 16 ) out *= 2; return out; } @@ -237,7 +237,7 @@ void KRecFile::saveProps() { _config->writeEntry( "Files", _buffers.count() ); for ( uint i=0; i<_buffers.count(); i++ ) { //kdDebug( 60005 ) << "Writing config " << i << endl; - _config->setGroup( "File-" + QString::number( i ) ); + _config->setGroup( "File-" + TQString::number( i ) ); _buffers[ i ]->writeConfig( _config ); } _config->sync(); @@ -252,15 +252,15 @@ void KRecFile::loadProps() { /// * * * NewBuffer * * * -void KRecFile::newBuffer( const QString &filename ) { +void KRecFile::newBuffer( const TQString &filename ) { kdDebug( 60005 ) << k_funcinfo << filename << endl; newBuffer( new KRecBuffer( filename, _pos, true, this ) ); } void KRecFile::newBuffer( KRecBuffer* buffer ) { kdDebug( 60005 ) << k_funcinfo << endl; - connect( buffer, SIGNAL( posChanged( KRecBuffer*, QIODevice::Offset ) ), this, SLOT( newPos( KRecBuffer*, QIODevice::Offset ) ) ); - connect( buffer, SIGNAL( sizeChanged( KRecBuffer*, QIODevice::Offset ) ), this, SLOT( newSize( KRecBuffer*, QIODevice::Offset ) ) ); - connect( buffer, SIGNAL( deleteSelf( KRecBuffer* ) ), this, SLOT( deleteBuffer( KRecBuffer* ) ) ); + connect( buffer, TQT_SIGNAL( posChanged( KRecBuffer*, TQIODevice::Offset ) ), this, TQT_SLOT( newPos( KRecBuffer*, TQIODevice::Offset ) ) ); + connect( buffer, TQT_SIGNAL( sizeChanged( KRecBuffer*, TQIODevice::Offset ) ), this, TQT_SLOT( newSize( KRecBuffer*, TQIODevice::Offset ) ) ); + connect( buffer, TQT_SIGNAL( deleteSelf( KRecBuffer* ) ), this, TQT_SLOT( deleteBuffer( KRecBuffer* ) ) ); _buffers.append( buffer ); newSize( buffer, buffer->size() ); _currentBuffer = _buffers.findIndex( buffer ); @@ -269,7 +269,7 @@ void KRecFile::newBuffer( KRecBuffer* buffer ) { } void KRecFile::newBuffer() { kdDebug( 60005 ) << k_funcinfo << endl; - newBuffer( _dir->name() + "file" + QString::number( _buffers.count() ) + ".raw" ); + newBuffer( _dir->name() + "file" + TQString::number( _buffers.count() ) + ".raw" ); } void KRecFile::deleteBuffer( KRecBuffer* b ) { @@ -285,7 +285,7 @@ void KRecFile::deleteBuffer( KRecBuffer* b ) { /// * * * helper * * * KRecBuffer* KRecFile::getTopBuffer_buffer( int pos ) { //kdDebug( 60005 ) << k_funcinfo << pos << endl; - QValueList::iterator it = _buffers.begin(); + TQValueList::iterator it = _buffers.begin(); KRecBuffer* out = 0; while ( it != _buffers.end() ) { if ( ( *it )->startpos() <= pos && offsetToSamples( ( *it )->size() ) + ( *it )->startpos() > pos && ( *it )->active() ) @@ -300,16 +300,16 @@ int KRecFile::getTopBuffer_int( int pos ) { /// * * * KRecBuffer * * * -KRecBuffer::KRecBuffer( const QString &filename, int startpos, bool a, KRecFile* p, const char* n ) - : QObject( p,n ) +KRecBuffer::KRecBuffer( const TQString &filename, int startpos, bool a, KRecFile* p, const char* n ) + : TQObject( p,n ) , _krecfile( p ) - , _file( new QFile( filename ) ) - , _stream( new QDataStream( _file ) ) - , _fileinfo( new QFileInfo( filename ) ) + , _file( new TQFile( filename ) ) + , _stream( new TQDataStream( _file ) ) + , _fileinfo( new TQFileInfo( filename ) ) , _active( a ) , _pos( 0 ), _start( startpos ) , _title( _fileinfo->fileName() ) - , _comment( QString::null ) + , _comment( TQString::null ) { kdDebug( 60005 ) << k_funcinfo << filename << " " << startpos << endl; _open = _file->open( IO_Raw | IO_ReadWrite ); @@ -336,21 +336,21 @@ void KRecBuffer::writeConfig( KConfig* config ) { config->writeEntry( "Comment", _comment ); } -KRecBuffer* KRecBuffer::fromConfig( KConfig* config, QDir* dir, KRecFile* p, const char* n ) { +KRecBuffer* KRecBuffer::fromConfig( KConfig* config, TQDir* dir, KRecFile* p, const char* n ) { kdDebug( 60005 ) << k_funcinfo << config << endl; KRecBuffer* tmp = new KRecBuffer( dir->path() + "/" + config->readEntry( "Filename" ), config->readNumEntry( "StartPos" ), config->readBoolEntry( "Activated", true ), p, n ); tmp->setTitle( config->readEntry( "Title", tmp->filename() ) ); - tmp->setComment( config->readEntry( "Comment", QString::null ) ); + tmp->setComment( config->readEntry( "Comment", TQString::null ) ); return tmp; } void KRecBuffer::writeData( Arts::mcopbyte* /*data*/, uint /*length*/ ) { kdDebug( 60005 ) << k_funcinfo << endl; } -void KRecBuffer::writeData( QByteArray* data ) { +void KRecBuffer::writeData( TQByteArray* data ) { kdDebug( 60005 ) << k_funcinfo << endl; writeData( *data ); /* if ( _open ) { @@ -360,7 +360,7 @@ kdDebug( 60005 ) << k_funcinfo << endl; emit sizeChanged( this, size() ); }*/ } -void KRecBuffer::writeData( QByteArray& data ) { +void KRecBuffer::writeData( TQByteArray& data ) { //kdDebug( 60005 ) << k_funcinfo << endl; if ( _open ) { _file->at( _pos ); @@ -370,7 +370,7 @@ void KRecBuffer::writeData( QByteArray& data ) { } } -void KRecBuffer::getData( QByteArray& data ) { +void KRecBuffer::getData( TQByteArray& data ) { //kdDebug( 60005 ) << k_funcinfo << "data.size()" << data.size() << " _pos" << _pos << endl; if ( _pos > _file->size() ) kdWarning() << "Trying to access behind file!" << endl; @@ -390,7 +390,7 @@ void KRecBuffer::getData( QByteArray& data ) { } } -void KRecBuffer::setPos( QIODevice::Offset p ) { +void KRecBuffer::setPos( TQIODevice::Offset p ) { if ( p!=_pos ) { _pos = p; emit posChanged( this, _pos ); @@ -399,20 +399,20 @@ void KRecBuffer::setPos( QIODevice::Offset p ) { } int KRecBuffer::startpos() const { return _start; } -QIODevice::Offset KRecBuffer::size() const { return _file->size(); } +TQIODevice::Offset KRecBuffer::size() const { return _file->size(); } -QString KRecBuffer::filename() const { return _fileinfo->fileName(); } -QString KRecBuffer::title() const { return _title; } -QString KRecBuffer::comment() const { return _comment; } +TQString KRecBuffer::filename() const { return _fileinfo->fileName(); } +TQString KRecBuffer::title() const { return _title; } +TQString KRecBuffer::comment() const { return _comment; } -void KRecBuffer::setTitle( const QString &n ) { +void KRecBuffer::setTitle( const TQString &n ) { if ( _title != n ) { _title = n; emit somethingChanged(); } } -void KRecBuffer::setComment( const QString &n ) { +void KRecBuffer::setComment( const TQString &n ) { if ( _comment != n ) { _comment = n; emit somethingChanged(); diff --git a/krec/krecfile.h b/krec/krecfile.h index ba307838..8b030833 100644 --- a/krec/krecfile.h +++ b/krec/krecfile.h @@ -14,9 +14,9 @@ #ifndef KRECFILE_H #define KRECFILE_H -#include -#include -#include +#include +#include +#include #include @@ -26,31 +26,31 @@ class KSimpleConfig; class QFile; class KRecFileViewWidget; -class KRecFile : virtual public QObject { +class KRecFile : virtual public TQObject { Q_OBJECT friend class KRecFileWidget; public: - KRecFile( QObject*, const char* =0 ); - KRecFile( const QString &, QObject*, const char* =0 ); + KRecFile( TQObject*, const char* =0 ); + KRecFile( const TQString &, TQObject*, const char* =0 ); ~KRecFile(); - QString filename(); - void filename( const QString &); + TQString filename(); + void filename( const TQString &); bool saved() const { return _saved; } int samplerate() const { return _samplerate; } int channels() const { return _channels; } int bits() const { return _bits; } - QIODevice::Offset offsetSize() const { return samplesToOffset( _size ); } - QIODevice::Offset offsetPosition() const { return samplesToOffset( _pos ); } + TQIODevice::Offset offsetSize() const { return samplesToOffset( _size ); } + TQIODevice::Offset offsetPosition() const { return samplesToOffset( _pos ); } int size() const { return _size; } int position() const { return _pos; } /// Calculates an offset into a frames-value depending on the files settings (channels and bits) - int offsetToSamples( QIODevice::Offset ) const; - QIODevice::Offset samplesToOffset( int ) const; + int offsetToSamples( TQIODevice::Offset ) const; + TQIODevice::Offset samplesToOffset( int ) const; public slots: /// Creates a new empty buffer and marks it for recording. void newBuffer(); @@ -59,22 +59,22 @@ public slots: void deleteBuffer( KRecBuffer* =0 ); void writeData( Arts::mcopbyte* data, uint length ); - void writeData( QByteArray* ); - void writeData( QByteArray& ); + void writeData( TQByteArray* ); + void writeData( TQByteArray& ); - void save( const QString & ); - void exportwave( const QString & ); + void save( const TQString & ); + void exportwave( const TQString & ); - /// Fills a QByteArray with values from the specified Offset. - QByteArray* getData( int ); + /// Fills a TQByteArray with values from the specified Offset. + TQByteArray* getData( int ); - void getData( QByteArray& ); + void getData( TQByteArray& ); void newPos( int ); private slots: - void newPos( KRecBuffer*, QIODevice::Offset ); - void newSize( KRecBuffer*, QIODevice::Offset ); + void newPos( KRecBuffer*, TQIODevice::Offset ); + void newSize( KRecBuffer*, TQIODevice::Offset ); signals: /// Position signals void posChanged( int ); @@ -86,7 +86,7 @@ signals: void sNewBuffer( KRecBuffer* ); void sDeleteBuffer( KRecBuffer* ); - void filenameChanged( const QString & ); + void filenameChanged( const TQString & ); private: void saveProps(); void loadProps(); @@ -94,7 +94,7 @@ private: Creates a new buffer for a given file @param filename Name of the file */ - void newBuffer( const QString &filename ); + void newBuffer( const TQString &filename ); /** Adds buffer to the buffers. @param buffer The to be added buffer @@ -106,10 +106,10 @@ private: KRecBuffer* getTopBuffer_buffer( int ); bool _saved; - QString _filename; + TQString _filename; int _samplerate, _channels, _bits; int _currentBuffer; - QValueList _buffers; + TQValueList _buffers; KTempDir *_dir; KSimpleConfig *_config; int _pos, _size; @@ -123,16 +123,16 @@ class QFileInfo; class KConfig; class QDataStream; -class KRecBuffer : virtual public QObject { +class KRecBuffer : virtual public TQObject { Q_OBJECT public: - KRecBuffer( const QString &, int, bool, KRecFile*, const char* =0 ); + KRecBuffer( const TQString &, int, bool, KRecFile*, const char* =0 ); ~KRecBuffer(); // After how many samples in the File this Buffer starts... int startpos() const; - QIODevice::Offset size() const; + TQIODevice::Offset size() const; int sizeInSamples() const { return _krecfile->offsetToSamples( size() ); } /** @@ -148,37 +148,37 @@ public: @param config The configuration thats read @param dir The directory where the file is saved */ - static KRecBuffer* fromConfig( KConfig* config, QDir* dir, KRecFile* p, const char* n=0 ); + static KRecBuffer* fromConfig( KConfig* config, TQDir* dir, KRecFile* p, const char* n=0 ); - QString filename() const; + TQString filename() const; bool active() const; - QString title() const; - QString comment() const; + TQString title() const; + TQString comment() const; public slots: /// writes the data into the buffer void writeData( Arts::mcopbyte* data, uint length ); - void writeData( QByteArray* ); - void writeData( QByteArray& ); + void writeData( TQByteArray* ); + void writeData( TQByteArray& ); /// gets the data from the stream - void getData( QByteArray& ); + void getData( TQByteArray& ); - void setPos( QIODevice::Offset ); + void setPos( TQIODevice::Offset ); void setActive( bool ); void deleteBuffer(); - void setTitle( const QString & ); - void setComment( const QString & ); + void setTitle( const TQString & ); + void setComment( const TQString & ); /// Returns the sample at the specified position and channel. float getSample( int pos, int channel ); float* getsamples( int start, int end, int channel ); signals: - void posChanged( KRecBuffer*, QIODevice::Offset ); - void sizeChanged( KRecBuffer*, QIODevice::Offset ); + void posChanged( KRecBuffer*, TQIODevice::Offset ); + void sizeChanged( KRecBuffer*, TQIODevice::Offset ); void activeChanged( bool ); /// Is emitted when something has changed. @@ -187,13 +187,13 @@ signals: void deleteSelf( KRecBuffer* ); private: KRecFile* _krecfile; - QFile* _file; - QDataStream* _stream; - QFileInfo* _fileinfo; + TQFile* _file; + TQDataStream* _stream; + TQFileInfo* _fileinfo; bool _open, _active; - QIODevice::Offset _pos; + TQIODevice::Offset _pos; int _start; - QString _title, _comment; + TQString _title, _comment; }; #endif diff --git a/krec/krecfileview.cpp b/krec/krecfileview.cpp index b3604412..42911620 100644 --- a/krec/krecfileview.cpp +++ b/krec/krecfileview.cpp @@ -21,24 +21,24 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include -KRecFileView::KRecFileView( QWidget* p, const char* n ) - : QWidget( p,n ) +KRecFileView::KRecFileView( TQWidget* p, const char* n ) + : TQWidget( p,n ) { kdDebug( 60005 ) << k_funcinfo << endl; - _layout_td = new QBoxLayout( this, QBoxLayout::TopToBottom, 5, 5 ); - _filename = new QLabel( i18n( "" ), this ); + _layout_td = new TQBoxLayout( this, TQBoxLayout::TopToBottom, 5, 5 ); + _filename = new TQLabel( i18n( "" ), this ); _layout_td->addWidget( _filename, 1 ); _fileview = new KRecFileWidget( 0, this ); _layout_td->addWidget( _fileview, 100 ); _timebar = new KRecTimeBar( this ); _layout_td->addWidget( _timebar, 50 ); - _layout_lr = new QBoxLayout( this, QBoxLayout::LeftToRight, 5, 5 ); + _layout_lr = new TQBoxLayout( this, TQBoxLayout::LeftToRight, 5, 5 ); _layout_td->addLayout( _layout_lr, 1 ); _layout_lr->addStretch( 20 ); _timedisplay = new KRecTimeDisplay( this ); @@ -57,15 +57,15 @@ kdDebug( 60005 ) << k_funcinfo << file << endl; if ( _file ) { if ( !_file->filename().isNull() ) setFilename( _file->filename() ); else _filename->setText( i18n( "file with no name" ) ); - connect( _file, SIGNAL( posChanged( int ) ), this, SLOT( setPos( int ) ) ); - connect( _file, SIGNAL( posChanged( int ) ), _timebar, SLOT( newPos( int ) ) ); - connect( _file, SIGNAL( posChanged( int ) ), _timedisplay, SLOT( newPos( int ) ) ); - connect( _file, SIGNAL( sizeChanged( int ) ), this, SLOT( setSize( int ) ) ); - connect( _file, SIGNAL( sizeChanged( int ) ), _timebar, SLOT( newSize( int ) ) ); - connect( _file, SIGNAL( sizeChanged( int ) ), _timedisplay, SLOT( newSize( int ) ) ); - connect( _file, SIGNAL( filenameChanged( const QString &) ), this, SLOT( setFilename( const QString &) ) ); - connect( _file, SIGNAL( filenameChanged( const QString &) ), _timedisplay, SLOT( newFilename( const QString &) ) ); - connect( _timebar, SIGNAL( sNewPos( int ) ), _file, SLOT( newPos( int ) ) ); + connect( _file, TQT_SIGNAL( posChanged( int ) ), this, TQT_SLOT( setPos( int ) ) ); + connect( _file, TQT_SIGNAL( posChanged( int ) ), _timebar, TQT_SLOT( newPos( int ) ) ); + connect( _file, TQT_SIGNAL( posChanged( int ) ), _timedisplay, TQT_SLOT( newPos( int ) ) ); + connect( _file, TQT_SIGNAL( sizeChanged( int ) ), this, TQT_SLOT( setSize( int ) ) ); + connect( _file, TQT_SIGNAL( sizeChanged( int ) ), _timebar, TQT_SLOT( newSize( int ) ) ); + connect( _file, TQT_SIGNAL( sizeChanged( int ) ), _timedisplay, TQT_SLOT( newSize( int ) ) ); + connect( _file, TQT_SIGNAL( filenameChanged( const TQString &) ), this, TQT_SLOT( setFilename( const TQString &) ) ); + connect( _file, TQT_SIGNAL( filenameChanged( const TQString &) ), _timedisplay, TQT_SLOT( newFilename( const TQString &) ) ); + connect( _timebar, TQT_SIGNAL( sNewPos( int ) ), _file, TQT_SLOT( newPos( int ) ) ); _timebar->newPos( _file->position() ); _timebar->newSize( _file->size() ); _timedisplay->newSamplingRate( _file->samplerate() ); @@ -75,9 +75,9 @@ kdDebug( 60005 ) << k_funcinfo << file << endl; _timedisplay->newPos( _file->position() ); _timedisplay->newSize( _file->size() ); } else { - disconnect( this, SLOT( setPos( QIODevice::Offset ) ) ); + disconnect( this, TQT_SLOT( setPos( TQIODevice::Offset ) ) ); _filename->setText( i18n( "" ) ); - _timedisplay->newFilename( QString::null ); + _timedisplay->newFilename( TQString::null ); } } } @@ -85,5 +85,5 @@ kdDebug( 60005 ) << k_funcinfo << file << endl; void KRecFileView::updateGUI() { _fileview->resizeEvent(); } void KRecFileView::setPos( int ) {} void KRecFileView::setSize( int ) {} -void KRecFileView::setFilename( const QString &n ) { _filename->setText( n );} +void KRecFileView::setFilename( const TQString &n ) { _filename->setText( n );} diff --git a/krec/krecfileview.h b/krec/krecfileview.h index a445316f..42cf7c12 100644 --- a/krec/krecfileview.h +++ b/krec/krecfileview.h @@ -14,7 +14,7 @@ #ifndef KRECFILEVIEW_H #define KRECFILEVIEW_H -#include +#include class KRecFile; class KRecBuffer; @@ -27,10 +27,10 @@ class KRecBufferWidget; class KRecTimeBar; class KRecTimeDisplay; -class KRecFileView : virtual public QWidget { +class KRecFileView : virtual public TQWidget { Q_OBJECT public: - KRecFileView( QWidget*, const char* =0 ); + KRecFileView( TQWidget*, const char* =0 ); ~KRecFileView(); void setFile( KRecFile* ); @@ -40,10 +40,10 @@ public slots: private slots: void setPos( int ); void setSize( int ); - void setFilename( const QString & ); + void setFilename( const TQString & ); private: - QBoxLayout *_layout_td, *_layout_lr; - QLabel *_filename; + TQBoxLayout *_layout_td, *_layout_lr; + TQLabel *_filename; KRecFile *_file; KRecFileWidget *_fileview; diff --git a/krec/krecfileviewhelpers.cpp b/krec/krecfileviewhelpers.cpp index 8025f576..a064dfea 100644 --- a/krec/krecfileviewhelpers.cpp +++ b/krec/krecfileviewhelpers.cpp @@ -18,19 +18,19 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include -KRecTimeBar::KRecTimeBar( QWidget* p, const char* n ) : QFrame( p,n ) +KRecTimeBar::KRecTimeBar( TQWidget* p, const char* n ) : TQFrame( p,n ) ,_size(10), _pos(0) { //kdDebug( 60005 ) << k_funcinfo << endl; setMinimumSize( 10,10 ); - setFrameStyle( QFrame::Panel|QFrame::Plain ); + setFrameStyle( TQFrame::Panel|TQFrame::Plain ); setLineWidth( 1 ); } @@ -38,24 +38,24 @@ KRecTimeBar::~KRecTimeBar() { //kdDebug( 60005 ) << k_funcinfo << endl; } -void KRecTimeBar::drawContents( QPainter* p ) { +void KRecTimeBar::drawContents( TQPainter* p ) { int w = contentsRect().width(); int h = contentsRect().height(); int t = contentsRect().top(); int l = contentsRect().left(); - p->setPen( QColor( 255,0,0 ) ); + p->setPen( TQColor( 255,0,0 ) ); if ( _pos < _size ) { int x = int( l + w * float( _pos ) / _size ); p->drawLine( x, t, x, int( t+h/2 ) ); } else { - QPointArray tmp; + TQPointArray tmp; tmp.putPoints( 0, 4, l+w-3,t+h/4, l+w-3,t+h/4*3, l+w,t+h/2, l+w-3,t+h/4 ); p->drawPolyline( tmp ); } } -void KRecTimeBar::mouseReleaseEvent( QMouseEvent* qme ) { - QIODevice::Offset pos = 0; +void KRecTimeBar::mouseReleaseEvent( TQMouseEvent* qme ) { + TQIODevice::Offset pos = 0; if ( _size > 0 ) pos = int( float( qme->x() - contentsRect().left() ) / contentsRect().width() * _size ); //kdDebug( 60005 ) << k_funcinfo << "New Position: " << pos << endl; @@ -73,18 +73,18 @@ void KRecTimeBar::newSize( int n ) { } -KRecTimeDisplay::KRecTimeDisplay( QWidget* p, const char* n ) - : QFrame( p,n ) +KRecTimeDisplay::KRecTimeDisplay( TQWidget* p, const char* n ) + : TQFrame( p,n ) , _posmenu( 0 ), _sizemenu( 0 ) , _sizevalue( 0 ), _posvalue( 0 ) , _samplingRate( 44100 ), _bits( 16 ), _channels( 2 ) { _position = new AKLabel( this ); - connect( _position, SIGNAL( showContextMenu( const QPoint & ) ), this, SLOT( timeContextMenu( const QPoint &) ) ); + connect( _position, TQT_SIGNAL( showContextMenu( const TQPoint & ) ), this, TQT_SLOT( timeContextMenu( const TQPoint &) ) ); _size = new AKLabel( this ); - connect( _size, SIGNAL( showContextMenu( const QPoint &) ), this, SLOT( sizeContextMenu( const QPoint &) ) ); + connect( _size, TQT_SIGNAL( showContextMenu( const TQPoint &) ), this, TQT_SLOT( sizeContextMenu( const TQPoint &) ) ); - _layout = new QBoxLayout( this, QBoxLayout::LeftToRight, 0, 2 ); + _layout = new TQBoxLayout( this, TQBoxLayout::LeftToRight, 0, 2 ); _layout->addStretch( 100 ); _layout->addWidget( _position ); _layout->addSpacing( 2 ); @@ -98,10 +98,10 @@ KRecTimeDisplay::~KRecTimeDisplay() { void KRecTimeDisplay::reset() { _position->setText( positionText( 0, 0 ) ); _size->setText( sizeText( 0, 0 ) ); - _position->setFrameStyle( QFrame::Panel|QFrame::Sunken ); + _position->setFrameStyle( TQFrame::Panel|TQFrame::Sunken ); _position->setLineWidth( 1 ); _position->setMargin( 2 ); - _size->setFrameStyle( QFrame::Panel|QFrame::Sunken ); + _size->setFrameStyle( TQFrame::Panel|TQFrame::Sunken ); _size->setLineWidth( 1 ); _size->setMargin( 2 ); } @@ -119,7 +119,7 @@ void KRecTimeDisplay::newSize( int n ) { _sizevalue = n; _size->setText( sizeText( KRecGlobal::the()->timeFormatMode(), n ) ); } -void KRecTimeDisplay::newFilename( const QString &n ) { +void KRecTimeDisplay::newFilename( const TQString &n ) { _filename = n; if ( _filename.isNull() ) { newPos( 0 ); @@ -127,8 +127,8 @@ void KRecTimeDisplay::newFilename( const QString &n ) { } } -QString KRecTimeDisplay::formatTime( const int mode, const int sample ) const { - QString text; +TQString KRecTimeDisplay::formatTime( const int mode, const int sample ) const { + TQString text; bool verbose = mode / 100; switch ( mode % 100 ) { case 3: @@ -137,13 +137,13 @@ QString KRecTimeDisplay::formatTime( const int mode, const int sample ) const { int kbyte = bytes % 1024; bytes /= 1024; int mbyte = bytes % 1024; - text += QString::number( mbyte ); + text += TQString::number( mbyte ); if ( verbose ) text += i18n( "MB" ); text += "."; if ( kbyte < 1000 ) text += "0"; if ( kbyte < 100 ) text += "0"; if ( kbyte < 10 ) text += "0"; - text += QString::number( kbyte ); + text += TQString::number( kbyte ); if ( verbose ) text += i18n( "kB" ); } break; @@ -157,20 +157,20 @@ QString KRecTimeDisplay::formatTime( const int mode, const int sample ) const { int mins = value % 60; value = value / 60; if ( value ) { - text += QString::number( value ); + text += TQString::number( value ); if ( verbose ) text += i18n( "hours" ); text += ":"; } if ( mins<10 ) text += "0"; - text += QString::number( mins ); + text += TQString::number( mins ); if ( verbose ) text += i18n( "mins" ); text += ":"; if ( secs<10 ) text += "0"; - text += QString::number( secs ); + text += TQString::number( secs ); if ( verbose ) text += i18n( "secs" ); text += "."; if ( frames < 10 ) text += "0"; - text += QString::number( frames ); + text += TQString::number( frames ); if ( verbose ) text += i18n( "frames" ); } break; @@ -184,36 +184,36 @@ QString KRecTimeDisplay::formatTime( const int mode, const int sample ) const { int mins = value % 60; value = value / 60; if ( value ) { - text += QString::number( value ); + text += TQString::number( value ); if ( verbose ) text += i18n( "hours" ); text += ":"; } if ( mins<10 ) text += "0"; - text += QString::number( mins ); + text += TQString::number( mins ); if ( verbose ) text += i18n( "mins" ); text += ":"; if ( secs<10 ) text += "0"; - text += QString::number( secs ); + text += TQString::number( secs ); if ( verbose ) text += i18n( "secs" ); text += "."; if ( samples < 10000 && ( _samplingRate / 60 > 10000 ) ) text += "0"; if ( samples < 1000 ) text += "0"; if ( samples < 100 ) text += "0"; if ( samples < 10 ) text += "0"; - text += QString::number( samples ); + text += TQString::number( samples ); if ( verbose ) text += i18n( "samples" ); } break; case 0: default: - text = QString::number( sample ); + text = TQString::number( sample ); if ( verbose ) text += i18n( "samples" ); break; }; return text; } -void KRecTimeDisplay::timeContextMenu( QPopupMenu* menu ) { +void KRecTimeDisplay::timeContextMenu( TQPopupMenu* menu ) { if ( !_filename.isNull() ) { menu->insertSeparator( 0 ); menu->insertItem( i18n( "kByte: %1" ).arg( formatTime( 3, _posvalue ) ), -1, 0 ); @@ -226,13 +226,13 @@ void KRecTimeDisplay::timeContextMenu( QPopupMenu* menu ) { } else menu->insertItem( i18n( "" ), -1, 0 ); } -void KRecTimeDisplay::timeContextMenu( const QPoint &point ) { +void KRecTimeDisplay::timeContextMenu( const TQPoint &point ) { if ( _posmenu ) delete _posmenu; _posmenu = new KPopupMenu( this ); timeContextMenu( _posmenu ); _posmenu->exec( point ); } -void KRecTimeDisplay::sizeContextMenu( QPopupMenu* menu ) { +void KRecTimeDisplay::sizeContextMenu( TQPopupMenu* menu ) { if ( !_filename.isNull() ) { menu->insertSeparator( 0 ); menu->insertItem( i18n( "kByte: %1" ).arg( formatTime( 3, _sizevalue ) ), -1, 0 ); @@ -245,7 +245,7 @@ void KRecTimeDisplay::sizeContextMenu( QPopupMenu* menu ) { } else menu->insertItem( i18n( "" ), -1, 0 ); } -void KRecTimeDisplay::sizeContextMenu( const QPoint &point ) { +void KRecTimeDisplay::sizeContextMenu( const TQPoint &point ) { if ( _sizemenu ) delete _sizemenu; _sizemenu = new KPopupMenu( this ); sizeContextMenu( _sizemenu ); @@ -254,14 +254,14 @@ void KRecTimeDisplay::sizeContextMenu( const QPoint &point ) { void KRecTimeDisplay::jumpToTime() { } -QString KRecTimeDisplay::positionText( int m, int n ) { +TQString KRecTimeDisplay::positionText( int m, int n ) { return i18n( "Position: %1" ).arg( formatTime( m,n ) ); } -QString KRecTimeDisplay::sizeText( int m, int n ) { +TQString KRecTimeDisplay::sizeText( int m, int n ) { return i18n( "Size: %1" ).arg( formatTime( m,n ) ); } -void AKLabel::mousePressEvent( QMouseEvent* qme ) { +void AKLabel::mousePressEvent( TQMouseEvent* qme ) { if ( qme->button() == Qt::RightButton ) emit showContextMenu( qme->globalPos() ); } diff --git a/krec/krecfileviewhelpers.h b/krec/krecfileviewhelpers.h index 71881f1e..db53d911 100644 --- a/krec/krecfileviewhelpers.h +++ b/krec/krecfileviewhelpers.h @@ -14,10 +14,10 @@ #ifndef KRECFILEVIEWHELPERS_H #define KRECFILEVIEWHELPERS_H -#include -#include -#include -#include +#include +#include +#include +#include #include class QBoxLayout; @@ -25,15 +25,15 @@ class AKLabel; class QPopupMenu; class KPopupMenu; -class KRecTimeBar : public QFrame { +class KRecTimeBar : public TQFrame { Q_OBJECT public: - KRecTimeBar( QWidget*, const char* =0 ); + KRecTimeBar( TQWidget*, const char* =0 ); ~KRecTimeBar(); - void drawContents( QPainter* ); + void drawContents( TQPainter* ); - void mouseReleaseEvent( QMouseEvent* ); + void mouseReleaseEvent( TQMouseEvent* ); public slots: void newPos( int ); @@ -54,10 +54,10 @@ private: * +100 - verbose ( [XXhours:]XXmins:XXsecs:... ) */ -class KRecTimeDisplay : public QFrame { +class KRecTimeDisplay : public TQFrame { Q_OBJECT public: - KRecTimeDisplay( QWidget*, const char* =0 ); + KRecTimeDisplay( TQWidget*, const char* =0 ); ~KRecTimeDisplay(); /// Resets the display to its defaultvalues @@ -65,24 +65,24 @@ public: public slots: void newPos( int ); void newSize( int ); - void newFilename( const QString & ); + void newFilename( const TQString & ); void newSamplingRate( int n ) { _samplingRate = n; } void newChannels( int n ) { _channels = n; } void newBits( int n ) { _bits = n; } signals: void sNewPos( int ); private slots: - void timeContextMenu( QPopupMenu* ); - void timeContextMenu( const QPoint &); - void sizeContextMenu( QPopupMenu* ); - void sizeContextMenu( const QPoint &); + void timeContextMenu( TQPopupMenu* ); + void timeContextMenu( const TQPoint &); + void sizeContextMenu( TQPopupMenu* ); + void sizeContextMenu( const TQPoint &); void jumpToTime(); private: - QString positionText( int, int ); - QString sizeText( int, int ); - QString formatTime( const int mode, const int samples ) const; - QString _filename; - QBoxLayout *_layout; + TQString positionText( int, int ); + TQString sizeText( int, int ); + TQString formatTime( const int mode, const int samples ) const; + TQString _filename; + TQBoxLayout *_layout; AKLabel *_position, *_size; KPopupMenu *_posmenu, *_sizemenu; int _sizevalue, _posvalue; @@ -90,16 +90,16 @@ private: }; -class AKLabel : public QLabel { +class AKLabel : public TQLabel { Q_OBJECT public: - AKLabel( QWidget* p, const char* n=0, WFlags f=0 ) : QLabel( p, n, f ) { init(); } - AKLabel( const QString& s, QWidget* p, const char* n=0, WFlags f=0 ) : QLabel( s, p, n, f ) { init(); } - AKLabel( QWidget* w, const QString& s, QWidget* p, const char* n=0, WFlags f=0 ) : QLabel( w,s,p,n,f ) { init(); } + AKLabel( TQWidget* p, const char* n=0, WFlags f=0 ) : TQLabel( p, n, f ) { init(); } + AKLabel( const TQString& s, TQWidget* p, const char* n=0, WFlags f=0 ) : TQLabel( s, p, n, f ) { init(); } + AKLabel( TQWidget* w, const TQString& s, TQWidget* p, const char* n=0, WFlags f=0 ) : TQLabel( w,s,p,n,f ) { init(); } - void mousePressEvent( QMouseEvent* ); + void mousePressEvent( TQMouseEvent* ); signals: - void showContextMenu( const QPoint & ); + void showContextMenu( const TQPoint & ); private: void init() { setFont( KGlobalSettings::fixedFont() ); diff --git a/krec/krecfilewidgets.cpp b/krec/krecfilewidgets.cpp index 44fd6a4e..16f2db93 100644 --- a/krec/krecfilewidgets.cpp +++ b/krec/krecfilewidgets.cpp @@ -19,26 +19,26 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include -KRecFileWidget::KRecFileWidget( KRecFile* file, QWidget* p, const char* n ) - : QFrame( p,n ) +KRecFileWidget::KRecFileWidget( KRecFile* file, TQWidget* p, const char* n ) + : TQFrame( p,n ) , _file( 0 ) { kdDebug( 60005 ) << k_funcinfo << file << endl; - setFrameStyle( QFrame::Panel|QFrame::Sunken ); + setFrameStyle( TQFrame::Panel|TQFrame::Sunken ); setLineWidth( 1 ); setMinimumHeight( 20 ); @@ -53,7 +53,7 @@ kdDebug( 60005 ) << k_funcinfo << file << endl; if ( _file != file ) { _file = file; //kdDebug( 60005 ) << "Removing widgets" << endl; - QValueList::iterator it = bufferwidgets.begin(); + TQValueList::iterator it = bufferwidgets.begin(); while ( it != bufferwidgets.end() ) { delete ( *it ); ++it; @@ -61,22 +61,22 @@ kdDebug( 60005 ) << k_funcinfo << file << endl; bufferwidgets.clear(); resizeEvent(); if ( _file ) { - for ( QValueList::iterator it = _file->_buffers.begin(); it != _file->_buffers.end(); ++it ) { + for ( TQValueList::iterator it = _file->_buffers.begin(); it != _file->_buffers.end(); ++it ) { newBuffer( ( *it ) ); } - connect( _file, SIGNAL( sNewBuffer( KRecBuffer* ) ), this, SLOT( newBuffer( KRecBuffer* ) ) ); - connect( _file, SIGNAL( sDeleteBuffer( KRecBuffer* ) ), this, SLOT( deleteBuffer( KRecBuffer* ) ) ); + connect( _file, TQT_SIGNAL( sNewBuffer( KRecBuffer* ) ), this, TQT_SLOT( newBuffer( KRecBuffer* ) ) ); + connect( _file, TQT_SIGNAL( sDeleteBuffer( KRecBuffer* ) ), this, TQT_SLOT( deleteBuffer( KRecBuffer* ) ) ); //kdDebug( 60005 ) << _file->_currentBuffer << endl; } } } -void KRecFileWidget::resizeEvent( QResizeEvent* /*qre*/ ) { +void KRecFileWidget::resizeEvent( TQResizeEvent* /*qre*/ ) { //kdDebug( 60005 ) << k_funcinfo << endl; if ( _file ) { int w = contentsRect().width(); int h = contentsRect().height(); - QValueList::iterator it; + TQValueList::iterator it; for ( it = bufferwidgets.begin(); it != bufferwidgets.end(); ++it ) { int width, x; if ( !_file->offsetSize()==0 && !( *it )->buffer()->size()==0 ) { @@ -91,21 +91,21 @@ void KRecFileWidget::resizeEvent( QResizeEvent* /*qre*/ ) { } } -void KRecFileWidget::mouseReleaseEvent( QMouseEvent* qme ) { +void KRecFileWidget::mouseReleaseEvent( TQMouseEvent* qme ) { kdDebug( 60005 ) << k_funcinfo << "(" << qme->x() << "|" << qme->y() << ")" << endl; } void KRecFileWidget::newBuffer( KRecBuffer* buffer ) { //kdDebug( 60005 ) << k_funcinfo << buffer << endl; KRecBufferWidget *tmp = new KRecBufferWidget( buffer, this ); - connect( tmp, SIGNAL( popupMenu( KRecBufferWidget*, QPoint ) ), this, SLOT( popupMenu( KRecBufferWidget*, QPoint ) ) ); + connect( tmp, TQT_SIGNAL( popupMenu( KRecBufferWidget*, TQPoint ) ), this, TQT_SLOT( popupMenu( KRecBufferWidget*, TQPoint ) ) ); bufferwidgets.append( tmp ); tmp->show(); resizeEvent(); } void KRecFileWidget::deleteBuffer( KRecBuffer* buffer ) { //kdDebug( 60005 ) << k_funcinfo << buffer << endl; - QValueList::iterator it = bufferwidgets.begin(); + TQValueList::iterator it = bufferwidgets.begin(); KRecBufferWidget* tmp = 0; while ( it != bufferwidgets.end() ) { if ( ( *it )->buffer() == buffer ) tmp = ( *it ); @@ -117,14 +117,14 @@ void KRecFileWidget::deleteBuffer( KRecBuffer* buffer ) { } } -void KRecFileWidget::popupMenu( KRecBufferWidget* bw, QPoint pos ) { +void KRecFileWidget::popupMenu( KRecBufferWidget* bw, TQPoint pos ) { KPopupMenu tmp( this ); KToggleAction* _activeaction = new KToggleAction( i18n( "Toggle Active/Disabled State" ), KShortcut(), this ); _activeaction->setChecked( bw->buffer()->active() ); - connect( _activeaction, SIGNAL( toggled( bool ) ), bw->buffer(), SLOT( setActive( bool ) ) ); - KAction* _removeaction = new KAction( i18n( "Remove This Part" ), "fileremove", KShortcut(), bw->buffer(), SLOT( deleteBuffer() ), this ); - KAction* _changetitle = new KAction( i18n( "Change Title of This Part" ), KShortcut(), bw, SLOT( changeTitle() ), this ); - KAction* _changecomment = new KAction( i18n( "Change Comment of This Part" ), KShortcut(), bw, SLOT( changeComment() ), this ); + connect( _activeaction, TQT_SIGNAL( toggled( bool ) ), bw->buffer(), TQT_SLOT( setActive( bool ) ) ); + KAction* _removeaction = new KAction( i18n( "Remove This Part" ), "fileremove", KShortcut(), bw->buffer(), TQT_SLOT( deleteBuffer() ), this ); + KAction* _changetitle = new KAction( i18n( "Change Title of This Part" ), KShortcut(), bw, TQT_SLOT( changeTitle() ), this ); + KAction* _changecomment = new KAction( i18n( "Change Comment of This Part" ), KShortcut(), bw, TQT_SLOT( changeComment() ), this ); _activeaction->plug( &tmp ); _changetitle->plug( &tmp ); _changecomment->plug( &tmp ); @@ -141,20 +141,20 @@ void KRecFileWidget::popupMenu( KRecBufferWidget* bw, QPoint pos ) { -KRecBufferWidget::KRecBufferWidget( KRecBuffer* buffer, QWidget* p, const char* n ) - : QFrame( p,n ) +KRecBufferWidget::KRecBufferWidget( KRecBuffer* buffer, TQWidget* p, const char* n ) + : TQFrame( p,n ) , _buffer( buffer ) , _main_region( 0 ), _title_region( 0 ), _fileend_region( 0 ) , alreadyreadsize( 0 ) { - connect( _buffer, SIGNAL( somethingChanged() ), this, SLOT( update() ) ); + connect( _buffer, TQT_SIGNAL( somethingChanged() ), this, TQT_SLOT( update() ) ); kdDebug( 60005 ) << k_funcinfo << endl; } KRecBufferWidget::~KRecBufferWidget() { kdDebug( 60005 ) << k_funcinfo << endl; } -void KRecBufferWidget::resizeEvent( QResizeEvent* ) { +void KRecBufferWidget::resizeEvent( TQResizeEvent* ) { //kdDebug( 60005 ) << k_funcinfo << endl; } @@ -164,17 +164,17 @@ void KRecBufferWidget::initLayout() { int _title_width = fontMetrics().boundingRect( _buffer->filename() ).width() + 10; if ( _title_width > width() ) _title_width = width(); if ( _main_region ) delete _main_region; - _main_region = new QRegion( QRect( 0, _title_height, width(), height()-_title_height ) ); + _main_region = new TQRegion( TQRect( 0, _title_height, width(), height()-_title_height ) ); if ( _title_region ) delete _title_region; if ( _buffer->active() ) - _title_region = new QRegion( QRect( 0, 0, _title_width, _title_height ) ); + _title_region = new TQRegion( TQRect( 0, 0, _title_width, _title_height ) ); else - _title_region = new QRegion( QRect( 0, _title_height/2, _title_width, _title_height/2 ) ); + _title_region = new TQRegion( TQRect( 0, _title_height/2, _title_width, _title_height/2 ) ); if ( _fileend_region ) { delete _fileend_region; _fileend_region=0; } if ( _buffer->active() ) - _fileend_region = new QRegion( QRect( width()-4, _title_height/2, 4, _title_height/2 ) ); + _fileend_region = new TQRegion( TQRect( width()-4, _title_height/2, 4, _title_height/2 ) ); else - _fileend_region = new QRegion( QRect( width()-4, _title_height/4*3, 4, _title_height/4 ) ); + _fileend_region = new TQRegion( TQRect( width()-4, _title_height/4*3, 4, _title_height/4 ) ); setMask( _main_region->unite( *_title_region ).unite( *_fileend_region ) ); @@ -183,60 +183,60 @@ void KRecBufferWidget::initLayout() { _bottomright = _main_region->boundingRect().bottomRight(); _topright = _main_region->boundingRect().topRight(); _bottommiddle = _title_region->boundingRect().bottomRight(); - _bottommiddle += QPoint( 0, 1 ); + _bottommiddle += TQPoint( 0, 1 ); _topmiddle = _title_region->boundingRect().topRight(); } -void KRecBufferWidget::drawFrame( QPainter* p ) { +void KRecBufferWidget::drawFrame( TQPainter* p ) { //kdDebug( 60005 ) << k_funcinfo << endl; if ( _buffer->active() ) p->setBrush( colorGroup().highlight() ); else p->setBrush( colorGroup().highlight().dark() ); - p->setPen( QPen( colorGroup().dark(), 1 ) ); + p->setPen( TQPen( colorGroup().dark(), 1 ) ); p->drawRect( _title_region->boundingRect() ); p->drawRect( _fileend_region->boundingRect() ); - p->setBrush( QBrush() ); - p->setPen( QPen( colorGroup().dark(), 1 ) ); + p->setBrush( TQBrush() ); + p->setPen( TQPen( colorGroup().dark(), 1 ) ); p->drawRect( _main_region->boundingRect() ); - p->setPen( QPen( colorGroup().highlightedText() ) ); + p->setPen( TQPen( colorGroup().highlightedText() ) ); p->drawText( _title_region->boundingRect(), Qt::AlignCenter, _buffer->title() ); } -void KRecBufferWidget::drawContents( QPainter* p ) { +void KRecBufferWidget::drawContents( TQPainter* p ) { //kdDebug( 60005 ) << k_funcinfo << endl; initSamples(); int space = ( _main_region->boundingRect().height() - 2 ) / 2; int xoffset = _main_region->boundingRect().top() + space + 1; - p->setPen( QPen( QColor( 0,0,255 ) ) ); + p->setPen( TQPen( TQColor( 0,0,255 ) ) ); for ( uint i=0; idrawPoint( i, int( samples1[ i ]->getMax() * space + xoffset ) ); for ( uint i=0; idrawPoint( i, int( samples1[ i ]->getMin() * space + xoffset ) ); - p->setPen( QPen( QColor( 255,0,0 ) ) ); + p->setPen( TQPen( TQColor( 255,0,0 ) ) ); for ( uint i=0; idrawPoint( i, int( samples1[ i ]->getValue() * space + xoffset ) ); - p->setPen( QPen( QColor( 0,0,0 ) ) ); - QString comment = _buffer->comment(); + p->setPen( TQPen( TQColor( 0,0,0 ) ) ); + TQString comment = _buffer->comment(); if ( comment.isNull() ) comment = i18n( "Lots of Data" ); p->drawText( _main_region->boundingRect(), Qt::AlignCenter, comment ); } -void KRecBufferWidget::paintEvent( QPaintEvent* ) { +void KRecBufferWidget::paintEvent( TQPaintEvent* ) { initLayout(); - QPainter *p = new QPainter( this ); + TQPainter *p = new TQPainter( this ); drawFrame( p ); drawContents( p ); delete p; } -void KRecBufferWidget::mousePressEvent( QMouseEvent* qme ) { +void KRecBufferWidget::mousePressEvent( TQMouseEvent* qme ) { kdDebug( 60005 ) << k_funcinfo << endl; if ( _main_region->contains( qme->pos() ) || _title_region->contains( qme->pos() ) ) if ( qme->button() == Qt::RightButton ) emit popupMenu( this, qme->globalPos() ); } -void KRecBufferWidget::mouseDoubleClickEvent( QMouseEvent* qme ) { +void KRecBufferWidget::mouseDoubleClickEvent( TQMouseEvent* qme ) { if ( _title_region->contains( qme->pos() ) ) _buffer->setActive( !_buffer->active() ); } @@ -301,12 +301,12 @@ void KRecBufferWidget::initSamples() { void KRecBufferWidget::changeTitle() { - QString tmp = KInputDialog::getText( i18n( "New Title" ), i18n( "Enter new part title:" ), _buffer->title() ); + TQString tmp = KInputDialog::getText( i18n( "New Title" ), i18n( "Enter new part title:" ), _buffer->title() ); if ( !tmp.isNull() ) _buffer->setTitle( tmp ); } void KRecBufferWidget::changeComment() { - QString tmp = KInputDialog::getText( i18n( "New Comment" ), i18n( "Enter new part comment:" ), _buffer->comment() ); + TQString tmp = KInputDialog::getText( i18n( "New Comment" ), i18n( "Enter new part comment:" ), _buffer->comment() ); if ( !tmp.isNull() ) _buffer->setComment( tmp ); } diff --git a/krec/krecfilewidgets.h b/krec/krecfilewidgets.h index cca78907..fe389b16 100644 --- a/krec/krecfilewidgets.h +++ b/krec/krecfilewidgets.h @@ -14,9 +14,9 @@ #ifndef KRECFILEWIDGETS_H #define KRECFILEWIDGETS_H -#include -#include -#include +#include +#include +#include class KRecFile; class KRecBuffer; @@ -35,27 +35,27 @@ class QPainter; class KAction; class KToggleAction; -class KRecFileWidget : public QFrame { +class KRecFileWidget : public TQFrame { Q_OBJECT public: - KRecFileWidget( KRecFile*, QWidget*, const char* =0 ); + KRecFileWidget( KRecFile*, TQWidget*, const char* =0 ); ~KRecFileWidget(); void setFile( KRecFile* ); - void resizeEvent( QResizeEvent* =0 ); - void mouseReleaseEvent( QMouseEvent* ); + void resizeEvent( TQResizeEvent* =0 ); + void mouseReleaseEvent( TQMouseEvent* ); public slots: void newBuffer( KRecBuffer* ); void deleteBuffer( KRecBuffer* ); private slots: - void popupMenu( KRecBufferWidget*, QPoint ); + void popupMenu( KRecBufferWidget*, TQPoint ); private: KRecFile *_file; - QValueList bufferwidgets; + TQValueList bufferwidgets; }; -class Sample : public QObject { +class Sample : public TQObject { Q_OBJECT public: Sample() : _values( 0 ), _min( 0 ), _max( 0 ) {} @@ -73,24 +73,24 @@ private: int _count; }; -class KRecBufferWidget : public QFrame { +class KRecBufferWidget : public TQFrame { Q_OBJECT public: - KRecBufferWidget( KRecBuffer*, QWidget*, const char* =0 ); + KRecBufferWidget( KRecBuffer*, TQWidget*, const char* =0 ); ~KRecBufferWidget(); const KRecBuffer* buffer() { return _buffer; } - void resizeEvent( QResizeEvent* ); + void resizeEvent( TQResizeEvent* ); - void drawFrame( QPainter* ); - void drawContents( QPainter* ); - void paintEvent( QPaintEvent* ); + void drawFrame( TQPainter* ); + void drawContents( TQPainter* ); + void paintEvent( TQPaintEvent* ); - void mousePressEvent( QMouseEvent* ); - void mouseDoubleClickEvent( QMouseEvent* ); + void mousePressEvent( TQMouseEvent* ); + void mouseDoubleClickEvent( TQMouseEvent* ); signals: - void popupMenu( KRecBufferWidget*, QPoint ); + void popupMenu( KRecBufferWidget*, TQPoint ); private slots: void initSamples(); void changeTitle(); @@ -98,10 +98,10 @@ private slots: private: void initLayout(); KRecBuffer *_buffer; - QRegion *_main_region, *_title_region, *_fileend_region; - QPoint _topleft, _bottomleft, _bottomright, _topright, _topmiddle, _bottommiddle; + TQRegion *_main_region, *_title_region, *_fileend_region; + TQPoint _topleft, _bottomleft, _bottomright, _topright, _topmiddle, _bottommiddle; int _title_height; - QValueList samples1, samples2; + TQValueList samples1, samples2; uint alreadyreadsize; }; diff --git a/krec/krecglobal.cpp b/krec/krecglobal.cpp index 94683995..58822f50 100644 --- a/krec/krecglobal.cpp +++ b/krec/krecglobal.cpp @@ -17,26 +17,26 @@ #include "krecexport_template.h" #include -#include +#include #include #include #include #include -#include +#include #include #include -KRecGlobal::KRecGlobal( QObject* p, const char* n ) - : QObject( p,n ) +KRecGlobal::KRecGlobal( TQObject* p, const char* n ) + : TQObject( p,n ) , _qwidget( 0 ) , _statusbar( 0 ) , _timeformatcache( -1 ) , _framebasecache( -1 ) { //kdDebug( 60005 ) << k_funcinfo << endl; - _exports = new QDict; + _exports = new TQDict; } KRecGlobal::~KRecGlobal() { //kdDebug( 60005 ) << k_funcinfo << endl; @@ -48,13 +48,13 @@ KRecGlobal* KRecGlobal::the() { return object; } -void KRecGlobal::setMainWidget( QWidget* n ) { _qwidget = n; } -QWidget* KRecGlobal::mainWidget() { return _qwidget; } +void KRecGlobal::setMainWidget( TQWidget* n ) { _qwidget = n; } +TQWidget* KRecGlobal::mainWidget() { return _qwidget; } KConfig* KRecGlobal::kconfig() { return kapp->config(); } void KRecGlobal::setStatusBar( KStatusBar *bar ) { _statusbar = bar; } -void KRecGlobal::message( const QString &text ) { if ( _statusbar ) _statusbar->message( text, 2000 ); } +void KRecGlobal::message( const TQString &text ) { if ( _statusbar ) _statusbar->message( text, 2000 ); } bool KRecGlobal::registerExport( KRecExportItem* item ) { //kdDebug( 60005 ) << k_funcinfo << "About to register ExportItem for \"" << item->exportFormat() << "\" extensions:\"" << item->extensions() << "\"" << endl; @@ -65,17 +65,17 @@ bool KRecGlobal::registerExport( KRecExportItem* item ) { return true; } -KRecExportItem* KRecGlobal::getExportItem( const QString &exportFormat ) { +KRecExportItem* KRecGlobal::getExportItem( const TQString &exportFormat ) { KRecExportItem *tmp = _exports->find( exportFormat ); return tmp->newItem(); } -QStringList KRecGlobal::exportFormats() const { +TQStringList KRecGlobal::exportFormats() const { return _exportformats; } -QString KRecGlobal::exportFormatEndings() const { - QString out; +TQString KRecGlobal::exportFormatEndings() const { + TQString out; KTrader::OfferList offers = KTrader::self()->query( "KRec/exportplugin" ); KTrader::OfferList::iterator it = offers.begin(); @@ -88,7 +88,7 @@ QString KRecGlobal::exportFormatEndings() const { return out; } -KRecExportItem* KRecGlobal::getExportItemForEnding( const QString &ending ) { +KRecExportItem* KRecGlobal::getExportItemForEnding( const TQString &ending ) { KTrader::OfferList offers = KTrader::self()->query( "KRec/exportplugin" ); KTrader::OfferList::iterator it = offers.begin(); while ( it!=offers.end() ) { diff --git a/krec/krecglobal.h b/krec/krecglobal.h index 6955eb14..f29a786d 100644 --- a/krec/krecglobal.h +++ b/krec/krecglobal.h @@ -14,10 +14,10 @@ #ifndef KREC_GLOBAL_H #define KREC_GLOBAL_H -#include -#include -#include -#include +#include +#include +#include +#include class KConfig; class QWidget; @@ -25,10 +25,10 @@ class KStatusBar; class KRecExportItem; -class KRecGlobal : public QObject { +class KRecGlobal : public TQObject { Q_OBJECT private: - KRecGlobal( QObject* =0, const char* =0 ); + KRecGlobal( TQObject* =0, const char* =0 ); ~KRecGlobal(); public: @@ -41,13 +41,13 @@ public: /** * Sets the MainWidget. */ - void setMainWidget( QWidget* ); + void setMainWidget( TQWidget* ); /** * Returns a pointer to the mainwidget. * Usefull to display Messageboxes, etc correctly without beeing a - * QWidget or knowing about a parent QWidget. + * TQWidget or knowing about a parent TQWidget. */ - QWidget* mainWidget(); + TQWidget* mainWidget(); /// @return kapp->config() static KConfig* kconfig(); @@ -58,7 +58,7 @@ public: * Puts a message into the statusbar. * Usefull for showing messages without knowing about the Statusbar. */ - void message( const QString & ); + void message( const TQString & ); /// Registers a KRecExportItem static bool registerExport( KRecExportItem* ); @@ -66,13 +66,13 @@ public: * Returns a new KRecExportItem for the specified exportFormat. * If now Item can be found the return value is 0. */ - KRecExportItem* getExportItem( const QString &exportFormat ); + KRecExportItem* getExportItem( const TQString &exportFormat ); /// - KRecExportItem* getExportItemForEnding( const QString & ); + KRecExportItem* getExportItemForEnding( const TQString & ); /// Returns a list of exportFormats. - QStringList exportFormats() const; + TQStringList exportFormats() const; /// Returns a list of fileendings. - QString exportFormatEndings() const; + TQString exportFormatEndings() const; /** * Gets/Sets the actual mode for formating time values. @@ -85,10 +85,10 @@ public: int frameBase(); void setFrameBase( int ); private: - QWidget *_qwidget; + TQWidget *_qwidget; KStatusBar *_statusbar; - QDict *_exports; - QStringList _exportformats; + TQDict *_exports; + TQStringList _exportformats; int _timeformatcache, _framebasecache; }; diff --git a/krec/krecnewproperties.cpp b/krec/krecnewproperties.cpp index b63cd032..12d386ed 100644 --- a/krec/krecnewproperties.cpp +++ b/krec/krecnewproperties.cpp @@ -18,24 +18,24 @@ #include "krecconfig_fileswidget.h" #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include -KRecNewProperties::KRecNewProperties( QWidget* p, const char* n ) - : QDialog( p,n, 0, Qt::WType_Dialog|Qt::WStyle_Customize|Qt::WStyle_DialogBorder ) - , _filename( QString::null ) +KRecNewProperties::KRecNewProperties( TQWidget* p, const char* n ) + : TQDialog( p,n, 0, Qt::WType_Dialog|Qt::WStyle_Customize|Qt::WStyle_DialogBorder ) + , _filename( TQString::null ) , _samplerate( 44100 ), _channels( 2 ), _bits( 16 ) { kdDebug( 60005 ) << k_funcinfo << endl; @@ -46,10 +46,10 @@ kdDebug( 60005 ) << k_funcinfo << endl; _bits = config->readNumEntry( "Bits", 16 ); _usedefaults = config->readBoolEntry( "UseDefaults", false ); - _layout = new QVBoxLayout( this, 5, 5 ); + _layout = new TQVBoxLayout( this, 5, 5 ); - QLabel *captionlabel = new QLabel( this ); - QFont labelfont( captionlabel->font() ); + TQLabel *captionlabel = new TQLabel( this ); + TQFont labelfont( captionlabel->font() ); labelfont.setPointSize( labelfont.pointSize()*3/2 ); captionlabel->setFont( labelfont ); captionlabel->setText( i18n( "Properties for the new File" ) ); @@ -57,16 +57,16 @@ kdDebug( 60005 ) << k_funcinfo << endl; _layout->addWidget( captionlabel ); _filewidget = new KRecConfigFilesWidget( this ); - connect( _filewidget, SIGNAL( sRateChanged( int ) ), this, SLOT( ratechanged( int ) ) ); - connect( _filewidget, SIGNAL( sChannelsChanged( int ) ), this, SLOT( channelschanged( int ) ) ); - connect( _filewidget, SIGNAL( sBitsChanged( int ) ), this, SLOT( bitschanged( int ) ) ); - connect( _filewidget, SIGNAL( sUseDefaultsChanged( bool ) ), this, SLOT( usedefaultschanged( bool ) ) ); + connect( _filewidget, TQT_SIGNAL( sRateChanged( int ) ), this, TQT_SLOT( ratechanged( int ) ) ); + connect( _filewidget, TQT_SIGNAL( sChannelsChanged( int ) ), this, TQT_SLOT( channelschanged( int ) ) ); + connect( _filewidget, TQT_SIGNAL( sBitsChanged( int ) ), this, TQT_SLOT( bitschanged( int ) ) ); + connect( _filewidget, TQT_SIGNAL( sUseDefaultsChanged( bool ) ), this, TQT_SLOT( usedefaultschanged( bool ) ) ); - QWidget *_btnWidget = new QWidget( this ); - _layoutbuttons = new QHBoxLayout( _btnWidget ); + TQWidget *_btnWidget = new TQWidget( this ); + _layoutbuttons = new TQHBoxLayout( _btnWidget ); _layoutbuttons->addStretch( 100 ); _btnok = new KPushButton( KStdGuiItem::ok(), _btnWidget ); - connect( _btnok, SIGNAL( clicked() ), this, SLOT( accept() ) ); + connect( _btnok, TQT_SIGNAL( clicked() ), this, TQT_SLOT( accept() ) ); _layoutbuttons->addWidget( _btnok, 0 ); _layout->addWidget( new KSeparator( KSeparator::HLine, this ) ); @@ -74,13 +74,13 @@ kdDebug( 60005 ) << k_funcinfo << endl; _layout->addWidget( new KSeparator( KSeparator::HLine, this ) ); _layout->addWidget( _btnWidget ); - setSizePolicy( QSizePolicy::Maximum, QSizePolicy::Maximum ); + setSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Maximum ); } KRecNewProperties::~KRecNewProperties() { kdDebug( 60005 ) << k_funcinfo << endl; } -QString KRecNewProperties::filename() { return _filename; } +TQString KRecNewProperties::filename() { return _filename; } int KRecNewProperties::samplerate() { return _samplerate; } int KRecNewProperties::channels() { return _channels; } int KRecNewProperties::bits() { return _bits; } @@ -97,6 +97,6 @@ void KRecNewProperties::usedefaultschanged( bool n ) { void KRecNewProperties::done( int r ) { kdDebug( 60005 ) << k_funcinfo << endl; - QDialog::done( r ); + TQDialog::done( r ); } diff --git a/krec/krecnewproperties.h b/krec/krecnewproperties.h index f398033b..53996f13 100644 --- a/krec/krecnewproperties.h +++ b/krec/krecnewproperties.h @@ -14,7 +14,7 @@ #ifndef KREC_NEW_PROPERTIES_H #define KREC_NEW_PROPERTIES_H -#include +#include class KConfig; class QBoxLayout; @@ -26,13 +26,13 @@ class QVBox; class KRecConfigFilesWidget; -class KRecNewProperties : public QDialog { +class KRecNewProperties : public TQDialog { Q_OBJECT public: - KRecNewProperties( QWidget*, const char* =0 ); + KRecNewProperties( TQWidget*, const char* =0 ); ~KRecNewProperties(); - QString filename(); + TQString filename(); int samplerate(); int channels(); int bits(); @@ -45,13 +45,13 @@ private slots: void bitschanged( int ); void usedefaultschanged( bool ); private: - QString _filename; + TQString _filename; KRecConfigFilesWidget *_filewidget; int _samplerate, _channels, _bits; bool _usedefaults; - QBoxLayout *_layout, *_layoutbuttons; + TQBoxLayout *_layout, *_layoutbuttons; KPushButton *_btnok; }; diff --git a/krec/krecord.cpp b/krec/krecord.cpp index 72fbde7c..3bd18c72 100644 --- a/krec/krecord.cpp +++ b/krec/krecord.cpp @@ -32,13 +32,13 @@ #include #include #include -#include -#include +#include +#include #include #include KRecPrivate::KRecPrivate( KRecord* p, const char* n ) - : QObject( p,n ) + : TQObject( p,n ) , _confdlg( 0 ) , server( new KArtsServer( 0 ) ) , dispatcher( new KArtsDispatcher( 0 ) ) @@ -99,7 +99,7 @@ void KRecPrivate::openFile() { //kdDebug( 60005 ) << k_funcinfo << endl; if ( _currentFile ) closeFile(); if ( !_currentFile ) { - QString filename = KFileDialog::getOpenFileName( "", "*.krec", _impl ); + TQString filename = KFileDialog::getOpenFileName( "", "*.krec", _impl ); //kdDebug( 60005 ) << k_funcinfo << filename << endl; if ( !filename.isNull() ) pNewFile( new KRecFile( filename, this ) ); @@ -107,8 +107,8 @@ void KRecPrivate::openFile() { } void KRecPrivate::pNewFile( KRecFile* file ) { _currentFile = file; - connect( m_recStream, SIGNAL( data( QByteArray& ) ), _currentFile, SLOT( writeData( QByteArray& ) ) ); - connect( m_playStream, SIGNAL( requestData( QByteArray& ) ), _currentFile, SLOT( getData( QByteArray& ) ) ); + connect( m_recStream, TQT_SIGNAL( data( TQByteArray& ) ), _currentFile, TQT_SLOT( writeData( TQByteArray& ) ) ); + connect( m_playStream, TQT_SIGNAL( requestData( TQByteArray& ) ), _currentFile, TQT_SLOT( getData( TQByteArray& ) ) ); mainwidget->_fileview->setFile( _currentFile ); checkActions(); } @@ -119,16 +119,16 @@ void KRecPrivate::saveFile() { } void KRecPrivate::saveAsFile() { //kdDebug( 60005 ) << k_funcinfo << endl; - if ( _currentFile ) pSaveFile( QString::null ); + if ( _currentFile ) pSaveFile( TQString::null ); } -void KRecPrivate::pSaveFile( const QString &filename ) { +void KRecPrivate::pSaveFile( const TQString &filename ) { if ( !_currentFile ) return; if ( !filename.isNull() ) _currentFile->save( filename ); else { - QString userFilename = KFileDialog::getSaveFileName( "", "*.krec", _impl, i18n( "Save File As" ) ); + TQString userFilename = KFileDialog::getSaveFileName( "", "*.krec", _impl, i18n( "Save File As" ) ); if ( !userFilename.isNull() ) _currentFile->save( userFilename ); } @@ -138,7 +138,7 @@ bool KRecPrivate::closeFile() { //kdDebug( 60005 ) << k_funcinfo << endl; if ( _currentFile ) { if ( !_currentFile->saved() ) { - int choice = KMessageBox::questionYesNoCancel( _impl, i18n( "The document \"%1\" has been modified.\nDo you want to save it?" ).arg( _currentFile->filename() ), QString::null, KStdGuiItem::save(), KStdGuiItem::discard() ); + int choice = KMessageBox::questionYesNoCancel( _impl, i18n( "The document \"%1\" has been modified.\nDo you want to save it?" ).arg( _currentFile->filename() ), TQString::null, KStdGuiItem::save(), KStdGuiItem::discard() ); if ( choice == KMessageBox::Yes ) saveFile(); if ( choice == KMessageBox::Cancel ) return false; // go on if KMessageBox::No @@ -154,17 +154,17 @@ bool KRecPrivate::closeFile() { void KRecPrivate::exportFile() { kdDebug( 60005 ) << k_funcinfo << endl; if ( _currentFile ) { - QString filename = KFileDialog::getSaveFileName( "", KRecGlobal::the()->exportFormatEndings(), _impl, "Export File As" ); + TQString filename = KFileDialog::getSaveFileName( "", KRecGlobal::the()->exportFormatEndings(), _impl, "Export File As" ); if ( !filename.isNull() ) { int lastdot = filename.find( '.', -5 ); - QString ending = filename.right( filename.length()-lastdot-1 ); + TQString ending = filename.right( filename.length()-lastdot-1 ); _exportitem = KRecGlobal::the()->getExportItemForEnding( ending ); if ( _exportitem ) { _exportitem->initialize( _currentFile->samplerate(), _currentFile->bits(), _currentFile->channels() ); if ( _exportitem->initialize( filename ) ) { - connect( _exportitem, SIGNAL( getData( QByteArray& ) ), _currentFile, SLOT( getData( QByteArray& ) ) ); - connect( _currentFile, SIGNAL( endReached() ), _exportitem, SLOT( stop() ) ); - connect( _currentFile, SIGNAL( endReached() ), this, SLOT( endExportFile() ) ); + connect( _exportitem, TQT_SIGNAL( getData( TQByteArray& ) ), _currentFile, TQT_SLOT( getData( TQByteArray& ) ) ); + connect( _currentFile, TQT_SIGNAL( endReached() ), _exportitem, TQT_SLOT( stop() ) ); + connect( _currentFile, TQT_SIGNAL( endReached() ), this, TQT_SLOT( endExportFile() ) ); _exportitem->start(); } } else @@ -185,7 +185,7 @@ void KRecPrivate::exportFile() { } else KRecGlobal::the()->message( i18n( "There is nothing to export." ) ); checkActions(); } -void KRecPrivate::endExportFile() { QTimer::singleShot( 20, this, SLOT( endExportFile2() ) ); } +void KRecPrivate::endExportFile() { TQTimer::singleShot( 20, this, TQT_SLOT( endExportFile2() ) ); } void KRecPrivate::endExportFile2() { _exportitem->finalize(); disconnect( _currentFile, 0, _exportitem, 0 ); @@ -248,7 +248,7 @@ void KRecPrivate::toEnd() { } void KRecPrivate::forceTipOfDay() { - KTipDialog::showTip( _impl, QString::null, true ); + KTipDialog::showTip( _impl, TQString::null, true ); } void KRecPrivate::execaRtsControl() { @@ -264,12 +264,12 @@ void KRecPrivate::execKMix() { */ -KRecord::KRecord(QWidget *parent, const char *name ) +KRecord::KRecord(TQWidget *parent, const char *name ) : KMainWindow(parent,name) , d( new KRecPrivate( this ) ) { kdDebug( 60005 ) << k_funcinfo << endl; - //kdDebug( 60005 )<<"KRecord::KRecord( QWidget *"<setMainWidget( this ); KRecGlobal::the()->setStatusBar( statusBar() ); @@ -283,40 +283,40 @@ KRecord::KRecord(QWidget *parent, const char *name ) // * * * Actions * * * d->artsactions = new ArtsActions( d->server, actionCollection(), this ); - KStdAction::preferences( d, SLOT( showConfDialog() ), actionCollection() ); + KStdAction::preferences( d, TQT_SLOT( showConfDialog() ), actionCollection() ); - KStdAction::openNew( d, SLOT( newFile() ), actionCollection() ); - KStdAction::open( d, SLOT( openFile() ), actionCollection() ); - KStdAction::save( d, SLOT( saveFile() ), actionCollection() ); - KStdAction::saveAs( d, SLOT( saveAsFile() ), actionCollection() ); - KStdAction::close( d, SLOT( closeFile() ), actionCollection() ); - KStdAction::quit( this, SLOT( close() ), actionCollection() ); + KStdAction::openNew( d, TQT_SLOT( newFile() ), actionCollection() ); + KStdAction::open( d, TQT_SLOT( openFile() ), actionCollection() ); + KStdAction::save( d, TQT_SLOT( saveFile() ), actionCollection() ); + KStdAction::saveAs( d, TQT_SLOT( saveAsFile() ), actionCollection() ); + KStdAction::close( d, TQT_SLOT( closeFile() ), actionCollection() ); + KStdAction::quit( this, TQT_SLOT( close() ), actionCollection() ); - KStdAction::tipOfDay( d, SLOT( forceTipOfDay() ), actionCollection() ); + KStdAction::tipOfDay( d, TQT_SLOT( forceTipOfDay() ), actionCollection() ); d->aExportFile = new KAction( i18n( "Export..." ), KShortcut(), - d, SLOT( exportFile() ), actionCollection(), "export_file" ); + d, TQT_SLOT( exportFile() ), actionCollection(), "export_file" ); d->aRecord = new KAction( i18n( "&Record" ), KShortcut( Key_R ), - this, SLOT( startRec() ), actionCollection(), "player_record" ); + this, TQT_SLOT( startRec() ), actionCollection(), "player_record" ); d->aPlay = new KAction( i18n( "&Play" ), KShortcut( Key_P ), - this, SLOT( startPlay() ), actionCollection(), "player_play" ); + this, TQT_SLOT( startPlay() ), actionCollection(), "player_play" ); d->aStop = new KAction( i18n( "&Stop" ), KShortcut( Key_S ), - this, SLOT( stopRec() ), actionCollection(), "player_stop" ); + this, TQT_SLOT( stopRec() ), actionCollection(), "player_stop" ); d->aThru = new KToggleAction( i18n( "Play Through" ), KShortcut( CTRL + Key_P), actionCollection(), "play_thru" ); - connect( d->aThru, SIGNAL( toggled( bool ) ), d, SLOT( playthru( bool ) ) ); + connect( d->aThru, TQT_SIGNAL( toggled( bool ) ), d, TQT_SLOT( playthru( bool ) ) ); d->aBegin = new KAction( i18n( "Go to &Beginning" ), KShortcut( SHIFT + Key_Left ), - d, SLOT( toBegin() ), actionCollection(), "player_gobegin" ); + d, TQT_SLOT( toBegin() ), actionCollection(), "player_gobegin" ); d->aEnd = new KAction( i18n( "Go to &End" ), KShortcut( SHIFT + Key_Right ), - d, SLOT( toEnd() ), actionCollection(), "player_goend" ); + d, TQT_SLOT( toEnd() ), actionCollection(), "player_goend" ); ( void* ) d->artsactions->actionAudioManager(); d->aExecaRtsControl = new KAction( i18n( "Start aRts Control Tool" ), KShortcut(), - d, SLOT( execaRtsControl() ), actionCollection(), "exec_artscontrol" ); + d, TQT_SLOT( execaRtsControl() ), actionCollection(), "exec_artscontrol" ); d->aExecKMix = new KAction( i18n( "Start KMix" ), KShortcut(), - d, SLOT( execKMix() ), actionCollection(), "exec_kmix" ); + d, TQT_SLOT( execKMix() ), actionCollection(), "exec_kmix" ); // * * * GUI * * * // TODO Fix toolbar config so this line can just be setupGUI() diff --git a/krec/krecord.h b/krec/krecord.h index 3e127cc4..034f0557 100644 --- a/krec/krecord.h +++ b/krec/krecord.h @@ -33,7 +33,7 @@ class KRecord : public KMainWindow { Q_OBJECT public: /// Constructor - KRecord( QWidget* /*parent*/=0, const char* /*name*/=0 ); + KRecord( TQWidget* /*parent*/=0, const char* /*name*/=0 ); /// Destructor ~KRecord(); public slots: diff --git a/krec/krecord_private.h b/krec/krecord_private.h index 8c157f41..407f3f0a 100644 --- a/krec/krecord_private.h +++ b/krec/krecord_private.h @@ -15,7 +15,7 @@ #ifndef KRECORD_PRIVATE_H #define KRECORD_PRIVATE_H -#include +#include #include #include @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include "krecfileview.h" @@ -43,7 +43,7 @@ class KRecentFilesAction; namespace KSettings { class Dialog; } -class KRecPrivate : public QObject { +class KRecPrivate : public TQObject { Q_OBJECT public: /// Constructor @@ -97,7 +97,7 @@ public slots: void execKMix(); private: void pNewFile( KRecFile* ); - void pSaveFile( const QString &); + void pSaveFile( const TQString &); public: KAction *aRecord, *aPlay, *aStop, *aExportFile; KAction *aBegin, *aEnd; @@ -127,17 +127,17 @@ public: KRecExportItem *_exportitem; }; -class KRecMainWidget : public QWidget { +class KRecMainWidget : public TQWidget { Q_OBJECT public: - KRecMainWidget( QWidget* p, const char* n=0 ) : QWidget( p,n ) { - _layout = new QBoxLayout( this, QBoxLayout::LeftToRight, 2 ); + KRecMainWidget( TQWidget* p, const char* n=0 ) : TQWidget( p,n ) { + _layout = new TQBoxLayout( this, TQBoxLayout::LeftToRight, 2 ); _kaw_volumecontrol = new KArtsWidget( this ); _layout->addWidget( _kaw_volumecontrol, 0 ); _fileview = new KRecFileView( this ); _layout->addWidget( _fileview, 500 ); } - QBoxLayout *_layout; + TQBoxLayout *_layout; KArtsWidget *_kaw_volumecontrol; Arts::Widget _artswidget; KRecFileView *_fileview; diff --git a/krec/main.cpp b/krec/main.cpp index 6e752817..98ebddb6 100644 --- a/krec/main.cpp +++ b/krec/main.cpp @@ -22,7 +22,7 @@ #include "krecord.h" -#include +#include using namespace std; diff --git a/krec/mp3_export/krecexport_mp3.cpp b/krec/mp3_export/krecexport_mp3.cpp index 85418688..0c4e8dc8 100644 --- a/krec/mp3_export/krecexport_mp3.cpp +++ b/krec/mp3_export/krecexport_mp3.cpp @@ -18,12 +18,12 @@ #include #include -#include -#include +#include +#include #include #include #include -#include +#include #include #include #include @@ -44,7 +44,7 @@ K_EXPORT_COMPONENT_FACTORY( libkrecexport_mp3, KGenericFactory ) KRecExport_MP3 krecExportMP3( 0 ); -KRecExport_MP3::KRecExport_MP3( QObject* p, const char* n, const QStringList& ) +KRecExport_MP3::KRecExport_MP3( TQObject* p, const char* n, const TQStringList& ) : KRecExportItem( p,n ) , _file( 0 ) , error_occurred( false ) @@ -63,14 +63,14 @@ kdDebug( 60005 ) << k_funcinfo << endl; return new KRecExport_MP3( 0 ); } -QStringList KRecExport_MP3::extensions() { +TQStringList KRecExport_MP3::extensions() { //kdDebug( 60005 ) << k_funcinfo << endl; - QStringList tmp; + TQStringList tmp; tmp << "*.wav" << "*.WAV"; return tmp; } -bool KRecExport_MP3::initialize( const QString &filename ) { +bool KRecExport_MP3::initialize( const TQString &filename ) { kdDebug( 60005 ) << k_funcinfo << endl; if ( !_file && !( bits()!=16 && channels()!=2 && @@ -85,7 +85,7 @@ kdDebug( 60005 ) << k_funcinfo << endl; " configuration. Make use" \ " of the Control Center to configure these settings." ), i18n( "Quality Configuration" ), "qualityinfo_mp3" ); - _file = new QFile( filename ); + _file = new TQFile( filename ); if ( _file->open( IO_Raw|IO_WriteOnly ) ) { if ( ! init_done ) { gfp = lame_init(); @@ -115,7 +115,7 @@ bool KRecExport_MP3::process() { //kdDebug( 60005 ) << k_funcinfo << running << endl; if ( _file ) { if ( running() ) { - QByteArray bytearray( 4096 ); + TQByteArray bytearray( 4096 ); emit getData( bytearray ); int mp3bytes = lame_encode_buffer_interleaved( gfp, reinterpret_cast( bytearray.data() ), @@ -128,7 +128,7 @@ bool KRecExport_MP3::process() { i18n( lame_error[ code ] ) ); error_occurred = true; } - QTimer::singleShot( 10, this, SLOT( process() ) ); + TQTimer::singleShot( 10, this, TQT_SLOT( process() ) ); } return true; } else return false; diff --git a/krec/mp3_export/krecexport_mp3.h b/krec/mp3_export/krecexport_mp3.h index 8bf243b3..baa40914 100644 --- a/krec/mp3_export/krecexport_mp3.h +++ b/krec/mp3_export/krecexport_mp3.h @@ -24,20 +24,20 @@ class QFile; class KRecExport_MP3 : public KRecExportItem { Q_OBJECT public: - KRecExport_MP3( QObject*, const char* =0, const QStringList& =0 ); + KRecExport_MP3( TQObject*, const char* =0, const TQStringList& =0 ); ~KRecExport_MP3(); KRecExport_MP3* newItem(); - QStringList extensions(); - QString exportFormat() { return QString( "Wave" ); } + TQStringList extensions(); + TQString exportFormat() { return TQString( "Wave" ); } public slots: - bool initialize( const QString & ); + bool initialize( const TQString & ); bool process(); bool finalize(); private: - QFile* _file; + TQFile* _file; // Lame MP3 encoder void setLameParameters(); lame_global_flags *gfp; diff --git a/krec/ogg_export/krecexport_ogg.cpp b/krec/ogg_export/krecexport_ogg.cpp index 6a5d5735..e2b495dd 100644 --- a/krec/ogg_export/krecexport_ogg.cpp +++ b/krec/ogg_export/krecexport_ogg.cpp @@ -22,12 +22,12 @@ #include #include -#include -#include +#include +#include #include #include #include -#include +#include #include #include #include @@ -36,7 +36,7 @@ K_EXPORT_COMPONENT_FACTORY( libkrecexport_ogg, KGenericFactory ) KRecExport_OGG krecExportOGG( 0 ); -KRecExport_OGG::KRecExport_OGG( QObject* p, const char* n, const QStringList& ) +KRecExport_OGG::KRecExport_OGG( TQObject* p, const char* n, const TQStringList& ) : KRecExportItem( p,n ) , _file( 0 ) , init_done( false ) @@ -54,14 +54,14 @@ kdDebug( 60005 ) << k_funcinfo << endl; return new KRecExport_OGG( 0 ); } -QStringList KRecExport_OGG::extensions() { +TQStringList KRecExport_OGG::extensions() { //kdDebug( 60005 ) << k_funcinfo << endl; - QStringList tmp; + TQStringList tmp; tmp << "*.ogg" << "*.OGG"; return tmp; } -bool KRecExport_OGG::initialize( const QString &filename ) { +bool KRecExport_OGG::initialize( const TQString &filename ) { kdDebug( 60005 ) << k_funcinfo << endl; if ( !_file && !( samplingRate()!=44100 && bits()!=16 && channels()!=2 && @@ -76,7 +76,7 @@ kdDebug( 60005 ) << k_funcinfo << endl; " the corresponding section of the audiocd:/ configuration. Make use" \ " of the Control Center to configure these settings." ), i18n( "Quality Configuration" ), "qualityinfo_ogg" ); - _file = new QFile( filename ); + _file = new TQFile( filename ); if ( _file->open( IO_Raw|IO_WriteOnly ) ) { if ( ! init_done ) { setOggParameters(); @@ -95,7 +95,7 @@ kdDebug( 60005 ) << k_funcinfo << endl; vorbis_comment_add_tag ( &vc, const_cast( "kde-encoder" ), const_cast( "KRec" ) ); if ( write_vorbis_comments ) { - QDateTime dt = QDateTime::currentDateTime(); + TQDateTime dt = TQDateTime::currentDateTime(); vorbis_comment_add_tag ( &vc, const_cast( "title" ), const_cast( "" ) ); vorbis_comment_add_tag ( &vc, const_cast( "artist" ), @@ -132,7 +132,7 @@ bool KRecExport_OGG::process() { //kdDebug( 60005 ) << k_funcinfo << endl; if ( _file ) { if ( running() ) { - QByteArray bytearray( 4096 ); + TQByteArray bytearray( 4096 ); emit getData( bytearray ); float **buffer = vorbis_analysis_buffer( &vd, bytearray.size() >> 2 ); @@ -169,7 +169,7 @@ bool KRecExport_OGG::process() { } } } - QTimer::singleShot( 10, this, SLOT( process() ) ); + TQTimer::singleShot( 10, this, TQT_SLOT( process() ) ); } return true; } else return false; diff --git a/krec/ogg_export/krecexport_ogg.h b/krec/ogg_export/krecexport_ogg.h index 43b79d54..15c0337d 100644 --- a/krec/ogg_export/krecexport_ogg.h +++ b/krec/ogg_export/krecexport_ogg.h @@ -28,20 +28,20 @@ class QFile; class KRecExport_OGG : public KRecExportItem { Q_OBJECT public: - KRecExport_OGG( QObject*, const char* =0, const QStringList& =0 ); + KRecExport_OGG( TQObject*, const char* =0, const TQStringList& =0 ); ~KRecExport_OGG(); KRecExport_OGG* newItem(); - QStringList extensions(); - QString exportFormat() { return QString( "OGG-Vorbis" ); } + TQStringList extensions(); + TQString exportFormat() { return TQString( "OGG-Vorbis" ); } public slots: - bool initialize( const QString & ); + bool initialize( const TQString & ); bool process(); bool finalize(); private: - QFile* _file; + TQFile* _file; bool init_done; diff --git a/kscd/bwlednum.cpp b/kscd/bwlednum.cpp index a8f828cc..4bfb16b6 100644 --- a/kscd/bwlednum.cpp +++ b/kscd/bwlednum.cpp @@ -9,8 +9,8 @@ #include "bwlednum.h" -#include "qbitarray.h" -#include "qpainter.h" +#include "tqbitarray.h" +#include "tqpainter.h" #include #include "bwlednum.moc" @@ -36,11 +36,11 @@ static char segs[14][8] = {25, 0, 0, 0, 0, 0, 0, 0} }; // blank -BW_LED_Number::BW_LED_Number( QWidget *parent, const char *name ) - : QFrame( parent, name ){ +BW_LED_Number::BW_LED_Number( TQWidget *parent, const char *name ) + : TQFrame( parent, name ){ - offcolor = QColor(100,0,0); + offcolor = TQColor(100,0,0); showOffColon(FALSE); smallLED = false; current_symbol = ' '; @@ -64,11 +64,11 @@ BW_LED_Number::~BW_LED_Number(){ } -void BW_LED_Number::resizeEvent( QResizeEvent * ){ +void BW_LED_Number::resizeEvent( TQResizeEvent * ){ } -void BW_LED_Number::mouseReleaseEvent( QMouseEvent * /* e */ ) +void BW_LED_Number::mouseReleaseEvent( TQMouseEvent * /* e */ ) { emit(clicked()); } @@ -79,20 +79,20 @@ void BW_LED_Number::showOffColon(bool off){ } -void BW_LED_Number::setLEDColor( const QColor& fgColor, const QColor& bgColor ){ +void BW_LED_Number::setLEDColor( const TQColor& fgColor, const TQColor& bgColor ){ fgcolor = fgColor; bgcolor = bgColor; - QColorGroup old_cg = this->colorGroup(); + TQColorGroup old_cg = this->colorGroup(); - QColorGroup new_cg( fgColor, bgColor, + TQColorGroup new_cg( fgColor, bgColor, fgColor, fgColor, fgColor, fgColor, fgColor ); - this->setPalette(QPalette(new_cg, new_cg, new_cg)); + this->setPalette(TQPalette(new_cg, new_cg, new_cg)); } @@ -129,7 +129,7 @@ static char *getSegments( char s) return segs[j]; } -void BW_LED_Number::drawContents( QPainter *p ){ +void BW_LED_Number::drawContents( TQPainter *p ){ drawSymbol( p, current_symbol,TRUE ); @@ -147,7 +147,7 @@ void BW_LED_Number::display(int i ){ void BW_LED_Number::display(char s){ - QPainter p; + TQPainter p; p.begin( this ); @@ -168,11 +168,11 @@ void BW_LED_Number::setSmallLED(bool a_boolean){ } -void BW_LED_Number::drawSymbol( QPainter *p,char ,bool repaint ){ +void BW_LED_Number::drawSymbol( TQPainter *p,char ,bool repaint ){ // printf("drawSymbol repaint = %d\n",repaint); - QPoint pos; + TQPoint pos; int xSegment_Length, ySegment_Length, Segment_Length, xAdvance; int Xoffset, Yoffset, space; @@ -191,7 +191,7 @@ void BW_LED_Number::drawSymbol( QPainter *p,char ,bool repaint ){ Xoffset = ( width() - xAdvance + Segment_Length/4 )/2; Yoffset = ( height() - Segment_Length*2 )/2; - pos = QPoint( Xoffset , Yoffset ); + pos = TQPoint( Xoffset , Yoffset ); if(repaint){ @@ -266,19 +266,19 @@ bool BW_LED_Number::seg_contained_in( char c, char* seg){ return result; } -void BW_LED_Number::setLEDoffColor(QColor color){ +void BW_LED_Number::setLEDoffColor(TQColor color){ offcolor = color; } -void BW_LED_Number::drawSegment( const QPoint &pos, char seg_number, QPainter &p, +void BW_LED_Number::drawSegment( const TQPoint &pos, char seg_number, TQPainter &p, int Segment_Length, bool erase){ - QPoint pt = pos; - QColorGroup g = colorGroup(); - QColor lightColor,darkColor; + TQPoint pt = pos; + TQColorGroup g = colorGroup(); + TQColor lightColor,darkColor; if ( erase ){ lightColor = offcolor; @@ -293,8 +293,8 @@ void BW_LED_Number::drawSegment( const QPoint &pos, char seg_number, QPainter &p int Width = (int) Segment_Length/4; - QBrush brush(g.light()); - QPointArray pts; + TQBrush brush(g.light()); + TQPointArray pts; pt.ry() += (QCOORD)Width/2; diff --git a/kscd/bwlednum.h b/kscd/bwlednum.h index f3d66f8e..5652832f 100644 --- a/kscd/bwlednum.h +++ b/kscd/bwlednum.h @@ -13,8 +13,8 @@ #ifndef BW_LED_NUM_H #define BW_LED_NUM_H -#include "qframe.h" -#include "qbitarray.h" +#include "tqframe.h" +#include "tqbitarray.h" class BW_LED_Number : public QFrame @@ -23,7 +23,7 @@ class BW_LED_Number : public QFrame public: - BW_LED_Number( QWidget *parent=0, const char *name=0 ); + BW_LED_Number( TQWidget *parent=0, const char *name=0 ); ~BW_LED_Number(); void setSmallLED(bool ); // if you LED is small it might look better @@ -33,13 +33,13 @@ public: // the forground defaults to yellow, the background defaults // to black - void setLEDColor( const QColor& foregroundColor, const QColor& backgroundColor ); + void setLEDColor( const TQColor& foregroundColor, const TQColor& backgroundColor ); // this sets the color of the segments that are not iluminated // the default is a rather dark red. - void setLEDoffColor(QColor color); + void setLEDoffColor(TQColor color); // calling showOffColon(TRUE) will show the colon if not illuminated // this is rather ugly -- the default is that they are not shown. @@ -59,24 +59,24 @@ public slots: protected: - void resizeEvent( QResizeEvent * ); - void mouseReleaseEvent ( QMouseEvent * e ); - void drawContents( QPainter * ); + void resizeEvent( TQResizeEvent * ); + void mouseReleaseEvent ( TQMouseEvent * e ); + void drawContents( TQPainter * ); private: bool seg_contained_in( char c, char* seg); - void drawSegment( const QPoint &, char, QPainter &, int, bool = FALSE ); - void drawSymbol( QPainter *p,char s ,bool repaint); + void drawSegment( const TQPoint &, char, TQPainter &, int, bool = FALSE ); + void drawSymbol( TQPainter *p,char s ,bool repaint); char* old_segments; char* current_segments; char current_symbol; char old_symbol; - QColor offcolor; - QColor fgcolor; - QColor bgcolor; + TQColor offcolor; + TQColor fgcolor; + TQColor bgcolor; bool smallLED; diff --git a/kscd/cddbdlg.cpp b/kscd/cddbdlg.cpp index cc0e9669..e574ba92 100644 --- a/kscd/cddbdlg.cpp +++ b/kscd/cddbdlg.cpp @@ -2,12 +2,12 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -33,7 +33,7 @@ struct mytoc unsigned absframe; }; -CDDBDlg::CDDBDlg( QWidget* parent, const char* name ) +CDDBDlg::CDDBDlg( TQWidget* parent, const char* name ) : KDialogBase( parent, name, false, i18n( "CD Editor" ), Ok|Cancel|User1|User2, Ok, true ) { @@ -46,15 +46,15 @@ CDDBDlg::CDDBDlg( QWidget* parent, const char* name ) setButtonText( User1, i18n( "Upload" ) ); setButtonText( User2, i18n( "Fetch Info" ) ); - connect( this, SIGNAL( okClicked() ), SLOT( save() ) ); - connect( this, SIGNAL( user1Clicked() ), SLOT( upload() ) ); - connect( this, SIGNAL( user2Clicked() ), SIGNAL( cddbQuery() ) ); - connect( m_dlgBase, SIGNAL( play( int ) ), SIGNAL( play( int ) ) ); + connect( this, TQT_SIGNAL( okClicked() ), TQT_SLOT( save() ) ); + connect( this, TQT_SIGNAL( user1Clicked() ), TQT_SLOT( upload() ) ); + connect( this, TQT_SIGNAL( user2Clicked() ), TQT_SIGNAL( cddbQuery() ) ); + connect( m_dlgBase, TQT_SIGNAL( play( int ) ), TQT_SIGNAL( play( int ) ) ); cddbClient = new KCDDB::Client(); cddbClient->setBlockingMode(false); - connect (cddbClient, SIGNAL(finished(CDDB::Result)), - SLOT(submitFinished(CDDB::Result))); + connect (cddbClient, TQT_SIGNAL(finished(CDDB::Result)), + TQT_SLOT(submitFinished(CDDB::Result))); } @@ -66,7 +66,7 @@ CDDBDlg::~CDDBDlg() void CDDBDlg::setData( const KCDDB::CDInfo &_cddbInfo, const KCDDB::TrackOffsetList &_trackStartFrames, - const QStringList &_playlist) + const TQStringList &_playlist) { // Let's make a deep copy of the cd struct info so that the data won't // change the cd changes while we are playing with the dialog. @@ -89,7 +89,7 @@ void CDDBDlg::submitFinished(KCDDB::CDDB::Result r) } else { - QString str = i18n("Error sending record.\n\n%1") + TQString str = i18n("Error sending record.\n\n%1") .arg(KCDDB::CDDB::resultToString(r)); KMessageBox::error(this, str, i18n("Record Submission")); } @@ -166,15 +166,15 @@ void CDDBDlg::updateFromDialog() KCDDB::CDInfo copy = m_dlgBase->info(); // Playorder... - QStringList strlist = QStringList::split( ',', m_dlgBase->m_playOrder->text() ); + TQStringList strlist = TQStringList::split( ',', m_dlgBase->m_playOrder->text() ); bool ret = true; - QString teststr; + TQString teststr; bool ok; unsigned num; - for ( QStringList::Iterator it = strlist.begin(); + for ( TQStringList::Iterator it = strlist.begin(); it != strlist.end(); ++it ) { diff --git a/kscd/cddbdlg.h b/kscd/cddbdlg.h index bbef6e4e..b8f3c90a 100644 --- a/kscd/cddbdlg.h +++ b/kscd/cddbdlg.h @@ -14,13 +14,13 @@ class CDDBDlg : public KDialogBase Q_OBJECT public: - CDDBDlg(QWidget* parent, const char* name = 0); + CDDBDlg(TQWidget* parent, const char* name = 0); ~CDDBDlg(); void setData( const KCDDB::CDInfo &_cddbInfo, const KCDDB::TrackOffsetList &_trackStartFrames, - const QStringList &_playlist); + const TQStringList &_playlist); private slots: void save(); @@ -35,12 +35,12 @@ class CDDBDlg : public KDialogBase private: bool validInfo(); void updateFromDialog(); - QString framesTime(unsigned frames); + TQString framesTime(unsigned frames); CDInfoDialogBase *m_dlgBase; KCDDB::CDInfo cddbInfo; KCDDB::TrackOffsetList trackStartFrames; - QStringList playlist; + TQStringList playlist; KCDDB::Client *cddbClient; }; #endif // CDDBDLG_H diff --git a/kscd/configWidget.cpp b/kscd/configWidget.cpp index 0865c5ad..bae787e9 100644 --- a/kscd/configWidget.cpp +++ b/kscd/configWidget.cpp @@ -26,9 +26,9 @@ #include #include #include -#include +#include #include -#include +#include #include extern "C" { @@ -45,14 +45,14 @@ extern "C" { class SpecialComboBox : public KComboBox { public: - SpecialComboBox(QWidget* parent, const char* name) + SpecialComboBox(TQWidget* parent, const char* name) : KComboBox(parent, name) {} - // QComboBox::setCurrentText replaces the current text if + // TQComboBox::setCurrentText replaces the current text if // the list doesn't contain text, while // KComboBox::setCurrentItem doesn't - void setCurrentText(const QString& text) + void setCurrentText(const TQString& text) { setCurrentItem(text); } @@ -65,7 +65,7 @@ public: * The dialog will by default be modeless, unless you set 'modal' to * TRUE to construct a modal dialog. */ -configWidget::configWidget(KSCD* player, QWidget* parent, const char* name) +configWidget::configWidget(KSCD* player, TQWidget* parent, const char* name) : configWidgetUI(parent, name), mPlayer(player) { @@ -78,7 +78,7 @@ configWidget::configWidget(KSCD* player, QWidget* parent, const char* name) kcfg_cdDevice->comboBox()->insertItem(DEFAULT_CD_DEVICE); getMediaDevices(); - (new QVBoxLayout(audioSystemFrame))->setAutoAdd(true); + (new TQVBoxLayout(audioSystemFrame))->setAutoAdd(true); kcfg_AudioSystem = new SpecialComboBox(audioSystemFrame, "kcfg_AudioSystem"); textLabel4->setBuddy(kcfg_AudioSystem); @@ -115,14 +115,14 @@ void configWidget::getMediaDevices() if (!rep.isValid()) { return; } - QStringList list = rep; - QStringList::const_iterator it = list.begin(); - QStringList::const_iterator itEnd = list.end(); + TQStringList list = rep; + TQStringList::const_iterator it = list.begin(); + TQStringList::const_iterator itEnd = list.end(); // it would be much better if libmediacommon was in kdelibs while (it != itEnd) { it++; if (it == itEnd) break; - QString url="media:/"+(*it); // is it always right? ervin? + TQString url="media:/"+(*it); // is it always right? ervin? kdDebug() << "checking " << url << endl; for (int i=0;i<9;i++) ++it; // go to mimetype (MIME_TYPE-NAME from medium.h) kdDebug() << "Mime: " << *it << endl; diff --git a/kscd/configWidget.h b/kscd/configWidget.h index 897f02c4..7269ca42 100644 --- a/kscd/configWidget.h +++ b/kscd/configWidget.h @@ -33,7 +33,7 @@ class configWidget : public configWidgetUI Q_OBJECT public: - configWidget(KSCD* player, QWidget* parent = 0, const char* name = 0); + configWidget(KSCD* player, TQWidget* parent = 0, const char* name = 0); ~configWidget(); protected: diff --git a/kscd/docking.cpp b/kscd/docking.cpp index 821e626d..705c2ca8 100644 --- a/kscd/docking.cpp +++ b/kscd/docking.cpp @@ -24,8 +24,8 @@ #include "docking.h" #include "kscd.h" -#include -#include +#include +#include #include #include @@ -51,22 +51,22 @@ DockWidget::DockWidget( KSCD* parent, const char *name) m_forwardPix = loadIcon("player_end"); // popup menu for right mouse button - QPopupMenu* popup = contextMenu(); + TQPopupMenu* popup = contextMenu(); - popup->insertItem(KGlobal::iconLoader()->loadIconSet("player_play", KIcon::Small), i18n("Play/Pause"), parent, SLOT(playClicked())); - popup->insertItem(KGlobal::iconLoader()->loadIconSet("player_stop", KIcon::Small), i18n("Stop"), parent, SLOT(stopClicked())); - popup->insertItem(KGlobal::iconLoader()->loadIconSet("player_end", KIcon::Small), i18n("Next"), parent, SLOT(nextClicked())); - popup->insertItem(KGlobal::iconLoader()->loadIconSet("player_start", KIcon::Small), i18n("Previous"), parent, SLOT(prevClicked())); - popup->insertItem(KGlobal::iconLoader()->loadIconSet("player_eject", KIcon::Small), i18n("Eject"), parent, SLOT(ejectClicked())); + popup->insertItem(KGlobal::iconLoader()->loadIconSet("player_play", KIcon::Small), i18n("Play/Pause"), parent, TQT_SLOT(playClicked())); + popup->insertItem(KGlobal::iconLoader()->loadIconSet("player_stop", KIcon::Small), i18n("Stop"), parent, TQT_SLOT(stopClicked())); + popup->insertItem(KGlobal::iconLoader()->loadIconSet("player_end", KIcon::Small), i18n("Next"), parent, TQT_SLOT(nextClicked())); + popup->insertItem(KGlobal::iconLoader()->loadIconSet("player_start", KIcon::Small), i18n("Previous"), parent, TQT_SLOT(prevClicked())); + popup->insertItem(KGlobal::iconLoader()->loadIconSet("player_eject", KIcon::Small), i18n("Eject"), parent, TQT_SLOT(ejectClicked())); - QToolTip::add(this, kapp->aboutData()->programName()); + TQToolTip::add(this, kapp->aboutData()->programName()); } DockWidget::~DockWidget() { } -void DockWidget::createPopup(const QString &songName, bool addButtons) +void DockWidget::createPopup(const TQString &songName, bool addButtons) { if (!Prefs::trackAnnouncement()) return; @@ -74,23 +74,23 @@ void DockWidget::createPopup(const QString &songName, bool addButtons) delete m_popup; m_popup = new KPassivePopup(this); - QHBox* box = new QHBox(m_popup); + TQHBox* box = new TQHBox(m_popup); if (addButtons) { - QPushButton* backButton = new QPushButton(m_backPix, 0, box, "popup_back"); + TQPushButton* backButton = new TQPushButton(m_backPix, 0, box, "popup_back"); backButton->setFlat(true); - connect(backButton, SIGNAL(clicked()), m_backAction, SLOT(activate())); + connect(backButton, TQT_SIGNAL(clicked()), m_backAction, TQT_SLOT(activate())); } - QLabel* l = new QLabel(songName, box); + TQLabel* l = new TQLabel(songName, box); l->setMargin(3); if (addButtons) { - QPushButton* forwardButton = new QPushButton(m_forwardPix, 0, box, "popup_forward"); + TQPushButton* forwardButton = new TQPushButton(m_forwardPix, 0, box, "popup_forward"); forwardButton->setFlat(true); - connect(forwardButton, SIGNAL(clicked()), m_forwardAction, SLOT(activate())); + connect(forwardButton, TQT_SIGNAL(clicked()), m_forwardAction, TQT_SLOT(activate())); } m_popup->setView(box); @@ -98,7 +98,7 @@ void DockWidget::createPopup(const QString &songName, bool addButtons) m_popup->show(); } -void DockWidget::setToolTip(const QString& text) +void DockWidget::setToolTip(const TQString& text) { if (tip == text) { @@ -106,19 +106,19 @@ void DockWidget::setToolTip(const QString& text) } tip = text; - QToolTip::remove(this); + TQToolTip::remove(this); if (text.isEmpty()) { - QToolTip::add(this, kapp->aboutData()->programName()); + TQToolTip::add(this, kapp->aboutData()->programName()); } else { - QToolTip::add(this, text); + TQToolTip::add(this, text); } } -void DockWidget::wheelEvent(QWheelEvent *e) +void DockWidget::wheelEvent(TQWheelEvent *e) { if (e->orientation() == Horizontal) return; diff --git a/kscd/docking.h b/kscd/docking.h index bb6434d0..52fceebd 100644 --- a/kscd/docking.h +++ b/kscd/docking.h @@ -30,11 +30,11 @@ #define _DOCKING_H_ #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include class KSCD; @@ -52,21 +52,21 @@ public: ~DockWidget(); public slots: - void setToolTip(const QString& text); - void createPopup(const QString& songName, bool addButtons = true); + void setToolTip(const TQString& text); + void createPopup(const TQString& songName, bool addButtons = true); private: - virtual void wheelEvent( QWheelEvent *e); + virtual void wheelEvent( TQWheelEvent *e); KPassivePopup* m_popup; KAction* m_forwardAction; KAction* m_backAction; - QPixmap m_backPix; - QPixmap m_forwardPix; + TQPixmap m_backPix; + TQPixmap m_forwardPix; - QString tip; + TQString tip; }; #endif diff --git a/kscd/kcompactdisc.cpp b/kscd/kcompactdisc.cpp index e1d0b9db..c412a932 100644 --- a/kscd/kcompactdisc.cpp +++ b/kscd/kcompactdisc.cpp @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include #include @@ -81,7 +81,7 @@ extern "C" #endif } -#include +#include #include // Our internal definition of when we have no disc. Used to guard some @@ -94,17 +94,17 @@ extern "C" #define TRACK_VALID(track) \ ((track) && (track <= m_tracks)) -const QString KCompactDisc::defaultDevice = DEFAULT_CD_DEVICE; +const TQString KCompactDisc::defaultDevice = DEFAULT_CD_DEVICE; const unsigned KCompactDisc::missingDisc = (unsigned)-1; KCompactDisc::KCompactDisc(InformationMode infoMode) : - m_device(QString::null), + m_device(TQString::null), m_status(0), m_previousStatus(123456), m_discId(missingDisc), m_previousDiscId(0), - m_artist(QString::null), - m_title(QString::null), + m_artist(TQString::null), + m_title(TQString::null), m_track(0), m_previousTrack(99999999), m_infoMode(infoMode) @@ -114,7 +114,7 @@ KCompactDisc::KCompactDisc(InformationMode infoMode) : m_trackArtists.clear(); m_trackTitles.clear(); m_trackStartFrames.clear(); - connect(&timer, SIGNAL(timeout()), SLOT(timerExpired())); + connect(&timer, TQT_SIGNAL(timeout()), TQT_SLOT(timerExpired())); } KCompactDisc::~KCompactDisc() @@ -126,7 +126,7 @@ KCompactDisc::~KCompactDisc() wm_cd_destroy(); } -const QString &KCompactDisc::device() const +const TQString &KCompactDisc::device() const { return m_device; } @@ -143,9 +143,9 @@ unsigned KCompactDisc::discPosition() const return cur_pos_abs * 1000 - FRAMES_TO_MS(m_trackStartFrames[0]); } -QString KCompactDisc::discStatus(int status) +TQString KCompactDisc::discStatus(int status) { - QString message; + TQString message; switch (status) { @@ -183,7 +183,7 @@ QString KCompactDisc::discStatus(int status) if (status <= 0) message = strerror(-status); else - message = QString::number(status); + message = TQString::number(status); break; } return message; @@ -232,15 +232,15 @@ void KCompactDisc::play(unsigned startTrack, unsigned startTrackPosition, unsign wm_cd_play(TRACK_VALID(startTrack) ? startTrack : 1, startTrackPosition / 1000, TRACK_VALID(endTrack) ? endTrack : WM_ENDTRACK ); } -QString KCompactDisc::urlToDevice(const QString& device) +TQString KCompactDisc::urlToDevice(const TQString& device) { KURL deviceUrl(device); if (deviceUrl.protocol() == "media" || deviceUrl.protocol() == "system") { kdDebug() << "Asking mediamanager for " << deviceUrl.fileName() << endl; DCOPRef mediamanager("kded", "mediamanager"); - DCOPReply reply = mediamanager.call("properties(QString)", deviceUrl.fileName()); - QStringList properties = reply; + DCOPReply reply = mediamanager.call("properties(TQString)", deviceUrl.fileName()); + TQStringList properties = reply; if (!reply.isValid() || properties.count() < 6) { kdError() << "Invalid reply from mediamanager" << endl; @@ -257,22 +257,22 @@ QString KCompactDisc::urlToDevice(const QString& device) } bool KCompactDisc::setDevice( - const QString &device_, + const TQString &device_, unsigned volume, bool digitalPlayback, - const QString &audioSystem, - const QString &audioDevice) + const TQString &audioSystem, + const TQString &audioDevice) { timer.stop(); - QString device = urlToDevice(device_); + TQString device = urlToDevice(device_); #if !defined(BUILD_CDDA) digitalPlayback = false; #endif int status = wm_cd_init( digitalPlayback ? WM_CDDA : WM_CDIN, - QFile::encodeName(device), + TQFile::encodeName(device), digitalPlayback ? audioSystem.ascii() : 0, digitalPlayback ? audioDevice.ascii() : 0, 0); @@ -280,14 +280,14 @@ bool KCompactDisc::setDevice( kdDebug() << "Device change: " << (digitalPlayback ? "WM_CDDA, " : "WM_CDIN, ") << m_device << ", " - << (digitalPlayback ? audioSystem : QString::null) << ", " - << (digitalPlayback ? audioDevice : QString::null) << ", status: " + << (digitalPlayback ? audioSystem : TQString::null) << ", " + << (digitalPlayback ? audioDevice : TQString::null) << ", status: " << discStatus(status) << endl; if (status < 0) { // Severe (OS-level) error. - m_device = QString::null; + m_device = TQString::null; } else { @@ -301,7 +301,7 @@ bool KCompactDisc::setDevice( timerExpired(); else timer.start(1000, true); - return m_device != QString::null; + return m_device != TQString::null; } void KCompactDisc::setVolume(unsigned volume) @@ -315,15 +315,15 @@ void KCompactDisc::stop() wm_cd_stop(); } -const QString &KCompactDisc::trackArtist() const +const TQString &KCompactDisc::trackArtist() const { return trackArtist(m_track); } -const QString &KCompactDisc::trackArtist(unsigned track) const +const TQString &KCompactDisc::trackArtist(unsigned track) const { if (NO_DISC || !TRACK_VALID(track)) - return QString::null; + return TQString::null; return m_trackArtists[track - 1]; } @@ -349,15 +349,15 @@ unsigned KCompactDisc::tracks() const return m_tracks; } -const QString &KCompactDisc::trackTitle() const +const TQString &KCompactDisc::trackTitle() const { return trackTitle(m_track); } -const QString &KCompactDisc::trackTitle(unsigned track) const +const TQString &KCompactDisc::trackTitle(unsigned track) const { if (NO_DISC || !TRACK_VALID(track)) - return QString::null; + return TQString::null; return m_trackTitles[track - 1]; } @@ -378,7 +378,7 @@ void KCompactDisc::timerExpired() { m_status = wm_cd_status(); - if (WM_CDS_NO_DISC(m_status) || (m_device == QString::null)) + if (WM_CDS_NO_DISC(m_status) || (m_device == TQString::null)) { if (m_previousStatus != m_status) { @@ -428,7 +428,7 @@ void KCompactDisc::timerExpired() else { m_trackArtists.append(i18n("Unknown Artist")); - m_trackTitles.append(i18n("Track %1").arg(QString::number(i).rightJustify(2, '0'))); + m_trackTitles.append(i18n("Track %1").arg(TQString::number(i).rightJustify(2, '0'))); } // FIXME: KDE4 // track.length = cd->trk[i - 1].length; diff --git a/kscd/kcompactdisc.h b/kscd/kcompactdisc.h index 4d1f1543..f71189a8 100644 --- a/kscd/kcompactdisc.h +++ b/kscd/kcompactdisc.h @@ -21,9 +21,9 @@ #ifndef KCOMPACTDISC_H #define KCOMPACTDISC_H -#include -#include -#include +#include +#include +#include /** * KCompactDisc - A CD drive interface for the KDE Project. @@ -76,7 +76,7 @@ public: * If the url is a media:/ or system:/ URL returns * the device it represents, otherwise returns device */ - static QString urlToDevice(const QString& device); + static TQString urlToDevice(const TQString& device); /** * @param device Name of CD device, e.g. /dev/cdrom. @@ -86,11 +86,11 @@ public: * @return true if the device seemed usable. */ bool setDevice( - const QString &device = defaultDevice, + const TQString &device = defaultDevice, unsigned volume = 50, bool digitalPlayback = true, - const QString &audioSystem = QString::null, - const QString &audioDevice = QString::null); + const TQString &audioSystem = TQString::null, + const TQString &audioDevice = TQString::null); void setVolume(unsigned volume); @@ -102,14 +102,14 @@ public: /** * The default CD for this system. */ - static const QString defaultDevice; + static const TQString defaultDevice; /** * Current device. * * @return Null string if no usable device set. */ - const QString &device() const; + const TQString &device() const; /** * The discId for a missing disc. @@ -124,21 +124,21 @@ public: /** * CDDB signature of disc. */ - const QValueList &discSignature() const { return m_trackStartFrames; } + const TQValueList &discSignature() const { return m_trackStartFrames; } /** * Artist for whole disc. * * @return Disc artist or null string. */ - const QString &discArtist() const { return m_artist; } + const TQString &discArtist() const { return m_artist; } /** * Title of disc. * * @return Disc title or null string. */ - const QString &discTitle() const { return m_title; } + const TQString &discTitle() const { return m_title; } /** * Length of disc. @@ -158,28 +158,28 @@ public: * * @return Track artist or null string. */ - const QString &trackArtist() const; + const TQString &trackArtist() const; /** * Artist of given track. * * @return Track artist or null string. */ - const QString &trackArtist(unsigned track) const; + const TQString &trackArtist(unsigned track) const; /** * Title of current track. * * @return Track title or null string. */ - const QString &trackTitle() const; + const TQString &trackTitle() const; /** * Title of given track. * * @return Track title or null string. */ - const QString &trackTitle(unsigned track) const; + const TQString &trackTitle(unsigned track) const; /** * Current track. @@ -277,22 +277,22 @@ signals: void trackPaused(unsigned track, unsigned trackPosition); private: - QTimer timer; - QString m_device; + TQTimer timer; + TQString m_device; int m_status; int m_previousStatus; unsigned m_discId; unsigned m_previousDiscId; - QString m_artist; - QString m_title; + TQString m_artist; + TQString m_title; unsigned m_tracks; - QValueList m_trackStartFrames; - QStringList m_trackArtists; - QStringList m_trackTitles; + TQValueList m_trackStartFrames; + TQStringList m_trackArtists; + TQStringList m_trackTitles; unsigned m_track; unsigned m_previousTrack; void checkDeviceStatus(); - QString discStatus(int status); + TQString discStatus(int status); class KCompactDiscPrivate *d; InformationMode m_infoMode; diff --git a/kscd/kscd.cpp b/kscd/kscd.cpp index 426df542..bb2b0ae5 100644 --- a/kscd/kscd.cpp +++ b/kscd/kscd.cpp @@ -22,15 +22,15 @@ * */ -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -76,7 +76,7 @@ #include "cddbdlg.h" #include "configWidget.h" -#include +#include #include #include @@ -89,7 +89,7 @@ bool stoppedByUser = false; The GUI part *****************************************************************************/ -KSCD::KSCD( QWidget *parent, const char *name ) +KSCD::KSCD( TQWidget *parent, const char *name ) : DCOPObject("CDPlayer"), kscdPanelDlg( parent, name, Qt::WDestructiveClose ), configDialog(0L), @@ -103,7 +103,7 @@ KSCD::KSCD( QWidget *parent, const char *name ) random_current = random_list.begin(); cddb = new KCDDB::Client(); - connect(cddb, SIGNAL(finished(CDDB::Result)), this, SLOT(lookupCDDBDone(CDDB::Result))); + connect(cddb, TQT_SIGNAL(finished(CDDB::Result)), this, TQT_SLOT(lookupCDDBDone(CDDB::Result))); #if defined(BUILD_CDDA) audio_systems_list @@ -124,77 +124,77 @@ KSCD::KSCD( QWidget *parent, const char *name ) // the time slider timeIcon->setPixmap(SmallIcon("player_time")); - connect(timeSlider, SIGNAL(sliderPressed()), SLOT(timeSliderPressed())); - connect(timeSlider, SIGNAL(sliderReleased()), SLOT(timeSliderReleased())); - connect(timeSlider, SIGNAL(sliderMoved(int)), SLOT(timeSliderMoved(int))); - connect(timeSlider, SIGNAL(valueChanged(int)), SLOT(jumpToTime(int))); + connect(timeSlider, TQT_SIGNAL(sliderPressed()), TQT_SLOT(timeSliderPressed())); + connect(timeSlider, TQT_SIGNAL(sliderReleased()), TQT_SLOT(timeSliderReleased())); + connect(timeSlider, TQT_SIGNAL(sliderMoved(int)), TQT_SLOT(timeSliderMoved(int))); + connect(timeSlider, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(jumpToTime(int))); // the volume slider volumeIcon->setPixmap(SmallIcon("player_volume")); volumeSlider->setValue(Prefs::volume()); - QString str; - str = QString::fromUtf8( QCString().sprintf(i18n("Vol: %02d%%").utf8(), Prefs::volume()) ); + TQString str; + str = TQString::fromUtf8( TQCString().sprintf(i18n("Vol: %02d%%").utf8(), Prefs::volume()) ); volumelabel->setText(str); - connect(volumeSlider, SIGNAL(valueChanged(int)), SLOT(volChanged(int))); + connect(volumeSlider, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(volChanged(int))); /* FIXME check for return value */ setDevicePaths(/*Prefs::cdDevice(), Prefs::audioSystem(), Prefs::audioDevice()*/); - connect(m_cd, SIGNAL(trackPlaying(unsigned, unsigned)), this, SLOT(trackUpdate(unsigned, unsigned))); - connect(m_cd, SIGNAL(trackPaused(unsigned, unsigned)), this, SLOT(trackUpdate(unsigned, unsigned))); - connect(m_cd, SIGNAL(trackChanged(unsigned, unsigned)), this, SLOT(trackChanged(unsigned, unsigned))); - connect(m_cd, SIGNAL(discStopped()), this, SLOT(discStopped())); - connect(m_cd, SIGNAL(discChanged(unsigned)), this, SLOT(discChanged(unsigned))); - connect( &queryledtimer, SIGNAL(timeout()), SLOT(togglequeryled()) ); - connect( &titlelabeltimer, SIGNAL(timeout()), SLOT(titlelabeltimeout()) ); - connect( &cycletimer, SIGNAL(timeout()), SLOT(cycletimeout()) ); - connect( &jumpTrackTimer, SIGNAL(timeout()), SLOT(jumpTracks()) ); + connect(m_cd, TQT_SIGNAL(trackPlaying(unsigned, unsigned)), this, TQT_SLOT(trackUpdate(unsigned, unsigned))); + connect(m_cd, TQT_SIGNAL(trackPaused(unsigned, unsigned)), this, TQT_SLOT(trackUpdate(unsigned, unsigned))); + connect(m_cd, TQT_SIGNAL(trackChanged(unsigned, unsigned)), this, TQT_SLOT(trackChanged(unsigned, unsigned))); + connect(m_cd, TQT_SIGNAL(discStopped()), this, TQT_SLOT(discStopped())); + connect(m_cd, TQT_SIGNAL(discChanged(unsigned)), this, TQT_SLOT(discChanged(unsigned))); + connect( &queryledtimer, TQT_SIGNAL(timeout()), TQT_SLOT(togglequeryled()) ); + connect( &titlelabeltimer, TQT_SIGNAL(timeout()), TQT_SLOT(titlelabeltimeout()) ); + connect( &cycletimer, TQT_SIGNAL(timeout()), TQT_SLOT(cycletimeout()) ); + connect( &jumpTrackTimer, TQT_SIGNAL(timeout()), TQT_SLOT(jumpTracks()) ); /* these are always connected in base class - connect( playPB, SIGNAL(clicked()), SLOT(playClicked()) ); - connect( nextPB, SIGNAL(clicked()), SLOT(nextClicked()) ); - connect( prevPB, SIGNAL(clicked()), SLOT(prevClicked()) ); - connect( stopPB, SIGNAL(clicked()), SLOT(stopClicked()) ); - connect( ejectPB, SIGNAL(clicked()), SLOT(ejectClicked()) ); + connect( playPB, TQT_SIGNAL(clicked()), TQT_SLOT(playClicked()) ); + connect( nextPB, TQT_SIGNAL(clicked()), TQT_SLOT(nextClicked()) ); + connect( prevPB, TQT_SIGNAL(clicked()), TQT_SLOT(prevClicked()) ); + connect( stopPB, TQT_SIGNAL(clicked()), TQT_SLOT(stopClicked()) ); + connect( ejectPB, TQT_SIGNAL(clicked()), TQT_SLOT(ejectClicked()) ); */ - connect( repeatPB, SIGNAL(clicked()), SLOT(loopClicked()) ); - connect( songListCB, SIGNAL(activated(int)), SLOT(trackSelected(int))); - connect( shufflePB, SIGNAL(clicked()), SLOT(randomSelected())); - connect( cddbPB, SIGNAL(clicked()), SLOT(CDDialogSelected())); - connect(kapp, SIGNAL(kdisplayPaletteChanged()), this, SLOT(setColors())); - connect(kapp, SIGNAL(iconChanged(int)), this, SLOT(setIcons())); - QToolTip::remove(songListCB); - QToolTip::add(songListCB, i18n("Track list")); + connect( repeatPB, TQT_SIGNAL(clicked()), TQT_SLOT(loopClicked()) ); + connect( songListCB, TQT_SIGNAL(activated(int)), TQT_SLOT(trackSelected(int))); + connect( shufflePB, TQT_SIGNAL(clicked()), TQT_SLOT(randomSelected())); + connect( cddbPB, TQT_SIGNAL(clicked()), TQT_SLOT(CDDialogSelected())); + connect(kapp, TQT_SIGNAL(kdisplayPaletteChanged()), this, TQT_SLOT(setColors())); + connect(kapp, TQT_SIGNAL(iconChanged(int)), this, TQT_SLOT(setIcons())); + TQToolTip::remove(songListCB); + TQToolTip::add(songListCB, i18n("Track list")); // set up the actions and keyboard accels m_actions = new KActionCollection(this); KAction* action; - action = new KAction(i18n("Play/Pause"), Key_P, this, SLOT(playClicked()), m_actions, "Play/Pause"); - action = new KAction(i18n("Stop"), Key_S, this, SLOT(stopClicked()), m_actions, "Stop"); - action = new KAction(i18n("Previous"), Key_B, this, SLOT(prevClicked()), m_actions, "Previous"); - action = new KAction(i18n("Next"), Key_N, this, SLOT(nextClicked()), m_actions, "Next"); - action = KStdAction::quit(this, SLOT(quitClicked()), m_actions); - action = KStdAction::keyBindings(this, SLOT(configureKeys()), m_actions, "options_configure_shortcuts"); - action = KStdAction::keyBindings(this, SLOT(configureGlobalKeys()), m_actions, "options_configure_globals"); - action = KStdAction::preferences(this, SLOT(showConfig()), m_actions); - action = new KAction(i18n("Loop"), Key_L, this, SLOT(loopClicked()), m_actions, "Loop"); - action = new KAction(i18n("Eject"), CTRL + Key_E, this, SLOT(ejectClicked()), m_actions, "Eject"); - action = new KAction(i18n("Increase Volume"), Key_Plus, this, SLOT(incVolume()), m_actions, "IncVolume"); + action = new KAction(i18n("Play/Pause"), Key_P, this, TQT_SLOT(playClicked()), m_actions, "Play/Pause"); + action = new KAction(i18n("Stop"), Key_S, this, TQT_SLOT(stopClicked()), m_actions, "Stop"); + action = new KAction(i18n("Previous"), Key_B, this, TQT_SLOT(prevClicked()), m_actions, "Previous"); + action = new KAction(i18n("Next"), Key_N, this, TQT_SLOT(nextClicked()), m_actions, "Next"); + action = KStdAction::quit(this, TQT_SLOT(quitClicked()), m_actions); + action = KStdAction::keyBindings(this, TQT_SLOT(configureKeys()), m_actions, "options_configure_shortcuts"); + action = KStdAction::keyBindings(this, TQT_SLOT(configureGlobalKeys()), m_actions, "options_configure_globals"); + action = KStdAction::preferences(this, TQT_SLOT(showConfig()), m_actions); + action = new KAction(i18n("Loop"), Key_L, this, TQT_SLOT(loopClicked()), m_actions, "Loop"); + action = new KAction(i18n("Eject"), CTRL + Key_E, this, TQT_SLOT(ejectClicked()), m_actions, "Eject"); + action = new KAction(i18n("Increase Volume"), Key_Plus, this, TQT_SLOT(incVolume()), m_actions, "IncVolume"); KShortcut increaseVolume = action->shortcut(); increaseVolume.append( KKey( Key_Equal ) ); action->setShortcut( increaseVolume ); - action = new KAction(i18n("Decrease Volume"), Key_Minus, this, SLOT(decVolume()), m_actions, "DecVolume"); - action = new KAction(i18n("Options"), CTRL + Key_T, this, SLOT(showConfig()), m_actions, "Options"); - action = new KAction(i18n("Shuffle"), Key_R, this, SLOT(randomSelected()), m_actions, "Shuffle"); - action = new KAction(i18n("CDDB"), CTRL + Key_D, this, SLOT(CDDialogSelected()), m_actions, "CDDB"); + action = new KAction(i18n("Decrease Volume"), Key_Minus, this, TQT_SLOT(decVolume()), m_actions, "DecVolume"); + action = new KAction(i18n("Options"), CTRL + Key_T, this, TQT_SLOT(showConfig()), m_actions, "Options"); + action = new KAction(i18n("Shuffle"), Key_R, this, TQT_SLOT(randomSelected()), m_actions, "Shuffle"); + action = new KAction(i18n("CDDB"), CTRL + Key_D, this, TQT_SLOT(CDDialogSelected()), m_actions, "CDDB"); m_actions->readShortcutSettings("Shortcuts"); m_actions->action( "options_configure_globals" )->setText( i18n( "Configure &Global Shortcuts..." ) ); kapp->installKDEPropertyMap(); - QSqlPropertyMap *map = QSqlPropertyMap::defaultMap(); + TQSqlPropertyMap *map = TQSqlPropertyMap::defaultMap(); map->insert("KComboBox", "currentText"); initGlobalShortcuts(); @@ -210,9 +210,9 @@ KSCD::KSCD( QWidget *parent, const char *name ) setDocking(Prefs::docking()); - setFocusPolicy(QWidget::NoFocus); + setFocusPolicy(TQWidget::NoFocus); - songListCB->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Fixed); + songListCB->setSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Fixed); adjustSize(); setFixedHeight(this->height()); } // KSCD @@ -232,20 +232,20 @@ void KSCD::initGlobalShortcuts() { //Definition of global shortcuts is based on 'local' shortcuts which follow //the WIN key. m_globalAccel->insert("Next", i18n("Next"), 0, KKey("WIN+N"), KKey("WIN+Right"), - this, SLOT(nextClicked())); + this, TQT_SLOT(nextClicked())); //NOTE: WIN+B collidates with amarok's default global shortcut. m_globalAccel->insert("Previous", i18n("Previous"), 0, KKey("WIN+B"), KKey("WIN+Left"), - this, SLOT(prevClicked())); + this, TQT_SLOT(prevClicked())); m_globalAccel->insert("Play/Pause", i18n("Play/Pause"), 0, KKey("WIN+P"), 0, - this, SLOT(playClicked())); + this, TQT_SLOT(playClicked())); m_globalAccel->insert("Stop", i18n("Stop"), 0, KKey("WIN+S"), 0, - this, SLOT(stopClicked())); + this, TQT_SLOT(stopClicked())); m_globalAccel->insert("IncVolume", i18n("Increase Volume"), 0, KKey("WIN+Plus"), KKey("WIN+Up"), - this, SLOT(incVolume())); + this, TQT_SLOT(incVolume())); m_globalAccel->insert("DecVolume", i18n("Decrease Volume"), 0, KKey("WIN+Minus"), KKey("WIN+Down"), - this, SLOT(decVolume())); + this, TQT_SLOT(decVolume())); m_globalAccel->insert("Shuffle", i18n("Shuffle"), 0, KKey("WIN+R"), 0, - this, SLOT(incVolume())); + this, TQT_SLOT(incVolume())); m_globalAccel->setConfigGroup( "GlobalShortcuts" ); m_globalAccel->readSettings( kapp->config() ); @@ -266,7 +266,7 @@ void KSCD::setVolume(int v) volumeSlider->setValue(v); } -void KSCD::setDevice(const QString& dev) +void KSCD::setDevice(const TQString& dev) { Prefs::self()->setCdDevice(dev); setDevicePaths(); @@ -280,11 +280,11 @@ void KSCD::initFont() /* int theSmallPtSize = 10; // Find a font that fits the 13 and 14 pixel widgets - QFont fn( KGlobalSettings::generalFont().family(), theSmallPtSize, QFont::Bold ); + TQFont fn( KGlobalSettings::generalFont().family(), theSmallPtSize, TQFont::Bold ); bool fits = false; while (!fits && theSmallPtSize > 1) { - QFontMetrics metrics(fn); + TQFontMetrics metrics(fn); if(metrics.height() > 13) { --theSmallPtSize; @@ -293,7 +293,7 @@ void KSCD::initFont() fits = true; } } - smallfont = QFont(KGlobalSettings::generalFont().family(), theSmallPtSize, QFont::Bold); + smallfont = TQFont(KGlobalSettings::generalFont().family(), theSmallPtSize, TQFont::Bold); */ } // initFont() @@ -312,7 +312,7 @@ void KSCD::drawPanel() trackTimeLED[u]->setLEDoffColor(Prefs::backColor()); trackTimeLED[u]->setLEDColor(Prefs::ledColor(), Prefs::backColor()); trackTimeLED[u]->setGeometry(2 + u * 18, D, 23, 30); - connect(trackTimeLED[u], SIGNAL(clicked()), this, SLOT(cycleplaytimemode())); + connect(trackTimeLED[u], TQT_SIGNAL(clicked()), this, TQT_SLOT(cycleplaytimemode())); } setLEDs(-1); @@ -342,9 +342,9 @@ void KSCD::setIcons() void KSCD::setupPopups() { - QPopupMenu* mainPopup = new QPopupMenu(this); + TQPopupMenu* mainPopup = new TQPopupMenu(this); infoPB->setPopup(mainPopup); - infoPopup = new QPopupMenu (this); + infoPopup = new TQPopupMenu (this); infoPopup->insertItem("MusicMoz", 0); @@ -369,7 +369,7 @@ void KSCD::setupPopups() mainPopup->insertItem(i18n("Artist Information"), infoPopup); - connect( infoPopup, SIGNAL(activated(int)), SLOT(information(int)) ); + connect( infoPopup, TQT_SIGNAL(activated(int)), TQT_SLOT(information(int)) ); KHelpMenu* helpMenu = new KHelpMenu(this, KGlobal::instance()->aboutData(), false); mainPopup->insertItem(SmallIcon("help"),i18n("&Help"), helpMenu->menu()); @@ -524,7 +524,7 @@ bool KSCD::nextClicked() void KSCD::trackChanged(unsigned track, unsigned trackLength) { - QString tooltip = artistlabel->text(); + TQString tooltip = artistlabel->text(); if (track < 1) { setLEDs(-1); @@ -546,20 +546,20 @@ void KSCD::trackChanged(unsigned track, unsigned trackLength) songListCB->setCurrentItem(track - 1); // drop the number. // for Mahlah, a picky though otherwise wonderful person - AJS - QString justTheName = songListCB->currentText(); + TQString justTheName = songListCB->currentText(); justTheName = justTheName.right(justTheName.length() - 4); - QToolTip::remove(songListCB); - QToolTip::add(songListCB, i18n("Current track: %1").arg(justTheName)); + TQToolTip::remove(songListCB); + TQToolTip::add(songListCB, i18n("Current track: %1").arg(justTheName)); } timeSlider->blockSignals(true); timeSlider->setRange(0, trackLength ? trackLength - 1 : 0); timeSlider->blockSignals(false); - QString str; + TQString str; str.sprintf("%02d/%02d", track, m_cd->tracks()); tracklabel->setText(str); - QString title = cddbInfo.trackInfoList[track-1].title; + TQString title = cddbInfo.trackInfoList[track-1].title; titlelabel->setText(title); tooltip += "/"; tooltip += KStringHandler::rsqueeze(title, 30); @@ -628,9 +628,9 @@ void KSCD::quitClicked() kapp->quit(); } // quitClicked() -bool KSCD::event( QEvent *e ) +bool KSCD::event( TQEvent *e ) { - return QWidget::event(e); + return TQWidget::event(e); } // event @@ -673,7 +673,7 @@ void KSCD::ejectClicked() m_cd->eject(); } // ejectClicked -void KSCD::closeEvent(QCloseEvent *e) +void KSCD::closeEvent(TQCloseEvent *e) { if (Prefs::docking() && !kapp->sessionSaving()) { @@ -713,7 +713,7 @@ void KSCD::updateConfigDialog(configWidget* widget) if(!widget) return; - static QString originalTitleOfGroupBox = widget->groupBox3->title(); + static TQString originalTitleOfGroupBox = widget->groupBox3->title(); if(m_cd->isPlaying()) { widget->groupBox3->setEnabled(false); widget->groupBox3->setTitle( i18n( "CD Drive (you must stop playing to change this)" ) ); @@ -734,7 +734,7 @@ void KSCD::showConfig() configDialog = new KConfigDialog(this, "settings", Prefs::self()); - configDialog->setHelp(QString::null); + configDialog->setHelp(TQString::null); confWidget = new configWidget(this, 0, "Kscd"); @@ -754,18 +754,18 @@ void KSCD::showConfig() m->load(); KCDDB::Config* cfg = new KCDDB::Config(); cfg->readConfig(); - configDialog -> addPage(m, cfg, QString("CDDB"), "cdtrack", i18n("Configure Fetching Items")); + configDialog -> addPage(m, cfg, TQString("CDDB"), "cdtrack", i18n("Configure Fetching Items")); - connect(configDialog, SIGNAL(okClicked()), m, SLOT(save())); - connect(configDialog, SIGNAL(applyClicked()), m, SLOT(save())); - connect(configDialog, SIGNAL(defaultClicked()), m, SLOT(defaults())); + connect(configDialog, TQT_SIGNAL(okClicked()), m, TQT_SLOT(save())); + connect(configDialog, TQT_SIGNAL(applyClicked()), m, TQT_SLOT(save())); + connect(configDialog, TQT_SIGNAL(defaultClicked()), m, TQT_SLOT(defaults())); } } } updateConfigDialog(confWidget); - connect(configDialog, SIGNAL(settingsChanged()), this, SLOT(configDone())); + connect(configDialog, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT(configDone())); configDialog -> show(); } // showConfig() @@ -799,7 +799,7 @@ void KSCD::setDevicePaths() Prefs::audioSystem(), Prefs::audioDevice())) { // This device did not seem usable. - QString str = i18n("CD-ROM read or access error (or no audio disc in drive).\n"\ + TQString str = i18n("CD-ROM read or access error (or no audio disc in drive).\n"\ "Please make sure you have access permissions to:\n%1").arg( KCompactDisc::urlToDevice(Prefs::cdDevice())); KMessageBox::error(this, str, i18n("Error")); @@ -814,14 +814,14 @@ void KSCD::setDocking(bool dock) if (!m_dockWidget) { m_dockWidget = new DockWidget(this, "dockw"); - connect(m_dockWidget, SIGNAL(quitSelected()), this, SLOT(quitClicked())); + connect(m_dockWidget, TQT_SIGNAL(quitSelected()), this, TQT_SLOT(quitClicked())); } m_dockWidget->show(); - connect(this, SIGNAL(trackChanged(const QString&)), - m_dockWidget, SLOT(setToolTip(const QString&))); - connect(this, SIGNAL(trackChanged(const QString&)), - m_dockWidget, SLOT(createPopup(const QString&))); + connect(this, TQT_SIGNAL(trackChanged(const TQString&)), + m_dockWidget, TQT_SLOT(setToolTip(const TQString&))); + connect(this, TQT_SIGNAL(trackChanged(const TQString&)), + m_dockWidget, TQT_SLOT(createPopup(const TQString&))); } else { @@ -859,8 +859,8 @@ void KSCD::decVolume() void KSCD::volChanged( int vol ) { - QString str; - str = QString::fromUtf8( QCString().sprintf(i18n("Vol: %02d%%").utf8(), vol) ); + TQString str; + str = TQString::fromUtf8( TQCString().sprintf(i18n("Vol: %02d%%").utf8(), vol) ); volumelabel->setText(str); m_cd->setVolume(vol); Prefs::setVolume(vol); @@ -962,7 +962,7 @@ void KSCD::discChanged(unsigned discId) } else { - cddbInfo.id = QString::number(discId, 16).rightJustify(8,'0'); + cddbInfo.id = TQString::number(discId, 16).rightJustify(8,'0'); cddbInfo.length = m_cd->discLength() / 1000; cddbInfo.artist = m_cd->discArtist(); cddbInfo.title = m_cd->discTitle(); @@ -990,10 +990,10 @@ void KSCD::discChanged(unsigned discId) } // Set the total time. - QTime dml; + TQTime dml; dml = dml.addSecs(m_cd->discLength() / 1000); - QString fmt; + TQString fmt; if(dml.hour() > 0) fmt.sprintf("%02d:%02d:%02d",dml.hour(),dml.minute(),dml.second()); else @@ -1054,7 +1054,7 @@ void KSCD::discStopped() void KSCD::setLEDs(int milliseconds) { - QString symbols; + TQString symbols; if (milliseconds < 0) { @@ -1085,23 +1085,23 @@ void KSCD::resetTimeSlider(bool enabled) void KSCD::setColors() { - QColor led_color = Prefs::ledColor(); - QColor background_color = Prefs::backColor(); + TQColor led_color = Prefs::ledColor(); + TQColor background_color = Prefs::backColor(); backdrop->setBackgroundColor(background_color); - QColorGroup colgrp( led_color, background_color, led_color,led_color , led_color, + TQColorGroup colgrp( led_color, background_color, led_color,led_color , led_color, led_color, white ); - titlelabel ->setPalette( QPalette(colgrp,colgrp,colgrp) ); - artistlabel->setPalette( QPalette(colgrp,colgrp,colgrp) ); - volumelabel->setPalette( QPalette(colgrp,colgrp,colgrp) ); - statuslabel->setPalette( QPalette(colgrp,colgrp,colgrp) ); - tracklabel ->setPalette( QPalette(colgrp,colgrp,colgrp) ); - totaltimelabel->setPalette( QPalette(colgrp,colgrp,colgrp) ); + titlelabel ->setPalette( TQPalette(colgrp,colgrp,colgrp) ); + artistlabel->setPalette( TQPalette(colgrp,colgrp,colgrp) ); + volumelabel->setPalette( TQPalette(colgrp,colgrp,colgrp) ); + statuslabel->setPalette( TQPalette(colgrp,colgrp,colgrp) ); + tracklabel ->setPalette( TQPalette(colgrp,colgrp,colgrp) ); + totaltimelabel->setPalette( TQPalette(colgrp,colgrp,colgrp) ); - queryled->setPalette( QPalette(colgrp,colgrp,colgrp) ); - loopled->setPalette( QPalette(colgrp,colgrp,colgrp) ); + queryled->setPalette( TQPalette(colgrp,colgrp,colgrp) ); + loopled->setPalette( TQPalette(colgrp,colgrp,colgrp) ); for (int u = 0; u< 5;u++){ trackTimeLED[u]->setLEDoffColor(background_color); @@ -1155,11 +1155,11 @@ void KSCD::CDDialogSelected() cddialog = new CDDBDlg(this); cddialog->setData(cddbInfo, m_cd->discSignature(), playlist); - connect(cddialog,SIGNAL(cddbQuery()),SLOT(lookupCDDB())); - connect(cddialog,SIGNAL(newCDInfoStored(KCDDB::CDInfo)), - SLOT(setCDInfo(KCDDB::CDInfo))); - connect(cddialog,SIGNAL(finished()),SLOT(CDDialogDone())); - connect(cddialog,SIGNAL(play(int)),SLOT(trackSelected(int))); + connect(cddialog,TQT_SIGNAL(cddbQuery()),TQT_SLOT(lookupCDDB())); + connect(cddialog,TQT_SIGNAL(newCDInfoStored(KCDDB::CDInfo)), + TQT_SLOT(setCDInfo(KCDDB::CDInfo))); + connect(cddialog,TQT_SIGNAL(finished()),TQT_SLOT(CDDialogDone())); + connect(cddialog,TQT_SIGNAL(play(int)),TQT_SLOT(trackSelected(int))); } cddialog->show(); @@ -1201,7 +1201,7 @@ void KSCD::lookupCDDBDone(CDDB::Result result) // The intent of the original code here seems to have been to perform the // lookup, and then to convert all the string data within the CDDB response - // using the use Prefs::selectedEncoding() and a QTextCodec. However, that + // using the use Prefs::selectedEncoding() and a TQTextCodec. However, that // seems to be irrelevant these days. KCDDB::CDInfo info = cddb->bestLookupResponse(); // TODO Why doesn't libcddb not return MultipleRecordFound? @@ -1209,21 +1209,21 @@ void KSCD::lookupCDDBDone(CDDB::Result result) if( cddb->lookupResponse().count() > 1 ) { CDInfoList cddb_info = cddb->lookupResponse(); CDInfoList::iterator it; - QStringList list; + TQStringList list; for ( it = cddb_info.begin(); it != cddb_info.end(); ++it ) { - list.append( QString("%1, %2, %3").arg((*it).artist).arg((*it).title) + list.append( TQString("%1, %2, %3").arg((*it).artist).arg((*it).title) .arg((*it).genre)); } bool ok(false); - QString res = KInputDialog::getItem( + TQString res = KInputDialog::getItem( i18n("Select CDDB Entry"), i18n("Select a CDDB entry:"), list, 0, false, &ok, this ); if ( ok ) { // The user selected and item and pressed OK uint c = 0; - for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) { + for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { if( *it == res) break; c++; } @@ -1398,8 +1398,8 @@ void KSCD::cycleplaytimemode() void KSCD::cycletimeout() { cycletimer.stop(); - QString str; - str = QString::fromUtf8( QCString().sprintf(i18n("Vol: %02d%%").utf8(), Prefs::volume()) ); + TQString str; + str = TQString::fromUtf8( TQCString().sprintf(i18n("Vol: %02d%%").utf8(), Prefs::volume()) ); volumelabel->setText(str); } // cycletimeout @@ -1411,69 +1411,69 @@ void KSCD::information(int i) if(cddbInfo.artist.isEmpty()) return; - QString encodedArtist = KURL::encode_string_no_slash(cddbInfo.artist); + TQString encodedArtist = KURL::encode_string_no_slash(cddbInfo.artist); - QString str; + TQString str; switch(i) { case 0: - str = QString("http://musicmoz.org/cgi-bin/ext.cgi?artist=%1") + str = TQString("http://musicmoz.org/cgi-bin/ext.cgi?artist=%1") .arg(encodedArtist); break; case 1: - str = QString("http://ubl.artistdirect.com/cgi-bin/gx.cgi/AppLogic+Search?select=MusicArtist&searchstr=%1&searchtype=NormalSearch") + str = TQString("http://ubl.artistdirect.com/cgi-bin/gx.cgi/AppLogic+Search?select=MusicArtist&searchstr=%1&searchtype=NormalSearch") .arg(encodedArtist); break; case 2: - str = QString("http://www.cduniverse.com/cgi-bin/cdubin.exe/rlinka/ean=%1") + str = TQString("http://www.cduniverse.com/cgi-bin/cdubin.exe/rlinka/ean=%1") .arg(encodedArtist); break; case 3: - str = QString("http://www.alltheweb.com/search?cat=web&q=%1") + str = TQString("http://www.alltheweb.com/search?cat=web&q=%1") .arg(encodedArtist); break; case 4: - str = QString("http://altavista.com/web/results?q=%1&kgs=0&kls=1&avkw=xytx") + str = TQString("http://altavista.com/web/results?q=%1&kgs=0&kls=1&avkw=xytx") .arg(encodedArtist); break; case 5: - str = QString("http://msxml.excite.com/_1_2UDOUB70SVHVHR__info.xcite/dog/results?otmpl=dog/webresults.htm&qkw=%1&qcat=web&qk=20&top=1&start=&ver=14060") + str = TQString("http://msxml.excite.com/_1_2UDOUB70SVHVHR__info.xcite/dog/results?otmpl=dog/webresults.htm&qkw=%1&qcat=web&qk=20&top=1&start=&ver=14060") .arg(encodedArtist); break; case 6: - str = QString("http://www.google.com/search?q=%1") + str = TQString("http://www.google.com/search?q=%1") .arg(encodedArtist); break; case 7: - str = QString("http://groups.google.com/groups?oi=djq&as_q=%1&num=20") + str = TQString("http://groups.google.com/groups?oi=djq&as_q=%1&num=20") .arg(encodedArtist); break; case 8: - str = QString("http://www.hotbot.com/default.asp?prov=Inktomi&query=%1&ps=&loc=searchbox&tab=web") + str = TQString("http://www.hotbot.com/default.asp?prov=Inktomi&query=%1&ps=&loc=searchbox&tab=web") .arg(encodedArtist); break; case 9: - str = QString("http://search.lycos.com/default.asp?lpv=1&loc=searchhp&tab=web&query=%1") + str = TQString("http://search.lycos.com/default.asp?lpv=1&loc=searchhp&tab=web&query=%1") .arg(encodedArtist); break; case 10: - str = QString("http://search.dmoz.org/cgi-bin/search?search=%1") + str = TQString("http://search.dmoz.org/cgi-bin/search?search=%1") .arg(encodedArtist); break; case 11: - str = QString("http://search.yahoo.com/bin/search?p=%1") + str = TQString("http://search.yahoo.com/bin/search?p=%1") .arg(encodedArtist); break; @@ -1501,7 +1501,7 @@ bool KSCD::saveState(QSessionManager& /*sm*/) /** * Allow the user to type in the number of the track */ -void KSCD::keyPressEvent(QKeyEvent* e) +void KSCD::keyPressEvent(TQKeyEvent* e) { bool isNum; int value = e->text().toInt(&isNum); @@ -1523,7 +1523,7 @@ void KSCD::keyPressEvent(QKeyEvent* e) } else { - QWidget::keyPressEvent(e); + TQWidget::keyPressEvent(e); } } //keyPressEvent @@ -1537,25 +1537,25 @@ void KSCD::jumpTracks() jumpToTrack = 0; } // jumpTracks -QString KSCD::currentTrackTitle() +TQString KSCD::currentTrackTitle() { int track = m_cd->track(); - return (track > -1) ? cddbInfo.trackInfoList[track-1].title : QString::null; + return (track > -1) ? cddbInfo.trackInfoList[track-1].title : TQString::null; } -QString KSCD::currentAlbum() +TQString KSCD::currentAlbum() { return cddbInfo.title; } -QString KSCD::currentArtist() +TQString KSCD::currentArtist() { return cddbInfo.artist; } -QStringList KSCD::trackList() +TQStringList KSCD::trackList() { - QStringList tracks; + TQStringList tracks; for (TrackInfoList::const_iterator it = cddbInfo.trackInfoList.begin(); it != cddbInfo.trackInfoList.end(); ++it) tracks << (*it).title; @@ -1563,13 +1563,13 @@ QStringList KSCD::trackList() return tracks; } -void KSCD::populateSongList(QString infoStatus) +void KSCD::populateSongList(TQString infoStatus) { // set the artist and title labels as well as the dock tooltip. if (!infoStatus.isEmpty()) artistlabel->setText(infoStatus); else - artistlabel->setText(QString("%1 - %2").arg(cddbInfo.artist, cddbInfo.title)); + artistlabel->setText(TQString("%1 - %2").arg(cddbInfo.artist, cddbInfo.title)); songListCB->clear(); for (unsigned i = 0; i < cddbInfo.trackInfoList.count(); i++) @@ -1579,9 +1579,9 @@ void KSCD::populateSongList(QString infoStatus) unsigned mysec; mymin = tmp / 60000; mysec = (tmp % 60000) / 1000; - QString str1; + TQString str1; str1.sprintf("%02d: ", i + 1); - QString str2; + TQString str2; str2.sprintf(" (%02d:%02d) ", mymin, mysec); str1.append(cddbInfo.trackInfoList[i].title); str1.append(str2); @@ -1635,7 +1635,7 @@ int main( int argc, char *argv[] ) DCOPRef ref("kscd", "CDPlayer"); if (args->count() > 0) { - ref.send("setDevice(QString)", QString(args->arg(0))); + ref.send("setDevice(TQString)", TQString(args->arg(0))); } if (args->isSet("start")) { diff --git a/kscd/kscd.h b/kscd/kscd.h index d5735e20..0a6bca7d 100644 --- a/kscd/kscd.h +++ b/kscd/kscd.h @@ -35,18 +35,18 @@ class KCompactDisc; #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include "ledlamp.h" #include "panel.h" @@ -67,7 +67,7 @@ class KToggleAction; using namespace KCDDB; -typedef QValueList RandomList; +typedef TQValueList RandomList; class KSCD : public kscdPanelDlg, public KSessionManaged, virtual public DCOPObject { @@ -96,31 +96,31 @@ k_dcop: void volumeDown() { decVolume(); } void volumeUp() { incVolume(); } void setVolume(int v); - void setDevice(const QString& dev); + void setDevice(const TQString& dev); int getVolume() { return Prefs::volume(); } int currentTrack(); int currentTrackLength(); int currentPosition(); int getStatus(); - QString currentTrackTitle(); - QString currentAlbum(); - QString currentArtist(); - QStringList trackList(); + TQString currentTrackTitle(); + TQString currentAlbum(); + TQString currentArtist(); + TQStringList trackList(); public: - KSCD( QWidget *parent = 0, const char *name = 0 ); + KSCD( TQWidget *parent = 0, const char *name = 0 ); ~KSCD(); virtual bool saveState(QSessionManager& sm); void setDocking(bool dock); bool digitalPlayback(); void setDevicePaths(); - QStringList audioSystems() { return audio_systems_list; } + TQStringList audioSystems() { return audio_systems_list; } KActionCollection* actionCollection() { return m_actions; } signals: - void trackChanged(const QString&); + void trackChanged(const TQString&); public slots: void setColors(); @@ -165,16 +165,16 @@ protected: void dragTime(int sec); - void closeEvent(QCloseEvent *e); - void keyPressEvent( QKeyEvent* e ); - bool event( QEvent *e ); - // void focusOutEvent(QFocusEvent *e); + void closeEvent(TQCloseEvent *e); + void keyPressEvent( TQKeyEvent* e ); + bool event( TQEvent *e ); + // void focusOutEvent(TQFocusEvent *e); void playtime(); void playtime(int seconds); void calculateDisplayedTime(); void calculateDisplayedTime(int sec); void setSongListTo(int whichTrack); - void populateSongList(QString infoStatus); + void populateSongList(TQString infoStatus); void updatePlayPB(bool playing); void updateConfigDialog(configWidget* widget); @@ -182,16 +182,16 @@ protected: private: KConfigDialog *configDialog; CDDBDlg *cddialog; - QPopupMenu *mainPopup; - QPopupMenu *infoPopup; + TQPopupMenu *mainPopup; + TQPopupMenu *infoPopup; BW_LED_Number *trackTimeLED[6]; KCompactDisc *m_cd; - QTimer titlelabeltimer; - QTimer queryledtimer; - QTimer cycletimer; - QTimer jumpTrackTimer; + TQTimer titlelabeltimer; + TQTimer queryledtimer; + TQTimer cycletimer; + TQTimer jumpTrackTimer; // random playlists KRandomSequence randSequence; @@ -204,7 +204,7 @@ private: LedLamp *loopled; bool randomplay_pending; bool updateTime; - QStringList audio_systems_list; + TQStringList audio_systems_list; /** * select a random track from the current disc. @@ -220,7 +220,7 @@ private: * Info from CDDB, and exploded versions thereof. */ KCDDB::CDInfo cddbInfo; - QStringList playlist; + TQStringList playlist; KCDDB::Client* cddb; KActionCollection* m_actions; KGlobalAccel* m_globalAccel; diff --git a/kscd/ledlamp.cpp b/kscd/ledlamp.cpp index bfaa5c4e..96675921 100644 --- a/kscd/ledlamp.cpp +++ b/kscd/ledlamp.cpp @@ -19,14 +19,14 @@ #include -#include -#include -#include -#include +#include +#include +#include +#include #include "ledlamp.h" #include "ledlamp.moc" -LedLamp::LedLamp(QWidget *parent, Type t) : QFrame(parent), +LedLamp::LedLamp(TQWidget *parent, Type t) : TQFrame(parent), w( 10 ), h( 7 ), dx( 4 ) { // Make sure we're in a sane state @@ -39,15 +39,15 @@ LedLamp::LedLamp(QWidget *parent, Type t) : QFrame(parent), } // LedLamp void -LedLamp::drawContents(QPainter *painter) +LedLamp::drawContents(TQPainter *painter) { - QBrush lightBrush(this->foregroundColor()); - QBrush darkBrush(this->backgroundColor()); + TQBrush lightBrush(this->foregroundColor()); + TQBrush darkBrush(this->backgroundColor()); - QPen darkPen(this->backgroundColor(),1); - QPen lightPen(this->foregroundColor(), 1); + TQPen darkPen(this->backgroundColor(),1); + TQPen lightPen(this->foregroundColor(), 1); switch(s) { diff --git a/kscd/ledlamp.h b/kscd/ledlamp.h index ccabee32..af37edc7 100644 --- a/kscd/ledlamp.h +++ b/kscd/ledlamp.h @@ -23,7 +23,7 @@ #ifndef LED_LAMP_H #define LED_LAMP_H -#include +#include class LedLamp : public QFrame @@ -33,7 +33,7 @@ public: enum Type { Rect, Loop }; - LedLamp(QWidget *parent=0, Type t=Rect); + LedLamp(TQWidget *parent=0, Type t=Rect); enum State { On, Off }; @@ -50,7 +50,7 @@ public slots: void on() { setState(On); }; void off() { setState(Off); }; protected: - void drawContents(QPainter *); + void drawContents(TQPainter *); private: const int w; const int h; diff --git a/libkcddb/asynccddbplookup.cpp b/libkcddb/asynccddbplookup.cpp index 27454298..d2584adf 100644 --- a/libkcddb/asynccddbplookup.cpp +++ b/libkcddb/asynccddbplookup.cpp @@ -39,21 +39,21 @@ namespace KCDDB CDDB::Result AsyncCDDBPLookup::lookup ( - const QString & hostname, + const TQString & hostname, uint port, const TrackOffsetList & trackOffsetList ) { - socket_ = new KNetwork::KBufferedSocket(hostname,QString::number(port)); + socket_ = new KNetwork::KBufferedSocket(hostname,TQString::number(port)); socket_->setBlocking( false ); - connect (socket_, SIGNAL(gotError(int)), SLOT(slotGotError(int))); + connect (socket_, TQT_SIGNAL(gotError(int)), TQT_SLOT(slotGotError(int))); - connect (socket_, SIGNAL( connected(const KResolverEntry &) ), - SLOT( slotConnectionSuccess() ) ); + connect (socket_, TQT_SIGNAL( connected(const KResolverEntry &) ), + TQT_SLOT( slotConnectionSuccess() ) ); - connect (socket_, SIGNAL( readyRead() ), SLOT( slotReadyRead() ) ); + connect (socket_, TQT_SIGNAL( readyRead() ), TQT_SLOT( slotReadyRead() ) ); if ( trackOffsetList.count() < 3 ) return UnknownError; @@ -62,7 +62,7 @@ namespace KCDDB state_ = WaitingForConnection; - if ( !socket_->connect(hostname, QString::number(port)) ) + if ( !socket_->connect(hostname, TQString::number(port)) ) { state_ = Idle; emit finished( NoResponse ); @@ -164,7 +164,7 @@ namespace KCDDB case WaitingForMoreMatches: { - QString line = readLine(); + TQString line = readLine(); if (line.startsWith(".")) requestCDInfoForMatch(); @@ -192,7 +192,7 @@ namespace KCDDB case WaitingForCDInfoData: { - QString line = readLine(); + TQString line = readLine(); if (line.startsWith(".")) { @@ -227,7 +227,7 @@ namespace KCDDB QString AsyncCDDBPLookup::readLine() { - return QString::fromUtf8(socket_->readLine()); + return TQString::fromUtf8(socket_->readLine()); } void diff --git a/libkcddb/asynccddbplookup.h b/libkcddb/asynccddbplookup.h index 661c76f7..17b72f48 100644 --- a/libkcddb/asynccddbplookup.h +++ b/libkcddb/asynccddbplookup.h @@ -21,7 +21,7 @@ #ifndef KCDDB_ASYNC_CDDBP_LOOKUP_H #define KCDDB_ASYNC_CDDBP_LOOKUP_H -#include +#include #include "cddbplookup.h" @@ -51,7 +51,7 @@ namespace KCDDB virtual ~AsyncCDDBPLookup(); - Result lookup( const QString &, uint, const TrackOffsetList & ); + Result lookup( const TQString &, uint, const TrackOffsetList & ); signals: @@ -71,22 +71,22 @@ namespace KCDDB void doQuery(); void doQuit(); - bool parseQueryResponse( const QString & ); + bool parseQueryResponse( const TQString & ); void requestCDInfoForMatch(); - bool parseCDInfoResponse( const QString & ); + bool parseCDInfoResponse( const TQString & ); void parseCDInfoData(); void read(); - QString readLine(); + TQString readLine(); - QString stateToString() const; + TQString stateToString() const; private: State state_; Result result_; - QStringList cdInfoBuffer_; + TQStringList cdInfoBuffer_; }; } diff --git a/libkcddb/asynchttplookup.cpp b/libkcddb/asynchttplookup.cpp index 97a91e5d..45eb4353 100644 --- a/libkcddb/asynchttplookup.cpp +++ b/libkcddb/asynchttplookup.cpp @@ -18,8 +18,8 @@ Boston, MA 02110-1301, USA. */ -#include -#include +#include +#include #include #include @@ -42,7 +42,7 @@ namespace KCDDB CDDB::Result AsyncHTTPLookup::lookup ( - const QString & hostName, + const TQString & hostName, uint port, const TrackOffsetList & trackOffsetList ) @@ -52,8 +52,8 @@ namespace KCDDB trackOffsetList_ = trackOffsetList; - connect( this, SIGNAL( queryReady() ), SLOT( slotQueryReady() ) ); - connect( this, SIGNAL( readReady() ), SLOT( requestCDInfoForMatch() ) ); + connect( this, TQT_SIGNAL( queryReady() ), TQT_SLOT( slotQueryReady() ) ); + connect( this, TQT_SIGNAL( readReady() ), TQT_SLOT( requestCDInfoForMatch() ) ); initURL( hostName, port ); @@ -66,7 +66,7 @@ namespace KCDDB CDDB::Result AsyncHTTPLookup::runQuery() { - data_ = QByteArray(); + data_ = TQByteArray(); state_ = WaitingForQueryResponse; result_ = sendQuery(); @@ -101,7 +101,7 @@ namespace KCDDB CDDBMatch match = matchList_.first(); matchList_.remove( match ); - data_ = QByteArray(); + data_ = TQByteArray(); state_ = WaitingForReadResponse; result_ = sendRead( match ); @@ -111,11 +111,11 @@ namespace KCDDB } void - AsyncHTTPLookup::slotData( KIO::Job *, const QByteArray &data ) + AsyncHTTPLookup::slotData( KIO::Job *, const TQByteArray &data ) { if (data.size() > 0) { - QDataStream stream(data_, IO_WriteOnly | IO_Append); + TQDataStream stream(data_, IO_WriteOnly | IO_Append); stream.writeRawBytes(data.data(), data.size()); } } @@ -144,10 +144,10 @@ namespace KCDDB if ( 0 == job ) return ServerError; - 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 * ) ) ); return Success; } diff --git a/libkcddb/asynchttplookup.h b/libkcddb/asynchttplookup.h index 4826dbf9..80926211 100644 --- a/libkcddb/asynchttplookup.h +++ b/libkcddb/asynchttplookup.h @@ -35,7 +35,7 @@ namespace KCDDB AsyncHTTPLookup(); virtual ~AsyncHTTPLookup(); - Result lookup( const QString &, uint, const TrackOffsetList & ); + Result lookup( const TQString &, uint, const TrackOffsetList & ); CDInfoList lookupResponse() const; @@ -47,7 +47,7 @@ namespace KCDDB void slotQueryReady(); void requestCDInfoForMatch(); - void slotData( KIO::Job *, const QByteArray & ); + void slotData( KIO::Job *, const TQByteArray & ); void slotResult( KIO::Job * ); protected: diff --git a/libkcddb/asynchttpsubmit.cpp b/libkcddb/asynchttpsubmit.cpp index cea272cf..6932b49b 100644 --- a/libkcddb/asynchttpsubmit.cpp +++ b/libkcddb/asynchttpsubmit.cpp @@ -23,7 +23,7 @@ namespace KCDDB { - AsyncHTTPSubmit::AsyncHTTPSubmit(const QString& from, const QString& hostname, uint port) + AsyncHTTPSubmit::AsyncHTTPSubmit(const TQString& from, const TQString& hostname, uint port) : HTTPSubmit(from, hostname, port) { @@ -36,7 +36,7 @@ namespace KCDDB CDDB::Result AsyncHTTPSubmit::runJob(KIO::Job* job) { - connect(job, SIGNAL(result(KIO::Job *)), SLOT(slotFinished(KIO::Job *))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), TQT_SLOT(slotFinished(KIO::Job *))); return CDDB::Success; } diff --git a/libkcddb/asynchttpsubmit.h b/libkcddb/asynchttpsubmit.h index 9c50c670..89ab8313 100644 --- a/libkcddb/asynchttpsubmit.h +++ b/libkcddb/asynchttpsubmit.h @@ -27,7 +27,7 @@ namespace KCDDB { Q_OBJECT public: - AsyncHTTPSubmit(const QString& from, const QString& hostname, uint port); + AsyncHTTPSubmit(const TQString& from, const TQString& hostname, uint port); virtual ~AsyncHTTPSubmit(); signals: diff --git a/libkcddb/asyncsmtpsubmit.cpp b/libkcddb/asyncsmtpsubmit.cpp index 484a0fc2..ff120fac 100644 --- a/libkcddb/asyncsmtpsubmit.cpp +++ b/libkcddb/asyncsmtpsubmit.cpp @@ -19,13 +19,13 @@ #include "asyncsmtpsubmit.h" #include "cdinfo.h" -#include +#include #include namespace KCDDB { - AsyncSMTPSubmit::AsyncSMTPSubmit(const QString& hostname, uint port, - const QString& username, const QString& from, const QString& to ) + AsyncSMTPSubmit::AsyncSMTPSubmit(const TQString& hostname, uint port, + const TQString& username, const TQString& from, const TQString& to ) : SMTPSubmit( hostname, port, username, from, to ) { @@ -38,8 +38,8 @@ namespace KCDDB CDDB::Result AsyncSMTPSubmit::runJob(KIO::Job* job) { - connect( job, SIGNAL( result( KIO::Job* ) ), - this, SLOT(slotDone( KIO::Job* ) ) ); + connect( job, TQT_SIGNAL( result( KIO::Job* ) ), + this, TQT_SLOT(slotDone( KIO::Job* ) ) ); return Success; } diff --git a/libkcddb/asyncsmtpsubmit.h b/libkcddb/asyncsmtpsubmit.h index 57f87302..9bcf84eb 100644 --- a/libkcddb/asyncsmtpsubmit.h +++ b/libkcddb/asyncsmtpsubmit.h @@ -29,8 +29,8 @@ namespace KCDDB Q_OBJECT public: - AsyncSMTPSubmit(const QString& hostname, uint port, const QString& username, - const QString& from, const QString& to); + AsyncSMTPSubmit(const TQString& hostname, uint port, const TQString& username, + const TQString& from, const TQString& to); virtual ~AsyncSMTPSubmit(); signals: diff --git a/libkcddb/cache.cpp b/libkcddb/cache.cpp index 3c2d778e..01c5dec0 100644 --- a/libkcddb/cache.cpp +++ b/libkcddb/cache.cpp @@ -22,8 +22,8 @@ #include #include -#include -#include +#include +#include #include "cache.h" #include "config.h" @@ -31,9 +31,9 @@ namespace KCDDB { QString - Cache::fileName( const QString &category, const QString &discid, const QString &cacheDir ) + Cache::fileName( const TQString &category, const TQString &discid, const TQString &cacheDir ) { - QDir dir( cacheDir ); + TQDir dir( cacheDir ); if ( !dir.exists( category ) ) dir.mkdir( category ); @@ -41,34 +41,34 @@ namespace KCDDB } CDInfoList - Cache::lookup( const QString &cddbId ) + Cache::lookup( const TQString &cddbId ) { kdDebug(60010) << "Looking up " << cddbId << " in CDDB cache" << endl; CDInfoList infoList; Config c; c.readConfig(); - QStringList cddbCacheDirs = c.cacheLocations(); + TQStringList cddbCacheDirs = c.cacheLocations(); - for (QStringList::Iterator cddbCacheDir = cddbCacheDirs.begin(); + for (TQStringList::Iterator cddbCacheDir = cddbCacheDirs.begin(); cddbCacheDir != cddbCacheDirs.end(); ++cddbCacheDir) { - QDir dir( *cddbCacheDir ); - QStringList dirList = dir.entryList( QDir::Dirs ); + TQDir dir( *cddbCacheDir ); + TQStringList dirList = dir.entryList( TQDir::Dirs ); - QStringList::ConstIterator it = dirList.begin(); + TQStringList::ConstIterator it = dirList.begin(); while ( it != dirList.end() ) { - QString category( *it ); + TQString category( *it ); if ( category[ 0 ] != '.' ) { - QFile f( *cddbCacheDir + "/" + category + "/" + cddbId ); + TQFile f( *cddbCacheDir + "/" + category + "/" + cddbId ); if ( f.exists() && f.open(IO_ReadOnly) ) { - QTextStream ts(&f); - ts.setEncoding(QTextStream::UnicodeUTF8); - QString cddbData = ts.read(); + TQTextStream ts(&f); + ts.setEncoding(TQTextStream::UnicodeUTF8); + TQString cddbData = ts.read(); f.close(); CDInfo info; info.load(cddbData); @@ -102,25 +102,25 @@ namespace KCDDB Config c; c.readConfig(); - QString cacheDir = c.cacheLocations().first(); - QDir d(cacheDir); + TQString cacheDir = c.cacheLocations().first(); + TQDir d(cacheDir); if (!d.exists()) d.mkdir(cacheDir); // The same entry can contain several discids (separated by a ','), // so we save the entry to all of them - QStringList discids = QStringList::split(',', info.id); - for (QStringList::Iterator it = discids.begin(); it != discids.end(); ++it) + TQStringList discids = TQStringList::split(',', info.id); + for (TQStringList::Iterator it = discids.begin(); it != discids.end(); ++it) { - QString cacheFile = fileName(info.category, *it, cacheDir); + TQString cacheFile = fileName(info.category, *it, cacheDir); kdDebug(60010) << "Storing " << cacheFile << " in CDDB cache" << endl; - QFile f(cacheFile); + TQFile f(cacheFile); if ( f.open(IO_WriteOnly) ) { - QTextStream ts(&f); - ts.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream ts(&f); + ts.setEncoding(TQTextStream::UnicodeUTF8); ts << info.toString(); f.close(); } diff --git a/libkcddb/cache.h b/libkcddb/cache.h index 4a3a7cfe..5ccf3775 100644 --- a/libkcddb/cache.h +++ b/libkcddb/cache.h @@ -22,8 +22,8 @@ #ifndef KCDDB_CACHE_H #define KCDDB_CACHE_H -#include -#include +#include +#include #include "cdinfo.h" #include @@ -40,7 +40,7 @@ namespace KCDDB Ignore }; - static CDInfoList lookup( const QString & ); + static CDInfoList lookup( const TQString & ); static void store( const CDInfoList & ); // KDE4: Should probably take a TrackOffsetList too, so // the list can be stored in the file, and we can make @@ -49,7 +49,7 @@ namespace KCDDB static void store( const CDInfo & ); private: - static QString fileName( const QString &category, const QString& discid, const QString &cacheDir ); + static TQString fileName( const TQString &category, const TQString& discid, const TQString &cacheDir ); }; } diff --git a/libkcddb/categories.cpp b/libkcddb/categories.cpp index 522da81b..5b86a5f5 100644 --- a/libkcddb/categories.cpp +++ b/libkcddb/categories.cpp @@ -23,7 +23,7 @@ KCDDB::Categories::Categories() i18n("New Age") << i18n("Reggae") << i18n("Rock") << i18n("Soundtrack"); } -const QString KCDDB::Categories::cddb2i18n(const QString &category) const +const TQString KCDDB::Categories::cddb2i18n(const TQString &category) const { int index = m_cddb.findIndex(category.stripWhiteSpace()); if (index != -1) @@ -36,7 +36,7 @@ const QString KCDDB::Categories::cddb2i18n(const QString &category) const } } -const QString KCDDB::Categories::i18n2cddb(const QString &category) const +const TQString KCDDB::Categories::i18n2cddb(const TQString &category) const { int index = m_i18n.findIndex(category.stripWhiteSpace()); if (index != -1) diff --git a/libkcddb/categories.h b/libkcddb/categories.h index 01147111..547e5570 100644 --- a/libkcddb/categories.h +++ b/libkcddb/categories.h @@ -8,8 +8,8 @@ #ifndef KCDDB_CATEGORIES_H #define KCDDB_CATEGORIES_H -#include -#include +#include +#include namespace KCDDB { @@ -21,21 +21,21 @@ namespace KCDDB public: Categories(); - const QStringList &cddbList() const { return m_cddb; }; - const QStringList &i18nList() const { return m_i18n; }; + const TQStringList &cddbList() const { return m_cddb; }; + const TQStringList &i18nList() const { return m_i18n; }; /** * Lookup the CDDB category, and return the i18n'd version. */ - const QString cddb2i18n(const QString &category) const; + const TQString cddb2i18n(const TQString &category) const; /** * Lookup the i18n category, and return the CDDB version. */ - const QString i18n2cddb(const QString &category) const; + const TQString i18n2cddb(const TQString &category) const; private: - QStringList m_cddb; - QStringList m_i18n; + TQStringList m_cddb; + TQStringList m_i18n; }; } diff --git a/libkcddb/cddb.cpp b/libkcddb/cddb.cpp index f1933cd5..f0ee84e0 100644 --- a/libkcddb/cddb.cpp +++ b/libkcddb/cddb.cpp @@ -19,8 +19,8 @@ Boston, MA 02110-1301, USA. */ -#include -#include +#include +#include #include #include @@ -71,34 +71,34 @@ namespace KCDDB id = ( ( id % 255 ) << 24 ) | ( l << 8 ) | numTracks; - return QString::number( id, 16 ).rightJustify( 8, '0' ); + return TQString::number( id, 16 ).rightJustify( 8, '0' ); } QString CDDB::trackOffsetListToString() { - QString ret; + TQString ret; uint numTracks = trackOffsetList_.count()-2; // Disc start. - ret.append( QString::number( numTracks ) ); + ret.append( TQString::number( numTracks ) ); ret.append( " " ); for ( uint i = 0; i < numTracks; i++ ) { - ret.append( QString::number( trackOffsetList_[ i ] ) ); + ret.append( TQString::number( trackOffsetList_[ i ] ) ); ret.append( " " ); } unsigned int discLengthInSec = ( trackOffsetList_[ numTracks+1 ] ) / 75; - ret.append( QString::number( discLengthInSec ) ); + ret.append( TQString::number( discLengthInSec ) ); return ret; } bool - CDDB::parseGreeting( const QString & line ) + CDDB::parseGreeting( const TQString & line ) { uint serverStatus = statusCode( line ); @@ -121,7 +121,7 @@ namespace KCDDB } bool - CDDB::parseHandshake( const QString & line ) + CDDB::parseHandshake( const TQString & line ) { uint serverStatus = statusCode( line ); @@ -137,9 +137,9 @@ namespace KCDDB } uint - CDDB::statusCode( const QString & line ) + CDDB::statusCode( const TQString & line ) { - QStringList tokenList = QStringList::split( ' ', line ); + TQStringList tokenList = TQStringList::split( ' ', line ); uint serverStatus = tokenList[ 0 ].toUInt(); @@ -147,7 +147,7 @@ namespace KCDDB } /* CDDB::Transport - CDDB::stringToTransport(const QString & s) + CDDB::stringToTransport(const TQString & s) { if ("HTTP" == s ) return HTTP; diff --git a/libkcddb/cddb.h b/libkcddb/cddb.h index d0031ebe..04d754c0 100644 --- a/libkcddb/cddb.h +++ b/libkcddb/cddb.h @@ -22,9 +22,9 @@ #ifndef KCDDB_CDDB_H #define KCDDB_CDDB_H -#include -#include -#include +#include +#include +#include #include @@ -38,7 +38,7 @@ namespace KCDDB as the first frame of the first track, the last one is the start frame of the leadout track. */ - typedef QValueList TrackOffsetList; + typedef TQValueList TrackOffsetList; /** This is just a container class used for interpreting results of CDDB queries. @@ -63,23 +63,23 @@ namespace KCDDB CDDB(); virtual ~CDDB(); - static QString resultToString(Result); - static QString trackOffsetListToId( const TrackOffsetList & ); + static TQString resultToString(Result); + static TQString trackOffsetListToId( const TrackOffsetList & ); - static QString clientName() { return QString::fromLatin1("libkcddb"); } - static QString clientVersion() { return QString::fromLatin1("0.31"); } + static TQString clientName() { return TQString::fromLatin1("libkcddb"); } + static TQString clientVersion() { return TQString::fromLatin1("0.31"); } protected: - bool parseGreeting( const QString & ); - bool parseHandshake( const QString & ); + bool parseGreeting( const TQString & ); + bool parseHandshake( const TQString & ); - uint statusCode( const QString & ); + uint statusCode( const TQString & ); - QString trackOffsetListToId(); - QString trackOffsetListToString(); + TQString trackOffsetListToId(); + TQString trackOffsetListToString(); - QString user_; - QString localHostName_; + TQString user_; + TQString localHostName_; bool readOnly_; diff --git a/libkcddb/cddbplookup.cpp b/libkcddb/cddbplookup.cpp index b07d7346..cd287b99 100644 --- a/libkcddb/cddbplookup.cpp +++ b/libkcddb/cddbplookup.cpp @@ -39,7 +39,7 @@ namespace KCDDB void CDDBPLookup::sendHandshake() { - QString handshake = QString( "cddb hello %1 %2 %3 %4" ) + TQString handshake = TQString( "cddb hello %1 %2 %3 %4" ) .arg( user_ ) .arg( localHostName_ ) .arg( clientName() ) @@ -57,7 +57,7 @@ namespace KCDDB void CDDBPLookup::sendQuery() { - QString query = QString( "cddb query %1 %2" ) + TQString query = TQString( "cddb query %1 %2" ) .arg( trackOffsetListToId() ) .arg( trackOffsetListToString() ); @@ -68,9 +68,9 @@ namespace KCDDB CDDBPLookup::sendRead( const CDDBMatch & match ) { category_ = match.first; - QString discid = match.second; + TQString discid = match.second; - QString readRequest = QString( "cddb read %1 %2" ) + TQString readRequest = TQString( "cddb read %1 %2" ) .arg( category_ ) .arg( discid ); @@ -94,7 +94,7 @@ namespace KCDDB } Q_LONG - CDDBPLookup::writeLine( const QString & line ) + CDDBPLookup::writeLine( const TQString & line ) { if ( !isConnected() ) { @@ -103,7 +103,7 @@ namespace KCDDB } kdDebug(60010) << "WRITE: [" << line << "]" << endl; - QCString buf = line.utf8(); + TQCString buf = line.utf8(); buf.append( "\n" ); return socket_->writeBlock( buf.data(), buf.length() ); diff --git a/libkcddb/cddbplookup.h b/libkcddb/cddbplookup.h index fa44ff05..c7983cde 100644 --- a/libkcddb/cddbplookup.h +++ b/libkcddb/cddbplookup.h @@ -42,7 +42,7 @@ namespace KCDDB void close(); protected: - Q_LONG writeLine( const QString & ); + Q_LONG writeLine( const TQString & ); bool isConnected() { return KNetwork::KClientSocketBase::Connected == socket_->state(); } diff --git a/libkcddb/cdinfo.cpp b/libkcddb/cdinfo.cpp index 12009cb8..bf69f853 100644 --- a/libkcddb/cdinfo.cpp +++ b/libkcddb/cdinfo.cpp @@ -90,38 +90,38 @@ namespace KCDDB return *this; } - QVariant TrackInfo::get(const QString &type) const { + TQVariant TrackInfo::get(const TQString &type) const { if(type == "title") return title; if(type == "extt") return extt; - return QVariant(); + return TQVariant(); } bool - CDInfo::load(const QString & s) + CDInfo::load(const TQString & s) { - return load(QStringList::split('\n', s)); + return load(TQStringList::split('\n', s)); } bool - CDInfo::load(const QStringList & lineList) + CDInfo::load(const TQStringList & lineList) { clear(); // We'll append to this until we've seen all the lines, then parse it after. - QString dtitle; + TQString dtitle; - QStringList::ConstIterator it = lineList.begin(); + TQStringList::ConstIterator it = lineList.begin(); - QRegExp rev("# Revision: (\\d+)"); + TQRegExp rev("# Revision: (\\d+)"); while ( it != lineList.end() ) { - QString line(*it); + TQString line(*it); ++it; - QStringList tokenList = KStringHandler::perlSplit('=', line, 2); + TQStringList tokenList = KStringHandler::perlSplit('=', line, 2); if (rev.search(line) != -1) { @@ -129,8 +129,8 @@ namespace KCDDB continue; } - QString key = tokenList[0].stripWhiteSpace(); - QString value; + TQString key = tokenList[0].stripWhiteSpace(); + TQString value; if (2 != tokenList.count()) { if (!key.startsWith("EXT")) @@ -201,26 +201,26 @@ namespace KCDDB QString CDInfo::toString(bool submit) const { - QString s; + TQString s; if (revision != 0) - s += "# Revision: " + QString::number(revision) + "\n"; + s += "# Revision: " + TQString::number(revision) + "\n"; if (submit) { s += "#\n"; - s += QString("# Submitted via: %1 %2\n").arg(CDDB::clientName(), + s += TQString("# Submitted via: %1 %2\n").arg(CDDB::clientName(), CDDB::clientVersion()); } s += "DISCID=" + escape( id ) + "\n"; s += createLine("DTITLE",escape( artist ) + " / " + escape( title )); - s += "DYEAR=" + (0 == year ? QString::null : QString::number(year)) + "\n"; + s += "DYEAR=" + (0 == year ? TQString::null : TQString::number(year)) + "\n"; s += createLine("DGENRE",escape( genre )); for (uint i = 0; i < trackInfoList.count(); ++i) { - s += createLine(QString("TTITLE%1").arg(i), + s += createLine(TQString("TTITLE%1").arg(i), escape( trackInfoList[ i ].title)); } @@ -228,7 +228,7 @@ namespace KCDDB for (uint i = 0; i < trackInfoList.count(); ++i) { - s += createLine(QString("EXTT%1").arg(i), escape(trackInfoList[i].extt)); + s += createLine(TQString("EXTT%1").arg(i), escape(trackInfoList[i].extt)); } s +="PLAYORDER=\n"; @@ -239,23 +239,23 @@ namespace KCDDB // Creates a line in the form NAME=VALUE, and splits it into several // lines if the line gets longer than 256 chars QString - CDInfo::createLine(const QString& name, const QString& value) const + CDInfo::createLine(const TQString& name, const TQString& value) const { Q_ASSERT(name.length() < 254); uint maxLength = 256 - name.length() - 2; - QString tmpValue = value; + TQString tmpValue = value; - QString lines; + TQString lines; while (tmpValue.length() > maxLength) { - lines += QString("%1=%2\n").arg(name,tmpValue.left(maxLength)); + lines += TQString("%1=%2\n").arg(name,tmpValue.left(maxLength)); tmpValue = tmpValue.mid(maxLength); } - lines += QString("%1=%2\n").arg(name,tmpValue); + lines += TQString("%1=%2\n").arg(name,tmpValue); return lines; } @@ -271,9 +271,9 @@ namespace KCDDB } QString - CDInfo::escape( const QString& value ) + CDInfo::escape( const TQString& value ) { - QString s = value; + TQString s = value; s.replace( "\\", "\\\\" ); s.replace( "\n", "\\n" ); s.replace( "\t", "\\t" ); @@ -282,9 +282,9 @@ namespace KCDDB } QString - CDInfo::unescape( const QString& value ) + CDInfo::unescape( const TQString& value ) { - QString s = value; + TQString s = value; s.replace( "\\n", "\n" ); s.replace( "\\t", "\t" ); @@ -296,7 +296,7 @@ namespace KCDDB void CDInfo::clear() { - id = artist = title = genre = extd = QString::null; + id = artist = title = genre = extd = TQString::null; length = year = revision = 0; trackInfoList.clear(); } @@ -313,7 +313,7 @@ namespace KCDDB return true; } - QVariant CDInfo::get(const QString &type) const { + TQVariant CDInfo::get(const TQString &type) const { if(type == "id") return id; if(type == "artist") @@ -332,7 +332,7 @@ namespace KCDDB return length; if(type == "revision") return revision; - return QVariant(); + return TQVariant(); } } diff --git a/libkcddb/cdinfo.h b/libkcddb/cdinfo.h index fb547672..afa66adc 100644 --- a/libkcddb/cdinfo.h +++ b/libkcddb/cdinfo.h @@ -22,10 +22,10 @@ #ifndef KCDDB_CDINFO_H #define KCDDB_CDINFO_H -#include -#include +#include +#include #include -#include +#include namespace KCDDB { @@ -46,16 +46,16 @@ namespace KCDDB * @p type is case insensitive. * For example get("title") */ - QVariant get(const QString &type) const; + TQVariant get(const TQString &type) const; #ifndef KDE_NO_COMPAT // Use get("title"); - QString title; + TQString title; // Use get("extt"); - QString extt; + TQString extt; #endif }; - typedef QValueList TrackInfoList; + typedef TQValueList TrackInfoList; /** * Information about a CD @@ -78,12 +78,12 @@ namespace KCDDB * Load CDInfo from a string that is CDDB compatible * @return true if successful */ - bool load(const QString &); + bool load(const TQString &); /** * Load CDInfo from a stringList that is CDDB compatible * @return true if successful */ - bool load(const QStringList &); + bool load(const TQStringList &); /** * Clear all information, setting this to invalid @@ -99,21 +99,21 @@ namespace KCDDB * @param submit If submit is true only returns CDDB compatible information * @return a string containing all of the CD's information. */ - QString toString(bool submit=false) const; + TQString toString(bool submit=false) const; /** * Get data for type that has been assigned to this disc. * @p type is case insensitive. * For example get("title") */ - QVariant get(const QString &type) const; + TQVariant get(const TQString &type) const; // Use get(...) - QString id; - QString artist; - QString title; - QString genre; - QString category; - QString extd; + TQString id; + TQString artist; + TQString title; + TQString genre; + TQString category; + TQString extd; uint year; uint length; // in milliseconds uint revision; @@ -124,7 +124,7 @@ namespace KCDDB /** * @returns a valid CDDB line made up of name and value */ - QString createLine(const QString& name, const QString& value) const; + TQString createLine(const TQString& name, const TQString& value) const; /** * Checks to make sure that trackNumber exists */ @@ -132,14 +132,14 @@ namespace KCDDB /** * escape's string for CDDB processing */ - static QString escape( const QString & ); + static TQString escape( const TQString & ); /** * fixes an escaped string that has been CDDB processed */ - static QString unescape( const QString & ); + static TQString unescape( const TQString & ); }; - typedef QValueList CDInfoList; + typedef TQValueList CDInfoList; } #endif // KCDDB_CDINFO_H diff --git a/libkcddb/cdinfodialogbase.ui.h b/libkcddb/cdinfodialogbase.ui.h index 1291010a..e33ad487 100644 --- a/libkcddb/cdinfodialogbase.ui.h +++ b/libkcddb/cdinfodialogbase.ui.h @@ -7,7 +7,7 @@ ** place of a destructor. *****************************************************************************/ -#include +#include #include #include #include @@ -25,7 +25,7 @@ void CDInfoDialogBase::init() m_genre->insertStringList(m_genres.i18nList()); // We want control over the visibility of this column. See artistChanged(). - m_trackList->setColumnWidthMode(TRACK_ARTIST, QListView::Manual); + m_trackList->setColumnWidthMode(TRACK_ARTIST, TQListView::Manual); // Make the user-definable values in-place editable. m_trackList->setRenameable(TRACK_NUMBER, false); @@ -39,7 +39,7 @@ void CDInfoDialogBase::destroy() { } -void CDInfoDialogBase::slotTrackSelected( QListViewItem *item ) +void CDInfoDialogBase::slotTrackSelected( TQListViewItem *item ) { emit play(item->text(0).toUInt()-1); } @@ -48,13 +48,13 @@ void CDInfoDialogBase::slotNextTrack() { if (m_trackList->currentItem()) { - QListViewItem *item = m_trackList->currentItem()->nextSibling(); + TQListViewItem *item = m_trackList->currentItem()->nextSibling(); m_trackList->setSelected(item, true); m_trackList->ensureItemVisible(item); } } -void CDInfoDialogBase::slotTrackDoubleClicked( QListViewItem *item, const QPoint &, int column) +void CDInfoDialogBase::slotTrackDoubleClicked( TQListViewItem *item, const TQPoint &, int column) { m_trackList->rename(item, column); } @@ -66,7 +66,7 @@ void CDInfoDialogBase::setInfo( const KCDDB::CDInfo &info, KCDDB::TrackOffsetLis m_category->setCurrentText(m_categories.cddb2i18n(info.category)); // Make sure the revision is set before the genre to allow the genreChanged() handler to fire. - m_revision->setText(QString::number(info.revision)); + m_revision->setText(TQString::number(info.revision)); m_genre->setCurrentText(m_genres.cddb2i18n(info.genre)); m_year->setValue(info.year); m_comment->setText(info.extd.stripWhiteSpace()); @@ -78,11 +78,11 @@ void CDInfoDialogBase::setInfo( const KCDDB::CDInfo &info, KCDDB::TrackOffsetLis m_trackList->clear(); for (unsigned i = 0; i < tracks; i++) { - QListViewItem *item = new QListViewItem(m_trackList, 0); + TQListViewItem *item = new TQListViewItem(m_trackList, 0); - item->setText(TRACK_NUMBER, QString().sprintf("%02d", i + 1)); + item->setText(TRACK_NUMBER, TQString().sprintf("%02d", i + 1)); item->setText(TRACK_TIME, framesTime(trackStartFrames[i + ((i + 1 < tracks) ? 1 : 2)] - trackStartFrames[i])); - QString title = info.trackInfoList[i].title; + TQString title = info.trackInfoList[i].title; int separator = title.find(SEPARATOR); if (info.artist != "Various" || separator == -1 || !m_multiple->isChecked() ) { @@ -104,16 +104,16 @@ void CDInfoDialogBase::setInfo( const KCDDB::CDInfo &info, KCDDB::TrackOffsetLis } } -QString CDInfoDialogBase::framesTime(unsigned frames) +TQString CDInfoDialogBase::framesTime(unsigned frames) { - QTime time; + TQTime time; double ms; ms = frames * 1000 / 75.0; time = time.addMSecs((int)ms); // Use ".zzz" for milliseconds... - QString temp2; + TQString temp2; if (time.hour() > 0) temp2 = time.toString("hh:mm:ss"); else @@ -134,10 +134,10 @@ KCDDB::CDInfo CDInfoDialogBase::info() const info.extd = m_comment->text().stripWhiteSpace(); info.revision = m_revision->text().stripWhiteSpace().toUInt(); info.id = m_id->text().stripWhiteSpace(); - for (QListViewItem *item = m_trackList->firstChild(); item; item=item->nextSibling()) + for (TQListViewItem *item = m_trackList->firstChild(); item; item=item->nextSibling()) { // Combine the track artist if present with the title. - QString trackArtist = item->text(TRACK_ARTIST).stripWhiteSpace(); + TQString trackArtist = item->text(TRACK_ARTIST).stripWhiteSpace(); track.title = trackArtist; if (!trackArtist.isEmpty()) { @@ -153,7 +153,7 @@ KCDDB::CDInfo CDInfoDialogBase::info() const } -void CDInfoDialogBase::artistChanged( const QString &newArtist ) +void CDInfoDialogBase::artistChanged( const TQString &newArtist ) { // Enable special handling of compilations. if (newArtist.stripWhiteSpace().compare("Various")) { @@ -163,7 +163,7 @@ void CDInfoDialogBase::artistChanged( const QString &newArtist ) } } -void CDInfoDialogBase::genreChanged( const QString &newGenre ) +void CDInfoDialogBase::genreChanged( const TQString &newGenre ) { // Disable changes to category if the version number indicates that a record // is already in the database, or if the genre is poorly set. The latter @@ -176,9 +176,9 @@ void CDInfoDialogBase::genreChanged( const QString &newGenre ) void CDInfoDialogBase::slotMultipleArtists( bool hasMultipleArtist) { if(hasMultipleArtist){ - for (QListViewItem *item = m_trackList->firstChild(); item; item=item->nextSibling()) + for (TQListViewItem *item = m_trackList->firstChild(); item; item=item->nextSibling()) { - QString title = item->text(TRACK_TITLE); + TQString title = item->text(TRACK_TITLE); int separator = title.find(SEPARATOR); if (separator != -1) { @@ -191,12 +191,12 @@ void CDInfoDialogBase::slotMultipleArtists( bool hasMultipleArtist) m_trackList->adjustColumn(TRACK_TITLE); } else{ - for (QListViewItem *item = m_trackList->firstChild(); item; item=item->nextSibling()) + for (TQListViewItem *item = m_trackList->firstChild(); item; item=item->nextSibling()) { - QString artist = item->text(TRACK_ARTIST); + TQString artist = item->text(TRACK_ARTIST); if (!artist.isEmpty()) { - item->setText(TRACK_ARTIST, QString::null); + item->setText(TRACK_ARTIST, TQString::null); item->setText(TRACK_TITLE, artist + SEPARATOR + item->text(TRACK_TITLE)); } } @@ -213,10 +213,10 @@ void CDInfoDialogBase::slotChangeEncoding() KDialogBase* dialog = new KDialogBase(this, 0, true, i18n("Change Encoding"), KDialogBase::Ok | KDialogBase::Cancel); - QStringList songTitles; - for (QListViewItem *item = m_trackList->firstChild(); item; item=item->nextSibling()) + TQStringList songTitles; + for (TQListViewItem *item = m_trackList->firstChild(); item; item=item->nextSibling()) { - QString title = item->text(TRACK_ARTIST).stripWhiteSpace(); + TQString title = item->text(TRACK_ARTIST).stripWhiteSpace(); if (!title.isEmpty()) title.append(SEPARATOR); title.append(item->text(TRACK_TITLE).stripWhiteSpace()); @@ -231,14 +231,14 @@ void CDInfoDialogBase::slotChangeEncoding() if (dialog->exec()) { KCharsets* charsets = KGlobal::charsets(); - QTextCodec* codec = charsets->codecForName(charsets->encodingForName(encWidget->selectedEncoding())); + TQTextCodec* codec = charsets->codecForName(charsets->encodingForName(encWidget->selectedEncoding())); m_artist->setText(codec->toUnicode(m_artist->text().latin1())); m_title->setText(codec->toUnicode(m_title->text().latin1())); m_genre->setCurrentText(codec->toUnicode(m_genre->currentText().latin1())); m_comment->setText(codec->toUnicode(m_comment->text().latin1())); - for (QListViewItem *item = m_trackList->firstChild(); item; item=item->nextSibling()) + for (TQListViewItem *item = m_trackList->firstChild(); item; item=item->nextSibling()) { item->setText(TRACK_ARTIST,codec->toUnicode(item->text(TRACK_ARTIST).latin1())); item->setText(TRACK_TITLE,codec->toUnicode(item->text(TRACK_TITLE).latin1())); diff --git a/libkcddb/cdinfoencodingwidget.cpp b/libkcddb/cdinfoencodingwidget.cpp index 434d1169..42d0e506 100644 --- a/libkcddb/cdinfoencodingwidget.cpp +++ b/libkcddb/cdinfoencodingwidget.cpp @@ -17,10 +17,10 @@ Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include @@ -28,8 +28,8 @@ namespace KCDDB { - CDInfoEncodingWidget::CDInfoEncodingWidget(QWidget* parent, const QString& artist, - const QString& title, const QStringList& songTitles) + CDInfoEncodingWidget::CDInfoEncodingWidget(TQWidget* parent, const TQString& artist, + const TQString& title, const TQStringList& songTitles) : CDInfoEncodingWidgetBase(parent), m_artist(artist), m_title(title), m_songTitles(songTitles) { @@ -37,25 +37,25 @@ namespace KCDDB slotEncodingChanged(encodingCombo->currentText()); - connect(encodingCombo,SIGNAL(activated(const QString&)), - this,SLOT(slotEncodingChanged(const QString&))); + connect(encodingCombo,TQT_SIGNAL(activated(const TQString&)), + this,TQT_SLOT(slotEncodingChanged(const TQString&))); } - QString CDInfoEncodingWidget::selectedEncoding() + TQString CDInfoEncodingWidget::selectedEncoding() { return encodingCombo->currentText(); } - void CDInfoEncodingWidget::slotEncodingChanged(const QString& encoding) + void CDInfoEncodingWidget::slotEncodingChanged(const TQString& encoding) { KCharsets* charsets = KGlobal::charsets(); - QTextCodec* codec = charsets->codecForName(charsets->encodingForName(encoding)); + TQTextCodec* codec = charsets->codecForName(charsets->encodingForName(encoding)); songsBox->clear(); - QStringList newTitles; + TQStringList newTitles; - for (QStringList::const_iterator it = m_songTitles.begin(); + for (TQStringList::const_iterator it = m_songTitles.begin(); it != m_songTitles.end(); ++it) newTitles << codec->toUnicode((*it).latin1()); diff --git a/libkcddb/cdinfoencodingwidget.h b/libkcddb/cdinfoencodingwidget.h index 010767ea..7182b44f 100644 --- a/libkcddb/cdinfoencodingwidget.h +++ b/libkcddb/cdinfoencodingwidget.h @@ -28,17 +28,17 @@ namespace KCDDB { Q_OBJECT public: - CDInfoEncodingWidget(QWidget* parent, const QString& artist, const QString& title, - const QStringList& songTitles); + CDInfoEncodingWidget(TQWidget* parent, const TQString& artist, const TQString& title, + const TQStringList& songTitles); - QString selectedEncoding(); + TQString selectedEncoding(); private slots: - void slotEncodingChanged(const QString &); + void slotEncodingChanged(const TQString &); private: - QString m_artist, m_title; - QStringList m_songTitles; + TQString m_artist, m_title; + TQStringList m_songTitles; } ; } diff --git a/libkcddb/client.cpp b/libkcddb/client.cpp index 1e0b982c..9a06f04d 100644 --- a/libkcddb/client.cpp +++ b/libkcddb/client.cpp @@ -49,7 +49,7 @@ namespace KCDDB }; Client::Client() - : QObject(), + : TQObject(), cdInfoLookup(0), cdInfoSubmit(0) { @@ -113,7 +113,7 @@ namespace KCDDB { d->cdInfoList.clear(); - QString cddbId = Lookup::trackOffsetListToId( trackOffsetList ); + TQString cddbId = Lookup::trackOffsetListToId( trackOffsetList ); if ( cddbId.isNull() ) { @@ -177,16 +177,16 @@ namespace KCDDB cdInfoLookup = new AsyncCDDBPLookup(); connect( static_cast( cdInfoLookup ), - SIGNAL( finished( CDDB::Result ) ), - SLOT( slotFinished( CDDB::Result ) ) ); + TQT_SIGNAL( finished( CDDB::Result ) ), + TQT_SLOT( slotFinished( CDDB::Result ) ) ); } else { cdInfoLookup = new AsyncHTTPLookup(); connect( static_cast( cdInfoLookup ), - SIGNAL( finished( CDDB::Result ) ), - SLOT( slotFinished( CDDB::Result ) ) ); + TQT_SIGNAL( finished( CDDB::Result ) ), + TQT_SLOT( slotFinished( CDDB::Result ) ) ); } r = cdInfoLookup->lookup( d->config.hostname(), @@ -252,13 +252,13 @@ namespace KCDDB // just in case we have a cdInfoSubmit, prevent memory leakage delete cdInfoSubmit; - QString from = d->config.emailAddress(); + TQString from = d->config.emailAddress(); switch (d->config.submitTransport()) { case Submit::HTTP: { - QString hostname = d->config.httpSubmitServer(); + TQString hostname = d->config.httpSubmitServer(); uint port = d->config.httpSubmitPort(); if ( blockingMode() ) @@ -267,17 +267,17 @@ namespace KCDDB { cdInfoSubmit = new AsyncHTTPSubmit(from, hostname, port); connect( static_cast( cdInfoSubmit ), - SIGNAL(finished( CDDB::Result ) ), - SLOT( slotSubmitFinished( CDDB::Result ) ) ); + TQT_SIGNAL(finished( CDDB::Result ) ), + TQT_SLOT( slotSubmitFinished( CDDB::Result ) ) ); } break; } case Submit::SMTP: { - QString hostname = d->config.smtpHostname(); + TQString hostname = d->config.smtpHostname(); uint port = d->config.smtpPort(); - QString username = d->config.smtpUsername(); + TQString username = d->config.smtpUsername(); if ( blockingMode() ) cdInfoSubmit = new SyncSMTPSubmit( hostname, port, username, from, d->config.submitAddress() ); @@ -285,8 +285,8 @@ namespace KCDDB { cdInfoSubmit = new AsyncSMTPSubmit( hostname, port, username, from, d->config.submitAddress() ); connect( static_cast( cdInfoSubmit ), - SIGNAL( finished( CDDB::Result ) ), - SLOT( slotSubmitFinished( CDDB::Result ) ) ); + TQT_SIGNAL( finished( CDDB::Result ) ), + TQT_SLOT( slotSubmitFinished( CDDB::Result ) ) ); } break; } diff --git a/libkcddb/client.h b/libkcddb/client.h index 6f58cec2..3aeb3bd6 100644 --- a/libkcddb/client.h +++ b/libkcddb/client.h @@ -23,7 +23,7 @@ #include "config.h" #include "cdinfo.h" -#include +#include #include "cddb.h" #include diff --git a/libkcddb/config.h b/libkcddb/config.h index 3fd11f75..65bd492e 100644 --- a/libkcddb/config.h +++ b/libkcddb/config.h @@ -26,7 +26,7 @@ #include "cache.h" #include "cddb.h" #include "configbase.h" -#include +#include #include namespace KCDDB { diff --git a/libkcddb/genres.cpp b/libkcddb/genres.cpp index 1eeee324..423e80fc 100644 --- a/libkcddb/genres.cpp +++ b/libkcddb/genres.cpp @@ -94,9 +94,9 @@ KCDDB::Genres::Genres() i18n("Vocal"); } -const QString KCDDB::Genres::cddb2i18n(const QString &genre) const +const TQString KCDDB::Genres::cddb2i18n(const TQString &genre) const { - QString userDefinedGenre = genre.stripWhiteSpace(); + TQString userDefinedGenre = genre.stripWhiteSpace(); int index = m_cddb.findIndex(userDefinedGenre); if (index != -1) { @@ -108,9 +108,9 @@ const QString KCDDB::Genres::cddb2i18n(const QString &genre) const } } -const QString KCDDB::Genres::i18n2cddb(const QString &genre) const +const TQString KCDDB::Genres::i18n2cddb(const TQString &genre) const { - QString userDefinedGenre = genre.stripWhiteSpace(); + TQString userDefinedGenre = genre.stripWhiteSpace(); int index = m_i18n.findIndex(userDefinedGenre); if (index != -1) { diff --git a/libkcddb/genres.h b/libkcddb/genres.h index 4456f894..1e7cab81 100644 --- a/libkcddb/genres.h +++ b/libkcddb/genres.h @@ -8,8 +8,8 @@ #ifndef KCDDB_GENRES_H #define KCDDB_GENRES_H -#include -#include +#include +#include namespace KCDDB { @@ -22,21 +22,21 @@ namespace KCDDB public: Genres(); - const QStringList &cddbList() const { return m_cddb; }; - const QStringList &i18nList() const { return m_i18n; }; + const TQStringList &cddbList() const { return m_cddb; }; + const TQStringList &i18nList() const { return m_i18n; }; /** * Lookup the CDDB genre, and return the i18n'd version. */ - const QString cddb2i18n(const QString &genre) const; + const TQString cddb2i18n(const TQString &genre) const; /** * Lookup the i18n genre, and return the CDDB version if we can. */ - const QString i18n2cddb(const QString &genre) const; + const TQString i18n2cddb(const TQString &genre) const; private: - QStringList m_cddb; - QStringList m_i18n; + TQStringList m_cddb; + TQStringList m_i18n; }; } diff --git a/libkcddb/httplookup.cpp b/libkcddb/httplookup.cpp index db72d23b..c360c423 100644 --- a/libkcddb/httplookup.cpp +++ b/libkcddb/httplookup.cpp @@ -39,7 +39,7 @@ namespace KCDDB CDDB::Result HTTPLookup::sendQuery() { - QString cmd = QString( "cddb query %1 %2" ) + TQString cmd = TQString( "cddb query %1 %2" ) .arg( trackOffsetListToId(), trackOffsetListToString() ) ; makeURL( cmd ); @@ -52,9 +52,9 @@ namespace KCDDB HTTPLookup::sendRead( const CDDBMatch & match ) { category_ = match.first; - QString discid = match.second; + TQString discid = match.second; - QString cmd = QString( "cddb read %1 %2" ) + TQString cmd = TQString( "cddb read %1 %2" ) .arg( category_, discid ); makeURL( cmd ); @@ -64,7 +64,7 @@ namespace KCDDB } void - HTTPLookup::initURL( const QString & hostName, uint port ) + HTTPLookup::initURL( const TQString & hostName, uint port ) { cgiURL_.setProtocol( "http" ); cgiURL_.setHost( hostName ); @@ -75,14 +75,14 @@ namespace KCDDB } void - HTTPLookup::makeURL( const QString & cmd ) + HTTPLookup::makeURL( const TQString & cmd ) { // The whole query has to constructed each time as the // CDDB CGI script expects the parameters in strict order - cgiURL_.setQuery( QString::null ); + cgiURL_.setQuery( TQString::null ); - QString hello = QString("%1 %2 %3 %4") + TQString hello = TQString("%1 %2 %3 %4") .arg(user_, localHostName_, clientName(), clientVersion()); cgiURL_.addQueryItem( "cmd", cmd ); @@ -93,8 +93,8 @@ namespace KCDDB void HTTPLookup::jobFinished() { - QStringList lineList = QStringList::split( "\n", QString::fromUtf8(data_, data_.size()) ); - QStringList::ConstIterator it = lineList.begin(); + TQStringList lineList = TQStringList::split( "\n", TQString::fromUtf8(data_, data_.size()) ); + TQStringList::ConstIterator it = lineList.begin(); switch ( state_ ) { @@ -102,7 +102,7 @@ namespace KCDDB if ( it != lineList.end() ) { - QString line( *it ); + TQString line( *it ); result_ = parseQuery( line ); @@ -119,7 +119,7 @@ namespace KCDDB ++it; while ( it != lineList.end() ) { - QString line( *it ); + TQString line( *it ); if ( '.' == line[ 0 ] ) { @@ -158,7 +158,7 @@ namespace KCDDB { CDInfo info; - if ( info.load( QString::fromUtf8(data_,data_.size()) ) ) + if ( info.load( TQString::fromUtf8(data_,data_.size()) ) ) { info.category = category_; cdInfoList_.append( info ); diff --git a/libkcddb/httplookup.h b/libkcddb/httplookup.h index 8b6066e6..b8f9c179 100644 --- a/libkcddb/httplookup.h +++ b/libkcddb/httplookup.h @@ -53,8 +53,8 @@ namespace KCDDB protected: - void initURL( const QString &, uint ); - void makeURL( const QString & ); + void initURL( const TQString &, uint ); + void makeURL( const TQString & ); virtual Result fetchURL() = 0; void jobFinished(); @@ -71,7 +71,7 @@ namespace KCDDB bool block_; KURL cgiURL_; - QByteArray data_; + TQByteArray data_; State state_; Result result_; }; diff --git a/libkcddb/httpsubmit.cpp b/libkcddb/httpsubmit.cpp index 91c7f3a0..fa4c2d98 100644 --- a/libkcddb/httpsubmit.cpp +++ b/libkcddb/httpsubmit.cpp @@ -23,7 +23,7 @@ namespace KCDDB { - HTTPSubmit::HTTPSubmit(const QString& from, const QString& hostname, uint port) + HTTPSubmit::HTTPSubmit(const TQString& from, const TQString& hostname, uint port) : Submit(), from_(from) { url_.setProtocol("http"); @@ -42,7 +42,7 @@ namespace KCDDB KIO::TransferJob* job = KIO::http_post(url_, diskData_.utf8(), false); job->addMetaData("content-type", "Content-Type: text/plain"); - QString header; + TQString header; header += "Content-Type: text/plain\n"; diff --git a/libkcddb/httpsubmit.h b/libkcddb/httpsubmit.h index 63d837b0..40131ea4 100644 --- a/libkcddb/httpsubmit.h +++ b/libkcddb/httpsubmit.h @@ -27,14 +27,14 @@ namespace KCDDB class HTTPSubmit : public Submit { public: - HTTPSubmit(const QString& from, const QString& hostname, uint port); + HTTPSubmit(const TQString& from, const TQString& hostname, uint port); virtual ~HTTPSubmit(); protected: virtual KIO::Job* createJob(const CDInfo& cdInfo); KURL url_; - QString from_; + TQString from_; } ; } diff --git a/libkcddb/kcmcddb/cddbconfigwidget.cpp b/libkcddb/kcmcddb/cddbconfigwidget.cpp index 70c5e1e9..442efd12 100644 --- a/libkcddb/kcmcddb/cddbconfigwidget.cpp +++ b/libkcddb/kcmcddb/cddbconfigwidget.cpp @@ -23,22 +23,22 @@ #include "libkcddb/sites.h" #include "libkcddb/lookup.h" -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include #include #include #include -#include +#include #include -#include -#include +#include +#include -CDDBConfigWidget::CDDBConfigWidget(QWidget * parent, const char * name) +CDDBConfigWidget::CDDBConfigWidget(TQWidget * parent, const char * name) : CDDBConfigWidgetBase(parent, name) { // Connections from widgets are made in designer. @@ -56,13 +56,13 @@ void CDDBConfigWidget::showMirrorList() { KCDDB::Sites s; - QValueList sites = s.siteList(); - QMap keys; - for (QValueList::Iterator it = sites.begin(); it != sites.end(); ++it) + TQValueList sites = s.siteList(); + TQMap keys; + for (TQValueList::Iterator it = sites.begin(); it != sites.end(); ++it) if ((*it).transport == KCDDB::Lookup::CDDBP) - keys[(*it).address + "(CDDBP, " + QString::number((*it).port) + ") " + (*it).description] = *it; + keys[(*it).address + "(CDDBP, " + TQString::number((*it).port) + ") " + (*it).description] = *it; else - keys[(*it).address + "(HTTP, " + QString::number((*it).port) + ") " + (*it).description] = *it; + keys[(*it).address + "(HTTP, " + TQString::number((*it).port) + ") " + (*it).description] = *it; bool ok; @@ -72,9 +72,9 @@ void CDDBConfigWidget::showMirrorList() return; } - QStringList result = KInputDialog::getItemList(i18n("Select mirror"), + TQStringList result = KInputDialog::getItemList(i18n("Select mirror"), i18n("Select one of these mirrors"), keys.keys(), - QStringList(), false, &ok, this); + TQStringList(), false, &ok, this); if (ok && result.count() == 1) { diff --git a/libkcddb/kcmcddb/cddbconfigwidget.h b/libkcddb/kcmcddb/cddbconfigwidget.h index fafeaffa..2f0363d7 100644 --- a/libkcddb/kcmcddb/cddbconfigwidget.h +++ b/libkcddb/kcmcddb/cddbconfigwidget.h @@ -28,7 +28,7 @@ class CDDBConfigWidget : public CDDBConfigWidgetBase public: - CDDBConfigWidget(QWidget * parent = 0, const char * name = 0); + CDDBConfigWidget(TQWidget * parent = 0, const char * name = 0); protected slots: diff --git a/libkcddb/kcmcddb/kcmcddb.cpp b/libkcddb/kcmcddb/kcmcddb.cpp index 851b7cb1..3688ba6a 100644 --- a/libkcddb/kcmcddb/kcmcddb.cpp +++ b/libkcddb/kcmcddb/kcmcddb.cpp @@ -18,15 +18,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -42,10 +42,10 @@ #include "libkcddb/cache.h" #include "libkcddb/submit.h" -typedef KGenericFactory KCDDBFactory; +typedef KGenericFactory KCDDBFactory; K_EXPORT_COMPONENT_FACTORY ( kcm_cddb, KCDDBFactory( "kcmcddb" ) ) -CDDBModule::CDDBModule(QWidget *parent, const char *name, const QStringList &) +CDDBModule::CDDBModule(TQWidget *parent, const char *name, const TQStringList &) : KCModule(parent, name) { KGlobal::locale()->insertCatalogue("libkcddb"); @@ -58,7 +58,7 @@ CDDBModule::CDDBModule(QWidget *parent, const char *name, const QStringList &) addConfig(cfg, widget_); - QVBoxLayout * layout = new QVBoxLayout(this, 0); + TQVBoxLayout * layout = new TQVBoxLayout(this, 0); layout->addWidget(widget_); layout->addStretch(); diff --git a/libkcddb/kcmcddb/kcmcddb.h b/libkcddb/kcmcddb/kcmcddb.h index dd22f0a5..36d42e6f 100644 --- a/libkcddb/kcmcddb/kcmcddb.h +++ b/libkcddb/kcmcddb/kcmcddb.h @@ -33,7 +33,7 @@ class CDDBModule : public KCModule public: - CDDBModule(QWidget * parent, const char *name, const QStringList &); + CDDBModule(TQWidget * parent, const char *name, const TQStringList &); public slots: diff --git a/libkcddb/lookup.cpp b/libkcddb/lookup.cpp index efd7de72..d7c15956 100644 --- a/libkcddb/lookup.cpp +++ b/libkcddb/lookup.cpp @@ -36,13 +36,13 @@ namespace KCDDB } CDDB::Result - Lookup::parseQuery( const QString & line ) + Lookup::parseQuery( const TQString & line ) { uint serverStatus = statusCode( line ); if ( 200 == serverStatus ) { - QStringList tokenList = QStringList::split( ' ', line ); + TQStringList tokenList = TQStringList::split( ' ', line ); matchList_.append( qMakePair( tokenList[ 1 ], tokenList[ 2 ] ) ); return Success; } @@ -59,14 +59,14 @@ namespace KCDDB } void - Lookup::parseExtraMatch( const QString & line ) + Lookup::parseExtraMatch( const TQString & line ) { - QStringList tokenList = QStringList::split( ' ', line ); + TQStringList tokenList = TQStringList::split( ' ', line ); matchList_.append( qMakePair( tokenList[ 0 ], tokenList[ 1 ] ) ); } CDDB::Result - Lookup::parseRead( const QString & line ) + Lookup::parseRead( const TQString & line ) { uint serverStatus = statusCode( line ); diff --git a/libkcddb/lookup.h b/libkcddb/lookup.h index 07575bc2..96538ac5 100644 --- a/libkcddb/lookup.h +++ b/libkcddb/lookup.h @@ -24,12 +24,12 @@ #include "cddb.h" #include "cdinfo.h" -#include +#include namespace KCDDB { - typedef QPair CDDBMatch; - typedef QValueList CDDBMatchList; + typedef QPair CDDBMatch; + typedef TQValueList CDDBMatchList; class Lookup : public CDDB, public QObject { @@ -45,19 +45,19 @@ namespace KCDDB Lookup(); virtual ~Lookup(); - virtual Result lookup( const QString &, uint, const TrackOffsetList & ) = 0; + virtual Result lookup( const TQString &, uint, const TrackOffsetList & ) = 0; CDInfoList lookupResponse() const; protected: - void parseExtraMatch( const QString & ); - Result parseQuery( const QString & ); - Result parseRead( const QString & ); + void parseExtraMatch( const TQString & ); + Result parseQuery( const TQString & ); + Result parseRead( const TQString & ); CDInfoList cdInfoList_; CDDBMatchList matchList_; - QString category_; + TQString category_; }; } diff --git a/libkcddb/sites.cpp b/libkcddb/sites.cpp index 5980ce89..393740fe 100644 --- a/libkcddb/sites.cpp +++ b/libkcddb/sites.cpp @@ -20,9 +20,9 @@ #include "sites.h" #include #include -#include +#include #include -#include +#include namespace KCDDB { @@ -32,7 +32,7 @@ namespace KCDDB } - QValueList + TQValueList Sites::siteList() { KURL url; @@ -41,18 +41,18 @@ namespace KCDDB url.setPort( 80 ); url.setPath( "/~cddb/cddb.cgi" ); - url.setQuery( QString::null ); + url.setQuery( TQString::null ); - QString hello = QString("%1 %2 %3 %4") + TQString hello = TQString("%1 %2 %3 %4") .arg(user_, localHostName_, clientName(), clientVersion()); url.addQueryItem( "cmd", "sites" ); url.addQueryItem( "hello", hello ); url.addQueryItem( "proto", "5" ); - QValueList result; + TQValueList result; - QString tmpFile; + TQString tmpFile; if( KIO::NetAccess::download( url, tmpFile, 0 ) ) { result = readFile( tmpFile ); @@ -62,26 +62,26 @@ namespace KCDDB return result; } - QValueList - Sites::readFile(const QString& fileName) + TQValueList + Sites::readFile(const TQString& fileName) { - QValueList result; + TQValueList result; - QFile f(fileName); + TQFile f(fileName); if (!f.open(IO_ReadOnly)) { kdDebug(60010) << "Couldn't read: " << fileName << endl; return result; } - QTextStream ts(&f); + TQTextStream ts(&f); if (statusCode(ts.readLine()) != 210) return result; while (!ts.atEnd()) { - QString line = ts.readLine(); + TQString line = ts.readLine(); if (line == ".") break; result << parseLine(line); @@ -91,11 +91,11 @@ namespace KCDDB } Mirror - Sites::parseLine(const QString& line) + Sites::parseLine(const TQString& line) { Mirror m; - QRegExp rexp("([^ ]+) (cddbp|http) (\\d+) ([^ ]+) [N|S]\\d{3}.\\d{2} [E|W]\\d{3}.\\d{2} (.*)"); + TQRegExp rexp("([^ ]+) (cddbp|http) (\\d+) ([^ ]+) [N|S]\\d{3}.\\d{2} [E|W]\\d{3}.\\d{2} (.*)"); if (rexp.search(line) != -1) { diff --git a/libkcddb/sites.h b/libkcddb/sites.h index bdd9ca28..65b184aa 100644 --- a/libkcddb/sites.h +++ b/libkcddb/sites.h @@ -20,7 +20,7 @@ #ifndef KCDDB_SITES_H #define KCDDB_SITES_H -#include +#include #include "cddb.h" #include "lookup.h" #include @@ -30,10 +30,10 @@ namespace KCDDB class Mirror { public: - QString address; + TQString address; Lookup::Transport transport; uint port; - QString description; + TQString description; } ; class KDE_EXPORT Sites : public CDDB @@ -41,10 +41,10 @@ namespace KCDDB public: Sites(); - QValueList siteList(); + TQValueList siteList(); private: - QValueList readFile(const QString& fileName); - Mirror parseLine(const QString& line); + TQValueList readFile(const TQString& fileName); + Mirror parseLine(const TQString& line); } ; } diff --git a/libkcddb/smtpsubmit.cpp b/libkcddb/smtpsubmit.cpp index d714251e..07f34b61 100644 --- a/libkcddb/smtpsubmit.cpp +++ b/libkcddb/smtpsubmit.cpp @@ -23,8 +23,8 @@ namespace KCDDB { - SMTPSubmit::SMTPSubmit(const QString& hostname, uint port, const QString& username, - const QString& from, const QString& to) + SMTPSubmit::SMTPSubmit(const TQString& hostname, uint port, const TQString& username, + const TQString& from, const TQString& to) : Submit(), from_(from), to_(to) { url_.setProtocol("smtp"); @@ -42,7 +42,7 @@ namespace KCDDB KIO::Job* SMTPSubmit::createJob(const CDInfo& cdInfo) { - url_.setQuery(QString("to=%1&subject=cddb %2 %3&from=%4") + url_.setQuery(TQString("to=%1&subject=cddb %2 %3&from=%4") .arg(to_, cdInfo.category, cdInfo.id, from_)); kdDebug(60010) << "Url is: " << url_.prettyURL() << endl; diff --git a/libkcddb/smtpsubmit.h b/libkcddb/smtpsubmit.h index 08cc3049..b2c4eaf1 100644 --- a/libkcddb/smtpsubmit.h +++ b/libkcddb/smtpsubmit.h @@ -27,7 +27,7 @@ namespace KCDDB class SMTPSubmit : public Submit { public: - SMTPSubmit(const QString& hostname, uint port, const QString& username, const QString& from, const QString& to); + SMTPSubmit(const TQString& hostname, uint port, const TQString& username, const TQString& from, const TQString& to); virtual ~SMTPSubmit(); protected: @@ -36,7 +36,7 @@ namespace KCDDB virtual KIO::Job* createJob(const CDInfo& cdInfo); KURL url_; - QString from_, to_; + TQString from_, to_; } ; } diff --git a/libkcddb/submit.cpp b/libkcddb/submit.cpp index d88672af..63a0951b 100644 --- a/libkcddb/submit.cpp +++ b/libkcddb/submit.cpp @@ -55,7 +55,7 @@ namespace KCDDB } CDDB::Result - Submit::parseWrite( const QString & line ) + Submit::parseWrite( const TQString & line ) { uint serverStatus = statusCode( line ); @@ -74,19 +74,19 @@ namespace KCDDB diskData_ += "# Track frame offsets:\n"; for (uint i=0; i < numTracks; i++) - diskData_ += QString("#\t%1\n").arg(offsetList[i]); + diskData_ += TQString("#\t%1\n").arg(offsetList[i]); int l = offsetList[numTracks+1]/75; - diskData_ += QString("# Disc length: %1 seconds\n").arg(l); + diskData_ += TQString("# Disc length: %1 seconds\n").arg(l); diskData_ += cdInfo.toString(true); kdDebug(60010) << "diskData_ == " << diskData_ << endl; } - bool Submit::validCategory( const QString& c ) + bool Submit::validCategory( const TQString& c ) { - QStringList validCategories; + TQStringList validCategories; validCategories << "blues" << "classical" << "country" << "data" << "folk" << "jazz" << "misc" << "newage" << "reggae" << "rock" << "soundtrack"; diff --git a/libkcddb/submit.h b/libkcddb/submit.h index 7f4bd29c..877b499a 100644 --- a/libkcddb/submit.h +++ b/libkcddb/submit.h @@ -25,7 +25,7 @@ #include "cddb.h" #include "cdinfo.h" -#include +#include namespace KIO { @@ -53,11 +53,11 @@ namespace KCDDB virtual KIO::Job* createJob(const CDInfo& cdInfo) = 0; virtual Result runJob(KIO::Job* job) = 0; - bool validCategory(const QString&); + bool validCategory(const TQString&); - Result parseWrite( const QString & ); + Result parseWrite( const TQString & ); virtual void makeDiskData( const CDInfo&, const TrackOffsetList& ); - QString diskData_; + TQString diskData_; }; } diff --git a/libkcddb/synccddbplookup.cpp b/libkcddb/synccddbplookup.cpp index 6e769d48..b2be7618 100644 --- a/libkcddb/synccddbplookup.cpp +++ b/libkcddb/synccddbplookup.cpp @@ -19,7 +19,7 @@ Boston, MA 02110-1301, USA. */ -#include +#include #include #include "synccddbplookup.h" @@ -39,7 +39,7 @@ namespace KCDDB CDDB::Result SyncCDDBPLookup::lookup ( - const QString & hostName, + const TQString & hostName, uint port, const TrackOffsetList & trackOffsetList ) @@ -49,7 +49,7 @@ namespace KCDDB trackOffsetList_ = trackOffsetList; - socket_ = new KNetwork::KBufferedSocket(hostName, QString::number(port)); + socket_ = new KNetwork::KBufferedSocket(hostName, TQString::number(port)); socket_->setTimeout( 30000 ); socket_->setOutputBuffering(false); @@ -117,7 +117,7 @@ namespace KCDDB CDDB::Result SyncCDDBPLookup::shakeHands() { - QString line = readLine(); + TQString line = readLine(); if ( !parseGreeting( line ) ) return ServerError; @@ -144,7 +144,7 @@ namespace KCDDB sendQuery(); - QString line = readLine(); + TQString line = readLine(); result = parseQuery( line ); if ( ServerError == result ) @@ -170,13 +170,13 @@ namespace KCDDB { sendRead( match ); - QString line = readLine(); + TQString line = readLine(); Result result = parseRead( line ); if ( Success != result ) return result; - QStringList lineList; + TQStringList lineList; line = readLine(); while ( !line.startsWith(".") && !line.isNull() ) @@ -202,7 +202,7 @@ namespace KCDDB if ( !isConnected() ) { kdDebug(60010) << "socket status: " << socket_->state() << endl; - return QString::null; + return TQString::null; } if (!socket_->canReadLine()) @@ -212,10 +212,10 @@ namespace KCDDB socket_->waitForMore(-1,&timeout); if (timeout) - return QString::null; + return TQString::null; } - return QString::fromUtf8(socket_->readLine()); + return TQString::fromUtf8(socket_->readLine()); } } diff --git a/libkcddb/synccddbplookup.h b/libkcddb/synccddbplookup.h index e81ed881..75395813 100644 --- a/libkcddb/synccddbplookup.h +++ b/libkcddb/synccddbplookup.h @@ -33,7 +33,7 @@ namespace KCDDB SyncCDDBPLookup(); virtual ~SyncCDDBPLookup(); - Result lookup( const QString &, uint, const TrackOffsetList & ); + Result lookup( const TQString &, uint, const TrackOffsetList & ); CDInfoList lookupResponse() const; @@ -43,7 +43,7 @@ namespace KCDDB Result runQuery(); Result matchToCDInfo( const CDDBMatch & ); - QString readLine(); + TQString readLine(); }; } diff --git a/libkcddb/synchttplookup.cpp b/libkcddb/synchttplookup.cpp index f086de73..fb2c90d7 100644 --- a/libkcddb/synchttplookup.cpp +++ b/libkcddb/synchttplookup.cpp @@ -18,8 +18,8 @@ Boston, MA 02110-1301, USA. */ -#include -#include +#include +#include #include #include @@ -42,7 +42,7 @@ namespace KCDDB CDDB::Result SyncHTTPLookup::lookup ( - const QString & hostName, + const TQString & hostName, uint port, const TrackOffsetList & trackOffsetList ) @@ -82,7 +82,7 @@ namespace KCDDB CDDB::Result SyncHTTPLookup::runQuery() { - data_ = QByteArray(); + data_ = TQByteArray(); state_ = WaitingForQueryResponse; result_ = sendQuery(); @@ -98,7 +98,7 @@ namespace KCDDB CDDB::Result SyncHTTPLookup::matchToCDInfo( const CDDBMatch & match ) { - data_ = QByteArray(); + data_ = TQByteArray(); state_ = WaitingForReadResponse; result_ = sendRead( match ); diff --git a/libkcddb/synchttplookup.h b/libkcddb/synchttplookup.h index 3c89078a..937a1aa9 100644 --- a/libkcddb/synchttplookup.h +++ b/libkcddb/synchttplookup.h @@ -32,7 +32,7 @@ namespace KCDDB SyncHTTPLookup(); virtual ~SyncHTTPLookup(); - Result lookup( const QString &, uint, const TrackOffsetList & ); + Result lookup( const TQString &, uint, const TrackOffsetList & ); CDInfoList lookupResponse() const; diff --git a/libkcddb/synchttpsubmit.cpp b/libkcddb/synchttpsubmit.cpp index 661382b6..8be4c60b 100644 --- a/libkcddb/synchttpsubmit.cpp +++ b/libkcddb/synchttpsubmit.cpp @@ -23,7 +23,7 @@ namespace KCDDB { - SyncHTTPSubmit::SyncHTTPSubmit(const QString& from, const QString& hostname, uint port) + SyncHTTPSubmit::SyncHTTPSubmit(const TQString& from, const TQString& hostname, uint port) : HTTPSubmit(from, hostname, port) { diff --git a/libkcddb/synchttpsubmit.h b/libkcddb/synchttpsubmit.h index a88b2895..bd2974ac 100644 --- a/libkcddb/synchttpsubmit.h +++ b/libkcddb/synchttpsubmit.h @@ -26,7 +26,7 @@ namespace KCDDB class SyncHTTPSubmit : public HTTPSubmit { public: - SyncHTTPSubmit(const QString& from, const QString& hostname, uint port); + SyncHTTPSubmit(const TQString& from, const TQString& hostname, uint port); virtual ~SyncHTTPSubmit(); protected: diff --git a/libkcddb/syncsmtpsubmit.cpp b/libkcddb/syncsmtpsubmit.cpp index 400aa0c5..717c77a5 100644 --- a/libkcddb/syncsmtpsubmit.cpp +++ b/libkcddb/syncsmtpsubmit.cpp @@ -24,8 +24,8 @@ namespace KCDDB { - SyncSMTPSubmit::SyncSMTPSubmit(const QString& hostname, uint port, - const QString& username, const QString& from, const QString& to) + SyncSMTPSubmit::SyncSMTPSubmit(const TQString& hostname, uint port, + const TQString& username, const TQString& from, const TQString& to) : SMTPSubmit( hostname, port, username, from, to ) { diff --git a/libkcddb/syncsmtpsubmit.h b/libkcddb/syncsmtpsubmit.h index b2ff98e0..57c660f7 100644 --- a/libkcddb/syncsmtpsubmit.h +++ b/libkcddb/syncsmtpsubmit.h @@ -26,8 +26,8 @@ namespace KCDDB class SyncSMTPSubmit : public SMTPSubmit { public: - SyncSMTPSubmit(const QString& hostname, uint port, const QString& username, - const QString& from, const QString& to); + SyncSMTPSubmit(const TQString& hostname, uint port, const TQString& username, + const TQString& from, const TQString& to); virtual ~SyncSMTPSubmit(); protected: virtual Result runJob(KIO::Job* job); diff --git a/libkcddb/test/asynccddblookuptest.cpp b/libkcddb/test/asynccddblookuptest.cpp index afbd326a..ff8c34bb 100644 --- a/libkcddb/test/asynccddblookuptest.cpp +++ b/libkcddb/test/asynccddblookuptest.cpp @@ -8,7 +8,7 @@ #include "libkcddb/lookup.h" AsyncCDDBLookupTest::AsyncCDDBLookupTest() - : QObject() + : TQObject() { using namespace KCDDB; @@ -22,8 +22,8 @@ AsyncCDDBLookupTest::AsyncCDDBLookupTest() connect ( client_, - SIGNAL(finished(CDDB::Result)), - SLOT(slotFinished(CDDB::Result)) + TQT_SIGNAL(finished(CDDB::Result)), + TQT_SLOT(slotFinished(CDDB::Result)) ); TrackOffsetList list; diff --git a/libkcddb/test/asynccddblookuptest.h b/libkcddb/test/asynccddblookuptest.h index 5e0a3efb..db4436e4 100644 --- a/libkcddb/test/asynccddblookuptest.h +++ b/libkcddb/test/asynccddblookuptest.h @@ -1,7 +1,7 @@ #ifndef TEST_H #define TEST_H -#include +#include #include using namespace KCDDB; diff --git a/libkcddb/test/asynchttplookuptest.cpp b/libkcddb/test/asynchttplookuptest.cpp index 610d9fab..174525bb 100644 --- a/libkcddb/test/asynchttplookuptest.cpp +++ b/libkcddb/test/asynchttplookuptest.cpp @@ -7,7 +7,7 @@ #include "libkcddb/lookup.h" AsyncHTTPLookupTest::AsyncHTTPLookupTest() - : QObject() + : TQObject() { using namespace KCDDB; @@ -21,8 +21,8 @@ AsyncHTTPLookupTest::AsyncHTTPLookupTest() connect ( client_, - SIGNAL(finished(CDDB::Result)), - SLOT(slotFinished(CDDB::Result)) + TQT_SIGNAL(finished(CDDB::Result)), + TQT_SLOT(slotFinished(CDDB::Result)) ); TrackOffsetList list; diff --git a/libkcddb/test/asynchttplookuptest.h b/libkcddb/test/asynchttplookuptest.h index c8e3e86c..7649f204 100644 --- a/libkcddb/test/asynchttplookuptest.h +++ b/libkcddb/test/asynchttplookuptest.h @@ -1,7 +1,7 @@ #ifndef TEST_H #define TEST_H -#include +#include #include using namespace KCDDB; diff --git a/libkcddb/test/asynchttpsubmittest.cpp b/libkcddb/test/asynchttpsubmittest.cpp index 9981f8a7..d0923b27 100644 --- a/libkcddb/test/asynchttpsubmittest.cpp +++ b/libkcddb/test/asynchttpsubmittest.cpp @@ -6,7 +6,7 @@ #include "libkcddb/submit.h" AsyncHTTPSubmitTest::AsyncHTTPSubmitTest() - : QObject() + : TQObject() { using namespace KCDDB; @@ -34,7 +34,7 @@ AsyncHTTPSubmitTest::AsyncHTTPSubmitTest() cdInfo.year = 2001; cdInfo.category = "misc"; cdInfo.genre = "Barnsaga"; - cdInfo.extd = QString::fromUtf8("Berättare: Olof Thunberg"); + cdInfo.extd = TQString::fromUtf8("Berättare: Olof Thunberg"); TrackInfo info; info.title = "Bamses signaturmelodi"; @@ -45,14 +45,14 @@ AsyncHTTPSubmitTest::AsyncHTTPSubmitTest() cdInfo.trackInfoList.append(info); info.title = "*"; cdInfo.trackInfoList.append(info); - info.title = QString::fromUtf8("Jätteödlan Bronto"); + info.title = TQString::fromUtf8("Jätteödlan Bronto"); cdInfo.trackInfoList.append(info); connect ( client_, - SIGNAL(finished(CDDB::Result)), - SLOT(slotFinished(CDDB::Result)) + TQT_SIGNAL(finished(CDDB::Result)), + TQT_SLOT(slotFinished(CDDB::Result)) ); client_->submit(cdInfo, list); diff --git a/libkcddb/test/asynchttpsubmittest.h b/libkcddb/test/asynchttpsubmittest.h index 27053836..6cce8ed2 100644 --- a/libkcddb/test/asynchttpsubmittest.h +++ b/libkcddb/test/asynchttpsubmittest.h @@ -1,7 +1,7 @@ #ifndef TEST_H #define TEST_H -#include +#include #include using namespace KCDDB; diff --git a/libkcddb/test/asyncsmtpsubmittest.cpp b/libkcddb/test/asyncsmtpsubmittest.cpp index 224288e3..89c0ad50 100644 --- a/libkcddb/test/asyncsmtpsubmittest.cpp +++ b/libkcddb/test/asyncsmtpsubmittest.cpp @@ -6,7 +6,7 @@ #include "libkcddb/submit.h" AsyncSMTPSubmitTest::AsyncSMTPSubmitTest() - : QObject() + : TQObject() { using namespace KCDDB; @@ -35,7 +35,7 @@ AsyncSMTPSubmitTest::AsyncSMTPSubmitTest() cdInfo.year = 2001; cdInfo.category = "misc"; cdInfo.genre = "Barnsaga"; - cdInfo.extd = QString::fromUtf8("Berättare: Olof Thunberg"); + cdInfo.extd = TQString::fromUtf8("Berättare: Olof Thunberg"); TrackInfo info; info.title = "Bamses signaturmelodi"; @@ -46,14 +46,14 @@ AsyncSMTPSubmitTest::AsyncSMTPSubmitTest() cdInfo.trackInfoList.append(info); info.title = "*"; cdInfo.trackInfoList.append(info); - info.title = QString::fromUtf8("Jätteödlan Bronto"); + info.title = TQString::fromUtf8("Jätteödlan Bronto"); cdInfo.trackInfoList.append(info); connect ( client_, - SIGNAL(finished(CDDB::Result)), - SLOT(slotFinished(CDDB::Result)) + TQT_SIGNAL(finished(CDDB::Result)), + TQT_SLOT(slotFinished(CDDB::Result)) ); client_->submit(cdInfo, list); diff --git a/libkcddb/test/asyncsmtpsubmittest.h b/libkcddb/test/asyncsmtpsubmittest.h index 3528798d..0e6f445e 100644 --- a/libkcddb/test/asyncsmtpsubmittest.h +++ b/libkcddb/test/asyncsmtpsubmittest.h @@ -1,7 +1,7 @@ #ifndef TEST_H #define TEST_H -#include +#include #include using namespace KCDDB; diff --git a/libkcddb/test/sitestest.cpp b/libkcddb/test/sitestest.cpp index cd2faaca..6188665d 100644 --- a/libkcddb/test/sitestest.cpp +++ b/libkcddb/test/sitestest.cpp @@ -36,8 +36,8 @@ main(int argc, char ** argv) kdDebug() << "Sites: " << endl; - QValueList sites = s.siteList(); - for (QValueList::Iterator it = sites.begin(); it != sites.end(); ++it) + TQValueList sites = s.siteList(); + for (TQValueList::Iterator it = sites.begin(); it != sites.end(); ++it) if ((*it).transport == Lookup::CDDBP) kdDebug() << (*it).address << " CDDBP " << (*it).port << " " << (*it).description << endl; else diff --git a/libkcddb/test/synchttpsubmittest.cpp b/libkcddb/test/synchttpsubmittest.cpp index 79fab86c..d6c17eaf 100644 --- a/libkcddb/test/synchttpsubmittest.cpp +++ b/libkcddb/test/synchttpsubmittest.cpp @@ -54,7 +54,7 @@ main(int argc, char ** argv) cdInfo.year = 2001; cdInfo.category = "misc"; cdInfo.genre = "Barnsaga"; - cdInfo.extd = QString::fromUtf8("Berättare: Olof Thunberg"); + cdInfo.extd = TQString::fromUtf8("Berättare: Olof Thunberg"); TrackInfo info; info.title = "Bamses signaturmelodi"; @@ -65,7 +65,7 @@ main(int argc, char ** argv) cdInfo.trackInfoList.append(info); info.title = "*"; cdInfo.trackInfoList.append(info); - info.title = QString::fromUtf8("Jätteödlan Bronto"); + info.title = TQString::fromUtf8("Jätteödlan Bronto"); cdInfo.trackInfoList.append(info); Client c; diff --git a/libkcddb/test/syncsmtpsubmittest.cpp b/libkcddb/test/syncsmtpsubmittest.cpp index 75935848..4af365bb 100644 --- a/libkcddb/test/syncsmtpsubmittest.cpp +++ b/libkcddb/test/syncsmtpsubmittest.cpp @@ -54,7 +54,7 @@ main(int argc, char ** argv) cdInfo.year = 2001; cdInfo.category = "misc"; cdInfo.genre = "Barnsaga"; - cdInfo.extd = QString::fromUtf8("Berättare: Olof Thunberg"); + cdInfo.extd = TQString::fromUtf8("Berättare: Olof Thunberg"); TrackInfo info; info.title = "Bamses signaturmelodi"; @@ -65,7 +65,7 @@ main(int argc, char ** argv) cdInfo.trackInfoList.append(info); info.title = "*"; cdInfo.trackInfoList.append(info); - info.title = QString::fromUtf8("Jätteödlan Bronto"); + info.title = TQString::fromUtf8("Jätteödlan Bronto"); cdInfo.trackInfoList.append(info); Client c; diff --git a/mpeglib/lib/util/abstract/abs_thread.h b/mpeglib/lib/util/abstract/abs_thread.h index f65445d8..0da7e2a0 100644 --- a/mpeglib/lib/util/abstract/abs_thread.h +++ b/mpeglib/lib/util/abstract/abs_thread.h @@ -83,7 +83,7 @@ typedef SDL_mutex* abs_thread_mutex_t; typedef SDL_cond* abs_thread_cond_t; typedef SDL_Thread* abs_thread_t; -// SIGNAL FUNCTIONS +// TQT_SIGNAL FUNCTIONS // note we have _no_ cond attribut (not needed) int abs_thread_cond_init(abs_thread_cond_t* cond); int abs_thread_cond_destroy(abs_thread_cond_t *cond); diff --git a/noatun/library/app.cpp b/noatun/library/app.cpp index 04167fe7..cf340f68 100644 --- a/noatun/library/app.cpp +++ b/noatun/library/app.cpp @@ -30,11 +30,11 @@ #include #include #include -#include -#include +#include +#include #include -#include -#include +#include +#include #include #include @@ -69,10 +69,10 @@ NoatunApp::NoatunApp() // set the default config data // TODO: Maybe a first time wizard instead? KConfig *config=KGlobal::config(); // + - config->setGroup(QString::null); // 1 + config->setGroup(TQString::null); // 1 if (!config->readEntry("Modules").length()) { - QStringList modules; + TQStringList modules; modules.append("excellent.plugin"); modules.append("splitplaylist.plugin"); modules.append("marquis.plugin"); @@ -101,7 +101,7 @@ NoatunApp::NoatunApp() mEffectView=new EffectView; // 859 mEqualizerView=new EqualizerView; // 24 - QTimer::singleShot(0, mDownloader, SLOT(start())); + TQTimer::singleShot(0, mDownloader, TQT_SLOT(start())); ::globalVideo = new GlobalVideo; @@ -122,7 +122,7 @@ NoatunApp::NoatunApp() } else { - config->setGroup(QString::null); // 0 + config->setGroup(TQString::null); // 0 player()->setVolume(config->readNumEntry("Volume", 100)); // 10 player()->loop(config->readNumEntry("LoopStyle", (int)Player::None)); mPlayer->engine()->setInitialized(); // 0 @@ -147,11 +147,11 @@ NoatunApp::~NoatunApp() { saveEngineState(); KConfig *config = KGlobal::config(); - config->setGroup(QString::null); + config->setGroup(TQString::null); config->writeEntry("Volume", player()->volume()); config->writeEntry("LoopStyle", player()->loopStyle()); // for version continuity in the future - config->writeEntry("Version", QString(version())); // 1 + config->writeEntry("Version", TQString(version())); // 1 config->sync(); // 40 mPlayer->stop(); @@ -171,7 +171,7 @@ NoatunApp::~NoatunApp() delete d; } -QCString NoatunApp::version() const +TQCString NoatunApp::version() const { return aboutData()->version().ascii(); } @@ -212,14 +212,14 @@ bool NoatunApp::clearOnStart() const int NoatunApp::startupPlayMode() const { KConfig *config=KGlobal::config(); - config->setGroup(QString::null); + config->setGroup(TQString::null); return config->readNumEntry("StartupPlayMode", autoPlay() ? Play : Restore); } void NoatunApp::setStartupPlayMode(int mode) { KConfig *config=KGlobal::config(); - config->setGroup(QString::null); + config->setGroup(TQString::null); config->writeEntry("StartupPlayMode", mode); config->sync(); } @@ -227,7 +227,7 @@ void NoatunApp::setStartupPlayMode(int mode) void NoatunApp::setHackUpPlaylist(bool b) { KConfig *config=KGlobal::config(); - config->setGroup(QString::null); + config->setGroup(TQString::null); config->writeEntry("HackUpPlaylist", b); config->sync(); } @@ -238,7 +238,7 @@ void NoatunApp::setFastMixer(bool b) if (whatBefore!=b) { KConfig *config=KGlobal::config(); - config->setGroup(QString::null); + config->setGroup(TQString::null); config->writeEntry("FastMixer", b); config->sync(); player()->engine()->useHardwareMixer(b); @@ -256,7 +256,7 @@ void NoatunApp::setOneInstance(bool b) void NoatunApp::setLoopList(bool b) { KConfig *config=KGlobal::config(); - config->setGroup(QString::null); + config->setGroup(TQString::null); config->writeEntry("LoopList", b); KGlobal::config()->sync(); } @@ -264,7 +264,7 @@ void NoatunApp::setLoopList(bool b) void NoatunApp::setAutoPlay(bool b) { KConfig *config=KGlobal::config(); - config->setGroup(QString::null); + config->setGroup(TQString::null); config->writeEntry("AutoPlay", b); KGlobal::config()->sync(); } @@ -272,37 +272,37 @@ void NoatunApp::setAutoPlay(bool b) void NoatunApp::setRememberPositions(bool b) { KConfig *config=KGlobal::config(); - config->setGroup(QString::null); + config->setGroup(TQString::null); config->writeEntry("RememberPositions", b); KGlobal::config()->sync(); } -void NoatunApp::setSaveDirectory(const QString &s) +void NoatunApp::setSaveDirectory(const TQString &s) { KConfig *config=KGlobal::config(); - config->setGroup(QString::null); + config->setGroup(TQString::null); config->writePathEntry("SaveDirectory", s); config->sync(); } -QString NoatunApp::saveDirectory() const +TQString NoatunApp::saveDirectory() const { KConfig *c=KGlobal::config(); - c->setGroup(QString::null); - return c->readPathEntry("SaveDirectory", QString(getenv("HOME"))); + c->setGroup(TQString::null); + return c->readPathEntry("SaveDirectory", TQString(getenv("HOME"))); } -QString NoatunApp::titleFormat() const +TQString NoatunApp::titleFormat() const { KConfig *c=KGlobal::config(); - c->setGroup(QString::null); + c->setGroup(TQString::null); return c->readEntry("TitleFormat", "$(\"[\"author\"] - \")$(title)$(\" (\"bitrate\"kbps)\")"); } -void NoatunApp::setTitleFormat(const QString &format) +void NoatunApp::setTitleFormat(const TQString &format) { KConfig *c=KGlobal::config(); - c->setGroup(QString::null); + c->setGroup(TQString::null); return c->writeEntry("TitleFormat", format); } @@ -314,7 +314,7 @@ void NoatunApp::setClearOnStart(bool b) void NoatunApp::setClearOnOpen(bool b) { KConfig *config=KGlobal::config(); - config->setGroup(QString::null); + config->setGroup(TQString::null); config->writeEntry("ClearOnOpen", b); config->sync(); } @@ -322,7 +322,7 @@ void NoatunApp::setClearOnOpen(bool b) void NoatunApp::setDisplayRemaining(bool b) { KConfig *config=KGlobal::config(); - config->setGroup(QString::null); + config->setGroup(TQString::null); config->writeEntry("DisplayRemaining", b); config->sync(); } @@ -350,7 +350,7 @@ void NoatunApp::hideInterfaces() } -int NoatunApp::pluginMenuAdd(const QString &text, const QObject *receiver, const char *member) +int NoatunApp::pluginMenuAdd(const TQString &text, const TQObject *receiver, const char *member) { return pluginActionMenu()->menuAdd(text, receiver, member); } @@ -432,9 +432,9 @@ Effects *NoatunApp::effects() const return d->effects; } -QString NoatunApp::mimeTypes() +TQString NoatunApp::mimeTypes() { - QString mimeTypes; + TQString mimeTypes; Arts::TraderQuery q; vector *results = q.query(); vector::iterator i; @@ -484,16 +484,16 @@ void NoatunApp::commitData(QSessionManager &) void NoatunApp::saveState(QSessionManager &sm) { - QStringList restartCommand = sm.restartCommand(); + TQStringList restartCommand = sm.restartCommand(); sm.setRestartCommand( restartCommand ); KApplication::saveState(sm); } // Deprecated -QImage NoatunApp::readPNG(const QString &filename) +TQImage NoatunApp::readPNG(const TQString &filename) { - QImageIO file(filename, "PNG"); + TQImageIO file(filename, "PNG"); file.setGamma(0.0); file.read(); return file.image(); @@ -502,7 +502,7 @@ QImage NoatunApp::readPNG(const QString &filename) void NoatunApp::restoreEngineState() { KConfig* config = KGlobal::config(); - config->setGroup(QString::null); + config->setGroup(TQString::null); int state = config->readNumEntry("EngineState", Arts::posPlaying); switch (state) { @@ -522,7 +522,7 @@ void NoatunApp::restoreEngineState() void NoatunApp::saveEngineState() { KConfig* config=KGlobal::config(); - config->setGroup(QString::null); + config->setGroup(TQString::null); config->writeEntry("EngineState", player()->engine()->state()); // we don't sync here since it's done in the destructor afterwards anyway } diff --git a/noatun/library/cmodule.cpp b/noatun/library/cmodule.cpp index a624fb64..27dbc686 100644 --- a/noatun/library/cmodule.cpp +++ b/noatun/library/cmodule.cpp @@ -3,24 +3,24 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include #include -#include -#include -#include +#include +#include +#include #include #include #include #include -#include -#include +#include +#include #include "mimetypetree.h" @@ -28,67 +28,67 @@ * General options *****************************************************************/ -General::General(QObject *parent) +General::General(TQObject *parent) : CModule(i18n("General"), i18n("General Options"), "configure", parent) { - mLoopList=new QCheckBox(i18n("&Return to start of playlist on finish"), this); + mLoopList=new TQCheckBox(i18n("&Return to start of playlist on finish"), this); mLoopList->setChecked(napp->loopList()); - QWhatsThis::add(mLoopList, i18n("When the playlist is finished playing, return to the start, but do not start playing.")); + TQWhatsThis::add(mLoopList, i18n("When the playlist is finished playing, return to the start, but do not start playing.")); - mOneInstance=new QCheckBox(i18n("Allow only one &instance of Noatun"), this); + mOneInstance=new TQCheckBox(i18n("Allow only one &instance of Noatun"), this); mOneInstance->setChecked(napp->oneInstance()); - QWhatsThis::add(mOneInstance, i18n("Starting noatun a second time will cause it to just append items from the start to the current instance.")); + TQWhatsThis::add(mOneInstance, i18n("Starting noatun a second time will cause it to just append items from the start to the current instance.")); - mClearOnOpen = new QCheckBox(i18n("Clear playlist &when opening a file"), this); + mClearOnOpen = new TQCheckBox(i18n("Clear playlist &when opening a file"), this); mClearOnOpen->setChecked(napp->clearOnOpen()); - QWhatsThis::add(mClearOnOpen, i18n("Opening a file with the global Open menu item will clear the playlist first.")); + TQWhatsThis::add(mClearOnOpen, i18n("Opening a file with the global Open menu item will clear the playlist first.")); - mFastVolume=new QCheckBox(i18n("&Use fast hardware volume control"), this); + mFastVolume=new TQCheckBox(i18n("&Use fast hardware volume control"), this); mFastVolume->setChecked(napp->fastMixer()); - QWhatsThis::add(mFastVolume, i18n("Use the hardware mixer instead of aRts'. It affects all streams, not just Noatun's, but is a little faster.")); + TQWhatsThis::add(mFastVolume, i18n("Use the hardware mixer instead of aRts'. It affects all streams, not just Noatun's, but is a little faster.")); - mRemaining=new QCheckBox(i18n("Display &remaining play time"), this); + mRemaining=new TQCheckBox(i18n("Display &remaining play time"), this); mRemaining->setChecked(napp->displayRemaining()); - QWhatsThis::add(mRemaining, i18n("Counters count down towards zero, showing remaining time instead of elapsed time.")); + TQWhatsThis::add(mRemaining, i18n("Counters count down towards zero, showing remaining time instead of elapsed time.")); - QLabel *titleLabel=new QLabel(i18n("Title &format:"), this); + TQLabel *titleLabel=new TQLabel(i18n("Title &format:"), this); mTitleFormat=new KLineEdit(this); titleLabel->setBuddy(mTitleFormat); mTitleFormat->setText(napp->titleFormat()); - QWhatsThis::add(mTitleFormat, i18n( + TQWhatsThis::add(mTitleFormat, i18n( "Select a title to use for each file (in the playlist and user interface). " "Each element such as $(title) is replaced with the property with the name " "as given in the parentheses. The properties include, but are not limited to: " "title, author, date, comments and album.")); - QLabel *dlsaver=new QLabel(i18n("&Download folder:"), this); + TQLabel *dlsaver=new TQLabel(i18n("&Download folder:"), this); mDlSaver=new KURLRequester(napp->saveDirectory(), this); dlsaver->setBuddy(mDlSaver); - connect( mDlSaver, SIGNAL( openFileDialog( KURLRequester * )), - this, SLOT( slotRequesterClicked( KURLRequester * ))); - QWhatsThis::add(mDlSaver, i18n("When opening a non-local file, download it to the selected folder.")); + connect( mDlSaver, TQT_SIGNAL( openFileDialog( KURLRequester * )), + this, TQT_SLOT( slotRequesterClicked( KURLRequester * ))); + TQWhatsThis::add(mDlSaver, i18n("When opening a non-local file, download it to the selected folder.")); - mPlayOnStartup = new QButtonGroup(1, Horizontal, i18n("Play Behavior on Startup"), this); + mPlayOnStartup = new TQButtonGroup(1, Horizontal, i18n("Play Behavior on Startup"), this); mPlayOnStartup->setExclusive(true); mPlayOnStartup->insert( - new QRadioButton(i18n("Restore &play state"), mPlayOnStartup), + new TQRadioButton(i18n("Restore &play state"), mPlayOnStartup), NoatunApp::Restore ); mPlayOnStartup->insert( - new QRadioButton(i18n("Automatically play &first file"), mPlayOnStartup), + new TQRadioButton(i18n("Automatically play &first file"), mPlayOnStartup), NoatunApp::Play ); mPlayOnStartup->insert( - new QRadioButton(i18n("&Do not start playing"), mPlayOnStartup), + new TQRadioButton(i18n("&Do not start playing"), mPlayOnStartup), NoatunApp::DontPlay ); - if (QButton* b = mPlayOnStartup->find(napp->startupPlayMode())) + if (TQButton* b = mPlayOnStartup->find(napp->startupPlayMode())) { b->toggle(); } - QGridLayout *layout = new QGridLayout(this, 0, KDialog::spacingHint()); + TQGridLayout *layout = new TQGridLayout(this, 0, KDialog::spacingHint()); layout->setSpacing(KDialog::spacingHint()); layout->addMultiCellWidget(mLoopList, 0, 0, 0, 1); diff --git a/noatun/library/cmodule.h b/noatun/library/cmodule.h index 6e0e1179..881842a9 100644 --- a/noatun/library/cmodule.h +++ b/noatun/library/cmodule.h @@ -1,7 +1,7 @@ #ifndef CMODULE_H #define CMODULE_H -#include +#include #include #include "noatun/pref.h" @@ -23,16 +23,16 @@ class General : public CModule { Q_OBJECT public: - General(QObject *parent=0); + General(TQObject *parent=0); virtual void save(); private slots: void slotRequesterClicked( KURLRequester * ); private: - QCheckBox *mLoopList, *mOneInstance, *mRememberPositions, + TQCheckBox *mLoopList, *mOneInstance, *mRememberPositions, *mClearOnOpen, *mFastVolume, *mRemaining; - QButtonGroup* mPlayOnStartup; + TQButtonGroup* mPlayOnStartup; KURLRequester *mDlSaver; KLineEdit *mTitleFormat; }; diff --git a/noatun/library/controls.cpp b/noatun/library/controls.cpp index 1fb08269..dc67ffaa 100644 --- a/noatun/library/controls.cpp +++ b/noatun/library/controls.cpp @@ -1,14 +1,14 @@ #include -L33tSlider::L33tSlider(QWidget * parent, const char * name) : - QSlider(parent,name), pressed(false) +L33tSlider::L33tSlider(TQWidget * parent, const char * name) : + TQSlider(parent,name), pressed(false) {} -L33tSlider::L33tSlider(Orientation o, QWidget * parent, const char * name) : - QSlider(o,parent,name), pressed(false) +L33tSlider::L33tSlider(Orientation o, TQWidget * parent, const char * name) : + TQSlider(o,parent,name), pressed(false) {} L33tSlider::L33tSlider(int minValue, int maxValue, int pageStep, int value, - Orientation o, QWidget * parent, const char * name) : - QSlider(minValue, maxValue, pageStep, value, o, parent,name), pressed(false) + Orientation o, TQWidget * parent, const char * name) : + TQSlider(minValue, maxValue, pageStep, value, o, parent,name), pressed(false) {} bool L33tSlider::currentlyPressed() const @@ -19,28 +19,28 @@ bool L33tSlider::currentlyPressed() const void L33tSlider::setValue(int i) { if (!pressed) - QSlider::setValue(i); + TQSlider::setValue(i); } -void L33tSlider::mousePressEvent(QMouseEvent*e) +void L33tSlider::mousePressEvent(TQMouseEvent*e) { if (e->button()!=RightButton) { pressed=true; - QSlider::mousePressEvent(e); + TQSlider::mousePressEvent(e); } } -void L33tSlider::mouseReleaseEvent(QMouseEvent*e) +void L33tSlider::mouseReleaseEvent(TQMouseEvent*e) { pressed=false; - QSlider::mouseReleaseEvent(e); + TQSlider::mouseReleaseEvent(e); emit userChanged(value()); } -void L33tSlider::wheelEvent(QWheelEvent *e) +void L33tSlider::wheelEvent(TQWheelEvent *e) { - QSlider::wheelEvent(e); + TQSlider::wheelEvent(e); int newValue=value() /* +e->delta()/120 */; if (newValueinherits("KToolBar")) return -1; @@ -73,11 +73,11 @@ int SliderAction::plug( QWidget *w, int index ) addContainer( toolBar, id ); - connect( toolBar, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) ); + connect( toolBar, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) ); toolBar->setItemAutoSized( id, true ); if (w->inherits( "KToolBar" )) - connect(toolBar, SIGNAL(moved(KToolBar::BarPosition)), this, SLOT(toolbarMoved(KToolBar::BarPosition))); + connect(toolBar, TQT_SIGNAL(moved(KToolBar::BarPosition)), this, TQT_SLOT(toolbarMoved(KToolBar::BarPosition))); emit plugged(); @@ -102,7 +102,7 @@ return; */ } -void SliderAction::unplug( QWidget *w ) +void SliderAction::unplug( TQWidget *w ) { KToolBar *toolBar = (KToolBar *)w; int idx = findContainer( w ); diff --git a/noatun/library/downloader.cpp b/noatun/library/downloader.cpp index 734f5e11..cce6e4d9 100644 --- a/noatun/library/downloader.cpp +++ b/noatun/library/downloader.cpp @@ -1,8 +1,8 @@ #include #include #include -#include -#include +#include +#include #include #include @@ -21,12 +21,12 @@ bool DownloadItem::isDownloaded() const return true; } -QString DownloadItem::localFilename() const +TQString DownloadItem::localFilename() const { return mLocalFilename; } -void DownloadItem::setLocalFilename(const QString &filename) +void DownloadItem::setLocalFilename(const TQString &filename) { mLocalFilename=filename; } @@ -65,11 +65,11 @@ void DownloadItem::dequeue() -Downloader::Downloader(QObject *parent) - : QObject(parent), localfile(0), current(0), mJob(0), mTimeout(0) +Downloader::Downloader(TQObject *parent) + : TQObject(parent), localfile(0), current(0), mJob(0), mTimeout(0) { mStarted=false; - mUnstartedQueue=new QPtrList; + mUnstartedQueue=new TQPtrList; } Downloader::~Downloader() @@ -84,7 +84,7 @@ void Downloader::start() if (current) emit enqueued(current->notifier, current->file); - for (QPtrListIterator i(*mUnstartedQueue); i.current(); ++i) + for (TQPtrListIterator i(*mUnstartedQueue); i.current(); ++i) { (*i)->notifier->mLocalFilename = (*i)->local; mQueue.append(*i); @@ -93,24 +93,24 @@ void Downloader::start() delete mUnstartedQueue; mUnstartedQueue=0; - QTimer::singleShot(0, this, SLOT(getNext())); + TQTimer::singleShot(0, this, TQT_SLOT(getNext())); } -static QString nonExistantFile(const QString &file) +static TQString nonExistantFile(const TQString &file) { if (file.right(1)=="/") return i18n("Unknown"); int i=0; - QString f(file); - while (QFile(f).exists()) + TQString f(file); + while (TQFile(f).exists()) { i++; f=file; - f.insert(f.findRev('.'), '_'+QString::number(i)); + f.insert(f.findRev('.'), '_'+TQString::number(i)); } return f; } -QString Downloader::enqueue(DownloadItem *notifier, const KURL &file) +TQString Downloader::enqueue(DownloadItem *notifier, const KURL &file) { if (file.isLocalFile()) return 0; QueueItem *i=new QueueItem; @@ -142,7 +142,7 @@ QString Downloader::enqueue(DownloadItem *notifier, const KURL &file) } mQueue.append(i); - QTimer::singleShot(0, this, SLOT(getNext())); + TQTimer::singleShot(0, this, TQT_SLOT(getNext())); emit enqueued(notifier, file); return i->local; } @@ -155,7 +155,7 @@ void Downloader::dequeue(DownloadItem *notifier) jobDone(mJob); return; } - for (QPtrListIterator i(mQueue); i.current(); ++i) + for (TQPtrListIterator i(mQueue); i.current(); ++i) { if ((*i)->notifier==notifier) { @@ -176,22 +176,22 @@ void Downloader::getNext() current=mQueue.take(0); // open the QFile - localfile=new QFile(current->local); + localfile=new TQFile(current->local); localfile->open(IO_ReadWrite | IO_Append); mJob= KIO::get(current->file, true, false); - connect(mJob, SIGNAL(data(KIO::Job*, const QByteArray&)), SLOT(data(KIO::Job*, const QByteArray&))); - connect(mJob, SIGNAL(result(KIO::Job*)), SLOT(jobDone(KIO::Job*))); - connect(mJob, SIGNAL(percent(KIO::Job*, unsigned long)), SLOT(percent(KIO::Job*, unsigned long))); + connect(mJob, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)), TQT_SLOT(data(KIO::Job*, const TQByteArray&))); + connect(mJob, TQT_SIGNAL(result(KIO::Job*)), TQT_SLOT(jobDone(KIO::Job*))); + connect(mJob, TQT_SIGNAL(percent(KIO::Job*, unsigned long)), TQT_SLOT(percent(KIO::Job*, unsigned long))); if (mTimeout) delete mTimeout; - mTimeout=new QTimer(this); + mTimeout=new TQTimer(this); mTimeout->start(30000, true); - connect(mTimeout, SIGNAL(timeout()), SLOT(giveUpWithThisDownloadServerIsRunningNT())); + connect(mTimeout, TQT_SIGNAL(timeout()), TQT_SLOT(giveUpWithThisDownloadServerIsRunningNT())); } -void Downloader::data(KIO::Job *, const QByteArray &data) +void Downloader::data(KIO::Job *, const TQByteArray &data) { localfile->writeBlock(data); localfile->flush(); diff --git a/noatun/library/effects.cpp b/noatun/library/effects.cpp index 3c6c601e..a71e0b43 100644 --- a/noatun/library/effects.cpp +++ b/noatun/library/effects.cpp @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include @@ -28,8 +28,8 @@ using namespace Arts; class EffectConfigWidget : public QWidget { public: - EffectConfigWidget(Effect *e, QWidget *parent=0) - : QWidget(parent), mEf(e) + EffectConfigWidget(Effect *e, TQWidget *parent=0) + : TQWidget(parent), mEf(e) {} virtual ~EffectConfigWidget() @@ -62,8 +62,8 @@ StereoEffect *Effect::effect() const Effect *Effect::after() const { - QPtrList effects=napp->effects()->effects(); - QPtrListIterator i(effects); + TQPtrList effects=napp->effects()->effects(); + TQPtrListIterator i(effects); for(; i.current(); ++i) if ((*i)->id()==mId) { @@ -77,8 +77,8 @@ Effect *Effect::after() const Effect *Effect::before() const { - QPtrList effects=napp->effects()->effects(); - QPtrListIterator i(effects); + TQPtrList effects=napp->effects()->effects(); + TQPtrListIterator i(effects); for(; i.current(); ++i) if ((*i)->id()==mId) { @@ -90,17 +90,17 @@ Effect *Effect::before() const return 0; } -QCString Effect::name() const +TQCString Effect::name() const { return mName; } -QString Effect::title() const +TQString Effect::title() const { return clean(mName); } -QString Effect::clean(const QCString &name) +TQString Effect::clean(const TQCString &name) { int pos=name.findRev("::"); if (pos>0) @@ -113,7 +113,7 @@ bool Effect::isNull() const return effect()->isNull(); } -QWidget *Effect::configure(bool /*friendly*/) +TQWidget *Effect::configure(bool /*friendly*/) { #ifdef HAS_ARTSVERSION_H if (mConfig) return mConfig; @@ -127,7 +127,7 @@ QWidget *Effect::configure(bool /*friendly*/) mConfig=new EffectConfigWidget(this); mConfig->setCaption(title()); - QBoxLayout *l=new QHBoxLayout(mConfig); + TQBoxLayout *l=new TQHBoxLayout(mConfig); l->add(new KArtsWidget(gui, mConfig)); l->freeze(); } @@ -235,14 +235,14 @@ void Effects::remove(Effect *item, bool del) void Effects::removeAll(bool del) { - for (QPtrListIterator i(mItems); i.current(); ++i) + for (TQPtrListIterator i(mItems); i.current(); ++i) if ((*i)->id()) remove(*i, del); } -QStrList Effects::available() const +TQStrList Effects::available() const { - QStrList val; + TQStrList val; Arts::TraderQuery query; query.supports("Interface", "Arts::StereoEffect"); query.supports("Interface", "Arts::SynthModule"); @@ -251,7 +251,7 @@ QStrList Effects::available() const for (vector::iterator i=offers->begin(); i!=offers->end(); i++) { Arts::TraderOffer &offer=*i; - QCString name = offer.interfaceName().c_str(); + TQCString name = offer.interfaceName().c_str(); val.append(name); } delete offers; @@ -260,16 +260,16 @@ QStrList Effects::available() const Effect *Effects::findId(long id) const { - for (QPtrListIterator i(mItems); i.current(); ++i) + for (TQPtrListIterator i(mItems); i.current(); ++i) if ((*i)->id()==id) return *i; return 0; } -QPtrList Effects::effects() const +TQPtrList Effects::effects() const { vector *items=stack.effectList(); - QPtrList effects; + TQPtrList effects; for (vector::iterator i=items->begin();i!=items->end();i++) if (Effect *e=findId(*i)) effects.append(e); diff --git a/noatun/library/effectview.cpp b/noatun/library/effectview.cpp index 73af1fc2..334781a1 100644 --- a/noatun/library/effectview.cpp +++ b/noatun/library/effectview.cpp @@ -30,22 +30,22 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include class EffectListItem : public QListViewItem { public: - EffectListItem(QListView *parent, QListViewItem *after, Effect *e) - : QListViewItem(parent, after, e->title()), mEffect(e) + EffectListItem(TQListView *parent, TQListViewItem *after, Effect *e) + : TQListViewItem(parent, after, e->title()), mEffect(e) { } @@ -55,24 +55,24 @@ private: Effect *mEffect; }; -EffectList::EffectList(QWidget *parent) +EffectList::EffectList(TQWidget *parent) : KListView(parent) { } -bool EffectList::acceptDrag(QDropEvent *event) const +bool EffectList::acceptDrag(TQDropEvent *event) const { - return QCString(event->format()) == "application/x-noatun-effectdrag"; + return TQCString(event->format()) == "application/x-noatun-effectdrag"; } -QDragObject *EffectList::dragObject() const +TQDragObject *EffectList::dragObject() const { if (!currentItem()) return 0; - return new QStoredDrag("application/x-noatun-effectdrag", (QWidget*)this); + return new TQStoredDrag("application/x-noatun-effectdrag", (TQWidget*)this); } EffectView::EffectView() - : KDialogBase((QWidget*)0L, 0, false, i18n("Effects"), Help | Close, Close, true) + : KDialogBase((TQWidget*)0L, 0, false, i18n("Effects"), Help | Close, Close, true) , initialized(false) { } @@ -85,13 +85,13 @@ void EffectView::show() namespace { -QToolButton *newButton(const QIconSet &iconSet, const QString &textLabel, QObject *receiver, const char * slot, QWidget *parent, const char *name = 0) +TQToolButton *newButton(const TQIconSet &iconSet, const TQString &textLabel, TQObject *receiver, const char * slot, TQWidget *parent, const char *name = 0) { - QToolButton *button = new QToolButton(parent, name); + TQToolButton *button = new TQToolButton(parent, name); button->setIconSet(iconSet); button->setTextLabel(textLabel, true); - QObject::connect(button, SIGNAL(clicked()), receiver, slot); - button->setFixedSize(QSize(22, 22)); + TQObject::connect(button, TQT_SIGNAL(clicked()), receiver, slot); + button->setFixedSize(TQSize(22, 22)); return button; } } @@ -105,21 +105,21 @@ void EffectView::init(void) setIcon(SmallIcon("effect")); // Create widgets and layouts - QFrame *box = makeMainWidget(); - QVBoxLayout *boxLayout = new QVBoxLayout(box, 0, KDialog::spacingHint()); + TQFrame *box = makeMainWidget(); + TQVBoxLayout *boxLayout = new TQVBoxLayout(box, 0, KDialog::spacingHint()); // Available - QVGroupBox *topBox = new QVGroupBox(i18n("Available Effects"), box); + TQVGroupBox *topBox = new TQVGroupBox(i18n("Available Effects"), box); topBox->setInsideSpacing(KDialog::spacingHint()); - QFrame *topTopFrame = new QFrame(topBox); - QHBoxLayout *topTopLayout = new QHBoxLayout(topTopFrame, 0, KDialog::spacingHint()); + TQFrame *topTopFrame = new TQFrame(topBox); + TQHBoxLayout *topTopLayout = new TQHBoxLayout(topTopFrame, 0, KDialog::spacingHint()); topTopLayout->setAutoAdd(true); available = new KComboBox(false, topTopFrame); - QToolButton *add = newButton(BarIconSet("down", KIcon::SizeSmall), i18n("Add"), this, SLOT(addEffect()), topTopFrame); + TQToolButton *add = newButton(BarIconSet("down", KIcon::SizeSmall), i18n("Add"), this, TQT_SLOT(addEffect()), topTopFrame); // Active - QHGroupBox *bottomBox = new QHGroupBox(i18n("Active Effects"), box); + TQHGroupBox *bottomBox = new TQHGroupBox(i18n("Active Effects"), box); bottomBox->setInsideSpacing(KDialog::spacingHint()); active = new EffectList(bottomBox); @@ -136,27 +136,27 @@ void EffectView::init(void) active->setSorting(-1); active->setDropVisualizer(true); active->setItemsMovable(true); - active->setSelectionMode(QListView::Single); + active->setSelectionMode(TQListView::Single); active->setDragEnabled(true); - connect(active, SIGNAL(dropped(QDropEvent *, QListViewItem *)), SLOT(activeDrop(QDropEvent *, QListViewItem *))); + connect(active, TQT_SIGNAL(dropped(TQDropEvent *, TQListViewItem *)), TQT_SLOT(activeDrop(TQDropEvent *, TQListViewItem *))); // when a new effect is added - connect(napp->effects(), SIGNAL(added(Effect *)), SLOT(added(Effect *))); - connect(napp->effects(), SIGNAL(removed(Effect *)), SLOT(removed(Effect *))); - connect(napp->effects(), SIGNAL(moved(Effect *)), SLOT(moved(Effect *))); + connect(napp->effects(), TQT_SIGNAL(added(Effect *)), TQT_SLOT(added(Effect *))); + connect(napp->effects(), TQT_SIGNAL(removed(Effect *)), TQT_SLOT(removed(Effect *))); + connect(napp->effects(), TQT_SIGNAL(moved(Effect *)), TQT_SLOT(moved(Effect *))); available->setCurrentItem(0); - connect(active, SIGNAL(currentChanged(QListViewItem *)), SLOT(activeChanged(QListViewItem *))); + connect(active, TQT_SIGNAL(currentChanged(TQListViewItem *)), TQT_SLOT(activeChanged(TQListViewItem *))); active->setCurrentItem(0); // the buttons - QFrame *bottomLeftFrame = new QFrame(bottomBox); - QVBoxLayout *bottomLeftLayout = new QVBoxLayout(bottomLeftFrame, 0, KDialog::spacingHint()); - up = newButton(BarIconSet("up", KIcon::SizeSmall), i18n("Up"), this, SLOT(moveUp()), bottomLeftFrame); - down = newButton(BarIconSet("down", KIcon::SizeSmall), i18n("Down"), this, SLOT(moveDown()), bottomLeftFrame); - configure = newButton(BarIconSet("configure", KIcon::SizeSmall), i18n("Configure"), this, SLOT(configureEffect()), bottomLeftFrame); - remove = newButton(BarIconSet("remove", KIcon::SizeSmall), i18n("Remove"), this, SLOT(removeEffect()), bottomLeftFrame); + TQFrame *bottomLeftFrame = new TQFrame(bottomBox); + TQVBoxLayout *bottomLeftLayout = new TQVBoxLayout(bottomLeftFrame, 0, KDialog::spacingHint()); + up = newButton(BarIconSet("up", KIcon::SizeSmall), i18n("Up"), this, TQT_SLOT(moveUp()), bottomLeftFrame); + down = newButton(BarIconSet("down", KIcon::SizeSmall), i18n("Down"), this, TQT_SLOT(moveDown()), bottomLeftFrame); + configure = newButton(BarIconSet("configure", KIcon::SizeSmall), i18n("Configure"), this, TQT_SLOT(configureEffect()), bottomLeftFrame); + remove = newButton(BarIconSet("remove", KIcon::SizeSmall), i18n("Remove"), this, TQT_SLOT(removeEffect()), bottomLeftFrame); bottomLeftLayout->addWidget(up); bottomLeftLayout->addWidget(down); bottomLeftLayout->addWidget(configure); @@ -167,18 +167,18 @@ void EffectView::init(void) activeChanged(active->currentItem()); // Inline documentation - QWhatsThis::add(available, i18n("This shows all available effects.\n\nTo activate a plugin, drag files from here to the active pane on the right.")); - QWhatsThis::add(add, i18n("This will place the selected effect at the bottom of your chain.")); - QWhatsThis::add(active, i18n("This shows your effect chain. Noatun supports an unlimited amount of effects in any order. You can even have the same effect twice.\n\nDrag the items to and from here to add and remove them, respectively. You may also reorder them with drag-and-drop. These actions can also be performed with the buttons to the right.")); - QWhatsThis::add(up, i18n("Move the currently selected effect up in the chain.")); - QWhatsThis::add(down, i18n("Move the currently selected effect down in the chain.")); - QWhatsThis::add(configure, i18n("Configure the currently selected effect.\n\nYou can change things such as intensity from here.")); - QWhatsThis::add(remove, i18n("This will remove the selected effect from your chain.")); + TQWhatsThis::add(available, i18n("This shows all available effects.\n\nTo activate a plugin, drag files from here to the active pane on the right.")); + TQWhatsThis::add(add, i18n("This will place the selected effect at the bottom of your chain.")); + TQWhatsThis::add(active, i18n("This shows your effect chain. Noatun supports an unlimited amount of effects in any order. You can even have the same effect twice.\n\nDrag the items to and from here to add and remove them, respectively. You may also reorder them with drag-and-drop. These actions can also be performed with the buttons to the right.")); + TQWhatsThis::add(up, i18n("Move the currently selected effect up in the chain.")); + TQWhatsThis::add(down, i18n("Move the currently selected effect down in the chain.")); + TQWhatsThis::add(configure, i18n("Configure the currently selected effect.\n\nYou can change things such as intensity from here.")); + TQWhatsThis::add(remove, i18n("This will remove the selected effect from your chain.")); resize(300, 400); } -void EffectView::activeDrop(QDropEvent *, QListViewItem *pafter) +void EffectView::activeDrop(TQDropEvent *, TQListViewItem *pafter) { EffectListItem *after(static_cast(pafter)); napp->effects()->move(after ? after->effect() : 0, @@ -186,9 +186,9 @@ void EffectView::activeDrop(QDropEvent *, QListViewItem *pafter) activeChanged(active->currentItem()); } -QListViewItem *EffectView::toListItem(Effect *e) const +TQListViewItem *EffectView::toListItem(Effect *e) const { - for(QListViewItem *i = active->firstChild(); i; i = i->itemBelow()) + for(TQListViewItem *i = active->firstChild(); i; i = i->itemBelow()) if(static_cast(i)->effect() == e) return i; return 0; @@ -257,11 +257,11 @@ void EffectView::configureEffect() Effect *e = static_cast(active->currentItem())->effect(); if(!e) return; - QWidget *c = e->configure(); + TQWidget *c = e->configure(); if(c) c->show(); } -void EffectView::activeChanged(QListViewItem *i) +void EffectView::activeChanged(TQListViewItem *i) { if(i) { diff --git a/noatun/library/effectview.h b/noatun/library/effectview.h index 1cdb1907..2a6e3ce6 100644 --- a/noatun/library/effectview.h +++ b/noatun/library/effectview.h @@ -53,20 +53,20 @@ public slots: void addEffect(); void configureEffect(); - void activeChanged(QListViewItem *); + void activeChanged(TQListViewItem *); protected slots: - void activeDrop(QDropEvent *, QListViewItem *); + void activeDrop(TQDropEvent *, TQListViewItem *); private: - QListViewItem *toListItem(Effect *) const; + TQListViewItem *toListItem(Effect *) const; void init(void); bool initialized; KComboBox *available; - QToolButton *up, *down, *configure, *remove; + TQToolButton *up, *down, *configure, *remove; EffectList *active; }; @@ -75,9 +75,9 @@ class EffectList : public KListView { Q_OBJECT public: - EffectList(QWidget *parent); - virtual bool acceptDrag(QDropEvent *) const; - virtual QDragObject *dragObject() const; + EffectList(TQWidget *parent); + virtual bool acceptDrag(TQDropEvent *) const; + virtual TQDragObject *dragObject() const; }; #endif diff --git a/noatun/library/engine.cpp b/noatun/library/engine.cpp index e937fa7f..00f26022 100644 --- a/noatun/library/engine.cpp +++ b/noatun/library/engine.cpp @@ -14,8 +14,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -248,7 +248,7 @@ Noatun::StereoEffectStack *Engine::globalEffectStack() const { return &d->globa Noatun::Equalizer *Engine::equalizer() const { return &d->equalizer; } Noatun::Session *Engine::session() const { return &d->session; } -Engine::Engine(QObject *parent) : QObject(parent, "Engine"), mPlay(false) +Engine::Engine(TQObject *parent) : TQObject(parent, "Engine"), mPlay(false) { d=new EnginePrivate; // Connect to aRts @@ -293,19 +293,19 @@ bool Engine::open(const PlaylistItem &file) d->pProxy = new TitleProxy::Proxy(KURL(file.property("stream_"))); d->playobj = factory.createPlayObject(d->pProxy->proxyUrl(), false); - connect(d->playobj, SIGNAL(destroyed()), this, SLOT(deleteProxy())); + connect(d->playobj, TQT_SIGNAL(destroyed()), this, TQT_SLOT(deleteProxy())); connect( - d->pProxy, SIGNAL( + d->pProxy, TQT_SIGNAL( metaData( - const QString &, const QString &, - const QString &, const QString &, - const QString &, const QString &)), - this, SIGNAL( - receivedStreamMeta(const QString &, const QString &, - const QString &, const QString &, - const QString &, const QString &)) + const TQString &, const TQString &, + const TQString &, const TQString &, + const TQString &, const TQString &)), + this, TQT_SIGNAL( + receivedStreamMeta(const TQString &, const TQString &, + const TQString &, const TQString &, + const TQString &, const TQString &)) ); - connect(d->pProxy, SIGNAL(proxyError()), this, SLOT(slotProxyError())); + connect(d->pProxy, TQT_SIGNAL(proxyError()), this, TQT_SLOT(slotProxyError())); } else { @@ -328,7 +328,7 @@ bool Engine::open(const PlaylistItem &file) } else { - connect( d->playobj, SIGNAL( playObjectCreated() ), this, SLOT( connectPlayObject() ) ); + connect( d->playobj, TQT_SIGNAL( playObjectCreated() ), this, TQT_SLOT( connectPlayObject() ) ); } if (mPlay) @@ -463,7 +463,7 @@ bool Engine::initArts() // aRts seems not to be running, let's try to run it // First, let's read the configuration as in kcmarts KConfig config("kcmartsrc"); - QCString cmdline; + TQCString cmdline; config.setGroup("Arts"); @@ -472,7 +472,7 @@ bool Engine::initArts() // put the value of x11Comm into .mcoprc { - KConfig X11CommConfig(QDir::homeDirPath()+"/.mcoprc"); + KConfig X11CommConfig(TQDir::homeDirPath()+"/.mcoprc"); if(x11Comm) X11CommConfig.writeEntry("GlobalComm", "Arts::X11GlobalComm"); @@ -482,15 +482,15 @@ bool Engine::initArts() X11CommConfig.sync(); } - cmdline = QFile::encodeName(KStandardDirs::findExe(QString::fromLatin1("kdeinit_wrapper"))); + cmdline = TQFile::encodeName(KStandardDirs::findExe(TQString::fromLatin1("kdeinit_wrapper"))); cmdline += " "; if (rt) - cmdline += QFile::encodeName(KStandardDirs::findExe( - QString::fromLatin1("artswrapper"))); + cmdline += TQFile::encodeName(KStandardDirs::findExe( + TQString::fromLatin1("artswrapper"))); else - cmdline += QFile::encodeName(KStandardDirs::findExe( - QString::fromLatin1("artsd"))); + cmdline += TQFile::encodeName(KStandardDirs::findExe( + TQString::fromLatin1("artsd"))); cmdline += " "; cmdline += config.readEntry("Arguments","-F 10 -S 4096 -s 60 -m artsmessage -l 3 -f").utf8(); diff --git a/noatun/library/equalizer.cpp b/noatun/library/equalizer.cpp index 2ee208db..61b10d01 100644 --- a/noatun/library/equalizer.cpp +++ b/noatun/library/equalizer.cpp @@ -8,10 +8,10 @@ #include #include #include -#include +#include #include #include -#include +#include #include #include #include @@ -28,7 +28,7 @@ struct OldEqCruft static OldEqCruft *eqCruft=0; -Preset::Preset(const QString &) +Preset::Preset(const TQString &) { } // unused Preset::Preset(VPreset p) @@ -36,7 +36,7 @@ Preset::Preset(VPreset p) VPreset *copy = new VPreset(p); // isn't this horrible? :) - mFile = QString::number((unsigned long)copy); + mFile = TQString::number((unsigned long)copy); } Preset::Preset() @@ -48,12 +48,12 @@ VPreset &Preset::vpreset() const return *(VPreset*)addr; } -QString Preset::name() const +TQString Preset::name() const { return vpreset().name(); } -bool Preset::setName(const QString &name) +bool Preset::setName(const TQString &name) { return vpreset().setName(name); } @@ -75,7 +75,7 @@ void Preset::remove() vpreset().remove(); } -QString Preset::file() const +TQString Preset::file() const { return vpreset().file(); } @@ -120,17 +120,17 @@ int Band::center() const return eqCruft->interpolated->band(mNum).center(); } -QString Band::formatStart(bool withHz) const +TQString Band::formatStart(bool withHz) const { return eqCruft->interpolated->band(mNum).formatStart(withHz); } -QString Band::formatEnd(bool withHz) const +TQString Band::formatEnd(bool withHz) const { return eqCruft->interpolated->band(mNum).formatEnd(withHz); } -QString Band::format(bool withHz) const +TQString Band::format(bool withHz) const { return eqCruft->interpolated->band(mNum).format(withHz); } @@ -164,19 +164,19 @@ void Equalizer::init() mBands.append(new Band(4)); mBands.append(new Band(5)); - connect(VEQ, SIGNAL(changed()), SIGNAL(changed())); + connect(VEQ, TQT_SIGNAL(changed()), TQT_SIGNAL(changed())); - connect(VEQ, SIGNAL(created(VPreset)), SLOT(created(VPreset))); - connect(VEQ, SIGNAL(selected(VPreset)), SLOT(selected(VPreset))); - connect(VEQ, SIGNAL(renamed(VPreset)), SLOT(renamed(VPreset))); - connect(VEQ, SIGNAL(removed(VPreset)), SLOT(removed(VPreset))); + connect(VEQ, TQT_SIGNAL(created(VPreset)), TQT_SLOT(created(VPreset))); + connect(VEQ, TQT_SIGNAL(selected(VPreset)), TQT_SLOT(selected(VPreset))); + connect(VEQ, TQT_SIGNAL(renamed(VPreset)), TQT_SLOT(renamed(VPreset))); + connect(VEQ, TQT_SIGNAL(removed(VPreset)), TQT_SLOT(removed(VPreset))); - connect(VEQ, SIGNAL(enabled()), SIGNAL(enabled())); - connect(VEQ, SIGNAL(disabled()), SIGNAL(disabled())); - connect(VEQ, SIGNAL(enabled(bool)), SIGNAL(enabled(bool))); + connect(VEQ, TQT_SIGNAL(enabled()), TQT_SIGNAL(enabled())); + connect(VEQ, TQT_SIGNAL(disabled()), TQT_SIGNAL(disabled())); + connect(VEQ, TQT_SIGNAL(enabled(bool)), TQT_SIGNAL(enabled(bool))); - connect(VEQ, SIGNAL(preampChanged(int)), SIGNAL(preampChanged(int))); - connect(VEQ, SIGNAL(preampChanged(int)), SIGNAL(preampChanged(int))); + connect(VEQ, TQT_SIGNAL(preampChanged(int)), TQT_SIGNAL(preampChanged(int))); + connect(VEQ, TQT_SIGNAL(preampChanged(int)), TQT_SIGNAL(preampChanged(int))); } void Equalizer::created(VPreset preset) @@ -207,12 +207,12 @@ void Equalizer::removed(VPreset preset) delete p; } -QPtrList Equalizer::presets() const +TQPtrList Equalizer::presets() const { - QValueList presets = VEQ->presets(); - QPtrList list; + TQValueList presets = VEQ->presets(); + TQPtrList list; for ( - QValueList::Iterator i(presets.begin()); + TQValueList::Iterator i(presets.begin()); i != presets.end(); ++i ) { @@ -221,35 +221,35 @@ QPtrList Equalizer::presets() const return list; } -Preset *Equalizer::preset(const QString &file) +Preset *Equalizer::preset(const TQString &file) { VPreset p = VEQ->presetByFile(file); if (!p) return 0; return new Preset(p); } -bool Equalizer::presetExists(const QString &name) const +bool Equalizer::presetExists(const TQString &name) const { return VEQ->presetExists(name); } -Preset *Equalizer::createPreset(const QString &name, bool smart) +Preset *Equalizer::createPreset(const TQString &name, bool smart) { VPreset p = VEQ->createPreset(name, smart); if (!p) return 0; return new Preset(p); } -const QPtrList &Equalizer::bands() const +const TQPtrList &Equalizer::bands() const { return mBands; } Band *Equalizer::band(int num) const { - // can't use QPtrList::at since it sets current + // can't use TQPtrList::at since it sets current - QPtrListIterator item(mBands); + TQPtrListIterator item(mBands); item+=(unsigned int)num; return *item; } @@ -290,17 +290,17 @@ void Equalizer::setEnabled(bool e) VEQ->setEnabled(e); } -QString Equalizer::toString(const QString &name) const +TQString Equalizer::toString(const TQString &name) const { return VEQ->toString(name); } -bool Equalizer::fromString(const QString &str) +bool Equalizer::fromString(const TQString &str) { return VEQ->fromString(str); } -bool Equalizer::save(const KURL &filename, const QString &name) const +bool Equalizer::save(const KURL &filename, const TQString &name) const { return VEQ->save(filename, name); } diff --git a/noatun/library/equalizerview.cpp b/noatun/library/equalizerview.cpp index 5e406e13..098226a7 100644 --- a/noatun/library/equalizerview.cpp +++ b/noatun/library/equalizerview.cpp @@ -11,18 +11,18 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #define EQ (napp->vequalizer()) @@ -30,14 +30,14 @@ //////////////////////////////////////////////// // PresetList -PresetList::PresetList(QWidget *parent, const char *name) +PresetList::PresetList(TQWidget *parent, const char *name) : KListView(parent, name) { setItemsRenameable(true); setRenameable(0, true); addColumn(""); // first column is the visible one addColumn("", 0); // create one column to store cruft in - setColumnWidthMode(0, QListView::Maximum); + setColumnWidthMode(0, TQListView::Maximum); header()->setStretchEnabled(true,0); header()->hide(); // a try to set a sne minimum width. unfortuately the custom item @@ -45,14 +45,14 @@ PresetList::PresetList(QWidget *parent, const char *name) setMinimumWidth(kapp->fontMetrics().boundingRect(i18n("Custom")).width()+2*itemMargin()); } -void PresetList::rename(QListViewItem *item, int c) +void PresetList::rename(TQListViewItem *item, int c) { // We can't rename the "Custom" metapreset if (item->text(0)==i18n("Custom")) return; // Or presets we don't have write access to - if (!QFileInfo(item->text(1)).isWritable()) + if (!TQFileInfo(item->text(1)).isWritable()) return; KListView::rename(item, c); @@ -61,18 +61,18 @@ void PresetList::rename(QListViewItem *item, int c) //////////////////////////////////////////////// // EqualizerLevel -EqualizerLevel::EqualizerLevel(QWidget *parent, VBand band) - : QWidget(parent), mBand(band) +EqualizerLevel::EqualizerLevel(TQWidget *parent, VBand band) + : TQWidget(parent), mBand(band) { - QVBoxLayout *layout = new QVBoxLayout(this, + TQVBoxLayout *layout = new TQVBoxLayout(this, 0, 0, "EqualizerLevel::layout"); - mSlider = new QSlider(-200, 200, 25, 0, Qt::Vertical, this, "EqualizerLevel::mSlider"); - mSlider->setTickmarks(QSlider::Left); + mSlider = new TQSlider(-200, 200, 25, 0, Qt::Vertical, this, "EqualizerLevel::mSlider"); + mSlider->setTickmarks(TQSlider::Left); mSlider->setTickInterval(25); layout->addWidget(mSlider); - connect(mSlider, SIGNAL(valueChanged(int)), SLOT(changed(int))); - mLabel = new QLabel("", this, "EqualizerLevel::mLabel"); + connect(mSlider, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed(int))); + mLabel = new TQLabel("", this, "EqualizerLevel::mLabel"); mLabel->setAlignment(AlignHCenter | AlignVCenter); layout->addWidget(mLabel); @@ -82,8 +82,8 @@ EqualizerLevel::EqualizerLevel(QWidget *parent, VBand band) setBand(band); - connect(EQ, SIGNAL(modified()), SLOT(changed())); - connect(mSlider, SIGNAL(valueChanged(int)), SLOT(changed(int))); + connect(EQ, TQT_SIGNAL(modified()), TQT_SLOT(changed())); + connect(mSlider, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed(int))); } void EqualizerLevel::setBand(VBand band) @@ -123,56 +123,56 @@ void EqualizerView::show() mWidget = new EqualizerWidget(this, "mWidget"); setMainWidget(mWidget); - bandsLayout = new QHBoxLayout(mWidget->bandsFrame, + bandsLayout = new TQHBoxLayout(mWidget->bandsFrame, 0, KDialog::spacingHint(), "bandsLayout"); - connect(mWidget->preampSlider, SIGNAL(valueChanged(int)), - this, SLOT(setPreamp(int))); - connect(EQ, SIGNAL(preampChanged(int)), - this, SLOT(changedPreamp(int))); + connect(mWidget->preampSlider, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(setPreamp(int))); + connect(EQ, TQT_SIGNAL(preampChanged(int)), + this, TQT_SLOT(changedPreamp(int))); mWidget->bandCount->setRange(EQ->minBands(), EQ->maxBands()); - connect(mWidget->bandCount, SIGNAL(valueChanged(int)), - EQ, SLOT(setBands(int))); + connect(mWidget->bandCount, TQT_SIGNAL(valueChanged(int)), + EQ, TQT_SLOT(setBands(int))); - QVBoxLayout *l = new QVBoxLayout(mWidget->presetFrame); + TQVBoxLayout *l = new TQVBoxLayout(mWidget->presetFrame); mPresets = new PresetList(mWidget->presetFrame, "mPresets"); l->addWidget(mPresets); - connect(mWidget->removePresetButton, SIGNAL(clicked()), SLOT(remove())); - connect(mWidget->addPresetButton, SIGNAL(clicked()), SLOT(create())); - connect(mWidget->resetEqButton, SIGNAL(clicked()), SLOT(reset())); + connect(mWidget->removePresetButton, TQT_SIGNAL(clicked()), TQT_SLOT(remove())); + connect(mWidget->addPresetButton, TQT_SIGNAL(clicked()), TQT_SLOT(create())); + connect(mWidget->resetEqButton, TQT_SIGNAL(clicked()), TQT_SLOT(reset())); new KListViewItem(mPresets, i18n("Custom")); - connect(mPresets, SIGNAL(currentChanged(QListViewItem*)), - this, SLOT(select(QListViewItem*))); + connect(mPresets, TQT_SIGNAL(currentChanged(TQListViewItem*)), + this, TQT_SLOT(select(TQListViewItem*))); - connect(mPresets, SIGNAL(itemRenamed(QListViewItem*)), - this, SLOT(rename(QListViewItem*))); + connect(mPresets, TQT_SIGNAL(itemRenamed(TQListViewItem*)), + this, TQT_SLOT(rename(TQListViewItem*))); // populate the preset list - QValueList presets = EQ->presets(); - QValueList::Iterator it; + TQValueList presets = EQ->presets(); + TQValueList::Iterator it; for (it=presets.begin(); it!=presets.end(); ++it) { created(*it); } - connect(EQ, SIGNAL(created(VPreset)), SLOT(created(VPreset))); - connect(EQ, SIGNAL(renamed(VPreset)), SLOT(renamed(VPreset))); - connect(EQ, SIGNAL(removed(VPreset)), SLOT(removed(VPreset))); + connect(EQ, TQT_SIGNAL(created(VPreset)), TQT_SLOT(created(VPreset))); + connect(EQ, TQT_SIGNAL(renamed(VPreset)), TQT_SLOT(renamed(VPreset))); + connect(EQ, TQT_SIGNAL(removed(VPreset)), TQT_SLOT(removed(VPreset))); mWidget->enabledCheckBox->setChecked(EQ->isEnabled()); - connect(mWidget->enabledCheckBox, SIGNAL(toggled(bool)), - EQ, SLOT(setEnabled(bool))); - connect(EQ, SIGNAL(enabled(bool)), - mWidget->enabledCheckBox, SLOT(setChecked(bool))); + connect(mWidget->enabledCheckBox, TQT_SIGNAL(toggled(bool)), + EQ, TQT_SLOT(setEnabled(bool))); + connect(EQ, TQT_SIGNAL(enabled(bool)), + mWidget->enabledCheckBox, TQT_SLOT(setChecked(bool))); - connect(EQ, SIGNAL(changed()), - this, SLOT(changedEq())); - connect(EQ, SIGNAL(changedBands()), - this, SLOT(changedBands())); + connect(EQ, TQT_SIGNAL(changed()), + this, TQT_SLOT(changedEq())); + connect(EQ, TQT_SIGNAL(changedBands()), + this, TQT_SLOT(changedBands())); changedBands(); changedEq(); @@ -184,23 +184,23 @@ void EqualizerView::show() KDialogBase::show(); } -QListViewItem *EqualizerView::itemFor(const QString &filename) +TQListViewItem *EqualizerView::itemFor(const TQString &filename) { - for (QListViewItem *i=mPresets->firstChild(); i!=0; i=i->itemBelow()) + for (TQListViewItem *i=mPresets->firstChild(); i!=0; i=i->itemBelow()) { - QString t = i->text(1); + TQString t = i->text(1); if ((t.length()==0 && filename.length()==0) || t==filename) return i; } return 0; } -QListViewItem *EqualizerView::itemFor(const VPreset &preset) +TQListViewItem *EqualizerView::itemFor(const VPreset &preset) { return itemFor(preset.file()); } -// why is it that when you move a QSlider up, it goes down? +// why is it that when you move a TQSlider up, it goes down? void EqualizerView::setPreamp(int x) { EQ->setPreamp(-x); @@ -233,7 +233,7 @@ void EqualizerView::changedEq() { if (!mGoingPreset) { - QListViewItem *customitem = itemFor(""); + TQListViewItem *customitem = itemFor(""); if (!customitem) // this should never happen! return; mPresets->setSelected(customitem, true); @@ -247,15 +247,15 @@ void EqualizerView::removed(VPreset p) void EqualizerView::created(VPreset p) { - // store the filename in QListViewItem::text(0) - QString n = p.name(); - QString f = p.file(); + // store the filename in TQListViewItem::text(0) + TQString n = p.name(); + TQString f = p.file(); new KListViewItem(mPresets, n, f); } void EqualizerView::renamed(VPreset p) { - QListViewItem *renamed = itemFor(p); + TQListViewItem *renamed = itemFor(p); if (!renamed) // WTF ! { created(p); @@ -266,10 +266,10 @@ void EqualizerView::renamed(VPreset p) void EqualizerView::remove() { - QListViewItem *current=mPresets->currentItem(); + TQListViewItem *current=mPresets->currentItem(); if (current->text(0)==i18n("Custom")) return; - QListViewItem *then=current->itemAbove(); + TQListViewItem *then=current->itemAbove(); if (!then) then=current->itemBelow(); if (then) @@ -290,7 +290,7 @@ void EqualizerView::create() // We should have just made a list view item for this preset // See EquailizerView::presetAdded() - QListViewItem *i = itemFor(p); + TQListViewItem *i = itemFor(p); if (i) mPresets->setSelected(i, true); @@ -307,13 +307,13 @@ void EqualizerView::reset() } -void EqualizerView::rename(QListViewItem *item) +void EqualizerView::rename(TQListViewItem *item) { EQ->presetByFile(item->text(1)).setName(item->text(0)); item->setText(0, EQ->presetByFile(item->text(1)).name()); } -void EqualizerView::select(QListViewItem *item) +void EqualizerView::select(TQListViewItem *item) { mGoingPreset = true; EQ->presetByFile(item->text(1)).load(); diff --git a/noatun/library/equalizerview.h b/noatun/library/equalizerview.h index 98778fcc..321b5ef0 100644 --- a/noatun/library/equalizerview.h +++ b/noatun/library/equalizerview.h @@ -1,7 +1,7 @@ #ifndef EQUALIZERVIEW_H #define EQUALIZERVIEW_H -#include +#include #include #include @@ -18,7 +18,7 @@ class EqualizerLevel : public QWidget { Q_OBJECT public: - EqualizerLevel(QWidget *parent, VBand band); + EqualizerLevel(TQWidget *parent, VBand band); public slots: void changed(); @@ -28,8 +28,8 @@ public slots: private: VBand mBand; - QSlider *mSlider; - QLabel *mLabel; + TQSlider *mSlider; + TQLabel *mLabel; }; @@ -37,24 +37,24 @@ class PresetList : public KListView { Q_OBJECT public: - PresetList(QWidget *parent, const char *name=0); + PresetList(TQWidget *parent, const char *name=0); public: - void rename(QListViewItem *item, int c); + void rename(TQListViewItem *item, int c); }; class EqualizerView : public KDialogBase { Q_OBJECT - QPtrList mBands; + TQPtrList mBands; public: EqualizerView(); virtual void show(); - QListViewItem *itemFor(const QString &filename); - QListViewItem *itemFor(const VPreset &preset); + TQListViewItem *itemFor(const TQString &filename); + TQListViewItem *itemFor(const VPreset &preset); public slots: void setPreamp(int); @@ -71,19 +71,19 @@ private slots: void remove(); void create(); void reset(); - void rename(QListViewItem *); - void select(QListViewItem*); + void rename(TQListViewItem *); + void select(TQListViewItem*); private: bool first; EqualizerWidget *mWidget; - QHBoxLayout *bandsLayout; -// QCheckBox *mOn; -// QSlider *mPreamp; + TQHBoxLayout *bandsLayout; +// TQCheckBox *mOn; +// TQSlider *mPreamp; PresetList *mPresets; bool mGoingPreset; -// QPushButton *mRemovePreset, *mAddPreset; -// QFrame *mSliders; +// TQPushButton *mRemovePreset, *mAddPreset; +// TQFrame *mSliders; // KIntNumInput *mBandCount; }; diff --git a/noatun/library/globalvideo.h b/noatun/library/globalvideo.h index e0f28cb0..c070ab30 100644 --- a/noatun/library/globalvideo.h +++ b/noatun/library/globalvideo.h @@ -7,7 +7,7 @@ class GlobalVideo : public QWidget { Q_OBJECT - QPopupMenu *menu; + TQPopupMenu *menu; VideoFrame *video; public: @@ -19,7 +19,7 @@ public slots: void slotAdaptSize(int w, int h); protected: - void mouseReleaseEvent(QMouseEvent *e); + void mouseReleaseEvent(TQMouseEvent *e); }; diff --git a/noatun/library/ksaver.cpp b/noatun/library/ksaver.cpp index f1cc6a61..40b3606c 100644 --- a/noatun/library/ksaver.cpp +++ b/noatun/library/ksaver.cpp @@ -39,11 +39,11 @@ public: KSaverPrivate() : isLocal(true), tempFile(0), file(0), textStream(0), dataStream(0) {}; bool isLocal; KTempFile *tempFile; - QFile *file; + TQFile *file; KURL url; - QString error; - QTextStream *textStream; - QDataStream *dataStream; + TQString error; + TQTextStream *textStream; + TQDataStream *dataStream; }; Noatun::KSaver::KSaver(const KURL &_target) @@ -54,7 +54,7 @@ Noatun::KSaver::KSaver(const KURL &_target) if(d->url.protocol() == "file") { d->isLocal = true; - d->file = new QFile(d->url.path()); + d->file = new TQFile(d->url.path()); } else { @@ -124,22 +124,22 @@ bool Noatun::KSaver::close(void) } } -QString Noatun::KSaver::error(void) +TQString Noatun::KSaver::error(void) { return d->error; } -QFile &Noatun::KSaver::file(void) +TQFile &Noatun::KSaver::file(void) { if(d->isLocal && d->file) return *d->file; else if(!d->isLocal && d->tempFile) return *d->tempFile->file(); else - return *static_cast(0); + return *static_cast(0); } -QTextStream &Noatun::KSaver::textStream() +TQTextStream &Noatun::KSaver::textStream() { if(d->textStream) { @@ -147,7 +147,7 @@ QTextStream &Noatun::KSaver::textStream() } else if(d->isLocal && d->file) { - d->textStream = new QTextStream(d->file); + d->textStream = new TQTextStream(d->file); return *d->textStream; } else if(!d->isLocal && d->tempFile) @@ -157,11 +157,11 @@ QTextStream &Noatun::KSaver::textStream() } else { - return *static_cast(0); + return *static_cast(0); } } -QDataStream &Noatun::KSaver::dataStream() +TQDataStream &Noatun::KSaver::dataStream() { if(d->dataStream) { @@ -169,7 +169,7 @@ QDataStream &Noatun::KSaver::dataStream() } else if(d->isLocal && d->file) { - d->dataStream = new QDataStream(d->file); + d->dataStream = new TQDataStream(d->file); return *d->dataStream; } else if(!d->isLocal && d->tempFile) @@ -179,6 +179,6 @@ QDataStream &Noatun::KSaver::dataStream() } else { - return *static_cast(0); + return *static_cast(0); } } diff --git a/noatun/library/ksaver.h b/noatun/library/ksaver.h index e55b2c0d..91fc4af8 100644 --- a/noatun/library/ksaver.h +++ b/noatun/library/ksaver.h @@ -25,10 +25,10 @@ #define KSAVER_H #include -#include -#include -#include -#include +#include +#include +#include +#include namespace Noatun { @@ -42,7 +42,7 @@ class KSaver public: /** * The constructor takes the url and decides the best way to save, - * which will mean using something like KIO::NetAccess or QFile. + * which will mean using something like KIO::NetAccess or TQFile. */ KSaver(const KURL &_target); @@ -69,29 +69,29 @@ public: * If open or close returns false, there was an error, and error * returns what the error was, when available. */ - QString error(void); + TQString error(void); /** - * file returns a QFile open for writing, which may be for a temporary + * file returns a TQFile open for writing, which may be for a temporary * file on the local filesystem. * * If this is called before the file is opened, you will crash. */ - QFile &file(void); + TQFile &file(void); /** * You can use this to write out your data. * * If this is called before the file is opened, you will crash. */ - QTextStream &textStream(void); + TQTextStream &textStream(void); /** * You can use this to write out your data. * * If this is called before the file is opened, you will crash. */ - QDataStream &dataStream(void); + TQDataStream &dataStream(void); private: class KSaverPrivate; KSaverPrivate *d; diff --git a/noatun/library/mimetypetree.cpp b/noatun/library/mimetypetree.cpp index c2b60c81..0370b048 100644 --- a/noatun/library/mimetypetree.cpp +++ b/noatun/library/mimetypetree.cpp @@ -1,54 +1,54 @@ #include "mimetypetree.h" #include -#include -#include +#include +#include -MimeTypeTree::MimeTypeTree(QWidget *parent) +MimeTypeTree::MimeTypeTree(TQWidget *parent) : KListView(parent) { KMimeType::List list=KMimeType::allMimeTypes(); - QDict map; + TQDict map; setRootIsDecorated(true); addColumn("-"); header()->hide(); - QValueListIterator i(list.begin()); + TQValueListIterator i(list.begin()); for (; i != list.end(); ++i) { - QString mimetype = (*i)->name(); + TQString mimetype = (*i)->name(); int slash = mimetype.find("/"); - QString major = mimetype.left(slash); + TQString major = mimetype.left(slash); // hide all and inode majors if (major == "all" || major=="inode") continue; - QString minor = mimetype.mid(slash+1); - QListViewItem *majorItem=map[major]; + TQString minor = mimetype.mid(slash+1); + TQListViewItem *majorItem=map[major]; if (!majorItem) { majorItem=addMajor(major); map.insert(major, majorItem); } - new QListViewItem(majorItem, minor); + new TQListViewItem(majorItem, minor); } } -void MimeTypeTree::sel(QListViewItem *item) +void MimeTypeTree::sel(TQListViewItem *item) { - QListViewItem *p=item->parent(); + TQListViewItem *p=item->parent(); if (!p) return; - QString major=p->text(0); - QString minor=item->text(0); + TQString major=p->text(0); + TQString minor=item->text(0); emit selected(major+'/'+minor); } -QListViewItem* MimeTypeTree::addMajor(const QString &name) +TQListViewItem* MimeTypeTree::addMajor(const TQString &name) { - return new QListViewItem(this, name); + return new TQListViewItem(this, name); } diff --git a/noatun/library/mimetypetree.h b/noatun/library/mimetypetree.h index 1f315526..92af43ec 100644 --- a/noatun/library/mimetypetree.h +++ b/noatun/library/mimetypetree.h @@ -20,15 +20,15 @@ class MimeTypeTree : public KListView { Q_OBJECT public: - MimeTypeTree(QWidget *parent); + MimeTypeTree(TQWidget *parent); private: - QListViewItem *addMajor(const QString &name); + TQListViewItem *addMajor(const TQString &name); private slots: - void sel(QListViewItem *item); + void sel(TQListViewItem *item); signals: - void selected(const QString &mimetype); + void selected(const TQString &mimetype); }; #endif diff --git a/noatun/library/noatun/app.h b/noatun/library/noatun/app.h index c4effa4d..0b8af3ee 100644 --- a/noatun/library/noatun/app.h +++ b/noatun/library/noatun/app.h @@ -56,20 +56,20 @@ public: /** * @return a list of mimetypes aRts (and thus Noatun) can play - * KFileDialog accepts this QString instead of the shell globs in + * KFileDialog accepts this TQString instead of the shell globs in * its static functions, make use of it :) **/ - QString mimeTypes(); + TQString mimeTypes(); LibraryLoader *libraryLoader() const { return mLibraryLoader; } Downloader *downloader() const { return mDownloader; } - static QImage readPNG(const QString &filename); + static TQImage readPNG(const TQString &filename); Effects *effects() const; ::Equalizer *equalizer() const { return mEqualizer; } ::VEqualizer *vequalizer(); KDialogBase *equalizerView() const { return mEqualizerView; } - QCString version() const; + TQCString version() const; virtual void commitData(QSessionManager &); virtual void saveState(QSessionManager &); @@ -121,7 +121,7 @@ public: //options int startupPlayMode() const; bool loopList() const; bool oneInstance() const; - QString saveDirectory() const; + TQString saveDirectory() const; /** * @deprecated * now merged with clearOnOpen() @@ -138,7 +138,7 @@ public: //options * software mixing is active **/ bool fastMixer() const; - QString titleFormat() const; + TQString titleFormat() const; /** * @return true if remaining time is displayed to the user, false if * played time is displayed @@ -152,7 +152,7 @@ public: //options */ void setAutoPlay(bool); void setStartupPlayMode(int mode); - void setSaveDirectory(const QString &); + void setSaveDirectory(const TQString &); void setRememberPositions(bool); /** * @deprecated @@ -171,7 +171,7 @@ public: //options **/ void setFastMixer(bool); - void setTitleFormat(const QString &); + void setTitleFormat(const TQString &); /** * Pass true if remaining time should be displayed to the user, false if @@ -192,7 +192,7 @@ public: //options * * @return the ID associated with the menu item, for use in pluginMenuRemove() **/ - int pluginMenuAdd(const QString &text, const QObject *receiver, const char *member); + int pluginMenuAdd(const TQString &text, const TQObject *receiver, const char *member); /** * @deprecated diff --git a/noatun/library/noatun/controls.h b/noatun/library/noatun/controls.h index 6db8d1cd..27186c08 100644 --- a/noatun/library/noatun/controls.h +++ b/noatun/library/noatun/controls.h @@ -1,12 +1,12 @@ #ifndef __CONTROLS_H #define __CONTROLS_H -#include +#include #include #include -#include -#include +#include +#include #include class QComboBox; @@ -16,7 +16,7 @@ class QLabel; * A slider that can be moved around while being * changed internally * - * @short Special QSlider based class suitable for time sliders + * @short Special TQSlider based class suitable for time sliders * @author Charles Samuels * @version 2.3 **/ @@ -24,10 +24,10 @@ class KDE_EXPORT L33tSlider : public QSlider { Q_OBJECT public: - L33tSlider(QWidget * parent, const char * name=0); - L33tSlider(Orientation, QWidget * parent, const char * name=0); + L33tSlider(TQWidget * parent, const char * name=0); + L33tSlider(Orientation, TQWidget * parent, const char * name=0); L33tSlider(int minValue, int maxValue, int pageStep, int value, - Orientation, QWidget * parent, const char * name=0); + Orientation, TQWidget * parent, const char * name=0); bool currentlyPressed() const; signals: @@ -40,9 +40,9 @@ public slots: virtual void setValue(int); protected: - virtual void mousePressEvent(QMouseEvent*); - virtual void mouseReleaseEvent(QMouseEvent*); - virtual void wheelEvent(QWheelEvent *); + virtual void mousePressEvent(TQMouseEvent*); + virtual void mouseReleaseEvent(TQMouseEvent*); + virtual void wheelEvent(TQWheelEvent *); private: bool pressed; @@ -57,11 +57,11 @@ class SliderAction : public KAction { Q_OBJECT public: - SliderAction(const QString& text, int accel, const QObject *receiver, - const char *member, QObject* parent, const char* name ); - virtual int plug( QWidget *w, int index = -1 ); - virtual void unplug( QWidget *w ); - QSlider* slider() const { return m_slider; } + SliderAction(const TQString& text, int accel, const TQObject *receiver, + const char *member, TQObject* parent, const char* name ); + virtual int plug( TQWidget *w, int index = -1 ); + virtual void unplug( TQWidget *w ); + TQSlider* slider() const { return m_slider; } signals: void plugged(); @@ -70,9 +70,9 @@ public slots: void toolbarMoved(KToolBar::BarPosition pos); private: - QGuardedPtr m_slider; - QStringList m_items; - const QObject *m_receiver; + TQGuardedPtr m_slider; + TQStringList m_items; + const TQObject *m_receiver; const char *m_member; }; diff --git a/noatun/library/noatun/downloader.h b/noatun/library/noatun/downloader.h index c281a006..624518d0 100644 --- a/noatun/library/noatun/downloader.h +++ b/noatun/library/noatun/downloader.h @@ -2,8 +2,8 @@ #define _DOWNLOADER_H #include -#include -#include +#include +#include class QFile; class QTimer; @@ -31,9 +31,9 @@ public: /** * @return the local filename this item will be saved to **/ - QString localFilename() const; + TQString localFilename() const; - virtual void setLocalFilename(const QString &filename); + virtual void setLocalFilename(const TQString &filename); /** * Called if this item has been fully downloaded @@ -57,7 +57,7 @@ public: void dequeue(); private: - QString mLocalFilename; + TQString mLocalFilename; }; /** @@ -70,15 +70,15 @@ Q_OBJECT { DownloadItem *notifier; KURL file; - QString local; + TQString local; }; public: - Downloader(QObject *parent=0); + Downloader(TQObject *parent=0); virtual ~Downloader(); public slots: - QString enqueue(DownloadItem *notifier, const KURL &file); + TQString enqueue(DownloadItem *notifier, const KURL &file); void dequeue(DownloadItem *notifier); /** @@ -101,18 +101,18 @@ signals: private slots: void getNext(); - void data( KIO::Job *, const QByteArray &data); + void data( KIO::Job *, const TQByteArray &data); void percent( KIO::Job *, unsigned long percent); void jobDone( KIO::Job *); void giveUpWithThisDownloadServerIsRunningNT(); private: - QPtrList mQueue; - QPtrList *mUnstartedQueue; - QFile *localfile; + TQPtrList mQueue; + TQPtrList *mUnstartedQueue; + TQFile *localfile; Downloader::QueueItem *current; KIO::TransferJob *mJob; - QTimer *mTimeout; + TQTimer *mTimeout; bool mStarted; }; diff --git a/noatun/library/noatun/effects.h b/noatun/library/noatun/effects.h index c39cb8aa..4c014a93 100644 --- a/noatun/library/noatun/effects.h +++ b/noatun/library/noatun/effects.h @@ -1,10 +1,10 @@ #ifndef EFFECTS_H #define EFFECTS_H -#include -#include -#include -#include +#include +#include +#include +#include namespace Arts { class StereoEffect; } class Engine; @@ -48,12 +48,12 @@ public: /** * Get the name of the object. **/ - QCString name() const; + TQCString name() const; /** * get the "clean" title of effect **/ - QString title() const; + TQString title() const; /** * @return true if this effect name is invalid, false otherwise @@ -69,7 +69,7 @@ public: * set an icon and make it purdy. Otherwise * create a plan widget that you can reparent. **/ - QWidget *configure(bool friendly=true); + TQWidget *configure(bool friendly=true); /** * Does this widget have a configurable @@ -82,12 +82,12 @@ public: * Return an effect name that can be presented to a user * i.e. Arts::FREEVERB will end up as FREEVERB **/ - static QString clean(const QCString &name); + static TQString clean(const TQCString &name); private: long mId; Arts::StereoEffect *mEffect; - QCString mName; - QWidget *mConfig; + TQCString mName; + TQWidget *mConfig; }; /** @@ -137,12 +137,12 @@ public: * each of these can be given to the first * argument of the Effect constructor **/ - QStrList available() const; + TQStrList available() const; /** * A list of all available effects objects **/ - QPtrList effects() const; + TQPtrList effects() const; /** * Get the Effect that has the following id @@ -150,7 +150,7 @@ public: Effect *findId(long id) const; private: - QPtrListIterator stackPosition() const; + TQPtrListIterator stackPosition() const; signals: /** @@ -177,7 +177,7 @@ signals: private: // stored in no specific order - QPtrList mItems; + TQPtrList mItems; }; diff --git a/noatun/library/noatun/engine.h b/noatun/library/noatun/engine.h index 2244fa1e..b47eb087 100644 --- a/noatun/library/noatun/engine.h +++ b/noatun/library/noatun/engine.h @@ -1,7 +1,7 @@ #ifndef _ENGINE_H #define _ENGINE_H -#include +#include #include #include #include @@ -35,7 +35,7 @@ class KDE_EXPORT Engine : public QObject Q_OBJECT friend class NoatunApp; public: - Engine(QObject *parent=0); + Engine(TQObject *parent=0); ~Engine(); void setInitialized(); bool initialized() const; @@ -78,9 +78,9 @@ signals: void aboutToPlay(); void receivedStreamMeta( - const QString &streamName, const QString &streamGenre, - const QString &streamUrl, const QString &streamBitrate, - const QString &trackTitle, const QString &trackUrl + const TQString &streamName, const TQString &streamGenre, + const TQString &streamUrl, const TQString &streamBitrate, + const TQString &trackTitle, const TQString &trackUrl ); void playingFailed(); diff --git a/noatun/library/noatun/equalizer.h b/noatun/library/noatun/equalizer.h index 10de88c5..d048d21d 100644 --- a/noatun/library/noatun/equalizer.h +++ b/noatun/library/noatun/equalizer.h @@ -1,8 +1,8 @@ #ifndef NOATUN_EQUALIZER_H #define NOATUN_EQUALIZER_H -#include -#include +#include +#include #include #include @@ -20,23 +20,23 @@ class Preset { friend class Equalizer; - Preset(const QString &file); + Preset(const TQString &file); Preset(); Preset(VPreset p); public: - QString name() const; - bool setName(const QString &name); + TQString name() const; + bool setName(const TQString &name); bool save() const; bool load(); void remove(); - QString file() const; + TQString file() const; VPreset &vpreset() const; private: - QString mFile; + TQString mFile; }; /** @@ -49,7 +49,7 @@ private: class Band { friend class Equalizer; -friend class QPtrList; +friend class TQPtrList; private: Band(); @@ -75,12 +75,12 @@ public: **/ int center() const; - QString formatStart(bool withHz=true) const; - QString formatEnd(bool withHz=true) const; + TQString formatStart(bool withHz=true) const; + TQString formatEnd(bool withHz=true) const; /** * return the format for center() **/ - QString format(bool withHz=true) const; + TQString format(bool withHz=true) const; private: int mOffset; @@ -110,7 +110,7 @@ public: Equalizer(); ~Equalizer(); - const QPtrList &bands() const; + const TQPtrList &bands() const; Band *band(int num) const; int bandCount() const; @@ -141,7 +141,7 @@ public: * pattern. Nevertheless, the file can be identified * by magic, so it's not required **/ - bool save(const KURL &file, const QString &friendly) const; + bool save(const KURL &file, const TQString &friendly) const; /** * restore the EQ settings from this file @@ -154,14 +154,14 @@ public: * * @see fromString **/ - QString toString(const QString &name="stored") const; + TQString toString(const TQString &name="stored") const; /** * undo a toString, restoring the EQ * to the settings in the given string, * emitting the changed signals **/ - bool fromString(const QString &str); + bool fromString(const TQString &str); /** * create a preset with such a name @@ -171,16 +171,16 @@ public: * If smart is true, append a number to the end * of the name, if one already exists by the given **/ - Preset *createPreset(const QString &name, bool smart=true); + Preset *createPreset(const TQString &name, bool smart=true); /** * return all the presets * remember to setAutoDelete on this **/ - QPtrList presets() const; + TQPtrList presets() const; - Preset *preset(const QString &file); - bool presetExists(const QString &name) const; + Preset *preset(const TQString &file); + bool presetExists(const TQString &name) const; signals: void changed(Band *band); @@ -227,7 +227,7 @@ private: void update(bool full=false); private: - QPtrList mBands; + TQPtrList mBands; bool mUpdates; int mPreamp; }; diff --git a/noatun/library/noatun/player.h b/noatun/library/noatun/player.h index bccda62b..a61c2335 100644 --- a/noatun/library/noatun/player.h +++ b/noatun/library/noatun/player.h @@ -1,8 +1,8 @@ #ifndef PLAYER_H #define PLAYER_H -#include -#include +#include +#include #include #include #include @@ -41,14 +41,14 @@ public: enum LoopType { None=0, Song, Playlist, Random }; public: - Player(QObject *parent=0); + Player(TQObject *parent=0); ~Player(); /** * @return a string with the time that can be used in the UI: * CC:CC/LL:LL (mm:ss) **/ - QString lengthString(int _position=-1); + TQString lengthString(int _position=-1); /** * @return LoopType enum **/ @@ -180,9 +180,9 @@ private slots: void posTimeout(); void aboutToPlay(); void slotUpdateStreamMeta( - const QString &streamName, const QString &streamGenre, - const QString &streamUrl, const QString &streamBitrate, - const QString &trackTitle, const QString &trackUrl + const TQString &streamName, const TQString &streamGenre, + const TQString &streamUrl, const TQString &streamBitrate, + const TQString &trackTitle, const TQString &trackUrl ); signals: @@ -257,12 +257,12 @@ signals: private: Engine *mEngine; - QTimer filePos; + TQTimer filePos; int position; int mLoopStyle; bool firstTimeout; PlaylistItem mCurrent; // TODO eliminate - QPtrList mNotifiers; + TQPtrList mNotifiers; }; diff --git a/noatun/library/noatun/playlist.h b/noatun/library/noatun/playlist.h index 37eabb0b..013d63a4 100644 --- a/noatun/library/noatun/playlist.h +++ b/noatun/library/noatun/playlist.h @@ -1,10 +1,10 @@ #ifndef NOATUNPLAYLIST_H #define NOATUNPLAYLIST_H -#include +#include #include -#include -#include +#include +#include #include #include @@ -35,7 +35,7 @@ public: /** * Noatun asks your playlist for properties. It is your - * responsiblity to store the information. But usually a QMap + * responsiblity to store the information. But usually a TQMap * is enough. * * If you return the default value, the default should not @@ -43,30 +43,30 @@ public: * * This returns the property, or def if such a property doesn't exist **/ - virtual QString property(const QString &key, const QString &def=0) const=0; + virtual TQString property(const TQString &key, const TQString &def=0) const=0; /** * This sets the property with the given key and value. * - * Important: If you use a QMap, you'll have to remove the current + * Important: If you use a TQMap, you'll have to remove the current * item before adding a new one **/ - virtual void setProperty(const QString &key, const QString &property)=0; + virtual void setProperty(const TQString &key, const TQString &property)=0; /** * remove the item with given key **/ - virtual void clearProperty(const QString &key)=0; + virtual void clearProperty(const TQString &key)=0; /** * return a list of property keys **/ - virtual QStringList properties() const=0; + virtual TQStringList properties() const=0; /** * return whether if the given key exists **/ - virtual bool isProperty(const QString &key) const=0; + virtual bool isProperty(const TQString &key) const=0; /** * return the title of the song. By default, this will @@ -78,7 +78,7 @@ public: * * you shouldn't need to override this. **/ - virtual QString title() const; + virtual TQString title() const; /** * the true filename of the song, remote or local @@ -93,18 +93,18 @@ public: * first, this checks for the property "mimetype", else * it'l ask KMimeType based on file() **/ - virtual QCString mimetype() const; + virtual TQCString mimetype() const; /** * first, checks for the property "playObject", else, * it'l ask aRts **/ - virtual QCString playObject() const; + virtual TQCString playObject() const; /** * return the filename to send to the playobject **/ - virtual QString file() const { return url().path(); } + virtual TQString file() const { return url().path(); } /** * what's the length of the song, in milliseconds? @@ -120,7 +120,7 @@ public: * returns a friendly representation of the length * of this file **/ - QString lengthString() const; + TQString lengthString() const; /** * compare yourself with the given PlaylistItemData @@ -243,31 +243,31 @@ public: bool operator !=(const PlaylistItemData *i) const { return ! (*this->data()==*i); } - QString property(const QString &key, const QString &def=0) const + TQString property(const TQString &key, const TQString &def=0) const { assert(mData); return mData->property(key, def); } - void setProperty(const QString &key, const QString &property) + void setProperty(const TQString &key, const TQString &property) { assert(mData); const_cast(mData)->setProperty(key, property); } - void clearProperty(const QString &key) + void clearProperty(const TQString &key) { assert(mData); const_cast(mData)->clearProperty(key); } - QStringList properties() const + TQStringList properties() const { assert(mData); return mData->properties(); } - bool isProperty(const QString &key) const + bool isProperty(const TQString &key) const { assert(mData); return mData->isProperty(key); @@ -280,11 +280,11 @@ public: const_cast(mData)->setUrl(url); } - QCString mimetype() const { assert(mData); return mData->mimetype(); } - QCString playObject() const { assert(mData); return mData->playObject(); } - QString file() const { assert(mData); return mData->file(); } + TQCString mimetype() const { assert(mData); return mData->mimetype(); } + TQCString playObject() const { assert(mData); return mData->playObject(); } + TQString file() const { assert(mData); return mData->file(); } - QString title() const + TQString title() const { assert(mData); return mData->title(); @@ -302,7 +302,7 @@ public: mData->setLength(ms); } - QString lengthString() const { assert(mData); return mData->lengthString(); } + TQString lengthString() const { assert(mData); return mData->lengthString(); } void remove() { assert(mData); mData->remove(); } @@ -331,7 +331,7 @@ class Playlist : public QObject Q_OBJECT friend class PlaylistItemData; public: - Playlist(QObject *parent, const char *name); + Playlist(TQObject *parent, const char *name); /** * on playlist unload, your playlist must * have current()==0 and emit playCurrent @@ -432,8 +432,8 @@ public: * to the items in the playlist. The keys * are always compared with case sensitivity **/ - virtual QValueList select( - const QStringList &keys, const QStringList &values, + virtual TQValueList select( + const TQStringList &keys, const TQStringList &values, int limit=-1, bool exact=false, bool caseSensitive=false ); @@ -443,21 +443,21 @@ public: * both of these (with different mechanisms if need be) * for speed **/ - virtual QValueList select( - const QString &key, const QString &value, + virtual TQValueList select( + const TQString &key, const TQString &value, int limit=-1, bool exact=false, bool caseSensitive=false ); /** * exactly the same as the above, except converts - * the const char* to QString (utf8) + * the const char* to TQString (utf8) **/ - inline QValueList select( + inline TQValueList select( const char *key, const char *value, int limit=-1, bool exact=false, bool caseSensitive=false ) { return select( - QString(key), QString(value), + TQString(key), TQString(value), limit, exact, caseSensitive ); } diff --git a/noatun/library/noatun/playlistsaver.h b/noatun/library/noatun/playlistsaver.h index e83761ca..781b8fc6 100644 --- a/noatun/library/noatun/playlistsaver.h +++ b/noatun/library/noatun/playlistsaver.h @@ -2,7 +2,7 @@ #define NOATUNPLAYLISTSAVER_H #include -#include +#include #include class Structure; @@ -52,7 +52,7 @@ public: * unused, for future expansion, do not use * @internal **/ - virtual void setGroup(const QString &); + virtual void setGroup(const TQString &); protected: /** @@ -60,7 +60,7 @@ protected: * Given is a list of properties which coincide * with the standard noatun ones **/ - virtual void readItem(const QMap &properties) = 0; + virtual void readItem(const TQMap &properties) = 0; /** * add this item to the XML file @@ -72,7 +72,7 @@ protected: * unused, for future expansion * @internal **/ - virtual void changeGroup(const QString &) {} + virtual void changeGroup(const TQString &) {} /** * this is called when you should either diff --git a/noatun/library/noatun/plugin.h b/noatun/library/noatun/plugin.h index f90dcc0d..2bd8c994 100644 --- a/noatun/library/noatun/plugin.h +++ b/noatun/library/noatun/plugin.h @@ -2,7 +2,7 @@ #define NPLUGIN_H #include -#include +#include #include #include @@ -153,7 +153,7 @@ public: private: int mTimeout; TimerThingy *mTimerThingy; - QCString mVisualizationStack; + TQCString mVisualizationStack; Arts::SoundServerV2 *mServer; static Arts::Dispatcher *mDispatcher; static bool internalVis; @@ -408,7 +408,7 @@ Q_OBJECT friend class NoatunListenerNotif; public: - NoatunListener(QObject *parent=0); + NoatunListener(TQObject *parent=0); virtual ~NoatunListener(); signals: @@ -432,11 +432,11 @@ protected: class ExitNotifier : public NoatunListener { public: - ExitNotifier(int pid, QObject *parent=0); + ExitNotifier(int pid, TQObject *parent=0); virtual ~ExitNotifier(); private: - QCString appid; + TQCString appid; }; /** @@ -454,7 +454,7 @@ class BoolNotifier : public QObject { Q_OBJECT public: - BoolNotifier(bool *value, NoatunListener *listener, QObject *parent=0); + BoolNotifier(bool *value, NoatunListener *listener, TQObject *parent=0); private slots: void event() {*mValue=false;} diff --git a/noatun/library/noatun/pluginloader.h b/noatun/library/noatun/pluginloader.h index 611fe358..04c1b750 100644 --- a/noatun/library/noatun/pluginloader.h +++ b/noatun/library/noatun/pluginloader.h @@ -1,27 +1,27 @@ #ifndef PLUGIN_LOADER_H #define PLUGIN_LOADER_H -#include -#include -#include +#include +#include +#include #include #include -#include +#include #include struct NoatunLibraryInfo { - QString specfile; - QString filename; - QString author; - QString license; - QString type; - QString site; - QString email; - QString name; - QString comment; - QStringList require; + TQString specfile; + TQString filename; + TQString author; + TQString license; + TQString type; + TQString site; + TQString email; + TQString name; + TQString comment; + TQStringList require; }; bool operator ==(const NoatunLibraryInfo &, const NoatunLibraryInfo &); @@ -46,30 +46,30 @@ public: LibraryLoader(); ~LibraryLoader(); - QValueList available() const; - QValueList loaded() const; - QValueList loadedByType(const QString &type) const; + TQValueList available() const; + TQValueList loaded() const; + TQValueList loadedByType(const TQString &type) const; /** * loads all the enabled plugins **/ bool loadAll(void); - bool loadAll(const QStringList &); + bool loadAll(const TQStringList &); - bool isLoaded(const QString &spec) const; - void add(const QString &spec); - void setModules(const QStringList &mods); + bool isLoaded(const TQString &spec) const; + void add(const TQString &spec); + void setModules(const TQStringList &mods); /** * unload the plugin specified by spec **/ - bool remove(const QString &spec); + bool remove(const TQString &spec); /** * Same as the above, but does not call kapp->exit() even * when the last userinterface plugin is removed. Necessary * during session management (see marquis plugin). * ### BIC: merge with above with terminateOnLastUI = true */ - bool remove(const QString &spec, bool terminateOnLastUI); + bool remove(const TQString &spec, bool terminateOnLastUI); /** * unload the plugin that is referenced by @par plugin **/ @@ -83,15 +83,15 @@ public: * to see what plugins are required to show * (when required by another noatun-plugin) **/ - NoatunLibraryInfo getInfo(const QString &spec) const; - QPtrList plugins() const; + NoatunLibraryInfo getInfo(const TQString &spec) const; + TQPtrList plugins() const; private: - bool loadSO(const QString &spec); - void removeNow(const QString &spec); + bool loadSO(const TQString &spec); + void removeNow(const TQString &spec); private: - QDict mLibHash; + TQDict mLibHash; Playlist *mPlaylist; }; diff --git a/noatun/library/noatun/pref.h b/noatun/library/noatun/pref.h index 95be5e0e..5a7d056e 100644 --- a/noatun/library/noatun/pref.h +++ b/noatun/library/noatun/pref.h @@ -2,7 +2,7 @@ #define NOATUNPREF_H #include -#include +#include #include class CModule; @@ -19,7 +19,7 @@ public: /** * @internal **/ - NoatunPreferences(QWidget *); + NoatunPreferences(TQWidget *); public: /** @@ -44,7 +44,7 @@ private: class NoatunPreferencesPrivate; NoatunPreferencesPrivate *d; - QPtrList mModules; + TQPtrList mModules; }; /** @@ -65,7 +65,7 @@ public: * parent is the object that is this modules virtual-parent. * When that is deleted, this also will go away, automagically. **/ - CModule(const QString &name, const QString &description, const QString &icon, QObject *parent=0); + CModule(const TQString &name, const TQString &description, const TQString &icon, TQObject *parent=0); virtual ~CModule(); diff --git a/noatun/library/noatun/scrollinglabel.h b/noatun/library/noatun/scrollinglabel.h index 1615a64f..231d3158 100644 --- a/noatun/library/noatun/scrollinglabel.h +++ b/noatun/library/noatun/scrollinglabel.h @@ -23,7 +23,7 @@ #ifndef SCROLLING_LABEL_H #define SCROLLING_LABEL_H -#include +#include /** * A clever label that scrolls its contents as soon as there is not enough * space to show everything at once. @@ -33,7 +33,7 @@ class ScrollingLabel : public QWidget Q_OBJECT public: - ScrollingLabel(const QString &initialText,QWidget *parent, + ScrollingLabel(const TQString &initialText,TQWidget *parent, const char * name = 0); virtual ~ScrollingLabel(); @@ -41,15 +41,15 @@ class ScrollingLabel : public QWidget * Sets the label's text * set @p time (ms) if you want to display a temporary message **/ - virtual void setText(const QString &text, int time = -1); + virtual void setText(const TQString &text, int time = -1); - virtual QSize sizeHint() const; - virtual QSize minimumSizeHint() const; + virtual TQSize sizeHint() const; + virtual TQSize minimumSizeHint() const; /** * @return the label's text. **/ - virtual QString text() const; + virtual TQString text() const; /** * Used to enable/disable scrolling manually @@ -58,8 +58,8 @@ class ScrollingLabel : public QWidget protected: - virtual void paintEvent(QPaintEvent *); - virtual void resizeEvent(QResizeEvent *); + virtual void paintEvent(TQPaintEvent *); + virtual void resizeEvent(TQResizeEvent *); protected slots: diff --git a/noatun/library/noatun/stdaction.h b/noatun/library/noatun/stdaction.h index 7cac67fe..bfa34164 100644 --- a/noatun/library/noatun/stdaction.h +++ b/noatun/library/noatun/stdaction.h @@ -21,7 +21,7 @@ class PlayAction : public KAction { Q_OBJECT public: - PlayAction(QObject *parent, const char *name); + PlayAction(TQObject *parent, const char *name); private slots: void playing(); void notplaying(); @@ -34,7 +34,7 @@ class PlaylistAction : public KToggleAction { Q_OBJECT public: - PlaylistAction(QObject *parent, const char *name); + PlaylistAction(TQObject *parent, const char *name); private slots: void shown(); void hidden(); @@ -48,7 +48,7 @@ class PluginActionMenu : public KActionMenu { Q_OBJECT public: - PluginActionMenu(QObject *parent, const char *name); + PluginActionMenu(TQObject *parent, const char *name); /** * inserts the given @p action into the action-menu * @param action the action to insert @@ -63,7 +63,7 @@ public: * Wrapper method for old Noatun API * DON'T USE **/ - int menuAdd(const QString &text, const QObject *receiver, const char *member); + int menuAdd(const TQString &text, const TQObject *receiver, const char *member); /** * Wrapper method for old Noatun API * DON'T USE @@ -81,12 +81,12 @@ class VisActionMenu : public KActionMenu { Q_OBJECT public: - VisActionMenu(QObject *parent, const char *name); + VisActionMenu(TQObject *parent, const char *name); private slots: void fillPopup(); void toggleVisPlugin(int); private: - QMapmSpecMap; + TQMapmSpecMap; }; @@ -98,7 +98,7 @@ class LoopActionMenu : public KActionMenu { Q_OBJECT public: - LoopActionMenu(QObject *parent, const char *name); + LoopActionMenu(TQObject *parent, const char *name); private slots: void updateLooping(int); void loopNoneSelected(); @@ -116,48 +116,48 @@ private: /** * @return pointer to a KAction which opens the effects dialog on activation */ -KDE_EXPORT KAction *effects(QObject *parent = 0, const char *name = 0); +KDE_EXPORT KAction *effects(TQObject *parent = 0, const char *name = 0); /** * @return pointer to a KAction which opens the equalizer dialog on activation */ -KDE_EXPORT KAction *equalizer(QObject *parent = 0, const char *name = 0); +KDE_EXPORT KAction *equalizer(TQObject *parent = 0, const char *name = 0); /** * @return pointer to a KAction which goes back one track on activation */ -KDE_EXPORT KAction *back(QObject *parent = 0, const char *name = 0); +KDE_EXPORT KAction *back(TQObject *parent = 0, const char *name = 0); /** * @return pointer to a KAction which stops playback on activation */ -KDE_EXPORT KAction *stop(QObject *parent = 0, const char *name = 0); +KDE_EXPORT KAction *stop(TQObject *parent = 0, const char *name = 0); /** * @return pointer to a KAction which starts/pauses playback on activation */ -KDE_EXPORT KAction *playpause(QObject *parent = 0, const char *name = 0); +KDE_EXPORT KAction *playpause(TQObject *parent = 0, const char *name = 0); /** * @return pointer to a KAction which advances one track on activation */ -KDE_EXPORT KAction *forward(QObject *parent = 0, const char *name = 0); +KDE_EXPORT KAction *forward(TQObject *parent = 0, const char *name = 0); /** * @return pointer to a KToggleAction which shows/hides the playlist */ -KDE_EXPORT KToggleAction *playlist(QObject *parent = 0, const char *name = 0); +KDE_EXPORT KToggleAction *playlist(TQObject *parent = 0, const char *name = 0); /** * loop action **/ -KDE_EXPORT LoopActionMenu *loop(QObject *parent, const char *name); +KDE_EXPORT LoopActionMenu *loop(TQObject *parent, const char *name); /** * play action */ -KDE_EXPORT KAction *play(QObject *parent = 0, const char *name = 0); +KDE_EXPORT KAction *play(TQObject *parent = 0, const char *name = 0); /** * pause action */ -KDE_EXPORT KAction *pause(QObject *parent = 0, const char *name = 0); +KDE_EXPORT KAction *pause(TQObject *parent = 0, const char *name = 0); /** * @return pointer to the global PluginActionMenu object (there is only one instance) @@ -167,7 +167,7 @@ KDE_EXPORT PluginActionMenu *actions(); /** * @return pointer to a VisActionMenu object */ -KDE_EXPORT VisActionMenu *visualizations(QObject *parent = 0, const char *name = 0); +KDE_EXPORT VisActionMenu *visualizations(TQObject *parent = 0, const char *name = 0); /** * The global popupmenu of noatun, there's not two or three but only one of these :) @@ -176,7 +176,7 @@ KDE_EXPORT VisActionMenu *visualizations(QObject *parent = 0, const char *name = class KDE_EXPORT ContextMenu { public: - static KPopupMenu *createContextMenu(QWidget *p); + static KPopupMenu *createContextMenu(TQWidget *p); /** * One menu to show them all, One menu to find them @@ -189,7 +189,7 @@ public: /** * Show the context menu at point **/ - static void showContextMenu(const QPoint &); + static void showContextMenu(const TQPoint &); /** * show the context menu at the mouse's current position diff --git a/noatun/library/noatun/stereobuttonaction.h b/noatun/library/noatun/stereobuttonaction.h index ce423b64..d6d6edb9 100644 --- a/noatun/library/noatun/stereobuttonaction.h +++ b/noatun/library/noatun/stereobuttonaction.h @@ -14,12 +14,12 @@ class StereoButtonAction : public KAction { Q_OBJECT public: - StereoButtonAction(const QString& text, int accel = 0, QObject* parent = 0, const char* name = 0 ); - StereoButtonAction(const QString& text, int accel, const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 ); - StereoButtonAction(const QString& text, const QIconSet& pix, int accel = 0, QObject* parent = 0, const char* name = 0 ); - StereoButtonAction(const QString& text, const QString& pix, int accel = 0, QObject* parent = 0, const char* name = 0 ); - StereoButtonAction(const QString& text, const QIconSet& pix, int accel, const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 ); - StereoButtonAction(const QString& text, const QString& pix, int accel, const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 ); + StereoButtonAction(const TQString& text, int accel = 0, TQObject* parent = 0, const char* name = 0 ); + StereoButtonAction(const TQString& text, int accel, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); + StereoButtonAction(const TQString& text, const TQIconSet& pix, int accel = 0, TQObject* parent = 0, const char* name = 0 ); + StereoButtonAction(const TQString& text, const TQString& pix, int accel = 0, TQObject* parent = 0, const char* name = 0 ); + StereoButtonAction(const TQString& text, const TQIconSet& pix, int accel, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); + StereoButtonAction(const TQString& text, const TQString& pix, int accel, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); public slots: void disable(void); void enable(void); diff --git a/noatun/library/noatun/vequalizer.h b/noatun/library/noatun/vequalizer.h index 73c421e1..d5ee7ecf 100644 --- a/noatun/library/noatun/vequalizer.h +++ b/noatun/library/noatun/vequalizer.h @@ -39,8 +39,8 @@ #ifndef NOATUN_VEQUALIZER_H #define NOATUN_VEQUALIZER_H -#include -#include +#include +#include #include #include class VBand; @@ -111,12 +111,12 @@ public: **/ int center() const; - QString formatStart(bool withHz=true) const; - QString formatEnd(bool withHz=true) const; + TQString formatStart(bool withHz=true) const; + TQString formatEnd(bool withHz=true) const; /** * return the format for center() **/ - QString format(bool withHz=true) const; + TQString format(bool withHz=true) const; }; @@ -134,7 +134,7 @@ public: * @short interpolated representation of Eq data * @author Charles Samuels **/ -class KDE_EXPORT VInterpolation : public QObject, public VBandsInterface +class KDE_EXPORT VInterpolation : public TQObject, public VBandsInterface { Q_OBJECT struct Private; @@ -173,7 +173,7 @@ class VPreset; * @short Noatun EQ * @author Charles Samuels **/ -class KDE_EXPORT VEqualizer : public QObject, public VBandsInterface +class KDE_EXPORT VEqualizer : public TQObject, public VBandsInterface { Q_OBJECT friend class VBand; @@ -197,7 +197,7 @@ public: * of each band, for example: { 40, 60, 100 } if * you hear up to 40hz **/ - static QValueList frequencies(int num); + static TQValueList frequencies(int num); /** * @return number of bands I have, which may be different @@ -243,7 +243,7 @@ public: // serialization * pattern. Nevertheless, the file can be identified * by magic, so it's not required **/ - bool save(const KURL &file, const QString &friendly) const; + bool save(const KURL &file, const TQString &friendly) const; /** * restore the EQ settings from this file @@ -256,14 +256,14 @@ public: // serialization * * @see fromString **/ - QString toString(const QString &name="stored") const; + TQString toString(const TQString &name="stored") const; /** * undo a toString, restoring the EQ * to the settings in the given string, * emitting the changed signals **/ - bool fromString(const QString &str); + bool fromString(const TQString &str); public: // presets /** @@ -274,31 +274,31 @@ public: // presets * If smart is true, append a number to the end * of the name, if one already exists by the given **/ - VPreset createPreset(const QString &name, bool smart=true); + VPreset createPreset(const TQString &name, bool smart=true); /** * return all the presets * remember to setAutoDelete on this **/ - QValueList presets() const; + TQValueList presets() const; /** * @returns the preset with the given name * or an invalid Preset if none exists **/ - VPreset presetByName(const QString &name); + VPreset presetByName(const TQString &name); /** * @returns the preset in the given file * or an invalid Preset if none exists **/ - VPreset presetByFile(const QString &file); + VPreset presetByFile(const TQString &file); /** * @returns whether a preset with the * given name exists **/ - bool presetExists(const QString &name) const; + bool presetExists(const TQString &name) const; signals: /** @@ -374,7 +374,7 @@ public slots: private: virtual int level(int index) const; virtual void setLevel(int index, int level); - void setLevels(const QValueList &levels); + void setLevels(const TQValueList &levels); private: /** @@ -405,7 +405,7 @@ class VPreset Private *d; void *_bc; - VPreset(const QString &file); + VPreset(const TQString &file); public: VPreset(); VPreset(const VPreset ©); @@ -416,7 +416,7 @@ public: /** * @returns the name of the preset, which is user visible **/ - QString name() const; + TQString name() const; /** * set the user-presentable name of the preset * @@ -425,12 +425,12 @@ public: * @returns success. If another preset is named * this, it'l fail. **/ - bool setName(const QString &name); + bool setName(const TQString &name); /** * @returns the file that this preset is in **/ - QString file() const; + TQString file() const; bool isValid() const; bool isNull() const { return !isValid(); } diff --git a/noatun/library/noatun/video.h b/noatun/library/noatun/video.h index 3655c489..e6fde310 100644 --- a/noatun/library/noatun/video.h +++ b/noatun/library/noatun/video.h @@ -15,12 +15,12 @@ Q_OBJECT struct Private; VideoFrame::Private *d; - static QPtrList frames; + static TQPtrList frames; static VideoFrame *whose; public: - VideoFrame(KXMLGUIClient *clientParent, QWidget *parent=0, const char *name=0, WFlags f=0); - VideoFrame(QWidget *parent = 0, const char *name=0, WFlags f=0); + VideoFrame(KXMLGUIClient *clientParent, TQWidget *parent=0, const char *name=0, WFlags f=0); + VideoFrame(TQWidget *parent = 0, const char *name=0, WFlags f=0); ~VideoFrame(); /** @@ -28,8 +28,8 @@ public: **/ static VideoFrame *playing(); - QPopupMenu *popupMenu(QWidget *parent); - QPopupMenu *popupMenu() { return popupMenu(this); } + TQPopupMenu *popupMenu(TQWidget *parent); + TQPopupMenu *popupMenu() { return popupMenu(this); } public slots: /** diff --git a/noatun/library/noatunlistview.h b/noatun/library/noatunlistview.h index 1571f64e..851751ef 100644 --- a/noatun/library/noatunlistview.h +++ b/noatun/library/noatunlistview.h @@ -1,5 +1,5 @@ // yeah yeah yeah.. fix qt and this can go away #define private protected -#include +#include #undef private diff --git a/noatun/library/noatunstdaction.cpp b/noatun/library/noatunstdaction.cpp index f2837623..99b69cb3 100644 --- a/noatun/library/noatunstdaction.cpp +++ b/noatun/library/noatunstdaction.cpp @@ -9,8 +9,8 @@ #include #include #include -#include -#include +#include +#include #include #include @@ -21,12 +21,12 @@ namespace NoatunStdAction { ///////////////////////////////////////////////////// -PlayAction::PlayAction(QObject *parent, const char *name) - : KAction(i18n("Play"), 0, napp->player(), SLOT(playpause()), parent, name) +PlayAction::PlayAction(TQObject *parent, const char *name) + : KAction(i18n("Play"), 0, napp->player(), TQT_SLOT(playpause()), parent, name) { - connect(napp->player(), SIGNAL(playing()), SLOT(playing())); - connect(napp->player(), SIGNAL(paused()), SLOT(notplaying())); - connect(napp->player(), SIGNAL(stopped()), SLOT(notplaying())); + connect(napp->player(), TQT_SIGNAL(playing()), TQT_SLOT(playing())); + connect(napp->player(), TQT_SIGNAL(paused()), TQT_SLOT(notplaying())); + connect(napp->player(), TQT_SIGNAL(stopped()), TQT_SLOT(notplaying())); if (napp->player()->isPlaying()) playing(); else if (napp->player()->isPaused() || napp->player()->isStopped()) @@ -35,23 +35,23 @@ PlayAction::PlayAction(QObject *parent, const char *name) void PlayAction::playing() { - setIconSet(QIconSet(SmallIcon("player_pause"))); + setIconSet(TQIconSet(SmallIcon("player_pause"))); setText(i18n("Pause")); } void PlayAction::notplaying() { - setIconSet(QIconSet(SmallIcon("player_play"))); + setIconSet(TQIconSet(SmallIcon("player_play"))); setText(i18n("Play")); } ///////////////////////////////////////////////////// -PlaylistAction::PlaylistAction(QObject *parent, const char *name) - : KToggleAction(i18n("Show Playlist"), "playlist", 0, napp->player(), SLOT(toggleListView()), parent, name) +PlaylistAction::PlaylistAction(TQObject *parent, const char *name) + : KToggleAction(i18n("Show Playlist"), "playlist", 0, napp->player(), TQT_SLOT(toggleListView()), parent, name) { setCheckedState(i18n("Hide Playlist")); - connect(napp->player(), SIGNAL(playlistShown()), SLOT(shown())); - connect(napp->player(), SIGNAL(playlistHidden()), SLOT(hidden())); + connect(napp->player(), TQT_SIGNAL(playlistShown()), TQT_SLOT(shown())); + connect(napp->player(), TQT_SIGNAL(playlistHidden()), TQT_SLOT(hidden())); setChecked(napp->playlist()->listVisible()); } @@ -67,7 +67,7 @@ void PlaylistAction::hidden() //////////////////////////////////////////////////// -PluginActionMenu::PluginActionMenu(QObject *parent, const char *name) +PluginActionMenu::PluginActionMenu(TQObject *parent, const char *name) : KActionMenu(i18n("&Actions"), parent, name) { // kdDebug(66666) << k_funcinfo << "called" << endl; @@ -92,7 +92,7 @@ void PluginActionMenu::remove(KAction *action) setEnabled(false); } -int PluginActionMenu::menuAdd(const QString &text, const QObject *receiver, const char *member) +int PluginActionMenu::menuAdd(const TQString &text, const TQObject *receiver, const char *member) { // kdDebug(66666) << k_funcinfo << "called, mCount is currently at " << mCount << endl; setEnabled(true); @@ -111,11 +111,11 @@ void PluginActionMenu::menuRemove(int id) //////////////////////////////////////////////////// -VisActionMenu::VisActionMenu(QObject *parent, const char *name) +VisActionMenu::VisActionMenu(TQObject *parent, const char *name) : KActionMenu(i18n("&Visualizations"), parent, name) { - connect(popupMenu(), SIGNAL(aboutToShow()), this, SLOT(fillPopup())); - connect(popupMenu(), SIGNAL(activated(int)), this, SLOT(toggleVisPlugin(int))); + connect(popupMenu(), TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(fillPopup())); + connect(popupMenu(), TQT_SIGNAL(activated(int)), this, TQT_SLOT(toggleVisPlugin(int))); } void VisActionMenu::fillPopup() @@ -124,10 +124,10 @@ void VisActionMenu::fillPopup() popupMenu()->clear(); mSpecMap.clear(); - QValueList available = napp->libraryLoader()->available(); - QValueList loaded = napp->libraryLoader()->loaded(); + TQValueList available = napp->libraryLoader()->available(); + TQValueList loaded = napp->libraryLoader()->loaded(); - for(QValueList::Iterator i = available.begin(); i != available.end(); ++i) + for(TQValueList::Iterator i = available.begin(); i != available.end(); ++i) { if ((*i).type == "visualization") { @@ -143,7 +143,7 @@ void VisActionMenu::toggleVisPlugin(int id) if(!mSpecMap.contains(id)) return; - QString specfile = mSpecMap[id]; + TQString specfile = mSpecMap[id]; if(popupMenu()->isItemChecked(id)) { @@ -159,30 +159,30 @@ void VisActionMenu::toggleVisPlugin(int id) //////////////////////////////////////////////////// -LoopActionMenu::LoopActionMenu(QObject *parent, const char *name) +LoopActionMenu::LoopActionMenu(TQObject *parent, const char *name) : KActionMenu(i18n("&Loop"), parent, name) { - mLoopNone = new KRadioAction(i18n("&None"), QString::fromLocal8Bit("noatunloopnone"), - 0, this, SLOT(loopNoneSelected()), this, "loop_none"); + mLoopNone = new KRadioAction(i18n("&None"), TQString::fromLocal8Bit("noatunloopnone"), + 0, this, TQT_SLOT(loopNoneSelected()), this, "loop_none"); mLoopNone->setExclusiveGroup("loopType"); insert(mLoopNone); - mLoopSong = new KRadioAction(i18n("&Song"), QString::fromLocal8Bit("noatunloopsong"), - 0, this, SLOT(loopSongSelected()), this, "loop_song"); + mLoopSong = new KRadioAction(i18n("&Song"), TQString::fromLocal8Bit("noatunloopsong"), + 0, this, TQT_SLOT(loopSongSelected()), this, "loop_song"); mLoopSong->setExclusiveGroup("loopType"); insert(mLoopSong); - mLoopPlaylist = new KRadioAction(i18n("&Playlist"), QString::fromLocal8Bit("noatunloopplaylist"), - 0, this, SLOT(loopPlaylistSelected()), this, "loop_playlist"); + mLoopPlaylist = new KRadioAction(i18n("&Playlist"), TQString::fromLocal8Bit("noatunloopplaylist"), + 0, this, TQT_SLOT(loopPlaylistSelected()), this, "loop_playlist"); mLoopPlaylist->setExclusiveGroup("loopType"); insert(mLoopPlaylist); - mLoopRandom = new KRadioAction(i18n("&Random"), QString::fromLocal8Bit("noatunlooprandom"), - 0, this, SLOT(loopRandomSelected()), this, "loop_random"); + mLoopRandom = new KRadioAction(i18n("&Random"), TQString::fromLocal8Bit("noatunlooprandom"), + 0, this, TQT_SLOT(loopRandomSelected()), this, "loop_random"); mLoopRandom->setExclusiveGroup("loopType"); insert(mLoopRandom); - connect(napp->player(), SIGNAL(loopTypeChange(int)), this, SLOT(updateLooping(int))); + connect(napp->player(), TQT_SIGNAL(loopTypeChange(int)), this, TQT_SLOT(updateLooping(int))); updateLooping(static_cast(napp->player()->loopStyle())); } @@ -232,32 +232,32 @@ void LoopActionMenu::loopRandomSelected() //////////////////////////////////////////////////// -KAction *playpause(QObject *parent, const char *name) +KAction *playpause(TQObject *parent, const char *name) { return new PlayAction(parent, name); } -KAction *effects(QObject *parent, const char *name) +KAction *effects(TQObject *parent, const char *name) { - return new KAction(i18n("&Effects..."), "effect", 0, napp, SLOT(effectView()), parent, name); + return new KAction(i18n("&Effects..."), "effect", 0, napp, TQT_SLOT(effectView()), parent, name); } -KAction *equalizer(QObject *parent, const char *name) +KAction *equalizer(TQObject *parent, const char *name) { - return new KAction(i18n("E&qualizer..."), "equalizer", 0, napp, SLOT(equalizerView()), parent, name); + return new KAction(i18n("E&qualizer..."), "equalizer", 0, napp, TQT_SLOT(equalizerView()), parent, name); } -KAction *back(QObject *parent, const char *name) +KAction *back(TQObject *parent, const char *name) { - return new KAction(i18n("&Back"), "player_start", 0, napp->player(), SLOT(back()), parent, name); + return new KAction(i18n("&Back"), "player_start", 0, napp->player(), TQT_SLOT(back()), parent, name); } -KAction *stop(QObject *parent, const char *name) +KAction *stop(TQObject *parent, const char *name) { - StereoButtonAction *action = new StereoButtonAction(i18n("Stop"), "player_stop", 0, napp->player(), SLOT(stop()), parent, name); - QObject::connect(napp->player(), SIGNAL(playing()), action, SLOT(enable())); - QObject::connect(napp->player(), SIGNAL(paused()), action, SLOT(enable())); - QObject::connect(napp->player(), SIGNAL(stopped()), action, SLOT(disable())); + StereoButtonAction *action = new StereoButtonAction(i18n("Stop"), "player_stop", 0, napp->player(), TQT_SLOT(stop()), parent, name); + TQObject::connect(napp->player(), TQT_SIGNAL(playing()), action, TQT_SLOT(enable())); + TQObject::connect(napp->player(), TQT_SIGNAL(paused()), action, TQT_SLOT(enable())); + TQObject::connect(napp->player(), TQT_SIGNAL(stopped()), action, TQT_SLOT(disable())); if(napp->player()->isStopped()) action->disable(); else @@ -265,17 +265,17 @@ KAction *stop(QObject *parent, const char *name) return action; } -KAction *forward(QObject *parent, const char *name) +KAction *forward(TQObject *parent, const char *name) { - return new KAction(i18n("&Forward"), "player_end", 0, napp->player(), SLOT(forward()), parent, name); + return new KAction(i18n("&Forward"), "player_end", 0, napp->player(), TQT_SLOT(forward()), parent, name); } -KAction *play(QObject *parent, const char *name) +KAction *play(TQObject *parent, const char *name) { - StereoButtonAction *action = new StereoButtonAction(i18n("&Play"), "player_play", 0, napp->player(), SLOT(playpause()), parent, name); - QObject::connect(napp->player(), SIGNAL(playing()), action, SLOT(disable())); - QObject::connect(napp->player(), SIGNAL(paused()), action, SLOT(enable())); - QObject::connect(napp->player(), SIGNAL(stopped()), action, SLOT(enable())); + StereoButtonAction *action = new StereoButtonAction(i18n("&Play"), "player_play", 0, napp->player(), TQT_SLOT(playpause()), parent, name); + TQObject::connect(napp->player(), TQT_SIGNAL(playing()), action, TQT_SLOT(disable())); + TQObject::connect(napp->player(), TQT_SIGNAL(paused()), action, TQT_SLOT(enable())); + TQObject::connect(napp->player(), TQT_SIGNAL(stopped()), action, TQT_SLOT(enable())); if(napp->player()->isPlaying()) action->disable(); else @@ -283,12 +283,12 @@ KAction *play(QObject *parent, const char *name) return action; } -KAction *pause(QObject *parent, const char *name) +KAction *pause(TQObject *parent, const char *name) { - StereoButtonAction *action = new StereoButtonAction(i18n("&Pause"), "player_pause", 0, napp->player(), SLOT(playpause()), parent, name); - QObject::connect(napp->player(), SIGNAL(playing()), action, SLOT(enable())); - QObject::connect(napp->player(), SIGNAL(paused()), action, SLOT(disable())); - QObject::connect(napp->player(), SIGNAL(stopped()), action, SLOT(disable())); + StereoButtonAction *action = new StereoButtonAction(i18n("&Pause"), "player_pause", 0, napp->player(), TQT_SLOT(playpause()), parent, name); + TQObject::connect(napp->player(), TQT_SIGNAL(playing()), action, TQT_SLOT(enable())); + TQObject::connect(napp->player(), TQT_SIGNAL(paused()), action, TQT_SLOT(disable())); + TQObject::connect(napp->player(), TQT_SIGNAL(stopped()), action, TQT_SLOT(disable())); if(napp->player()->isPlaying()) action->enable(); else @@ -296,7 +296,7 @@ KAction *pause(QObject *parent, const char *name) return action; } -LoopActionMenu *loop(QObject *parent, const char *name) +LoopActionMenu *loop(TQObject *parent, const char *name) { return new LoopActionMenu(parent, name); } @@ -307,12 +307,12 @@ PluginActionMenu *actions() return napp->pluginActionMenu(); } -VisActionMenu *visualizations(QObject *parent, const char *name) +VisActionMenu *visualizations(TQObject *parent, const char *name) { return new VisActionMenu(parent, name); } -KToggleAction *playlist(QObject *parent, const char *name) +KToggleAction *playlist(TQObject *parent, const char *name) { return new PlaylistAction(parent, name); } @@ -326,18 +326,18 @@ KPopupMenu *ContextMenu::contextMenu() return mContextMenu; } -KPopupMenu *ContextMenu::createContextMenu(QWidget *p) +KPopupMenu *ContextMenu::createContextMenu(TQWidget *p) { KPopupMenu *contextMenu = new KPopupMenu(p, "NoatunContextMenu"); KHelpMenu *helpmenu = new KHelpMenu(contextMenu, kapp->aboutData(), false); KActionCollection* actions = new KActionCollection(helpmenu); - KStdAction::open(napp, SLOT(fileOpen()), actions)->plug(contextMenu); - KStdAction::quit(napp, SLOT(quit()), actions)->plug(contextMenu); + KStdAction::open(napp, TQT_SLOT(fileOpen()), actions)->plug(contextMenu); + KStdAction::quit(napp, TQT_SLOT(quit()), actions)->plug(contextMenu); contextMenu->insertItem(SmallIcon("help"), KStdGuiItem::help().text(), helpmenu->menu()); contextMenu->insertSeparator(); - KStdAction::preferences(napp, SLOT(preferences()), actions)->plug(contextMenu); + KStdAction::preferences(napp, TQT_SLOT(preferences()), actions)->plug(contextMenu); NoatunStdAction::playlist(contextMenu)->plug(contextMenu); NoatunStdAction::effects(contextMenu)->plug(contextMenu); NoatunStdAction::equalizer(napp)->plug(contextMenu); @@ -347,14 +347,14 @@ KPopupMenu *ContextMenu::createContextMenu(QWidget *p) return contextMenu; } -void ContextMenu::showContextMenu(const QPoint &p) +void ContextMenu::showContextMenu(const TQPoint &p) { contextMenu()->exec(p); } void ContextMenu::showContextMenu() { - showContextMenu(QCursor::pos()); + showContextMenu(TQCursor::pos()); } } // END namespace NoatunStdAction diff --git a/noatun/library/noatuntags/tags.cpp b/noatun/library/noatuntags/tags.cpp index 38fd4abf..268f7bd9 100644 --- a/noatun/library/noatuntags/tags.cpp +++ b/noatun/library/noatuntags/tags.cpp @@ -1,22 +1,22 @@ #include "tags.h" #include "tagsgetter.h" #include -#include -#include +#include +#include #include -#include -#include -#include -#include +#include +#include +#include +#include #include -#include +#include TagsGetter *Tags::getter=0; TagsGetter::TagsGetter() { new Control(this); - connect(napp->player(), SIGNAL(newSong()), SLOT(newSong())); + connect(napp->player(), TQT_SIGNAL(newSong()), TQT_SLOT(newSong())); } int TagsGetter::interval() const @@ -50,7 +50,7 @@ void TagsGetter::getSongs() startTimer(interval()); } -void TagsGetter::timerEvent(QTimerEvent *) +void TagsGetter::timerEvent(TQTimerEvent *) { if (!items.size()) { @@ -115,7 +115,7 @@ void TagsGetter::associate(Tags *t) tags.append(t); sortPriority(); // getSongs(); - QTimer::singleShot(interval(), this, SLOT(getSongs())); + TQTimer::singleShot(interval(), this, TQT_SLOT(getSongs())); } void TagsGetter::sortPriority() @@ -129,7 +129,7 @@ void TagsGetter::sortPriority() lowest=i->mPriority; } - QPtrList sorted; + TQPtrList sorted; while (tags.count()) { // find the one equal to myself @@ -183,41 +183,41 @@ Control::Control(TagsGetter *parent) // todo (void)I18N_NOOP("Rescan All Tags"); - QVBoxLayout *l=new QVBoxLayout(this); - QCheckBox *onPlay; + TQVBoxLayout *l=new TQVBoxLayout(this); + TQCheckBox *onPlay; { - onPlay=new QCheckBox(i18n("Load tags &automatically"), this); + onPlay=new TQCheckBox(i18n("Load tags &automatically"), this); l->addWidget(onPlay); onPlay->show(); } { - QHBox *intervalLine=new QHBox(this); + TQHBox *intervalLine=new TQHBox(this); l->addWidget(intervalLine); l->addStretch(); - new QLabel(i18n( + new TQLabel(i18n( "The time between each time noatun scans for a new file" ", and updates tags (e.g., ID3)", "Interval:"), intervalLine); - QSlider *slider=new QSlider( + TQSlider *slider=new TQSlider( 0, 2000, 100, 0, Horizontal, intervalLine ); - QSpinBox *spin=new QSpinBox( + TQSpinBox *spin=new TQSpinBox( 0, 2000, 10, intervalLine ); spin->setSuffix(i18n("Milliseconds", " ms")); - connect(slider, SIGNAL(valueChanged(int)), spin, SLOT(setValue(int))); - connect(spin, SIGNAL(valueChanged(int)), slider, SLOT(setValue(int))); + connect(slider, TQT_SIGNAL(valueChanged(int)), spin, TQT_SLOT(setValue(int))); + connect(spin, TQT_SIGNAL(valueChanged(int)), slider, TQT_SLOT(setValue(int))); slider->setValue(parent->interval()); - connect(slider, SIGNAL(valueChanged(int)), parent, SLOT(setInterval(int))); + connect(slider, TQT_SIGNAL(valueChanged(int)), parent, TQT_SLOT(setInterval(int))); - connect(onPlay, SIGNAL(toggled(bool)), intervalLine, SLOT(setEnabled(bool))); + connect(onPlay, TQT_SIGNAL(toggled(bool)), intervalLine, TQT_SLOT(setEnabled(bool))); } - connect(onPlay, SIGNAL(toggled(bool)), parent, SLOT(setLoadAuto(bool))); + connect(onPlay, TQT_SIGNAL(toggled(bool)), parent, TQT_SLOT(setLoadAuto(bool))); onPlay->setChecked(parent->loadAuto()); } diff --git a/noatun/library/noatuntags/tagsgetter.h b/noatun/library/noatuntags/tagsgetter.h index 269b7b90..8b6eddb9 100644 --- a/noatun/library/noatuntags/tagsgetter.h +++ b/noatun/library/noatuntags/tagsgetter.h @@ -1,13 +1,13 @@ #ifndef TAGSGET_H #define TAGSGET_H -#include +#include #include -#include -#include +#include +#include #include "tags.h" -class TagsGetter : public QObject, public PlaylistNotifier +class TagsGetter : public TQObject, public PlaylistNotifier { Q_OBJECT public: @@ -24,7 +24,7 @@ public: //playlistnotifier virtual void removed(PlaylistItem &); protected: - void timerEvent(QTimerEvent *); + void timerEvent(TQTimerEvent *); private slots: // select the songs that need updating @@ -40,8 +40,8 @@ private: void sortPriority(); private: - QPtrList tags; - QValueList items; + TQPtrList tags; + TQValueList items; }; class Control : public CModule diff --git a/noatun/library/player.cpp b/noatun/library/player.cpp index 7760d9a8..0b90952c 100644 --- a/noatun/library/player.cpp +++ b/noatun/library/player.cpp @@ -8,28 +8,28 @@ #include #include #include -#include +#include enum ArtsPOS { posIdle=0, posPlaying, posPaused }; -Player::Player(QObject *parent) : QObject(parent, "Player"), +Player::Player(TQObject *parent) : TQObject(parent, "Player"), position(-1), mLoopStyle(None), firstTimeout(true) { mEngine=new Engine; - connect(&filePos, SIGNAL(timeout()), SLOT(posTimeout())); - connect(mEngine, SIGNAL(aboutToPlay()), this, SLOT(aboutToPlay())); + connect(&filePos, TQT_SIGNAL(timeout()), TQT_SLOT(posTimeout())); + connect(mEngine, TQT_SIGNAL(aboutToPlay()), this, TQT_SLOT(aboutToPlay())); connect(mEngine, - SIGNAL(receivedStreamMeta(const QString &, const QString &, - const QString &, const QString &, - const QString &, const QString &)), - this, SLOT( - slotUpdateStreamMeta(const QString &, const QString &, - const QString &, const QString &, - const QString &, const QString &)) + TQT_SIGNAL(receivedStreamMeta(const TQString &, const TQString &, + const TQString &, const TQString &, + const TQString &, const TQString &)), + this, TQT_SLOT( + slotUpdateStreamMeta(const TQString &, const TQString &, + const TQString &, const TQString &, + const TQString &, const TQString &)) ); - connect(mEngine, SIGNAL(playingFailed()), this, SLOT(forward())); + connect(mEngine, TQT_SIGNAL(playingFailed()), this, TQT_SLOT(forward())); handleButtons(); } @@ -231,13 +231,13 @@ void Player::posTimeout() emit timeout(); } -QString Player::lengthString(int _position) +TQString Player::lengthString(int _position) { if (!current()) - return QString("--:--/--:--"); + return TQString("--:--/--:--"); - QString posString; - QString lenString; + TQString posString; + TQString lenString; int secs, seconds, minutes; if (_position < 0) @@ -352,9 +352,9 @@ void Player::aboutToPlay() } void Player::slotUpdateStreamMeta( - const QString &streamName, const QString &streamGenre, - const QString &streamUrl, const QString &streamBitrate, - const QString &trackTitle, const QString &trackUrl) + const TQString &streamName, const TQString &streamGenre, + const TQString &streamUrl, const TQString &streamBitrate, + const TQString &trackTitle, const TQString &trackUrl) { PlaylistItem currentItem = napp->playlist()->current(); if(currentItem) diff --git a/noatun/library/playlist.cpp b/noatun/library/playlist.cpp index 4e729924..7cc28337 100644 --- a/noatun/library/playlist.cpp +++ b/noatun/library/playlist.cpp @@ -7,9 +7,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include @@ -22,7 +22,7 @@ PlaylistItemData::~PlaylistItemData() { } -QCString PlaylistItemData::mimetype() const +TQCString PlaylistItemData::mimetype() const { if (isProperty("mimetype")) return property("mimetype").latin1(); @@ -31,7 +31,7 @@ QCString PlaylistItemData::mimetype() const return mimetype->name().latin1(); } -QCString PlaylistItemData::playObject() const +TQCString PlaylistItemData::playObject() const { if (isProperty("playObject")) return property("playObject").latin1(); @@ -50,19 +50,19 @@ QCString PlaylistItemData::playObject() const delete offers; - return QCString(objectType.c_str()); + return TQCString(objectType.c_str()); } -QString PlaylistItemData::title() const +TQString PlaylistItemData::title() const { if (isProperty("realtitle")) return property("realtitle"); // "$(property)" - QString format=napp->titleFormat(); + TQString format=napp->titleFormat(); - QRegExp find("(?:(?:\\\\\\\\))*\\$\\((.*)"); + TQRegExp find("(?:(?:\\\\\\\\))*\\$\\((.*)"); int start=0; while (start != -1) @@ -76,7 +76,7 @@ QString PlaylistItemData::title() const // yes, so half the amount of backslashes // count how many there are first - QRegExp counter("([\\\\]+)"); + TQRegExp counter("([\\\\]+)"); counter.search(format, start-1); uint len=counter.cap(1).length()-1; @@ -91,7 +91,7 @@ QString PlaylistItemData::title() const if (format[start]=='\\') { // count how many there are first - QRegExp counter("([\\\\]+)"); + TQRegExp counter("([\\\\]+)"); counter.search(format, start); uint len=counter.cap(1).length(); @@ -101,8 +101,8 @@ QString PlaylistItemData::title() const } // "sth"foo"sth" - QString cont(find.cap(1)); - QString prefix,suffix,propname; + TQString cont(find.cap(1)); + TQString prefix,suffix,propname; unsigned int i=0; if (cont[i] == '"') { @@ -141,7 +141,7 @@ QString PlaylistItemData::title() const i++; - QString propval = property(propname); + TQString propval = property(propname); if (propname == "title" && !propval.length()) { propval = url().filename(); @@ -175,7 +175,7 @@ int PlaylistItemData::length() const void PlaylistItemData::setLength(int ms) { - setProperty("length", QString::number(ms)); + setProperty("length", TQString::number(ms)); } PlaylistItem::PlaylistItem(const PlaylistItem &source) @@ -246,14 +246,14 @@ void PlaylistItem::addRef() const mData->addRef(); } -QString PlaylistItemData::lengthString() const +TQString PlaylistItemData::lengthString() const { if ( length() == -1 ) // no file loaded - return QString("--:--"); + return TQString("--:--"); int secs = length()/1000; // convert milliseconds -> seconds int seconds = secs % 60; - return QString().sprintf("%.2d:%.2d", ((secs-seconds)/60), seconds); + return TQString().sprintf("%.2d:%.2d", ((secs-seconds)/60), seconds); } @@ -278,11 +278,11 @@ bool PlaylistItemData::operator != (const PlaylistItemData &d) const -Playlist::Playlist(QObject *parent, const char *name) : QObject(parent, name) +Playlist::Playlist(TQObject *parent, const char *name) : TQObject(parent, name) { - napp->player()->connect(this, SIGNAL(playCurrent()), SLOT(playCurrent())); - napp->player()->connect(this, SIGNAL(listHidden()), SIGNAL(playlistHidden())); - napp->player()->connect(this, SIGNAL(listShown()), SIGNAL(playlistShown())); + napp->player()->connect(this, TQT_SIGNAL(playCurrent()), TQT_SLOT(playCurrent())); + napp->player()->connect(this, TQT_SIGNAL(listHidden()), TQT_SIGNAL(playlistHidden())); + napp->player()->connect(this, TQT_SIGNAL(listShown()), TQT_SIGNAL(playlistShown())); } @@ -316,15 +316,15 @@ int Playlist::handleArguments() return i; } -QValueList Playlist::select( - const QStringList &keys, const QStringList &values, +TQValueList Playlist::select( + const TQStringList &keys, const TQStringList &values, int limit, bool exact, bool caseSensitive ) { - QValueList list; - QString k; - QString v; - QStringList::ConstIterator key, val; + TQValueList list; + TQString k; + TQString v; + TQStringList::ConstIterator key, val; for (PlaylistItem i(getFirst()); i && limit; i=getAfter(i)) { for (key = keys.begin(); key != keys.end() && limit ; ++key) @@ -371,13 +371,13 @@ QValueList Playlist::select( return list; } -QValueList Playlist::select( - const QString &key, const QString &value, +TQValueList Playlist::select( + const TQString &key, const TQString &value, int limit, bool exact, bool caseSensitive ) { - QStringList keys(key); - QStringList values(value); + TQStringList keys(key); + TQStringList values(value); return select(keys, values, limit, exact, caseSensitive); } diff --git a/noatun/library/playlistsaver.cpp b/noatun/library/playlistsaver.cpp index 58f5d5d2..8b34deca 100644 --- a/noatun/library/playlistsaver.cpp +++ b/noatun/library/playlistsaver.cpp @@ -1,15 +1,15 @@ #include -#include +#include #include -#include -#include +#include +#include #include #include "ksaver.h" #include #include #include -#include -#include +#include +#include #include PlaylistSaver::PlaylistSaver() @@ -71,7 +71,7 @@ bool PlaylistSaver::metalist(const KURL &url) { kdDebug(66666) << k_funcinfo << "url=" << url.url() << endl; - QString end=url.filename().right(3).lower(); + TQString end=url.filename().right(3).lower(); /* if (end=="mp3" || end=="ogg") // we want to download streams only { @@ -100,12 +100,12 @@ bool PlaylistSaver::metalist(const KURL &url) url.protocol().lower()=="http") { KMimeType::Ptr mimetype = KMimeType::findByURL(url); - QString type=mimetype->name(); + TQString type=mimetype->name(); if (type!="application/octet-stream") return false; - QMap map; + TQMap map; map["playObject"]="Arts::StreamPlayObject"; map["title"] = i18n("Stream from %1").arg(url.host()); @@ -138,29 +138,29 @@ bool PlaylistSaver::metalist(const KURL &url) bool PlaylistSaver::saveXML(const KURL &file, int ) { - QString localFile; + TQString localFile; if (file.isLocalFile()) - localFile = QFile::encodeName(file.path()); + localFile = TQFile::encodeName(file.path()); else localFile = napp->tempSaveName(file.path()); // QDom is a pain :) - QDomDocument doc("playlist"); - doc.setContent(QString("")); + TQDomDocument doc("playlist"); + doc.setContent(TQString("")); - QDomElement docElem=doc.documentElement(); + TQDomElement docElem=doc.documentElement(); reset(); PlaylistItem i; - QStringList props; + TQStringList props; while ((i=writeItem())) { // write all properties props=i.properties(); - QDomElement elem=doc.createElement("item"); - for (QStringList::Iterator pi(props.begin()); pi!=props.end(); ++pi) + TQDomElement elem=doc.createElement("item"); + for (TQStringList::Iterator pi(props.begin()); pi!=props.end(); ++pi) { - QString val=i.property(*pi); + TQString val=i.property(*pi); elem.setAttribute(*pi, val); if ((*pi)=="url") @@ -179,7 +179,7 @@ bool PlaylistSaver::saveXML(const KURL &file, int ) Noatun::KSaver saver(localFile); if (!saver.open()) return false; - saver.textStream().setEncoding(QTextStream::UnicodeUTF8); + saver.textStream().setEncoding(TQTextStream::UnicodeUTF8); saver.textStream() << doc.toString(); saver.close(); @@ -198,8 +198,8 @@ public: } bool startElement( - const QString&, const QString &, - const QString &name, const QXmlAttributes &a + const TQString&, const TQString &, + const TQString &name, const TQXmlAttributes &a ) { if (fresh) @@ -218,7 +218,7 @@ public: if (name != "item") return true; - QMap propMap; + TQMap propMap; for (int i=0; i propMap; - QString mAbsPath; + TQMap propMap; + TQString mAbsPath; - MSASXStructure(PlaylistSaver *s, const QString &absPath) + MSASXStructure(PlaylistSaver *s, const TQString &absPath) : saver(s), fresh(true), inEntry(false), inTitle(false), mAbsPath(absPath) { //kdDebug(66666) << k_funcinfo << endl; } - bool startElement(const QString&, const QString &, - const QString &name, const QXmlAttributes &a) + bool startElement(const TQString&, const TQString &, + const TQString &name, const TQXmlAttributes &a) { if (fresh) { @@ -290,12 +290,12 @@ public: { if(a.qName(i).lower()=="href") { - QString filename=a.value(i); - if (filename.find(QRegExp("^[a-zA-Z0-9]+:/"))==0) + TQString filename=a.value(i); + if (filename.find(TQRegExp("^[a-zA-Z0-9]+:/"))==0) { KURL url(filename); KMimeType::Ptr mimetype = KMimeType::findByURL(url); - QString type=mimetype->name(); + TQString type=mimetype->name(); if (type != "application/octet-stream") { propMap["url"]=filename; @@ -333,7 +333,7 @@ public: } else if(name.lower()=="param") { - QString keyName="", keyValue=""; + TQString keyName="", keyValue=""; for (int i=0; i =====================" << endl; - for (QMap::ConstIterator it=propMap.begin(); it!=propMap.end(); ++it ) + for (TQMap::ConstIterator it=propMap.begin(); it!=propMap.end(); ++it ) kdDebug(66666) << "key='" << it.key() << "', val='" << it.data() << "'" << endl; */ saver->readItem(propMap); @@ -419,7 +419,7 @@ public: return true; } - bool characters(const QString &ch) + bool characters(const TQString &ch) { if(inTitle) { @@ -439,18 +439,18 @@ bool PlaylistSaver::loadXML(const KURL &url, int opt) kdDebug(66666) << k_funcinfo << "file='" << url.url() << "', opt=" << opt << endl; - QString dest; + TQString dest; if(KIO::NetAccess::download(url, dest, 0L)) { - QFile file(dest); + TQFile file(dest); if (!file.open(IO_ReadOnly)) return false; reset(); // QXml is horribly documented - QXmlInputSource source(&file); - QXmlSimpleReader reader; + TQXmlInputSource source(&file); + TQXmlSimpleReader reader; if (opt == ASX || url.path().right(4).lower()==".wax" || @@ -478,7 +478,7 @@ bool PlaylistSaver::loadM3U(const KURL &file, int /*opt*/) { kdDebug(66666) << k_funcinfo << "file='" << file.path() << endl; - QString localFile; + TQString localFile; if(!KIO::NetAccess::download(file, localFile, 0L)) return false; @@ -489,7 +489,7 @@ bool PlaylistSaver::loadM3U(const KURL &file, int /*opt*/) list.setGroup("playlist"); // some stupid Windows lusers like to be case insensitive - QStringList groups=list.groupList().grep(QRegExp("^playlist$", false)); + TQStringList groups=list.groupList().grep(TQRegExp("^playlist$", false)); if (groups.count()) { KURL l; @@ -499,14 +499,14 @@ bool PlaylistSaver::loadM3U(const KURL &file, int /*opt*/) } #endif - QFile saver(localFile); + TQFile saver(localFile); saver.open(IO_ReadOnly); - QTextStream t(&saver); + TQTextStream t(&saver); bool isExt = false; // flag telling if we load an EXTM3U file - QString filename; - QString extinf; - QMap prop; + TQString filename; + TQString extinf; + TQMap prop; reset(); while (!t.eof()) @@ -541,7 +541,7 @@ bool PlaylistSaver::loadM3U(const KURL &file, int /*opt*/) if (filename.isEmpty()) continue; - if (filename.find(QRegExp("^[a-zA-Z0-9]+:/"))==0) + if (filename.find(TQRegExp("^[a-zA-Z0-9]+:/"))==0) { //kdDebug(66666) << k_funcinfo << "url filename = " << filename << endl; @@ -591,9 +591,9 @@ bool PlaylistSaver::loadM3U(const KURL &file, int /*opt*/) int length = (extinf.left(timeTitleSep)).toInt(); if (length>0) - prop["length"]=QString::number(length*1000); + prop["length"]=TQString::number(length*1000); - QString displayTitle=extinf.mid(timeTitleSep+1); + TQString displayTitle=extinf.mid(timeTitleSep+1); if (!displayTitle.isEmpty()) { int artistTitleSep = displayTitle.find(" - ",0); @@ -628,14 +628,14 @@ bool PlaylistSaver::saveM3U(const KURL &file, int opt) bool isExt=(opt==EXTM3U); // easier ;) - QString local(napp->tempSaveName(file.path())); - QFile saver(local); + TQString local(napp->tempSaveName(file.path())); + TQFile saver(local); saver.open(IO_ReadWrite | IO_Truncate); - QTextStream t(&saver); + TQTextStream t(&saver); reset(); PlaylistItem i; - QStringList props; + TQStringList props; // this is more code but otoh faster than checking for isExt inside the loop if(isExt) @@ -647,7 +647,7 @@ bool PlaylistSaver::saveM3U(const KURL &file, int opt) int length = static_cast(((i.property("length")).toInt())/1000); if(length==0) length=-1; // special value in an EXTM3U file, means "unknown" KURL u(i.property("url")); - QString title; + TQString title; // if a playlistitem is without a tag or ONLY title is set if((i.property("author").isEmpty() && i.property("title").isEmpty()) @@ -656,8 +656,8 @@ bool PlaylistSaver::saveM3U(const KURL &file, int opt) else title = i.property("author") + " - " + i.property("title"); -// kdDebug(66666) << "#EXTINF:"<< QString::number(length) << "," << title << endl; - t << "#EXTINF:"<< QString::number(length) << "," << title << '\n'; +// kdDebug(66666) << "#EXTINF:"<< TQString::number(length) << "," << title << endl; + t << "#EXTINF:"<< TQString::number(length) << "," << title << '\n'; if (u.isLocalFile()) t << u.path() << '\n'; @@ -683,9 +683,9 @@ bool PlaylistSaver::saveM3U(const KURL &file, int opt) return true; } -static QString findNoCase(const QMap &map, const QString &key) +static TQString findNoCase(const TQMap &map, const TQString &key) { - for (QMap::ConstIterator i=map.begin(); i!=map.end(); ++i) + for (TQMap::ConstIterator i=map.begin(); i!=map.end(); ++i) { if (i.key().lower() == key.lower()) return i.data(); @@ -697,14 +697,14 @@ bool PlaylistSaver::loadPLS(const KURL &file, int /*opt*/) { kdDebug(66666) << k_funcinfo << "file='" << file.path() << endl; - QString localFile; + TQString localFile; if(!KIO::NetAccess::download(file, localFile, 0L)) return false; - QFile checkFile(localFile); + TQFile checkFile(localFile); checkFile.open(IO_ReadOnly); - QTextStream t(&checkFile); - QString firstLine = t.readLine(); + TQTextStream t(&checkFile); + TQString firstLine = t.readLine(); if(firstLine.lower() != "[playlist]") { kdDebug(66666) << k_funcinfo << "PLS didn't start with '[playlist]', aborting" << endl; @@ -716,15 +716,15 @@ bool PlaylistSaver::loadPLS(const KURL &file, int /*opt*/) //list.setGroup("playlist"); // some stupid Windows lusers like to be case insensitive - QStringList groups = list.groupList().grep(QRegExp("^playlist$", false)); + TQStringList groups = list.groupList().grep(TQRegExp("^playlist$", false)); /* if (!groups.count()) // didn't find "[playlist]", it's not a .pls file return false; */ - QMap group = list.entryMap(groups[0]); + TQMap group = list.entryMap(groups[0]); - QString numOfEntries = findNoCase(group, "numberofentries"); + TQString numOfEntries = findNoCase(group, "numberofentries"); if(numOfEntries.isEmpty()) return false; @@ -733,14 +733,14 @@ bool PlaylistSaver::loadPLS(const KURL &file, int /*opt*/) unsigned int nEntries = numOfEntries.toInt(); for(unsigned int entry = 1; entry <= nEntries; ++entry ) { - QString str; + TQString str; str.sprintf("file%d", entry); - QString cast = findNoCase(group, str.utf8()); + TQString cast = findNoCase(group, str.utf8()); str.sprintf("title%d", entry); - QString title = findNoCase(group, str.utf8()); + TQString title = findNoCase(group, str.utf8()); // assume that everything in a pls is a streamable file - QMap map; + TQMap map; KURL url(cast); if (!url.hasPath()) @@ -764,7 +764,7 @@ bool PlaylistSaver::savePLS(const KURL &, int) return false; } -void PlaylistSaver::setGroup(const QString &) +void PlaylistSaver::setGroup(const TQString &) { } diff --git a/noatun/library/plugin.cpp b/noatun/library/plugin.cpp index e9090609..3c5b6f5d 100644 --- a/noatun/library/plugin.cpp +++ b/noatun/library/plugin.cpp @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include #include #include @@ -46,7 +46,7 @@ TimerThingy::TimerThingy(Visualization *vis) { } -void TimerThingy::timerEvent(QTimerEvent *) +void TimerThingy::timerEvent(TQTimerEvent *) { mVis->timeout(); } @@ -88,15 +88,15 @@ Visualization::Visualization(int timeout, int pid) int parent=pid ? pid : getppid(); if (getenv("NOATUN_PID")) - parent = QString::fromLatin1(getenv("NOATUN_PID")).toInt(); + parent = TQString::fromLatin1(getenv("NOATUN_PID")).toInt(); DCOPClient c; c.attach(); - QCString appids[2]; - appids[0]=QString("noatun-%1").arg(parent).local8Bit(); + TQCString appids[2]; + appids[0]=TQString("noatun-%1").arg(parent).local8Bit(); appids[1]="noatun"; - QCString &appid=appids[0]; + TQCString &appid=appids[0]; if (!internalVis && c.isApplicationRegistered(appids[0])) { @@ -115,10 +115,10 @@ Visualization::Visualization(int timeout, int pid) } { - QByteArray replyData; - QCString replyType; + TQByteArray replyData; + TQCString replyType; - if (!c.call(appid, "Noatun", "visStack()", QByteArray(), replyType, replyData)) + if (!c.call(appid, "Noatun", "visStack()", TQByteArray(), replyType, replyData)) { kdDebug(66666) << "Error communicating to parent noatun" << endl; } @@ -127,8 +127,8 @@ Visualization::Visualization(int timeout, int pid) initDispatcher(); mServer=new Arts::SoundServerV2; *mServer = Arts::Reference("global:Arts_SoundServerV2"); - QDataStream reply(replyData, IO_ReadOnly); - QCString result; + TQDataStream reply(replyData, IO_ReadOnly); + TQCString result; reply >> result; mVisualizationStack=result; } @@ -213,8 +213,8 @@ FFTScope::FFTScope(int interval, int pid) : Visualization(interval, pid) float FFTScope::magic(int bands) { -/* QString path=locate("data", "noatun/magictable"); - QFile magic(path); +/* TQString path=locate("data", "noatun/magictable"); + TQFile magic(path); if (!magic.open(IO_ReadOnly | IO_Raw)) return 0; if (!magic.at(bands*sizeof(float))) @@ -473,7 +473,7 @@ void StereoScope::setSamples(int len) -NoatunListener::NoatunListener(QObject *parent) : QObject(parent) +NoatunListener::NoatunListener(TQObject *parent) : TQObject(parent) { } NoatunListener::~NoatunListener() @@ -495,7 +495,7 @@ void NoatunListenerNotif::message() } -ExitNotifier::ExitNotifier(int pid, QObject *parent) : NoatunListener(parent) +ExitNotifier::ExitNotifier(int pid, TQObject *parent) : NoatunListener(parent) { mNotif=new NoatunListenerNotif(this); @@ -503,8 +503,8 @@ ExitNotifier::ExitNotifier(int pid, QObject *parent) : NoatunListener(parent) c.attach(); - QCString appids[2]; - appids[0]=QString("noatun-%1").arg(pid).local8Bit(); + TQCString appids[2]; + appids[0]=TQString("noatun-%1").arg(pid).local8Bit(); appids[1]="noatun"; appid=appids[0]; @@ -521,18 +521,18 @@ ExitNotifier::ExitNotifier(int pid, QObject *parent) : NoatunListener(parent) return; } - QByteArray replyData; - QCString replyType; + TQByteArray replyData; + TQCString replyType; - QCString sessionName; + TQCString sessionName; - if (!c.call(appid, "Noatun", "session()", QByteArray(), replyType, replyData)) + if (!c.call(appid, "Noatun", "session()", TQByteArray(), replyType, replyData)) { kdDebug(66666) << "Error communicating to parent noatun" << endl; } else { - QDataStream reply(replyData, IO_ReadOnly); + TQDataStream reply(replyData, IO_ReadOnly); reply >> sessionName; } @@ -544,17 +544,17 @@ ExitNotifier::ExitNotifier(int pid, QObject *parent) : NoatunListener(parent) ExitNotifier::~ExitNotifier() { - QByteArray replyData; - QCString replyType; + TQByteArray replyData; + TQCString replyType; - QCString sessionName; + TQCString sessionName; DCOPClient c; c.attach(); - if (c.call(appid, "Noatun", "session()", QByteArray(), replyType, replyData)) + if (c.call(appid, "Noatun", "session()", TQByteArray(), replyType, replyData)) { - QDataStream reply(replyData, IO_ReadOnly); + TQDataStream reply(replyData, IO_ReadOnly); reply >> sessionName; Noatun::Session session=Arts::Reference(sessionName); @@ -563,10 +563,10 @@ ExitNotifier::~ExitNotifier() delete mNotif; } -BoolNotifier::BoolNotifier(bool *value, NoatunListener *listener, QObject *parent) - : QObject(parent) +BoolNotifier::BoolNotifier(bool *value, NoatunListener *listener, TQObject *parent) + : TQObject(parent) { - connect(listener, SIGNAL(event()), SLOT(event())); + connect(listener, TQT_SIGNAL(event()), TQT_SLOT(event())); mValue=value; } diff --git a/noatun/library/plugin_deps.h b/noatun/library/plugin_deps.h index a2f3f628..330636e3 100644 --- a/noatun/library/plugin_deps.h +++ b/noatun/library/plugin_deps.h @@ -1,8 +1,8 @@ #ifndef PLUGIN_DEPS_H #define PLUGIN_DEPS_H -#include -#include +#include +#include #include class Visualization; @@ -20,7 +20,7 @@ public: void start(); public: - virtual void timerEvent(QTimerEvent *); + virtual void timerEvent(TQTimerEvent *); private: Visualization *mVis; diff --git a/noatun/library/pluginloader.cpp b/noatun/library/pluginloader.cpp index c367228a..0897e76d 100644 --- a/noatun/library/pluginloader.cpp +++ b/noatun/library/pluginloader.cpp @@ -1,6 +1,6 @@ -#include +#include #include -#include +#include #include #include #include @@ -22,10 +22,10 @@ LibraryLoader::LibraryLoader() : mPlaylist(0) LibraryLoader::~LibraryLoader() { - QValueList l; + TQValueList l; l = loaded(); - for(QValueList::Iterator i = l.begin(); i != l.end(); ++i) + for(TQValueList::Iterator i = l.begin(); i != l.end(); ++i) { if((*i).type != "userinterface" && (*i).type != "playlist" && (*i).type != "systray") { @@ -34,7 +34,7 @@ LibraryLoader::~LibraryLoader() } l = loaded(); - for(QValueList::Iterator i = l.begin(); i != l.end(); ++i) + for(TQValueList::Iterator i = l.begin(); i != l.end(); ++i) { if((*i).type == "userinterface") { @@ -43,26 +43,26 @@ LibraryLoader::~LibraryLoader() } l = loaded(); - for(QValueList::Iterator i = l.begin(); i != l.end(); ++i) + for(TQValueList::Iterator i = l.begin(); i != l.end(); ++i) { removeNow((*i).specfile); } } -QValueList LibraryLoader::available() const +TQValueList LibraryLoader::available() const { - QValueList items; - QStringList files=KGlobal::dirs()->findAllResources("appdata", "*.plugin", false, true); - for (QStringList::Iterator i=files.begin(); i!=files.end(); ++i) + TQValueList items; + TQStringList files=KGlobal::dirs()->findAllResources("appdata", "*.plugin", false, true); + for (TQStringList::Iterator i=files.begin(); i!=files.end(); ++i) items.append(getInfo(*i)); return items; } -QPtrList LibraryLoader::plugins() const +TQPtrList LibraryLoader::plugins() const { - QPtrList list; - for (QDictIterator i(mLibHash); i.current(); ++i) + TQPtrList list; + for (TQDictIterator i(mLibHash); i.current(); ++i) list.append(i.current()->plugin); return list; } @@ -71,14 +71,14 @@ bool LibraryLoader::loadAll() { KConfig *config=KGlobal::config(); config->setGroup(""); - QStringList modules = config->readListEntry("Modules"); + TQStringList modules = config->readListEntry("Modules"); return loadAll(modules); } -bool LibraryLoader::loadAll(const QStringList &modules) +bool LibraryLoader::loadAll(const TQStringList &modules) { // Session management... - for(QStringList::ConstIterator i=modules.begin(); i!=modules.end(); ++i) + for(TQStringList::ConstIterator i=modules.begin(); i!=modules.end(); ++i) { NoatunLibraryInfo info=getInfo(*i); if (!info.type.contains("sm")) @@ -87,7 +87,7 @@ bool LibraryLoader::loadAll(const QStringList &modules) } // load all the playlists in the first - for(QStringList::ConstIterator i=modules.begin(); i!=modules.end(); ++i) + for(TQStringList::ConstIterator i=modules.begin(); i!=modules.end(); ++i) { NoatunLibraryInfo info=getInfo(*i); if (!info.type.contains("playlist")) @@ -103,7 +103,7 @@ bool LibraryLoader::loadAll(const QStringList &modules) } // load all the user interfaces now - for(QStringList::ConstIterator i=modules.begin(); i!=modules.end(); ++i) + for(TQStringList::ConstIterator i=modules.begin(); i!=modules.end(); ++i) { NoatunLibraryInfo info=getInfo(*i); if (!info.type.contains("userinterface")) @@ -118,7 +118,7 @@ bool LibraryLoader::loadAll(const QStringList &modules) return false; } - for(QStringList::ConstIterator i=modules.begin(); i!=modules.end(); ++i) + for(TQStringList::ConstIterator i=modules.begin(); i!=modules.end(); ++i) { NoatunLibraryInfo info=getInfo(*i); if((!info.type.contains("playlist")) @@ -132,11 +132,11 @@ bool LibraryLoader::loadAll(const QStringList &modules) return true; } -NoatunLibraryInfo LibraryLoader::getInfo(const QString &spec) const +NoatunLibraryInfo LibraryLoader::getInfo(const TQString &spec) const { NoatunLibraryInfo info; - QString specPath = (spec[0]=='/') ? spec : KGlobal::dirs()->findResource("appdata", spec); - if (!QFile::exists(specPath)) + TQString specPath = (spec[0]=='/') ? spec : KGlobal::dirs()->findResource("appdata", spec); + if (!TQFile::exists(specPath)) return info; KSimpleConfig file(specPath); if (spec.find('/')>=0) @@ -155,14 +155,14 @@ NoatunLibraryInfo LibraryLoader::getInfo(const QString &spec) const return info; } -bool LibraryLoader::isLoaded(const QString &spec) const +bool LibraryLoader::isLoaded(const TQString &spec) const { PluginLibrary *lib=mLibHash[spec]; if (!lib) return false; return lib->plugin; } -bool LibraryLoader::loadSO(const QString &spec) +bool LibraryLoader::loadSO(const TQString &spec) { if(!isLoaded(spec)) { @@ -170,7 +170,7 @@ bool LibraryLoader::loadSO(const QString &spec) if (info.specfile != spec) return false; - for (QStringList::ConstIterator it = info.require.begin(); it != info.require.end(); ++it) + for (TQStringList::ConstIterator it = info.require.begin(); it != info.require.end(); ++it) loadSO(*it); // get the library loader instance @@ -180,8 +180,8 @@ bool LibraryLoader::loadSO(const QString &spec) if (!listitem) { - QString filename = KGlobal::dirs()->findResource("module", info.filename); - KLibrary *lib = loader->library(QFile::encodeName(filename)); + TQString filename = KGlobal::dirs()->findResource("module", info.filename); + KLibrary *lib = loader->library(TQFile::encodeName(filename)); if (!lib) return false; listitem=new PluginLibrary; @@ -210,7 +210,7 @@ bool LibraryLoader::loadSO(const QString &spec) return false; } -void LibraryLoader::add(const QString &spec) +void LibraryLoader::add(const TQString &spec) { PluginLibrary *lib=mLibHash[spec]; if (lib) @@ -219,7 +219,7 @@ void LibraryLoader::add(const QString &spec) loadSO(spec); } -void LibraryLoader::setModules(const QStringList &mods) +void LibraryLoader::setModules(const TQStringList &mods) { KConfig *config=KGlobal::config(); config->setGroup(0); @@ -227,7 +227,7 @@ void LibraryLoader::setModules(const QStringList &mods) config->sync(); } -bool LibraryLoader::remove(const QString& spec, bool terminateOnLastUI) +bool LibraryLoader::remove(const TQString& spec, bool terminateOnLastUI) { bool SystrayPluginEnabled=false; @@ -235,10 +235,10 @@ bool LibraryLoader::remove(const QString& spec, bool terminateOnLastUI) // exit if this is the last UI if (info.type=="userinterface" && terminateOnLastUI) { - QValueList l=loaded(); + TQValueList l=loaded(); // Iterate over other plugins - for (QValueList::Iterator i=l.begin(); i!=l.end(); ++i) + for (TQValueList::Iterator i=l.begin(); i!=l.end(); ++i) { // Is this a UI plugin? if ((*i).specfile!=spec && (*i).type=="userinterface") @@ -275,7 +275,7 @@ bool LibraryLoader::remove(const QString& spec, bool terminateOnLastUI) return true; } -bool LibraryLoader::remove(const QString &spec) +bool LibraryLoader::remove(const TQString &spec) { remove(spec, true); return true; @@ -283,7 +283,7 @@ bool LibraryLoader::remove(const QString &spec) bool LibraryLoader::remove(const PluginLibrary *pl) { - for (QDictIterator i(mLibHash); i.current(); ++i) + for (TQDictIterator i(mLibHash); i.current(); ++i) { if (i.current()==pl) return remove(i.currentKey()); @@ -293,7 +293,7 @@ bool LibraryLoader::remove(const PluginLibrary *pl) bool LibraryLoader::remove(const Plugin *plugin) { - for (QDictIterator i(mLibHash); i.current(); ++i) + for (TQDictIterator i(mLibHash); i.current(); ++i) { if (i.current()->plugin==plugin) return remove(i.currentKey()); @@ -309,22 +309,22 @@ Playlist *LibraryLoader::playlist() const return mPlaylist; } -QValueList LibraryLoader::loaded() const +TQValueList LibraryLoader::loaded() const { - QValueList items; + TQValueList items; - for (QDictIterator i(mLibHash); i.current(); ++i) + for (TQDictIterator i(mLibHash); i.current(); ++i) if (isLoaded(i.currentKey())) items.append(getInfo(i.currentKey())); return items; } -QValueList LibraryLoader::loadedByType(const QString &type) const +TQValueList LibraryLoader::loadedByType(const TQString &type) const { - QValueList items; + TQValueList items; - for (QDictIterator i(mLibHash); i.current(); ++i) + for (TQDictIterator i(mLibHash); i.current(); ++i) { if (isLoaded(i.currentKey())) { @@ -337,15 +337,15 @@ QValueList LibraryLoader::loadedByType(const QString &type) c return items; } -void LibraryLoader::removeNow(const QString &spec) +void LibraryLoader::removeNow(const TQString &spec) { NoatunLibraryInfo info = getInfo(spec); if (info.specfile == spec) { - QValueList l = loaded(); - for (QValueList::Iterator i = l.begin(); i != l.end(); ++i) + TQValueList l = loaded(); + for (TQValueList::Iterator i = l.begin(); i != l.end(); ++i) { - for (QStringList::ConstIterator it = (*i).require.begin(); it != (*i).require.end(); ++it) + for (TQStringList::ConstIterator it = (*i).require.begin(); it != (*i).require.end(); ++it) { if (*it == spec) removeNow((*i).specfile); diff --git a/noatun/library/pluginmodule.cpp b/noatun/library/pluginmodule.cpp index aec76e44..77047471 100644 --- a/noatun/library/pluginmodule.cpp +++ b/noatun/library/pluginmodule.cpp @@ -25,20 +25,20 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include "noatunlistview.h" #include "pluginmodule.h" -#include +#include #include "common.h" -PluginListItem::PluginListItem(const bool _exclusive, bool _checked, const NoatunLibraryInfo &_info, QListView *_parent) - : QCheckListItem(_parent, _info.name, CheckBox) +PluginListItem::PluginListItem(const bool _exclusive, bool _checked, const NoatunLibraryInfo &_info, TQListView *_parent) + : TQCheckListItem(_parent, _info.name, CheckBox) , mInfo(_info) , silentStateChange(false) , exclusive(_exclusive) @@ -61,14 +61,14 @@ void PluginListItem::stateChange(bool b) static_cast(listView())->stateChanged(this, b); } -void PluginListItem::paintCell(QPainter *p, const QColorGroup &cg, int a, int b, int c) +void PluginListItem::paintCell(TQPainter *p, const TQColorGroup &cg, int a, int b, int c) { if(exclusive) myType = RadioButton; - QCheckListItem::paintCell(p, cg, a, b, c); + TQCheckListItem::paintCell(p, cg, a, b, c); if(exclusive) myType = CheckBox; } -PluginListView::PluginListView(unsigned _min, unsigned _max, QWidget *_parent, const char *_name) +PluginListView::PluginListView(unsigned _min, unsigned _max, TQWidget *_parent, const char *_name) : KListView(_parent, _name) , hasMaximum(true) , max(_max) @@ -77,7 +77,7 @@ PluginListView::PluginListView(unsigned _min, unsigned _max, QWidget *_parent, c { } -PluginListView::PluginListView(unsigned _min, QWidget *_parent, const char *_name) +PluginListView::PluginListView(unsigned _min, TQWidget *_parent, const char *_name) : KListView(_parent, _name) , hasMaximum(false) , min(_min) @@ -85,7 +85,7 @@ PluginListView::PluginListView(unsigned _min, QWidget *_parent, const char *_nam { } -PluginListView::PluginListView(QWidget *_parent, const char *_name) +PluginListView::PluginListView(TQWidget *_parent, const char *_name) : KListView(_parent, _name) , hasMaximum(false) , min(0) @@ -110,7 +110,7 @@ void PluginListView::stateChanged(PluginListItem *item, bool b) { // Find a different one and turn it off - QListViewItem *cur = firstChild(); + TQListViewItem *cur = firstChild(); PluginListItem *curItem = dynamic_cast(cur); while(cur == item || !curItem || !curItem->isOn()) @@ -136,58 +136,58 @@ void PluginListView::stateChanged(PluginListItem *item, bool b) } } -Plugins::Plugins(QObject *_parent) +Plugins::Plugins(TQObject *_parent) : CModule(i18n("Plugins"), i18n("Select Your Plugins"), "gear", _parent) , shown(false) { - (new QVBoxLayout(this))->setAutoAdd(true); - QTabWidget *tabControl = new QTabWidget(this,"tabControl"); + (new TQVBoxLayout(this))->setAutoAdd(true); + TQTabWidget *tabControl = new TQTabWidget(this,"tabControl"); - QFrame *interfaceTab = new QFrame(tabControl); - (new QVBoxLayout(interfaceTab, KDialog::marginHint(), KDialog::spacingHint()))->setAutoAdd(true); - (void)new QLabel(i18n("Select one or more interfaces to use:"), interfaceTab); + TQFrame *interfaceTab = new TQFrame(tabControl); + (new TQVBoxLayout(interfaceTab, KDialog::marginHint(), KDialog::spacingHint()))->setAutoAdd(true); + (void)new TQLabel(i18n("Select one or more interfaces to use:"), interfaceTab); // At least one interface is required interfaceList = new PluginListView(1, interfaceTab); interfaceList->addColumn(i18n("Name")); interfaceList->addColumn(i18n("Description")); interfaceList->addColumn(i18n("Author")); interfaceList->addColumn(i18n("License")); - connect(interfaceList, SIGNAL(stateChange(PluginListItem *, bool)), this, SLOT(stateChange(PluginListItem *, bool))); + connect(interfaceList, TQT_SIGNAL(stateChange(PluginListItem *, bool)), this, TQT_SLOT(stateChange(PluginListItem *, bool))); tabControl->addTab(interfaceTab, i18n("&Interfaces")); - QFrame *playlistTab = new QFrame(tabControl); - (new QVBoxLayout(playlistTab, KDialog::marginHint(), KDialog::spacingHint()))->setAutoAdd(true); - (void)new QLabel(i18n("Select one playlist to use:"), playlistTab); + TQFrame *playlistTab = new TQFrame(tabControl); + (new TQVBoxLayout(playlistTab, KDialog::marginHint(), KDialog::spacingHint()))->setAutoAdd(true); + (void)new TQLabel(i18n("Select one playlist to use:"), playlistTab); // Exactly one playlist is required playlistList = new PluginListView(1, 1, playlistTab); playlistList->addColumn(i18n("Name")); playlistList->addColumn(i18n("Description")); playlistList->addColumn(i18n("Author")); playlistList->addColumn(i18n("License")); - connect(playlistList, SIGNAL(stateChange(PluginListItem *, bool)), this, SLOT(stateChange(PluginListItem *, bool))); + connect(playlistList, TQT_SIGNAL(stateChange(PluginListItem *, bool)), this, TQT_SLOT(stateChange(PluginListItem *, bool))); tabControl->addTab(playlistTab, i18n("&Playlist")); - QFrame *visTab = new QFrame(tabControl); - (new QVBoxLayout(visTab, KDialog::marginHint(), KDialog::spacingHint()))->setAutoAdd(true); - (void)new QLabel(i18n("Select any visualizations to use:"), visTab); + TQFrame *visTab = new TQFrame(tabControl); + (new TQVBoxLayout(visTab, KDialog::marginHint(), KDialog::spacingHint()))->setAutoAdd(true); + (void)new TQLabel(i18n("Select any visualizations to use:"), visTab); visList = new PluginListView(0, visTab); visList->addColumn(i18n("Name")); visList->addColumn(i18n("Description")); visList->addColumn(i18n("Author")); visList->addColumn(i18n("License")); - connect(visList, SIGNAL(stateChange(PluginListItem *, bool)), this, SLOT(stateChange(PluginListItem *, bool))); + connect(visList, TQT_SIGNAL(stateChange(PluginListItem *, bool)), this, TQT_SLOT(stateChange(PluginListItem *, bool))); tabControl->addTab(visTab, i18n("&Visualizations")); // Other plugins are not restricted - QFrame *otherTab = new QFrame(tabControl); - (new QVBoxLayout(otherTab, KDialog::marginHint(), KDialog::spacingHint()))->setAutoAdd(true); - (void)new QLabel(i18n("Select any other plugins to use:"), otherTab); + TQFrame *otherTab = new TQFrame(tabControl); + (new TQVBoxLayout(otherTab, KDialog::marginHint(), KDialog::spacingHint()))->setAutoAdd(true); + (void)new TQLabel(i18n("Select any other plugins to use:"), otherTab); otherList = new PluginListView(0, otherTab); otherList->addColumn(i18n("Name")); otherList->addColumn(i18n("Description")); otherList->addColumn(i18n("Author")); otherList->addColumn(i18n("License")); - connect(otherList, SIGNAL(stateChange(PluginListItem *, bool)), this, SLOT(stateChange(PluginListItem *, bool))); + connect(otherList, TQT_SIGNAL(stateChange(PluginListItem *, bool)), this, TQT_SLOT(stateChange(PluginListItem *, bool))); tabControl->addTab(otherTab, i18n("O&ther Plugins")); } @@ -198,10 +198,10 @@ void Plugins::reopen() otherList->clear(); visList->clear(); - QValueList available = napp->libraryLoader()->available(); - QValueList loaded = napp->libraryLoader()->loaded(); + TQValueList available = napp->libraryLoader()->available(); + TQValueList loaded = napp->libraryLoader()->loaded(); - for(QValueList::Iterator i = available.begin(); i != available.end(); ++i) + for(TQValueList::Iterator i = available.begin(); i != available.end(); ++i) { PluginListView *parent; bool exclusive = false; @@ -250,7 +250,7 @@ void Plugins::stateChange(PluginListItem *item, bool b) void Plugins::addPlugin(const NoatunLibraryInfo &info) { // Load any that this one depends upon - for(QStringList::ConstIterator i = info.require.begin(); i != info.require.end(); ++i) + for(TQStringList::ConstIterator i = info.require.begin(); i != info.require.end(); ++i) { NoatunLibraryInfo requiredInfo = napp->libraryLoader()->getInfo(*i); PluginListItem *item = findItem(requiredInfo); @@ -268,20 +268,20 @@ void Plugins::removePlugin(const NoatunLibraryInfo &info) LibraryLoader &loader = *(napp->libraryLoader()); // Here are the ones loaded - QValueList loaded = napp->libraryLoader()->loaded(); + TQValueList loaded = napp->libraryLoader()->loaded(); // Add the ones marked for loading - for(QStringList::ConstIterator i = mAdded.begin(); i != mAdded.end(); ++i) + for(TQStringList::ConstIterator i = mAdded.begin(); i != mAdded.end(); ++i) loaded.append(loader.getInfo(*i)); // Subtract the ones marked for removal - for(QStringList::ConstIterator i = mDeleted.begin(); i != mDeleted.end(); ++i) + for(TQStringList::ConstIterator i = mDeleted.begin(); i != mDeleted.end(); ++i) loaded.remove(loader.getInfo(*i)); // If any depend on this plugin, mark them for removal (or remove them from mAdded) - for(QValueList::Iterator i = loaded.begin(); i != loaded.end(); ++i) + for(TQValueList::Iterator i = loaded.begin(); i != loaded.end(); ++i) { - for(QStringList::ConstIterator j = (*i).require.begin(); j != (*i).require.end(); ++j) + for(TQStringList::ConstIterator j = (*i).require.begin(); j != (*i).require.end(); ++j) { if(*j == info.specfile) { @@ -299,7 +299,7 @@ void Plugins::removePlugin(const NoatunLibraryInfo &info) PluginListItem *Plugins::findItem(const NoatunLibraryInfo &info) const { - for(QListViewItem *cur = otherList->firstChild(); cur != 0; cur = cur->itemBelow()) + for(TQListViewItem *cur = otherList->firstChild(); cur != 0; cur = cur->itemBelow()) { PluginListItem *item = dynamic_cast(cur); if(item && item->info() == info) @@ -307,7 +307,7 @@ PluginListItem *Plugins::findItem(const NoatunLibraryInfo &info) const } // visualizations - for(QListViewItem *cur = visList->firstChild(); cur != 0; cur = cur->itemBelow()) + for(TQListViewItem *cur = visList->firstChild(); cur != 0; cur = cur->itemBelow()) { PluginListItem *item = dynamic_cast(cur); if(item && item->info() == info) @@ -316,7 +316,7 @@ PluginListItem *Plugins::findItem(const NoatunLibraryInfo &info) const // If our only interface has a dependency removed, that's a double dose of trouble // We may as well have this here for completeness, though - for(QListViewItem *cur = interfaceList->firstChild(); cur != 0; cur = cur->itemBelow()) + for(TQListViewItem *cur = interfaceList->firstChild(); cur != 0; cur = cur->itemBelow()) { PluginListItem *item = dynamic_cast(cur); if(item && item->info() == info) @@ -325,7 +325,7 @@ PluginListItem *Plugins::findItem(const NoatunLibraryInfo &info) const // If a playlist is added or removed due to a dependency, we're doom-diddly-oomed // We may as well have this here for completeness, though - for(QListViewItem *cur = playlistList->firstChild(); cur != 0; cur = cur->itemBelow()) + for(TQListViewItem *cur = playlistList->firstChild(); cur != 0; cur = cur->itemBelow()) { PluginListItem *item = dynamic_cast(cur); if(item && item->info() == info) @@ -342,20 +342,20 @@ void Plugins::save() // Load the plugins the user added //loader.loadAll(mAdded); - QString oldPlaylist, newPlaylist; + TQString oldPlaylist, newPlaylist; // first load all non playlist things - for (QStringList::Iterator i = mAdded.begin(); i != mAdded.end(); ++i) + for (TQStringList::Iterator i = mAdded.begin(); i != mAdded.end(); ++i) { NoatunLibraryInfo info = loader.getInfo(*i); if(info.type != "playlist") - loader.loadAll(QStringList(*i)); + loader.loadAll(TQStringList(*i)); else newPlaylist = (*i); } // Remove the plugins the user removed - for (QStringList::Iterator i = mDeleted.begin(); i != mDeleted.end(); ++i) + for (TQStringList::Iterator i = mDeleted.begin(); i != mDeleted.end(); ++i) { NoatunLibraryInfo info = loader.getInfo(*i); if(info.type != "playlist") @@ -372,15 +372,15 @@ void Plugins::save() kdDebug(66666) << k_funcinfo << "Unloading " << oldPlaylist << endl; loader.remove(oldPlaylist); kdDebug(66666) << k_funcinfo << "Loading " << oldPlaylist << endl; - loader.loadAll(QStringList(newPlaylist)); + loader.loadAll(TQStringList(newPlaylist)); } // Round up the ones that weren't loaded right now, for saving in the configuration - QStringList specList(mAdded); + TQStringList specList(mAdded); - QValueList loaded = loader.loaded(); - for(QValueList::Iterator i = loaded.begin(); i != loaded.end(); ++i) + TQValueList loaded = loader.loaded(); + for(TQValueList::Iterator i = loaded.begin(); i != loaded.end(); ++i) { if(!specList.contains((*i).specfile) && loader.isLoaded((*i).specfile)) specList += (*i).specfile; @@ -393,12 +393,12 @@ void Plugins::save() mAdded.clear(); } -void Plugins::showEvent(QShowEvent *e) +void Plugins::showEvent(TQShowEvent *e) { if(!shown) { shown = true; - KMessageBox::information(this, i18n("Changing your playlist plugin will stop playback. Different playlists may use different methods of storing information, so after changing playlists you may have to recreate your playlist."), QString::null, "Plugin warning"); + KMessageBox::information(this, i18n("Changing your playlist plugin will stop playback. Different playlists may use different methods of storing information, so after changing playlists you may have to recreate your playlist."), TQString::null, "Plugin warning"); } CModule::showEvent(e); } diff --git a/noatun/library/pluginmodule.h b/noatun/library/pluginmodule.h index 75d3e04d..59ece235 100644 --- a/noatun/library/pluginmodule.h +++ b/noatun/library/pluginmodule.h @@ -25,15 +25,15 @@ #include "noatun/pluginloader.h" #include -#include -#include +#include +#include class KTabCtl; class PluginListItem : public QCheckListItem { public: - PluginListItem(const bool _exclusive, bool _checked, const NoatunLibraryInfo &_info, QListView *_parent); + PluginListItem(const bool _exclusive, bool _checked, const NoatunLibraryInfo &_info, TQListView *_parent); const NoatunLibraryInfo &info() const { return mInfo; } // This will toggle the state without "emitting" the stateChange @@ -41,7 +41,7 @@ public: protected: virtual void stateChange(bool); - virtual void paintCell(QPainter *, const QColorGroup &, int, int, int); + virtual void paintCell(TQPainter *, const TQColorGroup &, int, int, int); private: NoatunLibraryInfo mInfo; bool silentStateChange; @@ -55,9 +55,9 @@ Q_OBJECT friend class PluginListItem; public: - PluginListView(QWidget *_parent = 0, const char *_name = 0); - PluginListView(unsigned _min, QWidget *_parent = 0, const char *_name = 0); - PluginListView(unsigned _min, unsigned _max, QWidget *_parent = 0, const char *_name = 0); + PluginListView(TQWidget *_parent = 0, const char *_name = 0); + PluginListView(unsigned _min, TQWidget *_parent = 0, const char *_name = 0); + PluginListView(unsigned _min, unsigned _max, TQWidget *_parent = 0, const char *_name = 0); virtual void clear(); @@ -76,12 +76,12 @@ class Plugins : public CModule { Q_OBJECT public: - Plugins(QObject *_parent = 0); + Plugins(TQObject *_parent = 0); virtual void save(); virtual void reopen(); protected: - virtual void showEvent(QShowEvent *); + virtual void showEvent(TQShowEvent *); private slots: void stateChange(PluginListItem *, bool); @@ -91,7 +91,7 @@ private: void removePlugin(const NoatunLibraryInfo &); PluginListItem *findItem(const NoatunLibraryInfo &) const; - QStringList mAdded, mDeleted; + TQStringList mAdded, mDeleted; PluginListView *interfaceList, *playlistList, *otherList, *visList; bool shown; diff --git a/noatun/library/pref.cpp b/noatun/library/pref.cpp index 98e71645..658e7951 100644 --- a/noatun/library/pref.cpp +++ b/noatun/library/pref.cpp @@ -4,11 +4,11 @@ #include #include #include -#include -//#include +#include +//#include #include "cmodule.h" -NoatunPreferences::NoatunPreferences(QWidget *parent) +NoatunPreferences::NoatunPreferences(TQWidget *parent) : KDialogBase(TreeList, i18n("Preferences - Noatun"), Ok|Apply|Cancel|Help, Ok, parent, "NoatunPreferences", false, true) { @@ -32,7 +32,7 @@ void NoatunPreferences::show() void NoatunPreferences::show(CModule *page) { - int index = pageIndex( static_cast(page->parent()) ); + int index = pageIndex( static_cast(page->parent()) ); if (index != -1) showPage(index); show(); @@ -54,19 +54,19 @@ void NoatunPreferences::remove(CModule *page) mModules.removeRef(page); } -CModule::CModule(const QString &name, const QString &description, const QString &icon, QObject *owner) - : QWidget(napp->preferencesBox()->addPage(name, description, KGlobal::iconLoader()->loadIcon( +CModule::CModule(const TQString &name, const TQString &description, const TQString &icon, TQObject *owner) + : TQWidget(napp->preferencesBox()->addPage(name, description, KGlobal::iconLoader()->loadIcon( icon, KIcon::Small,0, KIcon::DefaultState,0, true))) { if (owner) - connect(owner, SIGNAL(destroyed()), SLOT(ownerDeleted())); + connect(owner, TQT_SIGNAL(destroyed()), TQT_SLOT(ownerDeleted())); //kdDebug(66666) << k_funcinfo << "name = " << name << endl; napp->preferencesBox()->add(this); - QFrame *page=static_cast(parent()); - (new QHBoxLayout(page))->addWidget(this); + TQFrame *page=static_cast(parent()); + (new TQHBoxLayout(page))->addWidget(this); } CModule::~CModule() @@ -87,7 +87,7 @@ CModule::~CModule() void CModule::ownerDeleted() { - QObject *p=parent(); + TQObject *p=parent(); delete this; p->deleteLater(); } diff --git a/noatun/library/scrollinglabel.cpp b/noatun/library/scrollinglabel.cpp index d7bdd643..09d64678 100644 --- a/noatun/library/scrollinglabel.cpp +++ b/noatun/library/scrollinglabel.cpp @@ -22,10 +22,10 @@ #include -#include -#include -#include -#include +#include +#include +#include +#include class ScrollingLabel::Private { @@ -58,12 +58,12 @@ ScrollingLabel::ScrollingLabel QWidget * parent, const char * name ) - : QWidget(parent, name) + : TQWidget(parent, name) { d = new Private; - connect(&d->scrollTimer, SIGNAL(timeout()), this, SLOT(scroll())); - connect(&d->resetTimer, SIGNAL(timeout()), this, SLOT(restoreText())); + connect(&d->scrollTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(scroll())); + connect(&d->resetTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(restoreText())); setText(initialText); } @@ -74,7 +74,7 @@ ScrollingLabel::~ScrollingLabel() } void -ScrollingLabel::setText(const QString & t, int time) +ScrollingLabel::setText(const TQString & t, int time) { d->resetTimer.stop(); @@ -92,8 +92,8 @@ ScrollingLabel::setText(const QString & t, int time) _update(); } - QToolTip::remove(this); - QToolTip::add(this, d->text); + TQToolTip::remove(this); + TQToolTip::add(this, d->text); } void @@ -121,7 +121,7 @@ ScrollingLabel::_update() d->buf.resize(w, h); d->buf.fill(colorGroup().background()); - QPainter p(&d->buf); + TQPainter p(&d->buf); p.setFont(font()); p.drawText(0, fontMetrics().ascent(), d->text); @@ -132,14 +132,14 @@ ScrollingLabel::_update() } void -ScrollingLabel::paintEvent(QPaintEvent *) +ScrollingLabel::paintEvent(TQPaintEvent *) { bitBlt (this, 0, 0, &d->buf, d->pos, 0, d->pos + width(), height(), Qt::CopyROP); } void -ScrollingLabel::resizeEvent(QResizeEvent *) +ScrollingLabel::resizeEvent(TQResizeEvent *) { _update(); } @@ -174,7 +174,7 @@ ScrollingLabel::sizeHint() const QSize ScrollingLabel::minimumSizeHint() const { - return QSize(0, fontMetrics().height()); + return TQSize(0, fontMetrics().height()); } QString diff --git a/noatun/library/stereobuttonaction.cpp b/noatun/library/stereobuttonaction.cpp index bfb688f7..e8df0046 100644 --- a/noatun/library/stereobuttonaction.cpp +++ b/noatun/library/stereobuttonaction.cpp @@ -3,27 +3,27 @@ namespace NoatunStdAction { -StereoButtonAction::StereoButtonAction(const QString& text, int accel, QObject* parent, const char* name ) +StereoButtonAction::StereoButtonAction(const TQString& text, int accel, TQObject* parent, const char* name ) : KAction(text, accel, parent, name) {} -StereoButtonAction::StereoButtonAction(const QString& text, int accel, const QObject* receiver, const char* slot, QObject* parent, const char* name ) +StereoButtonAction::StereoButtonAction(const TQString& text, int accel, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) : KAction(text, accel, receiver, slot, parent, name) {} -StereoButtonAction::StereoButtonAction(const QString& text, const QIconSet& pix, int accel, QObject* parent, const char* name ) +StereoButtonAction::StereoButtonAction(const TQString& text, const TQIconSet& pix, int accel, TQObject* parent, const char* name ) : KAction(text, pix, accel, parent, name) {} -StereoButtonAction::StereoButtonAction(const QString& text, const QString& pix, int accel, QObject* parent, const char* name ) +StereoButtonAction::StereoButtonAction(const TQString& text, const TQString& pix, int accel, TQObject* parent, const char* name ) : KAction(text, pix, accel, parent, name) {} -StereoButtonAction::StereoButtonAction(const QString& text, const QIconSet& pix, int accel, const QObject* receiver, const char* slot, QObject* parent, const char* name ) +StereoButtonAction::StereoButtonAction(const TQString& text, const TQIconSet& pix, int accel, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) : KAction(text, pix, accel, receiver, slot, parent, name) {} -StereoButtonAction::StereoButtonAction(const QString& text, const QString& pix, int accel, const QObject* receiver, const char* slot, QObject* parent, const char* name ) +StereoButtonAction::StereoButtonAction(const TQString& text, const TQString& pix, int accel, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) : KAction(text, pix, accel, receiver, slot, parent, name) {} diff --git a/noatun/library/titleproxy.cpp b/noatun/library/titleproxy.cpp index 7515a35a..ee62863c 100644 --- a/noatun/library/titleproxy.cpp +++ b/noatun/library/titleproxy.cpp @@ -21,8 +21,8 @@ email : markey@web.de #include #include -#include -#include +#include +#include #include "noatun/app.h" using namespace TitleProxy; @@ -32,7 +32,7 @@ static const uint MAX_PROXYPORT = 7777; static const int BUFSIZE = 32768; Proxy::Proxy( KURL url ) - : QObject() + : TQObject() , m_url( url ) , m_initSuccess( true ) , m_metaInt( 0 ) @@ -50,9 +50,9 @@ Proxy::Proxy( KURL url ) if ( m_url.port() < 1 ) m_url.setPort( 80 ); - connect( &m_sockRemote, SIGNAL( error( int ) ), this, SLOT( connectError() ) ); - connect( &m_sockRemote, SIGNAL( connected() ), this, SLOT( sendRequest() ) ); - connect( &m_sockRemote, SIGNAL( readyRead() ), this, SLOT( readRemote() ) ); + connect( &m_sockRemote, TQT_SIGNAL( error( int ) ), this, TQT_SLOT( connectError() ) ); + connect( &m_sockRemote, TQT_SIGNAL( connected() ), this, TQT_SLOT( sendRequest() ) ); + connect( &m_sockRemote, TQT_SIGNAL( readyRead() ), this, TQT_SLOT( readRemote() ) ); uint i = 0; Server* server = 0; @@ -74,7 +74,7 @@ Proxy::Proxy( KURL url ) return; } m_usedPort = i; - connect( server, SIGNAL( connected( int ) ), this, SLOT( accept( int ) ) ); + connect( server, TQT_SIGNAL( connected( int ) ), this, TQT_SLOT( accept( int ) ) ); } @@ -129,8 +129,8 @@ void Proxy::connectToHost() //SLOT } { //connect to server - QTimer::singleShot( KProtocolManager::connectTimeout() * 1000, - this, SLOT( connectError() ) ); + TQTimer::singleShot( KProtocolManager::connectTimeout() * 1000, + this, TQT_SLOT( connectError() ) ); kdDebug(66666) << k_funcinfo << "Connecting to " << m_url.host() << ":" << m_url.port() << endl; @@ -146,12 +146,12 @@ void Proxy::sendRequest() //SLOT { //kdDebug(66666) << "BEGIN " << k_funcinfo << endl; - QCString username = m_url.user().utf8(); - QCString password = m_url.pass().utf8(); - QCString authString = KCodecs::base64Encode( username + ":" + password ); + TQCString username = m_url.user().utf8(); + TQCString password = m_url.pass().utf8(); + TQCString authString = KCodecs::base64Encode( username + ":" + password ); bool auth = !( username.isEmpty() && password.isEmpty() ); - QString request = QString( "GET %1 HTTP/1.0\r\n" + TQString request = TQString( "GET %1 HTTP/1.0\r\n" "Host: %2\r\n" "User-Agent: Noatun/%5\r\n" "%3" @@ -159,8 +159,8 @@ void Proxy::sendRequest() //SLOT "\r\n" ) .arg( m_url.path( -1 ).isEmpty() ? "/" : m_url.path( -1 ) ) .arg( m_url.host() ) - .arg( m_icyMode ? QString( "Icy-MetaData:1\r\n" ) : QString::null ) - .arg( auth ? QString( "Authorization: Basic " ).append( authString ) : QString::null ) + .arg( m_icyMode ? TQString( "Icy-MetaData:1\r\n" ) : TQString::null ) + .arg( auth ? TQString( "Authorization: Basic " ).append( authString ) : TQString::null ) .arg( NOATUN_VERSION ); m_sockRemote.writeBlock( request.latin1(), request.length() ); @@ -257,7 +257,7 @@ bool Proxy::processHeader( Q_LONG &index, Q_LONG bytesRead ) "Got shoutcast header: '" << m_headerStr << "'" << endl;*/ // Handle redirection - QString loc( "Location: " ); + TQString loc( "Location: " ); int index = m_headerStr.find( loc ); if ( index >= 0 ) { @@ -276,31 +276,31 @@ bool Proxy::processHeader( Q_LONG &index, Q_LONG bytesRead ) if (m_headerStr.startsWith("ICY")) { - m_metaInt = m_headerStr.section( "icy-metaint:", 1, 1, QString::SectionCaseInsensitiveSeps ).section( "\r", 0, 0 ).toInt(); - m_bitRate = m_headerStr.section( "icy-br:", 1, 1, QString::SectionCaseInsensitiveSeps ).section( "\r", 0, 0 ); - m_streamName = m_headerStr.section( "icy-name:", 1, 1, QString::SectionCaseInsensitiveSeps ).section( "\r", 0, 0 ); - m_streamGenre = m_headerStr.section( "icy-genre:", 1, 1, QString::SectionCaseInsensitiveSeps ).section( "\r", 0, 0 ); - m_streamUrl = m_headerStr.section( "icy-url:", 1, 1, QString::SectionCaseInsensitiveSeps ).section( "\r", 0, 0 ); + m_metaInt = m_headerStr.section( "icy-metaint:", 1, 1, TQString::SectionCaseInsensitiveSeps ).section( "\r", 0, 0 ).toInt(); + m_bitRate = m_headerStr.section( "icy-br:", 1, 1, TQString::SectionCaseInsensitiveSeps ).section( "\r", 0, 0 ); + m_streamName = m_headerStr.section( "icy-name:", 1, 1, TQString::SectionCaseInsensitiveSeps ).section( "\r", 0, 0 ); + m_streamGenre = m_headerStr.section( "icy-genre:", 1, 1, TQString::SectionCaseInsensitiveSeps ).section( "\r", 0, 0 ); + m_streamUrl = m_headerStr.section( "icy-url:", 1, 1, TQString::SectionCaseInsensitiveSeps ).section( "\r", 0, 0 ); } else // not ShoutCast { - QString serverName = m_headerStr.section( "Server:", 1, 1, QString::SectionCaseInsensitiveSeps ).section( "\r", 0, 0 ); + TQString serverName = m_headerStr.section( "Server:", 1, 1, TQString::SectionCaseInsensitiveSeps ).section( "\r", 0, 0 ); kdDebug(66666) << k_funcinfo << "Server name: " << serverName << endl; if (serverName == "Icecast") { m_metaInt = 0; - m_streamName = m_headerStr.section( "ice-name:", 1, 1, QString::SectionCaseInsensitiveSeps ).section( "\r", 0, 0 ); - m_streamGenre = m_headerStr.section( "ice-genre:", 1, 1, QString::SectionCaseInsensitiveSeps ).section( "\r", 0, 0 ); - m_streamUrl = m_headerStr.section( "ice-url:", 1, 1, QString::SectionCaseInsensitiveSeps ).section( "\r", 0, 0 ); + m_streamName = m_headerStr.section( "ice-name:", 1, 1, TQString::SectionCaseInsensitiveSeps ).section( "\r", 0, 0 ); + m_streamGenre = m_headerStr.section( "ice-genre:", 1, 1, TQString::SectionCaseInsensitiveSeps ).section( "\r", 0, 0 ); + m_streamUrl = m_headerStr.section( "ice-url:", 1, 1, TQString::SectionCaseInsensitiveSeps ).section( "\r", 0, 0 ); } else if (serverName.startsWith("icecast/1.")) { m_metaInt = 0; - m_bitRate = m_headerStr.section( "x-audiocast-bitrate:", 1, 1, QString::SectionCaseInsensitiveSeps ).section( "\r", 0, 0 ); - m_streamName = m_headerStr.section( "x-audiocast-name:", 1, 1, QString::SectionCaseInsensitiveSeps ).section( "\r", 0, 0 ); - m_streamGenre = m_headerStr.section( "x-audiocast-genre:", 1, 1, QString::SectionCaseInsensitiveSeps ).section( "\r", 0, 0 ); - m_streamUrl = m_headerStr.section( "x-audiocast-url:", 1, 1, QString::SectionCaseInsensitiveSeps ).section( "\r", 0, 0 ); + m_bitRate = m_headerStr.section( "x-audiocast-bitrate:", 1, 1, TQString::SectionCaseInsensitiveSeps ).section( "\r", 0, 0 ); + m_streamName = m_headerStr.section( "x-audiocast-name:", 1, 1, TQString::SectionCaseInsensitiveSeps ).section( "\r", 0, 0 ); + m_streamGenre = m_headerStr.section( "x-audiocast-genre:", 1, 1, TQString::SectionCaseInsensitiveSeps ).section( "\r", 0, 0 ); + m_streamUrl = m_headerStr.section( "x-audiocast-url:", 1, 1, TQString::SectionCaseInsensitiveSeps ).section( "\r", 0, 0 ); } } @@ -316,8 +316,8 @@ bool Proxy::processHeader( Q_LONG &index, Q_LONG bytesRead ) return false; } - connect( &m_sockRemote, SIGNAL( connectionClosed() ), - this, SLOT( connectError() ) ); + connect( &m_sockRemote, TQT_SIGNAL( connectionClosed() ), + this, TQT_SLOT( connectError() ) ); return true; } } @@ -325,7 +325,7 @@ bool Proxy::processHeader( Q_LONG &index, Q_LONG bytesRead ) } -void Proxy::transmitData( const QString &data ) +void Proxy::transmitData( const TQString &data ) { /*kdDebug(66666) << k_funcinfo << " received new metadata: '" << data << "'" << endl;*/ @@ -339,8 +339,8 @@ void Proxy::transmitData( const QString &data ) emit metaData( m_streamName, m_streamGenre, m_streamUrl, m_bitRate, - extractStr(data, QString::fromLatin1("StreamTitle")), - extractStr(data, QString::fromLatin1("StreamUrl"))); + extractStr(data, TQString::fromLatin1("StreamTitle")), + extractStr(data, TQString::fromLatin1("StreamUrl"))); } @@ -358,12 +358,12 @@ void Proxy::error() } -QString Proxy::extractStr( const QString &str, const QString &key ) +TQString Proxy::extractStr( const TQString &str, const TQString &key ) { int index = str.find( key, 0, true ); if ( index == -1 ) { - return QString::null; + return TQString::null; } else { diff --git a/noatun/library/titleproxy.h b/noatun/library/titleproxy.h index 058943d6..541f3190 100644 --- a/noatun/library/titleproxy.h +++ b/noatun/library/titleproxy.h @@ -20,9 +20,9 @@ email : #include //stack allocated -#include -#include //baseclass -#include //stack allocated +#include +#include //baseclass +#include //stack allocated class QString; @@ -58,12 +58,12 @@ namespace TitleProxy signals: void metaData( - const QString &streamName, - const QString &streamGenre, - const QString &streamUrl, - const QString &streamBitrate, - const QString &trackTitle, - const QString &trackUrl); + const TQString &streamName, + const TQString &streamGenre, + const TQString &streamUrl, + const TQString &streamBitrate, + const TQString &trackTitle, + const TQString &trackUrl); void proxyError(); private slots: @@ -75,9 +75,9 @@ namespace TitleProxy private: bool processHeader( Q_LONG &index, Q_LONG bytesRead ); - void transmitData( const QString &data ); + void transmitData( const TQString &data ); void error(); - QString extractStr( const QString &str, const QString &key ); + TQString extractStr( const TQString &str, const TQString &key ); //ATTRIBUTES: KURL m_url; @@ -86,25 +86,25 @@ namespace TitleProxy bool m_connectSuccess; int m_metaInt; - QString m_bitRate; + TQString m_bitRate; int m_byteCount; uint m_metaLen; - QString m_metaData; + TQString m_metaData; bool m_headerFinished; - QString m_headerStr; + TQString m_headerStr; int m_usedPort; - QString m_lastMetadata; + TQString m_lastMetadata; bool m_icyMode; - QString m_streamName; - QString m_streamGenre; - QString m_streamUrl; + TQString m_streamName; + TQString m_streamGenre; + TQString m_streamUrl; char *m_pBuf; - QSocket m_sockRemote; - QSocket m_sockProxy; + TQSocket m_sockRemote; + TQSocket m_sockProxy; }; @@ -113,8 +113,8 @@ namespace TitleProxy Q_OBJECT public: - Server( Q_UINT16 port, QObject* parent ) - : QServerSocket( port, 1, parent, "TitleProxyServer" ) {}; + Server( Q_UINT16 port, TQObject* parent ) + : TQServerSocket( port, 1, parent, "TitleProxyServer" ) {}; signals: void connected( int socket ); diff --git a/noatun/library/vequalizer.cpp b/noatun/library/vequalizer.cpp index 4b131e8a..c081d84b 100644 --- a/noatun/library/vequalizer.cpp +++ b/noatun/library/vequalizer.cpp @@ -56,9 +56,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include @@ -155,13 +155,13 @@ int VBand::center() const return (d->start + d->end)/2; } -static QString formatFreq(int f, bool withHz) +static TQString formatFreq(int f, bool withHz) { - QString format; + TQString format; if (f<991) - format=QString::number(f); + format=TQString::number(f); else - format=QString::number((int)((f+500)/1000.0))+"k"; + format=TQString::number((int)((f+500)/1000.0))+"k"; if (withHz) format+="Hz"; @@ -169,17 +169,17 @@ static QString formatFreq(int f, bool withHz) return format; } -QString VBand::formatStart(bool withHz) const +TQString VBand::formatStart(bool withHz) const { return formatFreq(d->start, withHz); } -QString VBand::formatEnd(bool withHz) const +TQString VBand::formatEnd(bool withHz) const { return formatFreq(d->end, withHz); } -QString VBand::format(bool withHz) const +TQString VBand::format(bool withHz) const { return formatFreq(center(), withHz); } @@ -212,7 +212,7 @@ int VInterpolation::bands() const void VInterpolation::getFrequencies(int num, int *low, int *high) const { - QValueList fs = VEqualizer::frequencies(bands()); + TQValueList fs = VEqualizer::frequencies(bands()); if (num == 0) *low = 1; else *low = fs[num-1]+1; @@ -249,7 +249,7 @@ void VInterpolation::setLevel(int index, int level) } int realbands = EQ->bands(); - QValueList values; + TQValueList values; for (int i=0; i < realbands; ++i) { // i @@ -360,10 +360,10 @@ int VEqualizer::minBands() const } -QValueList VEqualizer::frequencies(int _num) +TQValueList VEqualizer::frequencies(int _num) { #if 0 - QValueList fs; + TQValueList fs; fs += 108; fs += 217; fs += 810; @@ -389,7 +389,7 @@ QValueList VEqualizer::frequencies(int _num) double vend = double(end()); const double base = ::pow(10.0, ::log10(vend-vstart)/num); - QValueList fs; + TQValueList fs; for (double i=1.0; i <= num; i++) { @@ -416,11 +416,11 @@ void VEqualizer::setBands(int num, bool interpolate) if (num == bands()) return; - QValueList fs = VEqualizer::frequencies(num); + TQValueList fs = VEqualizer::frequencies(num); std::vector modified; int bstart=0; - for (QValueList::Iterator i(fs.begin()); i != fs.end(); ++i) + for (TQValueList::Iterator i(fs.begin()); i != fs.end(); ++i) { Private::BandInfo info; info.start = bstart+1; @@ -514,11 +514,11 @@ void VEqualizer::setLevel(int index, int level) emit modified(); } -void VEqualizer::setLevels(const QValueList &levels) +void VEqualizer::setLevels(const TQValueList &levels) { int index=0; for ( - QValueList::ConstIterator i(levels.begin()); + TQValueList::ConstIterator i(levels.begin()); i != levels.end(); ++i ) { @@ -572,7 +572,7 @@ void VEqualizer::update(bool full) -bool VEqualizer::save(const KURL &filename, const QString &friendly) const +bool VEqualizer::save(const KURL &filename, const TQString &friendly) const { Noatun::KSaver saver(filename); if(!saver.open()) return false; @@ -585,26 +585,26 @@ bool VEqualizer::save(const KURL &filename, const QString &friendly) const bool VEqualizer::load(const KURL &filename) { - QString dest; + TQString dest; if(KIO::NetAccess::download(filename, dest, 0L)) { - QFile file(dest); + TQFile file(dest); if (!file.open(IO_ReadOnly)) return false; - QTextStream t(&file); - QString str = t.read(); + TQTextStream t(&file); + TQString str = t.read(); fromString(str); return true; } return false; } -QString VEqualizer::toString(const QString &name) const +TQString VEqualizer::toString(const TQString &name) const { - QDomDocument doc("noatunequalizer"); - doc.setContent(QString("")); - QDomElement docElem = doc.documentElement(); + TQDomDocument doc("noatunequalizer"); + doc.setContent(TQString("")); + TQDomElement docElem = doc.documentElement(); { docElem.setAttribute("level", preamp()); @@ -616,7 +616,7 @@ QString VEqualizer::toString(const QString &name) const for (int i=0; i < bandc; ++i) { VBand band = const_cast(this)->operator[](i); - QDomElement elem = doc.createElement("band"); + TQDomElement elem = doc.createElement("band"); elem.setAttribute("start", band.start()); elem.setAttribute("end", band.end()); elem.setAttribute("level", band.level()); @@ -627,22 +627,22 @@ QString VEqualizer::toString(const QString &name) const return doc.toString(); } -bool VEqualizer::fromString(const QString &str) +bool VEqualizer::fromString(const TQString &str) { - QDomDocument doc("noatunequalizer"); + TQDomDocument doc("noatunequalizer"); if (!doc.setContent(str)) return false; - QDomElement docElem = doc.documentElement(); + TQDomElement docElem = doc.documentElement(); if (docElem.tagName()!="noatunequalizer") return false; setPreamp(docElem.attribute("level", "0").toInt()); std::vector modified; - for (QDomNode n = docElem.firstChild(); !n.isNull(); n = n.nextSibling()) + for (TQDomNode n = docElem.firstChild(); !n.isNull(); n = n.nextSibling()) { - QDomElement e = n.toElement(); + TQDomElement e = n.toElement(); if(e.isNull()) continue; if (e.tagName().lower() != "band") continue; @@ -662,34 +662,34 @@ bool VEqualizer::fromString(const QString &str) return true; } -static QString makePresetFile() +static TQString makePresetFile() { - QString basedir=kapp->dirs()->localkdedir()+"/share/apps/noatun/eq.preset/"; + TQString basedir=kapp->dirs()->localkdedir()+"/share/apps/noatun/eq.preset/"; // now append a filename that doesn't exist KStandardDirs::makeDir(basedir); - QString fullpath; + TQString fullpath; int num=0; do { if (num) - fullpath=basedir+"preset."+QString::number(num); + fullpath=basedir+"preset."+TQString::number(num); else fullpath=basedir+"preset"; num++; } - while (QFile(fullpath).exists()); + while (TQFile(fullpath).exists()); return fullpath; } -VPreset VEqualizer::createPreset(const QString &name, bool smart) +VPreset VEqualizer::createPreset(const TQString &name, bool smart) { if (presetExists(name) && !smart) return VPreset(); - QString nameReal=name; + TQString nameReal=name; { int number=1; while (presetExists(nameReal)) { - nameReal=name+" ("+QString::number(number)+')'; + nameReal=name+" ("+TQString::number(number)+')'; number++; } } @@ -700,7 +700,7 @@ VPreset VEqualizer::createPreset(const QString &name, bool smart) save(preset.file(), nameReal); KConfig *config=kapp->config(); config->setGroup("Equalizer"); - QStringList list = config->readListEntry("presets"); + TQStringList list = config->readListEntry("presets"); list += preset.file(); config->writeEntry("presets", list); config->sync(); @@ -710,12 +710,12 @@ VPreset VEqualizer::createPreset(const QString &name, bool smart) } -QValueList VEqualizer::presets() const +TQValueList VEqualizer::presets() const { KConfig *conf=KGlobal::config(); conf->setGroup("Equalizer"); - QStringList list; + TQStringList list; if (conf->hasKey("presets")) { list=conf->readListEntry("presets"); @@ -727,17 +727,17 @@ QValueList VEqualizer::presets() const conf->sync(); } - QValueList presets; + TQValueList presets; - for (QStringList::Iterator i = list.begin(); i!=list.end(); ++i) + for (TQStringList::Iterator i = list.begin(); i!=list.end(); ++i) { - QFile file(*i); + TQFile file(*i); if (!file.open(IO_ReadOnly)) continue; - QDomDocument doc("noatunequalizer"); + TQDomDocument doc("noatunequalizer"); if (!doc.setContent(&file)) continue; - QDomElement docElem = doc.documentElement(); + TQDomElement docElem = doc.documentElement(); if (docElem.tagName()!="noatunequalizer") continue; presets.append(VPreset(*i)); @@ -745,11 +745,11 @@ QValueList VEqualizer::presets() const return presets; } -VPreset VEqualizer::presetByName(const QString &name) +VPreset VEqualizer::presetByName(const TQString &name) { - QValueList pr = presets(); + TQValueList pr = presets(); for ( - QValueList::Iterator i(pr.begin()); + TQValueList::Iterator i(pr.begin()); i != pr.end(); ++i ) { @@ -759,21 +759,21 @@ VPreset VEqualizer::presetByName(const QString &name) return VPreset(); } -VPreset VEqualizer::presetByFile(const QString &file) +VPreset VEqualizer::presetByFile(const TQString &file) { KConfig *conf=KGlobal::config(); conf->setGroup("Equalizer"); - QStringList list=kapp->config()->readListEntry("presets"); + TQStringList list=kapp->config()->readListEntry("presets"); if (list.contains(file)) return VPreset(file); return VPreset(); } -bool VEqualizer::presetExists(const QString &name) const +bool VEqualizer::presetExists(const TQString &name) const { - QValueList list=presets(); + TQValueList list=presets(); for ( - QValueList::Iterator i(list.begin()); + TQValueList::Iterator i(list.begin()); i != list.end(); ++i ) { @@ -787,12 +787,12 @@ bool VEqualizer::presetExists(const QString &name) const struct VPreset::Private { - QString file; + TQString file; }; -VPreset::VPreset(const QString &file) +VPreset::VPreset(const TQString &file) { d = new Private; d->file = file; @@ -827,18 +827,18 @@ VPreset & VPreset::operator=(const VPreset ©) return *this; } -QString VPreset::name() const +TQString VPreset::name() const { - QFile file(d->file); + TQFile file(d->file); if (!file.open(IO_ReadOnly)) return 0; - QDomDocument doc("noatunequalizer"); + TQDomDocument doc("noatunequalizer"); if (!doc.setContent(&file)) return 0; - QDomElement docElem = doc.documentElement(); + TQDomElement docElem = doc.documentElement(); if (docElem.tagName()!="noatunequalizer") return 0; bool standard=docElem.attribute("default", "0")=="0"; - QString n=docElem.attribute("name", 0); + TQString n=docElem.attribute("name", 0); { // All the translations for the presets # ifdef I18N_STUFF @@ -857,15 +857,15 @@ QString VPreset::name() const return n; } -bool VPreset::setName(const QString &name) +bool VPreset::setName(const TQString &name) { - QFile file(d->file); + TQFile file(d->file); if (!file.open(IO_ReadOnly)) return false; - QDomDocument doc("noatunequalizer"); + TQDomDocument doc("noatunequalizer"); if (!doc.setContent(&file)) return false; - QDomElement docElem = doc.documentElement(); + TQDomElement docElem = doc.documentElement(); if (docElem.tagName()!="noatunequalizer") return false; if (docElem.attribute("name") == name) return true; @@ -876,7 +876,7 @@ bool VPreset::setName(const QString &name) if (!file.open(IO_ReadWrite | IO_Truncate)) return false; - QTextStream s(&file); + TQTextStream s(&file); s << doc.toString(); file.close(); @@ -904,7 +904,7 @@ void VPreset::load() const EQ->load(url); } -QString VPreset::file() const +TQString VPreset::file() const { return d->file; } @@ -913,7 +913,7 @@ void VPreset::remove() { KConfig *config=kapp->config(); config->setGroup("Equalizer"); - QStringList items=config->readListEntry("presets"); + TQStringList items=config->readListEntry("presets"); items.remove(file()); config->writeEntry("presets", items); config->sync(); @@ -922,7 +922,7 @@ void VPreset::remove() if (file().find(kapp->dirs()->localkdedir())==0) { - QFile f(file()); + TQFile f(file()); f.remove(); } d->file = ""; diff --git a/noatun/library/video.cpp b/noatun/library/video.cpp index c259d4ba..94646315 100644 --- a/noatun/library/video.cpp +++ b/noatun/library/video.cpp @@ -8,14 +8,14 @@ #include #include -#include +#include #include #include #include "globalvideo.h" // sorry :) -QPtrList VideoFrame::frames; +TQPtrList VideoFrame::frames; VideoFrame *VideoFrame::whose=0; @@ -24,21 +24,21 @@ struct VideoFrame::Private }; -VideoFrame::VideoFrame(KXMLGUIClient *clientParent, QWidget *parent, const char*name, WFlags f) +VideoFrame::VideoFrame(KXMLGUIClient *clientParent, TQWidget *parent, const char*name, WFlags f) : KVideoWidget(clientParent, parent, name, f) { d = new Private; - connect(napp->player(), SIGNAL(newSong()), SLOT(changed())); - connect(napp->player(), SIGNAL(stopped()), SLOT(stopped())); + connect(napp->player(), TQT_SIGNAL(newSong()), TQT_SLOT(changed())); + connect(napp->player(), TQT_SIGNAL(stopped()), TQT_SLOT(stopped())); frames.append(this); } -VideoFrame::VideoFrame(QWidget *parent, const char *name, WFlags f) +VideoFrame::VideoFrame(TQWidget *parent, const char *name, WFlags f) : KVideoWidget(parent, name, f) { d = new Private; - connect(napp->player(), SIGNAL(newSong()), SLOT(changed())); - connect(napp->player(), SIGNAL(stopped()), SLOT(stopped())); + connect(napp->player(), TQT_SIGNAL(newSong()), TQT_SLOT(changed())); + connect(napp->player(), TQT_SIGNAL(stopped()), TQT_SLOT(stopped())); frames.append(this); } @@ -62,9 +62,9 @@ VideoFrame *VideoFrame::playing() return whose; } -QPopupMenu *VideoFrame::popupMenu(QWidget *parent) +TQPopupMenu *VideoFrame::popupMenu(TQWidget *parent) { - QPopupMenu *view = new QPopupMenu(parent); + TQPopupMenu *view = new TQPopupMenu(parent); action( "half_size" )->plug( view ); action( "normal_size" )->plug( view ); action( "double_size" )->plug( view ); @@ -110,14 +110,14 @@ void VideoFrame::stopped() } } -#include +#include GlobalVideo::GlobalVideo() - : QWidget( 0, 0, WType_TopLevel | WStyle_Customize | WStyle_DialogBorder | WStyle_Title ) + : TQWidget( 0, 0, WType_TopLevel | WStyle_Customize | WStyle_DialogBorder | WStyle_Title ) { setCaption(i18n("Video - Noatun")); - (new QVBoxLayout(this))->setAutoAdd(true); + (new TQVBoxLayout(this))->setAutoAdd(true); video = new VideoFrame(this); menu = video->popupMenu(this); @@ -126,9 +126,9 @@ GlobalVideo::GlobalVideo() // video->setMinimumSize(101,35); video->setMinimumSize(128,96); - connect(video, SIGNAL(acquired()), SLOT(appear())); - connect(video, SIGNAL(lost()), SLOT(hide())); - connect(video, SIGNAL(adaptSize(int,int)), this, SLOT(slotAdaptSize(int,int))); + connect(video, TQT_SIGNAL(acquired()), TQT_SLOT(appear())); + connect(video, TQT_SIGNAL(lost()), TQT_SLOT(hide())); + connect(video, TQT_SIGNAL(adaptSize(int,int)), this, TQT_SLOT(slotAdaptSize(int,int))); video->setNormalSize(); video->give(); @@ -141,15 +141,15 @@ void GlobalVideo::slotAdaptSize(int w, int h) void GlobalVideo::appear() { - QWidget::show(); + TQWidget::show(); } void GlobalVideo::hide() { - QWidget::hide(); + TQWidget::hide(); } -void GlobalVideo::mouseReleaseEvent(QMouseEvent *e) +void GlobalVideo::mouseReleaseEvent(TQMouseEvent *e) { if (e->button() == RightButton) { diff --git a/noatun/modules/artseffects/extrastereogui_impl.cc b/noatun/modules/artseffects/extrastereogui_impl.cc index 5952c80e..b5a19bf0 100644 --- a/noatun/modules/artseffects/extrastereogui_impl.cc +++ b/noatun/modules/artseffects/extrastereogui_impl.cc @@ -1,13 +1,13 @@ -#include -#include +#include +#include #include "extrastereogui_impl.h" namespace Arts { -ExtraStereoGUI_impl::ExtraStereoGUI_impl() : QWidget(0) +ExtraStereoGUI_impl::ExtraStereoGUI_impl() : TQWidget(0) { - (new QHBoxLayout(this))->setAutoAdd(true); - mSlider=new QSlider(0,100,10, 0, Horizontal, this); + (new TQHBoxLayout(this))->setAutoAdd(true); + mSlider=new TQSlider(0,100,10, 0, Horizontal, this); mSlider->show(); show(); } diff --git a/noatun/modules/artseffects/extrastereogui_impl.h b/noatun/modules/artseffects/extrastereogui_impl.h index 56104ae8..d807644a 100644 --- a/noatun/modules/artseffects/extrastereogui_impl.h +++ b/noatun/modules/artseffects/extrastereogui_impl.h @@ -1,12 +1,12 @@ #include "artseffects.h" #include "stdsynthmodule.h" -#include +#include class QSlider; namespace Arts { -class ExtraStereoGUI_impl : public QWidget, virtual public ExtraStereoGUI_skel +class ExtraStereoGUI_impl : public TQWidget, virtual public ExtraStereoGUI_skel { public: ExtraStereo effect; @@ -19,7 +19,7 @@ public slots: void changeSlider(int); private: - QSlider *mSlider; + TQSlider *mSlider; }; diff --git a/noatun/modules/dcopiface/dcopiface.cpp b/noatun/modules/dcopiface/dcopiface.cpp index 93ef6160..aef6c58f 100644 --- a/noatun/modules/dcopiface/dcopiface.cpp +++ b/noatun/modules/dcopiface/dcopiface.cpp @@ -19,12 +19,12 @@ extern "C" NIF::NIF() : Plugin(), DCOPObject("Noatun") { mLastVolume = 0; -// connect(napp->player(), SIGNAL(newSong()), SLOT(newSongPlaying())); +// connect(napp->player(), TQT_SIGNAL(newSong()), TQT_SLOT(newSongPlaying())); } NIF::~NIF() { - kapp->dcopClient()->emitDCOPSignal("exiting()", QByteArray()); + kapp->dcopClient()->emitDCOPSignal("exiting()", TQByteArray()); } void NIF::toggleListView() @@ -131,36 +131,36 @@ int NIF::state() return 0; // default to stopped } -QString NIF::lengthString() +TQString NIF::lengthString() { return napp->player()->current() ? napp->player()->current().lengthString() : ""; } -QString NIF::timeString() +TQString NIF::timeString() { return napp->player()->lengthString(); } -QString NIF::title() +TQString NIF::title() { return napp->player()->current() ? napp->player()->current().title() : ""; } -void NIF::setCurrentProperty(const QString &key, const QString &value) +void NIF::setCurrentProperty(const TQString &key, const TQString &value) { if (!napp->player()->current()) return; napp->player()->current().setProperty(key, value); } -QString NIF::currentProperty(const QString &key) +TQString NIF::currentProperty(const TQString &key) { if (!napp->player()->current()) return ""; return napp->player()->current().property(key); } -void NIF::clearCurrentProperty(const QString &key) +void NIF::clearCurrentProperty(const TQString &key) { if (!napp->player()->current()) return; @@ -168,41 +168,41 @@ void NIF::clearCurrentProperty(const QString &key) } -QCString NIF::visStack() +TQCString NIF::visStack() { return napp->player()->engine()->visualizationStack()->toString().c_str(); } -QCString NIF::session() +TQCString NIF::session() { return napp->player()->engine()->session()->toString().c_str(); } // adds one file to the playlist -void NIF::addFile(const QString& f, bool autoplay) +void NIF::addFile(const TQString& f, bool autoplay) { napp->player()->openFile(f, false, autoplay); } // Adds a bunch of files to the playlist -void NIF::addFile(const QStringList &f, bool autoplay) +void NIF::addFile(const TQStringList &f, bool autoplay) { - for (QStringList::ConstIterator it = f.begin(); it != f.end(); ++it ) + for (TQStringList::ConstIterator it = f.begin(); it != f.end(); ++it ) napp->player()->openFile(*it, false, autoplay); } -void NIF::loadPlugin(const QString &spec) +void NIF::loadPlugin(const TQString &spec) { napp->libraryLoader()->add(spec); } -QStringList NIF::availablePlugins() { - QStringList available_spec_files; - QValueList available; +TQStringList NIF::availablePlugins() { + TQStringList available_spec_files; + TQValueList available; available = napp->libraryLoader()->available(); - QValueList::iterator it; + TQValueList::iterator it; for (it = available.begin();it != available.end();it++) { available_spec_files += (*it).specfile; } @@ -210,13 +210,13 @@ QStringList NIF::availablePlugins() { return available_spec_files; } -QStringList NIF::loadedPlugins() { - QStringList loaded_spec_files; - QValueList loaded; +TQStringList NIF::loadedPlugins() { + TQStringList loaded_spec_files; + TQValueList loaded; loaded = napp->libraryLoader()->loaded(); - QValueList::iterator it; + TQValueList::iterator it; for (it = loaded.begin();it != loaded.end();it++) { loaded_spec_files += (*it).specfile; } @@ -224,24 +224,24 @@ QStringList NIF::loadedPlugins() { return loaded_spec_files; } -bool NIF::unloadPlugin(const QString &spec) +bool NIF::unloadPlugin(const TQString &spec) { return napp->libraryLoader()->remove(spec); } -QStringList NIF::mimeTypes() +TQStringList NIF::mimeTypes() { return napp->mimeTypes(); } -QCString NIF::version() +TQCString NIF::version() { return napp->version(); } void NIF::newSongPlaying() { - kapp->dcopClient()->emitDCOPSignal("newFile()", QByteArray()); + kapp->dcopClient()->emitDCOPSignal("newFile()", TQByteArray()); } void NIF::clear() diff --git a/noatun/modules/dcopiface/dcopiface.h b/noatun/modules/dcopiface/dcopiface.h index 4b9fe5e7..cd58a228 100644 --- a/noatun/modules/dcopiface/dcopiface.h +++ b/noatun/modules/dcopiface/dcopiface.h @@ -53,37 +53,37 @@ k_dcop: **/ int state(); - QString lengthString(); - QString timeString(); + TQString lengthString(); + TQString timeString(); - QString title(); + TQString title(); /** * set a property for the current song **/ - void setCurrentProperty(const QString &key, const QString &value); + void setCurrentProperty(const TQString &key, const TQString &value); /** * get a property from the current song **/ - QString currentProperty(const QString &key); + TQString currentProperty(const TQString &key); /** * clear a property from the current song **/ - void clearCurrentProperty(const QString &key); + void clearCurrentProperty(const TQString &key); - QCString visStack(); - QCString session(); + TQCString visStack(); + TQCString session(); - void addFile(const QString& f, bool autoplay); - void addFile(const QStringList &f, bool autoplay); + void addFile(const TQString& f, bool autoplay); + void addFile(const TQStringList &f, bool autoplay); - void loadPlugin(const QString &specFile); - QStringList availablePlugins(); - QStringList loadedPlugins(); - bool unloadPlugin(const QString &specFile); + void loadPlugin(const TQString &specFile); + TQStringList availablePlugins(); + TQStringList loadedPlugins(); + bool unloadPlugin(const TQString &specFile); - QStringList mimeTypes(); - QCString version(); + TQStringList mimeTypes(); + TQCString version(); /** * clear the playlist diff --git a/noatun/modules/excellent/userinterface.cpp b/noatun/modules/excellent/userinterface.cpp index 7f218e98..dac6fbb3 100644 --- a/noatun/modules/excellent/userinterface.cpp +++ b/noatun/modules/excellent/userinterface.cpp @@ -51,15 +51,15 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include Excellent::Excellent() : KMainWindow(0, "NoatunExcellent") @@ -67,12 +67,12 @@ Excellent::Excellent() { setAcceptDrops(true); - KStdAction::quit(napp, SLOT(quit()), actionCollection()); - KStdAction::open(napp, SLOT(fileOpen()), actionCollection()); + KStdAction::quit(napp, TQT_SLOT(quit()), actionCollection()); + KStdAction::open(napp, TQT_SLOT(fileOpen()), actionCollection()); setStandardToolBarMenuEnabled(true); - menubarAction = KStdAction::showMenubar(this, SLOT(showMenubar()), actionCollection()); - KStdAction::preferences(napp, SLOT(preferences()), actionCollection()); + menubarAction = KStdAction::showMenubar(this, TQT_SLOT(showMenubar()), actionCollection()); + KStdAction::preferences(napp, TQT_SLOT(preferences()), actionCollection()); // buttons NoatunStdAction::back(actionCollection(), "back"); @@ -82,7 +82,7 @@ Excellent::Excellent() NoatunStdAction::forward(actionCollection(), "forward"); NoatunStdAction::playlist(actionCollection(), "show_playlist"); - volumeAction = new KToggleAction(i18n("Show &Volume Control"), 0, this, SLOT(showVolumeControl()), actionCollection(), "show_volumecontrol"); + volumeAction = new KToggleAction(i18n("Show &Volume Control"), 0, this, TQT_SLOT(showVolumeControl()), actionCollection(), "show_volumecontrol"); volumeAction->setCheckedState(i18n("Hide &Volume Control")); NoatunStdAction::effects(actionCollection(), "effects"); NoatunStdAction::equalizer(actionCollection(), "equalizer"); @@ -95,17 +95,17 @@ Excellent::Excellent() toolBar("mainToolBar")->hide(); // Who needs Qt Designer? - mainFrame = new QHBox(this); + mainFrame = new TQHBox(this); mainFrame->setSpacing(KDialog::spacingHint()); mainFrame->setMargin(0); slider = new L33tSlider(0, 1000, 10, 0, L33tSlider::Horizontal, mainFrame); - slider->setTickmarks(QSlider::NoMarks); + slider->setTickmarks(TQSlider::NoMarks); - elapsed = new QLabel(mainFrame); - QFont labelFont = elapsed->font(); + elapsed = new TQLabel(mainFrame); + TQFont labelFont = elapsed->font(); labelFont.setPointSize(24); labelFont.setBold(true); - QFontMetrics labelFontMetrics = labelFont; + TQFontMetrics labelFontMetrics = labelFont; elapsed->setFont(labelFont); elapsed->setAlignment(AlignCenter | AlignVCenter | ExpandTabs); elapsed->setText("--:--"); @@ -117,7 +117,7 @@ Excellent::Excellent() setCentralWidget(mainFrame); - total = new QLabel(statusBar()); + total = new TQLabel(statusBar()); labelFont = total->font(); labelFont.setBold(true); total->setFont(labelFont); @@ -129,24 +129,24 @@ Excellent::Excellent() statusBar()->addWidget(total, 0, true); statusBar()->show(); - connect( napp, SIGNAL(hideYourself()), this, SLOT(hide()) ); - connect( napp, SIGNAL(showYourself()), this, SLOT(show()) ); + connect( napp, TQT_SIGNAL(hideYourself()), this, TQT_SLOT(hide()) ); + connect( napp, TQT_SIGNAL(showYourself()), this, TQT_SLOT(show()) ); - connect(napp->player(), SIGNAL(playing()), this, SLOT(slotPlaying())); - connect(napp->player(), SIGNAL(stopped()), this, SLOT(slotStopped())); - connect(napp->player(), SIGNAL(paused()), this, SLOT(slotPaused())); + connect(napp->player(), TQT_SIGNAL(playing()), this, TQT_SLOT(slotPlaying())); + connect(napp->player(), TQT_SIGNAL(stopped()), this, TQT_SLOT(slotStopped())); + connect(napp->player(), TQT_SIGNAL(paused()), this, TQT_SLOT(slotPaused())); napp->player()->handleButtons(); - connect(napp->player(), SIGNAL(timeout()), this, SLOT(slotTimeout())); - connect(napp->player(), SIGNAL(loopTypeChange(int)), this, SLOT(slotLoopTypeChanged(int))); + connect(napp->player(), TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimeout())); + connect(napp->player(), TQT_SIGNAL(loopTypeChange(int)), this, TQT_SLOT(slotLoopTypeChanged(int))); /* This skipToWrapper is needed to pass milliseconds to Player() as everybody * below the GUI is based on milliseconds instead of some unprecise thingy * like seconds or mille */ - connect(slider, SIGNAL(userChanged(int)), this, SLOT(skipToWrapper(int))); - connect(this, SIGNAL(skipTo(int)), napp->player(), SLOT(skipTo(int))); + connect(slider, TQT_SIGNAL(userChanged(int)), this, TQT_SLOT(skipToWrapper(int))); + connect(this, TQT_SIGNAL(skipTo(int)), napp->player(), TQT_SLOT(skipTo(int))); - connect(slider, SIGNAL(sliderMoved(int)), SLOT(sliderMoved(int))); + connect(slider, TQT_SIGNAL(sliderMoved(int)), TQT_SLOT(sliderMoved(int))); setCaption("Noatun"); setIcon(SmallIcon("noatun")); @@ -186,7 +186,7 @@ Excellent::Excellent() break; } - for (QPtrListIterator i(*children()); i.current(); ++i) + for (TQPtrListIterator i(*children()); i.current(); ++i) (*i)->installEventFilter(this); } @@ -203,7 +203,7 @@ Excellent::~Excellent() config.sync(); } -void Excellent::showEvent(QShowEvent *e) +void Excellent::showEvent(TQShowEvent *e) { KConfig *config = KGlobal::config(); config->setGroup("excellent"); @@ -213,7 +213,7 @@ void Excellent::showEvent(QShowEvent *e) KMainWindow::showEvent(e); } -void Excellent::hideEvent(QHideEvent *e) +void Excellent::hideEvent(TQHideEvent *e) { KConfig *config = KGlobal::config(); config->setGroup("excellent"); @@ -223,18 +223,18 @@ void Excellent::hideEvent(QHideEvent *e) KMainWindow::hideEvent(e); } -void Excellent::closeEvent(QCloseEvent *) +void Excellent::closeEvent(TQCloseEvent *) { unload(); } -void Excellent::dragEnterEvent(QDragEnterEvent *event) +void Excellent::dragEnterEvent(TQDragEnterEvent *event) { // accept uri drops only event->accept(KURLDrag::canDecode(event)); } -void Excellent::dropEvent(QDropEvent *event) +void Excellent::dropEvent(TQDropEvent *event) { KURL::List uri; if (KURLDrag::decode(event, uri)) @@ -244,17 +244,17 @@ void Excellent::dropEvent(QDropEvent *event) } } -bool Excellent::eventFilter(QObject *o, QEvent *e) +bool Excellent::eventFilter(TQObject *o, TQEvent *e) { - if (e->type() == QEvent::Wheel) + if (e->type() == TQEvent::Wheel) { - wheelEvent(static_cast(e)); + wheelEvent(static_cast(e)); return true; } - return QWidget::eventFilter(o, e); + return TQWidget::eventFilter(o, e); } -void Excellent::wheelEvent(QWheelEvent *e) +void Excellent::wheelEvent(TQWheelEvent *e) { int delta=e->delta(); napp->player()->setVolume(napp->player()->volume() + delta/120*2); @@ -335,7 +335,7 @@ void Excellent::showMenubar(void) } else { - KMessageBox::information(this, i18n("Press %1 to show the menubar.").arg(menubarAction->shortcut().toString()), QString::null, "Hide Menu warning"); + KMessageBox::information(this, i18n("Press %1 to show the menubar.").arg(menubarAction->shortcut().toString()), TQString::null, "Hide Menu warning"); menuBar()->hide(); } } @@ -354,7 +354,7 @@ void Excellent::changeStatusbar(void) statusBar()->message(napp->player()->current().title()); } -void Excellent::handleLengthString(const QString &text) +void Excellent::handleLengthString(const TQString &text) { if(text.right(5) == "00:00" && text.left(5) == "00:00") { @@ -364,7 +364,7 @@ void Excellent::handleLengthString(const QString &text) else { // Split the length string in to "current" and "elapsed" - QStringList tokens = QStringList::split("/", text); + TQStringList tokens = TQStringList::split("/", text); elapsed->setText(tokens[0]); total->setText(tokens[1]); @@ -376,8 +376,8 @@ void Excellent::growVolumeControl(void) volumeSlider = new L33tSlider(0, 100, 10, 0, Vertical, mainFrame); volumeSlider->setValue(100 - napp->player()->volume()); volumeSlider->show(); - connect(volumeSlider, SIGNAL(sliderMoved(int)), SLOT(changeVolume(int))); - connect(volumeSlider, SIGNAL(userChanged(int)), SLOT(changeVolume(int))); + connect(volumeSlider, TQT_SIGNAL(sliderMoved(int)), TQT_SLOT(changeVolume(int))); + connect(volumeSlider, TQT_SIGNAL(userChanged(int)), TQT_SLOT(changeVolume(int))); } void Excellent::shrinkVolumeControl(void) diff --git a/noatun/modules/excellent/userinterface.h b/noatun/modules/excellent/userinterface.h index 588db6e4..7b30bd93 100644 --- a/noatun/modules/excellent/userinterface.h +++ b/noatun/modules/excellent/userinterface.h @@ -54,16 +54,16 @@ Q_OBJECT public: Excellent(); virtual ~Excellent(); - void load(const QString& url); + void load(const TQString& url); protected: - virtual void showEvent(QShowEvent *); - virtual void hideEvent(QHideEvent *); - virtual void closeEvent(QCloseEvent *); - virtual void dragEnterEvent(QDragEnterEvent *); - virtual void dropEvent(QDropEvent *); - void wheelEvent(QWheelEvent *e); - bool eventFilter(QObject *o, QEvent *e); + virtual void showEvent(TQShowEvent *); + virtual void hideEvent(TQHideEvent *); + virtual void closeEvent(TQCloseEvent *); + virtual void dragEnterEvent(TQDragEnterEvent *); + virtual void dropEvent(TQDropEvent *); + void wheelEvent(TQWheelEvent *e); + bool eventFilter(TQObject *o, TQEvent *e); public slots: void slotPlaying(); @@ -85,17 +85,17 @@ private slots: void changeStatusbar(void); void changeVolume(int); - void handleLengthString(const QString &text); + void handleLengthString(const TQString &text); private: void growVolumeControl(void); void shrinkVolumeControl(void); - QHBox *mainFrame; + TQHBox *mainFrame; KToggleAction *volumeAction, *menubarAction; L33tSlider *volumeSlider, *slider; - QLabel *elapsed, *total; + TQLabel *elapsed, *total; }; #endif diff --git a/noatun/modules/htmlexport/htmlexport.cpp b/noatun/modules/htmlexport/htmlexport.cpp index dc48fd8f..29d00935 100644 --- a/noatun/modules/htmlexport/htmlexport.cpp +++ b/noatun/modules/htmlexport/htmlexport.cpp @@ -1,6 +1,6 @@ #include -#include -#include +#include +#include #include #include #include "htmlexport.h" @@ -13,12 +13,12 @@ extern "C" } } -HTMLExport::HTMLExport(): QObject(0, "HTMLExport"), Plugin() +HTMLExport::HTMLExport(): TQObject(0, "HTMLExport"), Plugin() { NOATUNPLUGINC(HTMLExport); mAction = new KAction(i18n("&Export Playlist..."), "filesaveas", 0, - this, SLOT(slotExport()), this, "exportlist"); + this, TQT_SLOT(slotExport()), this, "exportlist"); napp->pluginActionMenu()->insert(mAction); new Prefs(this); @@ -36,7 +36,7 @@ void HTMLExport::slotExport() config->setGroup("HTMLExport"); // get output target - KURL url = KFileDialog::getSaveURL(QString::null, + KURL url = KFileDialog::getSaveURL(TQString::null, "text/html", 0, i18n("Export Playlist")); @@ -44,10 +44,10 @@ void HTMLExport::slotExport() // write into tempfile KTempFile temp; temp.setAutoDelete(true); - QFile file(temp.name()); + TQFile file(temp.name()); file.open(IO_WriteOnly); - QTextStream str(&file); - str.setCodec(QTextCodec::codecForName("utf8")); + TQTextStream str(&file); + str.setCodec(TQTextCodec::codecForName("utf8")); str << "" << endl; str << "" << endl; @@ -132,37 +132,37 @@ void HTMLExport::slotExport() KIO::NetAccess::upload(temp.name(), url, 0); } -QString HTMLExport::htmlEscape(const QString &source) { +TQString HTMLExport::htmlEscape(const TQString &source) { // Escape characters that need to be escaped - QString temp = source; + TQString temp = source; - temp.replace( QRegExp("&"), "&" ); - temp.replace( QRegExp("<"), "<" ); - temp.replace( QRegExp(">"), ">" ); + temp.replace( TQRegExp("&"), "&" ); + temp.replace( TQRegExp("<"), "<" ); + temp.replace( TQRegExp(">"), ">" ); return temp; } -QString HTMLExport::getColorByEntry(QString s) +TQString HTMLExport::getColorByEntry(TQString s) { - QString res; - QString tmp; - QColor c; + TQString res; + TQString tmp; + TQColor c; // init readConfig config->setGroup("HTMLExport"); c = config->readColorEntry( s ); - tmp = QString::number( c.red(), 16); + tmp = TQString::number( c.red(), 16); if (tmp.length()==1) tmp="0"+tmp; res = tmp; - tmp = QString::number( c.green(), 16); + tmp = TQString::number( c.green(), 16); if (tmp.length()==1) tmp="0"+tmp; res += tmp; - tmp = QString::number( c.blue(), 16); + tmp = TQString::number( c.blue(), 16); if (tmp.length()==1) tmp="0"+tmp; res += tmp; @@ -171,7 +171,7 @@ QString HTMLExport::getColorByEntry(QString s) } //////////////////////////////////// Settings //////////////////////////////////// -Prefs::Prefs(QObject *parent) +Prefs::Prefs(TQObject *parent) : CModule(i18n("Playlist Export"), i18n("Colors & Settings for HTML Export"), "html", parent) { @@ -181,26 +181,26 @@ Prefs::Prefs(QObject *parent) // Set default values if ( !config->hasKey( "headColor" ) ) - config->writeEntry( "headColor", QColor( black ) ) ; + config->writeEntry( "headColor", TQColor( black ) ) ; if ( !config->hasKey( "hoverColor" ) ) - config->writeEntry( "hoverColor", QColor( black ) ); + config->writeEntry( "hoverColor", TQColor( black ) ); if ( !config->hasKey( "bgColor" ) ) - config->writeEntry( "bgColor", QColor( white ) ) ; + config->writeEntry( "bgColor", TQColor( white ) ) ; if ( !config->hasKey( "txtColor" ) ) - config->writeEntry( "txtColor", QColor( black ) ); + config->writeEntry( "txtColor", TQColor( black ) ); config->sync(); // Draw Stuff and insert Settings - QVBoxLayout *top = new QVBoxLayout(this, KDialog::marginHint(), + TQVBoxLayout *top = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint() ); - colorBox = new QGroupBox( i18n( "HTML Color Settings" ), this, "colorBox" ); + colorBox = new TQGroupBox( i18n( "HTML Color Settings" ), this, "colorBox" ); - bgcolorLabel = new QGridLayout( colorBox, 2, 5, + bgcolorLabel = new TQGridLayout( colorBox, 2, 5, KDialog::marginHint(), KDialog::spacingHint() ); headColorSelect = new KColorButton( colorBox, "headColorSelect" ); @@ -211,21 +211,21 @@ Prefs::Prefs(QObject *parent) txtColorSelect = new KColorButton( colorBox, "txtColorSelect" ); - txtColorLabel = new QLabel( colorBox, "txtColorLabel" ); + txtColorLabel = new TQLabel( colorBox, "txtColorLabel" ); txtColorLabel->setText( i18n( "Text:" ) ); - txtColorLabel->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); + txtColorLabel->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); - bgColorLabel = new QLabel( colorBox, "bgColorLabel" ); + bgColorLabel = new TQLabel( colorBox, "bgColorLabel" ); bgColorLabel->setText( i18n( "Background:" ) ); - bgColorLabel->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); + bgColorLabel->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); - headColorLabel = new QLabel( colorBox, "headColorLabel" ); + headColorLabel = new TQLabel( colorBox, "headColorLabel" ); headColorLabel->setText( i18n( "Heading:" ) ); - headColorLabel->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); + headColorLabel->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); - hoverColorLabel = new QLabel( colorBox, "hoverColorLabel" ); + hoverColorLabel = new TQLabel( colorBox, "hoverColorLabel" ); hoverColorLabel->setText( i18n( "Link hover:" ) ); - hoverColorLabel->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); + hoverColorLabel->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); bgcolorLabel->setRowStretch(0, 1); @@ -245,7 +245,7 @@ Prefs::Prefs(QObject *parent) // Set up the Background Image frame - bgPicBox = new QHGroupBox( i18n( "Background Image"), this, "bgPicBox" ); + bgPicBox = new TQHGroupBox( i18n( "Background Image"), this, "bgPicBox" ); // Set up the URL requestor bgPicPath = new KURLRequester ( bgPicBox, "bgPicPath" ); @@ -255,11 +255,11 @@ Prefs::Prefs(QObject *parent) bgPicPath->setMode(KFile::File | KFile::ExistingOnly); bgPicPath->setFilter("image/gif image/jpeg image/gif image/png image/svg+xml image/tiff"); - linkEntries = new QCheckBox( this, "linkEntries" ); + linkEntries = new TQCheckBox( this, "linkEntries" ); linkEntries->setText( i18n( "Hyper&link playlist entries to their URL" ) ); linkEntries->setTristate( false ); - numberEntries = new QCheckBox( this, "numberEntries" ); + numberEntries = new TQCheckBox( this, "numberEntries" ); numberEntries->setText( i18n( "&Number playlist entries" ) ); numberEntries->setTristate( false ); @@ -277,7 +277,7 @@ void Prefs::save() { KConfig *config = KGlobal::config(); - QString bgRealURL = bgPicPath->url(); + TQString bgRealURL = bgPicPath->url(); if (bgRealURL[0] == '/') bgRealURL = "file:" + bgRealURL; diff --git a/noatun/modules/htmlexport/htmlexport.h b/noatun/modules/htmlexport/htmlexport.h index a909a5cb..81047d3d 100644 --- a/noatun/modules/htmlexport/htmlexport.h +++ b/noatun/modules/htmlexport/htmlexport.h @@ -2,16 +2,16 @@ #ifndef _HTMLEXPORT_H_ #define _HTMLEXPORT_H_ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -31,7 +31,7 @@ class KAction; -class HTMLExport : public QObject, public Plugin +class HTMLExport : public TQObject, public Plugin { Q_OBJECT NOATUNPLUGIND @@ -41,8 +41,8 @@ public: private: - QString htmlEscape(const QString &source); - QString getColorByEntry(QString s); + TQString htmlEscape(const TQString &source); + TQString getColorByEntry(TQString s); KConfig *config; KAction *mAction; @@ -55,30 +55,30 @@ class Prefs : public CModule { Q_OBJECT public: - Prefs(QObject *parent); + Prefs(TQObject *parent); virtual void save(); virtual void reopen(); - QGroupBox* colorBox; + TQGroupBox* colorBox; KColorButton* headColorSelect; KColorButton* hoverColorSelect; KColorButton* bgColorSelect; KColorButton* txtColorSelect; - QLabel* bgColorLabel; - QLabel* txtColorLabel; - QLabel* headColorLabel; - QLabel* hoverColorLabel; + TQLabel* bgColorLabel; + TQLabel* txtColorLabel; + TQLabel* headColorLabel; + TQLabel* hoverColorLabel; - QCheckBox* linkEntries; - QCheckBox* numberEntries; + TQCheckBox* linkEntries; + TQCheckBox* numberEntries; - QGroupBox* bgPicBox; + TQGroupBox* bgPicBox; KURLRequester* bgPicPath; protected: - QGridLayout* bgcolorLabel; + TQGridLayout* bgcolorLabel; signals: diff --git a/noatun/modules/infrared/infrared.cpp b/noatun/modules/infrared/infrared.cpp index 60ea145c..c9b31230 100644 --- a/noatun/modules/infrared/infrared.cpp +++ b/noatun/modules/infrared/infrared.cpp @@ -6,7 +6,7 @@ #include #include -#include +#include #include "infrared.h" #include "lirc.h" @@ -22,18 +22,18 @@ extern "C" InfraRed::InfraRed() - : QObject(), + : TQObject(), Plugin() { NOATUNPLUGINC(InfraRed); m_lirc = new Lirc(this); connect(m_lirc, - SIGNAL(commandReceived(const QString &, const QString &, int)), - SLOT(slotCommand(const QString &, const QString &, int))); + TQT_SIGNAL(commandReceived(const TQString &, const TQString &, int)), + TQT_SLOT(slotCommand(const TQString &, const TQString &, int))); IRPrefs::s_lirc = m_lirc; volume=0; - QTimer::singleShot(0, this, SLOT(start())); + TQTimer::singleShot(0, this, TQT_SLOT(start())); } InfraRed::~InfraRed() @@ -45,7 +45,7 @@ void InfraRed::start() new IRPrefs(this); } -void InfraRed::slotCommand(const QString &remote, const QString &button, int repeat) +void InfraRed::slotCommand(const TQString &remote, const TQString &button, int repeat) { switch (IRPrefs::actionFor(remote, button, repeat)) { diff --git a/noatun/modules/infrared/infrared.h b/noatun/modules/infrared/infrared.h index 37e97735..870efbd5 100644 --- a/noatun/modules/infrared/infrared.h +++ b/noatun/modules/infrared/infrared.h @@ -8,7 +8,7 @@ class NoatunPreferences; class Lirc; -class InfraRed : public QObject, public Plugin +class InfraRed : public TQObject, public Plugin { Q_OBJECT NOATUNPLUGIND @@ -17,7 +17,7 @@ public: ~InfraRed(); private slots: - void slotCommand(const QString &, const QString &, int); + void slotCommand(const TQString &, const TQString &, int); void start(); diff --git a/noatun/modules/infrared/irprefs.cpp b/noatun/modules/infrared/irprefs.cpp index 409fa94e..548fd27d 100644 --- a/noatun/modules/infrared/irprefs.cpp +++ b/noatun/modules/infrared/irprefs.cpp @@ -1,7 +1,7 @@ -#include -#include -#include +#include +#include +#include #include #include @@ -17,17 +17,17 @@ class CommandItem : public QListViewItem { public: - CommandItem(QListViewItem *remote, const QString &name, + CommandItem(TQListViewItem *remote, const TQString &name, IRPrefs::Action action, int interval) - : QListViewItem(remote, name, IRPrefs::actionName(action), - interval ? QString().setNum(interval) : QString::null), + : TQListViewItem(remote, name, IRPrefs::actionName(action), + interval ? TQString().setNum(interval) : TQString::null), m_name(remote->text(0) + "::" + name), m_action(action), m_interval(interval) { } - const QString &name() const { return m_name; } + const TQString &name() const { return m_name; } IRPrefs::Action action() const { return m_action; } int interval() const { return m_interval; } void setAction(IRPrefs::Action action) @@ -37,44 +37,44 @@ public: } void setInterval(int interval) { - setText(2, interval ? QString().setNum(interval) : QString::null); + setText(2, interval ? TQString().setNum(interval) : TQString::null); m_interval = interval; } private: - QString m_name; + TQString m_name; IRPrefs::Action m_action; int m_interval; }; Lirc *IRPrefs::s_lirc = 0; bool IRPrefs::s_configRead = false; -QMap IRPrefs::s_commands; +TQMap IRPrefs::s_commands; -IRPrefs::IRPrefs(QObject *parent) +IRPrefs::IRPrefs(TQObject *parent) : CModule(i18n("Infrared Control"), i18n("Configure Infrared Commands"), "remote", parent) { - QGridLayout *layout = new QGridLayout(this, 3, 5, KDialog::marginHint(), KDialog::spacingHint()); + TQGridLayout *layout = new TQGridLayout(this, 3, 5, KDialog::marginHint(), KDialog::spacingHint()); layout->setColStretch(1, 1); - QLabel *label = new QLabel(i18n("Remote control &commands:"), this); + TQLabel *label = new TQLabel(i18n("Remote control &commands:"), this); layout->addMultiCellWidget(label, 0, 0, 0, 4); label->setBuddy(m_commands = new KListView(this)); layout->addMultiCellWidget(m_commands, 1, 1, 0, 4); - label = new QLabel(i18n("&Action:"), this); + label = new TQLabel(i18n("&Action:"), this); layout->addWidget(label, 2, 0); label->setBuddy(m_action = new KComboBox(this)); m_action->setEnabled(false); layout->addWidget(m_action, 2, 1); - m_repeat = new QCheckBox(i18n("&Repeat"), this); + m_repeat = new TQCheckBox(i18n("&Repeat"), this); m_repeat->setEnabled(false); layout->addWidget(m_repeat, 2, 2); - label = new QLabel(i18n("&Interval:"), this); + label = new TQLabel(i18n("&Interval:"), this); layout->addWidget(label, 2, 3); label->setBuddy(m_interval = new KIntSpinBox(this)); @@ -84,19 +84,19 @@ IRPrefs::IRPrefs(QObject *parent) m_interval->setEnabled(false); layout->addWidget(m_interval, 2, 4); - connect(s_lirc, SIGNAL(remotesRead()), SLOT(reopen())); + connect(s_lirc, TQT_SIGNAL(remotesRead()), TQT_SLOT(reopen())); connect(m_commands, - SIGNAL(selectionChanged(QListViewItem *)), - SLOT(slotCommandSelected(QListViewItem *))); + TQT_SIGNAL(selectionChanged(TQListViewItem *)), + TQT_SLOT(slotCommandSelected(TQListViewItem *))); connect(m_action, - SIGNAL(activated(int)), - SLOT(slotActionActivated(int))); + TQT_SIGNAL(activated(int)), + TQT_SLOT(slotActionActivated(int))); connect(m_repeat, - SIGNAL(toggled(bool)), - SLOT(slotRepeatToggled(bool))); + TQT_SIGNAL(toggled(bool)), + TQT_SLOT(slotRepeatToggled(bool))); connect(m_interval, - SIGNAL(valueChanged(int)), - SLOT(slotIntervalChanged(int))); + TQT_SIGNAL(valueChanged(int)), + TQT_SLOT(slotIntervalChanged(int))); reopen(); } @@ -107,11 +107,11 @@ void IRPrefs::save() KConfigGroupSaver groupSaver(c, "Infrared"); c->writeEntry("CommandCount", s_commands.count()); int i = 1; - for (QMap::ConstIterator it = s_commands.begin(); it != s_commands.end(); ++it) + for (TQMap::ConstIterator it = s_commands.begin(); it != s_commands.end(); ++it) { - c->writePathEntry(QString("Command_%1").arg(i), it.key()); - c->writeEntry(QString("Action_%1").arg(i), (int)((*it).action)); - c->writeEntry(QString("Interval_%1").arg(i), (*it).interval); + c->writePathEntry(TQString("Command_%1").arg(i), it.key()); + c->writeEntry(TQString("Action_%1").arg(i), (int)((*it).action)); + c->writeEntry(TQString("Interval_%1").arg(i), (*it).interval); ++i; } } @@ -120,7 +120,7 @@ void IRPrefs::reopen() { readConfig(); - QStringList remotes = s_lirc->remotes(); + TQStringList remotes = s_lirc->remotes(); m_commands->clear(); while (m_commands->columns()) m_commands->removeColumn(0); if (!remotes.count()) @@ -129,13 +129,13 @@ void IRPrefs::reopen() m_commands->setSorting(-1); if (s_lirc->isConnected()) { - new QListViewItem(m_commands, i18n("You do not have any remote control configured.")); - new QListViewItem(m_commands, i18n("Please make sure lirc is setup correctly.")); + new TQListViewItem(m_commands, i18n("You do not have any remote control configured.")); + new TQListViewItem(m_commands, i18n("Please make sure lirc is setup correctly.")); } else { - new QListViewItem(m_commands, i18n("Connection could not be established.")); - new QListViewItem(m_commands, i18n("Please make sure lirc is setup correctly and lircd is running.")); + new TQListViewItem(m_commands, i18n("Connection could not be established.")); + new TQListViewItem(m_commands, i18n("Please make sure lirc is setup correctly and lircd is running.")); } m_commands->setEnabled(false); return; @@ -145,13 +145,13 @@ void IRPrefs::reopen() m_commands->addColumn(i18n("Action")); m_commands->addColumn(i18n("Interval")); m_commands->setSorting(0); - for (QStringList::ConstIterator it = remotes.begin(); it != remotes.end(); ++it) + for (TQStringList::ConstIterator it = remotes.begin(); it != remotes.end(); ++it) { - QListViewItem *remote = new QListViewItem(m_commands, *it); - const QStringList &buttons = s_lirc->buttons(*it); - for (QStringList::ConstIterator btn = buttons.begin(); btn != buttons.end(); ++btn) + TQListViewItem *remote = new TQListViewItem(m_commands, *it); + const TQStringList &buttons = s_lirc->buttons(*it); + for (TQStringList::ConstIterator btn = buttons.begin(); btn != buttons.end(); ++btn) { - QString key = *it + "::" + *btn; + TQString key = *it + "::" + *btn; if (s_commands.contains(key)) new CommandItem(remote, *btn, s_commands[key].action, s_commands[key].interval); else @@ -163,7 +163,7 @@ void IRPrefs::reopen() m_action->clear(); for (int i = 0; ; ++i) { - QString action = actionName((Action)i); + TQString action = actionName((Action)i); if (action.isNull()) break; if (action.isEmpty()) @@ -175,7 +175,7 @@ void IRPrefs::reopen() } -void IRPrefs::slotCommandSelected(QListViewItem *item) +void IRPrefs::slotCommandSelected(TQListViewItem *item) { CommandItem *cmd = dynamic_cast(item); if (cmd) @@ -242,12 +242,12 @@ void IRPrefs::slotIntervalChanged(int value) s_commands[cmd->name()].interval = cmd->interval(); } -const QString IRPrefs::actionName(Action action) +const TQString IRPrefs::actionName(Action action) { switch (action) { case None: - return QString(""); + return TQString(""); case Play: return i18n("Play"); case Stop: @@ -275,7 +275,7 @@ const QString IRPrefs::actionName(Action action) case PreviousSection: return i18n("Previous Section"); } - return QString::null; + return TQString::null; } void IRPrefs::readConfig() @@ -288,14 +288,14 @@ void IRPrefs::readConfig() for (int i = 1; i <= count; ++i) { Command cmd; - cmd.action = (Action)(c->readNumEntry(QString("Action_%1").arg(i))); - cmd.interval = c->readNumEntry(QString("Interval_%1").arg(i)); - s_commands.insert(c->readPathEntry(QString("Command_%1").arg(i)), cmd); + cmd.action = (Action)(c->readNumEntry(TQString("Action_%1").arg(i))); + cmd.interval = c->readNumEntry(TQString("Interval_%1").arg(i)); + s_commands.insert(c->readPathEntry(TQString("Command_%1").arg(i)), cmd); } s_configRead = true; } -IRPrefs::Action IRPrefs::actionFor(const QString &remote, const QString &button, int repeat) +IRPrefs::Action IRPrefs::actionFor(const TQString &remote, const TQString &button, int repeat) { readConfig(); Command cmd = s_commands[remote + "::" + button]; diff --git a/noatun/modules/infrared/irprefs.h b/noatun/modules/infrared/irprefs.h index 7f813ac8..1d7196a9 100644 --- a/noatun/modules/infrared/irprefs.h +++ b/noatun/modules/infrared/irprefs.h @@ -2,7 +2,7 @@ #ifndef _IRPREFS_H_ #define _IRPREFS_H_ -#include +#include #include class QCheckBox; @@ -24,19 +24,19 @@ public: NextSection, PreviousSection }; - IRPrefs(QObject *parent); + IRPrefs(TQObject *parent); virtual void save(); - static const QString actionName(Action); - static Action actionFor(const QString &, const QString &, int); + static const TQString actionName(Action); + static Action actionFor(const TQString &, const TQString &, int); public slots: static Lirc *s_lirc; private slots: virtual void reopen(); - void slotCommandSelected(QListViewItem *); + void slotCommandSelected(TQListViewItem *); void slotActionActivated(int); void slotRepeatToggled(bool); void slotIntervalChanged(int); @@ -46,7 +46,7 @@ private: KListView *m_commands; KComboBox *m_action; - QCheckBox *m_repeat; + TQCheckBox *m_repeat; KIntSpinBox *m_interval; struct Command @@ -55,7 +55,7 @@ private: int interval; }; static bool s_configRead; - static QMap s_commands; + static TQMap s_commands; }; #endif diff --git a/noatun/modules/infrared/lirc.cpp b/noatun/modules/infrared/lirc.cpp index 857c07e2..657172d5 100644 --- a/noatun/modules/infrared/lirc.cpp +++ b/noatun/modules/infrared/lirc.cpp @@ -4,7 +4,7 @@ #include #include -#include +#include #include #include @@ -12,8 +12,8 @@ #include "lirc.h" -Lirc::Lirc(QObject *parent) - : QObject(parent), +Lirc::Lirc(TQObject *parent) + : TQObject(parent), m_socket(0) { int sock = ::socket(PF_UNIX, SOCK_STREAM, 0); @@ -34,7 +34,7 @@ Lirc::Lirc(QObject *parent) m_socket = new QSocket; m_socket->setSocket(sock); - connect(m_socket, SIGNAL(readyRead()), SLOT(slotRead())); + connect(m_socket, TQT_SIGNAL(readyRead()), TQT_SLOT(slotRead())); update(); } @@ -43,9 +43,9 @@ Lirc::~Lirc() delete m_socket; } -const QStringList Lirc::remotes() const +const TQStringList Lirc::remotes() const { - QStringList result; + TQStringList result; for (Remotes::ConstIterator it = m_remotes.begin(); it != m_remotes.end(); ++it) result.append(it.key()); result.sort(); @@ -56,7 +56,7 @@ void Lirc::slotRead() { while (m_socket->bytesAvailable()) { - QString line = readLine(); + TQString line = readLine(); if (line == "BEGIN") { // BEGIN @@ -84,7 +84,7 @@ void Lirc::slotRead() while (!line.isEmpty() && line != "END"); return; } - QStringList remotes; + TQStringList remotes; int count = readLine().toInt(); for (int i = 0; i < count; ++i) remotes.append(readLine()); @@ -92,7 +92,7 @@ void Lirc::slotRead() while (!line.isEmpty() && line != "END"); if (line.isEmpty()) return; // abort on corrupt data - for (QStringList::ConstIterator it = remotes.begin(); it != remotes.end(); ++it) + for (TQStringList::ConstIterator it = remotes.begin(); it != remotes.end(); ++it) sendCommand("LIST " + *it); return; } @@ -105,13 +105,13 @@ void Lirc::slotRead() while (!line.isEmpty() && line != "END"); return; } - QString remote = line.mid(5); - QStringList buttons; + TQString remote = line.mid(5); + TQStringList buttons; int count = readLine().toInt(); for (int i = 0; i < count; ++i) { // - QString btn = readLine(); + TQString btn = readLine(); buttons.append(btn.mid(17)); } m_remotes.insert(remote, buttons); @@ -136,7 +136,7 @@ void Lirc::slotRead() pos = line.find(' '); if (pos < 0) return; - QString btn = line.left(pos); + TQString btn = line.left(pos); line.remove(0, pos + 1); emit commandReceived(line, btn, repeat); @@ -150,22 +150,22 @@ void Lirc::update() sendCommand("LIST"); } -const QString Lirc::readLine() +const TQString Lirc::readLine() { if (!m_socket->bytesAvailable()) - return QString::null; + return TQString::null; - QString line = m_socket->readLine(); + TQString line = m_socket->readLine(); if (line.isEmpty()) - return QString::null; + return TQString::null; line.remove(line.length() - 1, 1); return line; } -void Lirc::sendCommand(const QString &command) +void Lirc::sendCommand(const TQString &command) { - QString cmd = command + "\n"; + TQString cmd = command + "\n"; m_socket->writeBlock(cmd.latin1(), cmd.length()); } diff --git a/noatun/modules/infrared/lirc.h b/noatun/modules/infrared/lirc.h index e5380c5c..de9665fd 100644 --- a/noatun/modules/infrared/lirc.h +++ b/noatun/modules/infrared/lirc.h @@ -2,13 +2,13 @@ #ifndef _LIRC_H_ #define _LIRC_H_ -#include -#include -#include +#include +#include +#include class QSocket; -typedef QMap Remotes; +typedef TQMap Remotes; class Lirc : public QObject { @@ -17,7 +17,7 @@ public: /** * Constructor */ - Lirc(QObject *parent); + Lirc(TQObject *parent); /** * Destructor */ @@ -30,12 +30,12 @@ public: /** * The names of the remote configured controls */ - const QStringList remotes() const; + const TQStringList remotes() const; /** * The names of the buttons for the specified * remote control */ - const QStringList buttons(const QString &remote) const + const TQStringList buttons(const TQString &remote) const { return m_remotes[remote]; } @@ -56,18 +56,18 @@ signals: * The repeat counter starts with 0 and increases * every time this signal is emitted. */ - void commandReceived(const QString &, const QString &, int); + void commandReceived(const TQString &, const TQString &, int); private slots: void slotRead(); private: void update(); - const QString readLine(); - void sendCommand(const QString &); + const TQString readLine(); + void sendCommand(const TQString &); private: - QSocket *m_socket; + TQSocket *m_socket; Remotes m_remotes; }; diff --git a/noatun/modules/kaiman/pref.cpp b/noatun/modules/kaiman/pref.cpp index 29ef30d9..5f241bc0 100644 --- a/noatun/modules/kaiman/pref.cpp +++ b/noatun/modules/kaiman/pref.cpp @@ -17,11 +17,11 @@ */ #include -#include -#include +#include +#include #include -#include -#include +#include +#include #include #include #include @@ -31,12 +31,12 @@ #include "userinterface.h" -KaimanPrefDlg::KaimanPrefDlg(QObject *parent ) +KaimanPrefDlg::KaimanPrefDlg(TQObject *parent ) : CModule(i18n("Kaiman Skins"), i18n("Skin Selection for the Kaiman Plugin"), "style", parent) { // create widgets - QVBoxLayout *topLayout = new QVBoxLayout( this, 6, 11 ); - QLabel *label = new QLabel( i18n("Kaiman Skins"), this, "label" ); + TQVBoxLayout *topLayout = new TQVBoxLayout( this, 6, 11 ); + TQLabel *label = new TQLabel( i18n("Kaiman Skins"), this, "label" ); topLayout->addWidget( label ); _skinList = new KListBox( this, "skinList" ); @@ -68,15 +68,15 @@ void KaimanPrefDlg::reopen() _skinList->clear(); // fill with available skins KGlobal::dirs()->addResourceType("skins", KStandardDirs::kde_default("data") + "noatun/skins/kaiman/"); - QStringList list = KGlobal::dirs()->resourceDirs("skins"); - for (QStringList::ConstIterator it = list.begin(); it != list.end(); it++) + TQStringList list = KGlobal::dirs()->resourceDirs("skins"); + for (TQStringList::ConstIterator it = list.begin(); it != list.end(); it++) readSkinDir(*it); // load current config KConfig *config=KGlobal::config(); config->setGroup("Kaiman"); - QString skin = config->readEntry( "SkinResource", Kaiman::DEFAULT_SKIN ); - QListBoxItem *item = _skinList->findItem( skin ); + TQString skin = config->readEntry( "SkinResource", Kaiman::DEFAULT_SKIN ); + TQListBoxItem *item = _skinList->findItem( skin ); if ( item ) _skinList->setCurrentItem( item ); else @@ -84,23 +84,23 @@ void KaimanPrefDlg::reopen() } -void KaimanPrefDlg::setSkin( QString skin ) +void KaimanPrefDlg::setSkin( TQString skin ) { _skinList->setCurrentItem( _skinList->findItem( skin ) ); } -QString KaimanPrefDlg::skin() +TQString KaimanPrefDlg::skin() { return _skinList->currentText(); } -void KaimanPrefDlg::readSkinDir( const QString &dir ) +void KaimanPrefDlg::readSkinDir( const TQString &dir ) { kdDebug() << "readSkinDir " << dir << endl; - QDir directory( dir ); + TQDir directory( dir ); if (!directory.exists()) return; @@ -109,7 +109,7 @@ void KaimanPrefDlg::readSkinDir( const QString &dir ) while ( it.current() ) { kdDebug() << it.current()->absFilePath() << endl; - QFileInfo skindata( it.current()->absFilePath()+"/skindata" ); + TQFileInfo skindata( it.current()->absFilePath()+"/skindata" ); if ( skindata.exists() ) { _skinList->insertItem( it.current()->baseName() ); diff --git a/noatun/modules/kaiman/pref.h b/noatun/modules/kaiman/pref.h index d18200fa..4f473859 100644 --- a/noatun/modules/kaiman/pref.h +++ b/noatun/modules/kaiman/pref.h @@ -28,18 +28,18 @@ class KaimanPrefDlg : public CModule { Q_OBJECT public: - KaimanPrefDlg( QObject *parent ); + KaimanPrefDlg( TQObject *parent ); virtual ~KaimanPrefDlg(); virtual void save(); virtual void reopen(); public slots: - void setSkin( QString skin ); - QString skin(); + void setSkin( TQString skin ); + TQString skin(); private: - void readSkinDir( const QString &dir ); + void readSkinDir( const TQString &dir ); KListBox *_skinList; }; diff --git a/noatun/modules/kaiman/style.cpp b/noatun/modules/kaiman/style.cpp index 0cce6b96..6b700230 100644 --- a/noatun/modules/kaiman/style.cpp +++ b/noatun/modules/kaiman/style.cpp @@ -21,14 +21,14 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include -#include +#include #include #include @@ -42,8 +42,8 @@ const bool KaimanStyleSlider::optionVertical = 1; const bool KaimanStyleSlider::optionReversed = 2; const bool KaimanStyleText::optionExtended = 1; -KaimanStyleElement::KaimanStyleElement(QWidget *parent, const char *name) - : QWidget(parent, name) +KaimanStyleElement::KaimanStyleElement(TQWidget *parent, const char *name) + : TQWidget(parent, name) { // Initialize everything to default values filename = ""; @@ -71,9 +71,9 @@ KaimanStyleElement::~KaimanStyleElement() } -void KaimanStyleElement::loadPixmaps(QString &val_s_filename) +void KaimanStyleElement::loadPixmaps(TQString &val_s_filename) { - QPixmap pixmap; + TQPixmap pixmap; bool i_b_ret = pixmap.load(val_s_filename); pixmapNum = pixmapLines*pixmapColumns; @@ -117,14 +117,14 @@ void KaimanStyleElement::loadPixmaps(QString &val_s_filename) { int w = (x==0) ? firstWidth : width; - QPixmap *part = new QPixmap(w,h,pixmap.depth()); + TQPixmap *part = new TQPixmap(w,h,pixmap.depth()); part->fill(Qt::black); bitBlt(part,0,0,&pixmap,sourcex,sourcey,w,h); pixmaps.insert(i,part); if(pixmap.mask()) { - QBitmap maskpart(w,h); + TQBitmap maskpart(w,h); bitBlt(&maskpart,0,0,pixmap.mask(),sourcex,sourcey,w,h); part->setMask(maskpart); } @@ -141,7 +141,7 @@ void KaimanStyleElement::loadPixmaps(QString &val_s_filename) for ( int i=0; ifill(Qt::black); pixmaps.insert( i, pm ); } @@ -149,7 +149,7 @@ void KaimanStyleElement::loadPixmaps(QString &val_s_filename) if ( dimension.width()==0 ) dimension.setWidth( pixmaps[0]->width() ); if ( dimension.height()==0 ) dimension.setHeight( pixmaps[0]->height() ); - setGeometry( QRect(upperLeft, dimension) ); + setGeometry( TQRect(upperLeft, dimension) ); } void KaimanStyleElement::setPixmap( int num ) @@ -164,27 +164,27 @@ void KaimanStyleElement::setPixmap( int num ) } } -void KaimanStyleElement::paintEvent ( QPaintEvent */*qpe*/ ) +void KaimanStyleElement::paintEvent ( TQPaintEvent */*qpe*/ ) { - QPixmap *pm = pixmaps[_currentPixmap]; + TQPixmap *pm = pixmaps[_currentPixmap]; if ( pm ) bitBlt(this, 0, 0, pm ); else kdDebug() << "Invalid pixmap" << endl; -/* QPainter p( this ); +/* TQPainter p( this ); p.setBrush( NoBrush ); - p.setPen( QColor(255,255,255) ); + p.setPen( TQColor(255,255,255) ); p.drawRect( 0, 0, width(), height() ); p.drawText( 2, 16, name() ); */ } -void KaimanStyleElement::dragEnterEvent( QDragEnterEvent *event ) +void KaimanStyleElement::dragEnterEvent( TQDragEnterEvent *event ) { event->accept( KURLDrag::canDecode(event) ); } -void KaimanStyleElement::dropEvent( QDropEvent *event ) +void KaimanStyleElement::dropEvent( TQDropEvent *event ) { ((Kaiman*)(parentWidget()->parentWidget()))->doDropEvent(event); } @@ -192,7 +192,7 @@ void KaimanStyleElement::dropEvent( QDropEvent *event ) /***************************************************************************/ -KaimanStyleButton::KaimanStyleButton(QWidget *parent, const char *name) +KaimanStyleButton::KaimanStyleButton(TQWidget *parent, const char *name) : KaimanStyleMasked(parent, name) { i_b_lit = i_b_prelit = i_b_down = false; @@ -210,7 +210,7 @@ KaimanStyleButton::~KaimanStyleButton() { } -void KaimanStyleButton::mousePressEvent(QMouseEvent *qme) +void KaimanStyleButton::mousePressEvent(TQMouseEvent *qme) { // We deactivate prelight, because the user presses the button. // So it is now down, but there is no PrelitDown icon (BTW: would @@ -222,7 +222,7 @@ void KaimanStyleButton::mousePressEvent(QMouseEvent *qme) KaimanStyleMasked::mousePressEvent( qme ); } -void KaimanStyleButton::mouseReleaseEvent(QMouseEvent *qme) +void KaimanStyleButton::mouseReleaseEvent(TQMouseEvent *qme) { releaseMouse (); @@ -237,7 +237,7 @@ void KaimanStyleButton::mouseReleaseEvent(QMouseEvent *qme) /* paint prelight */ -void KaimanStyleButton::enterEvent ( QEvent * e ) +void KaimanStyleButton::enterEvent ( TQEvent * e ) { if ( !down() ) setPrelight(true); @@ -246,7 +246,7 @@ void KaimanStyleButton::enterEvent ( QEvent * e ) } /* unpaint prelight */ -void KaimanStyleButton::leaveEvent ( QEvent * e ) +void KaimanStyleButton::leaveEvent ( TQEvent * e ) { if (!down()) setPrelight(false); @@ -327,7 +327,7 @@ void KaimanStyleButton::updateButtonState() { /***********************************************************************/ -KaimanStyleSlider::KaimanStyleSlider(int min, int max, QWidget *parent, const char *name) +KaimanStyleSlider::KaimanStyleSlider(int min, int max, TQWidget *parent, const char *name) : KaimanStyleMasked( parent, name ) { _min = min; @@ -380,7 +380,7 @@ int KaimanStyleSlider::pos2value( int x, int y ) } -void KaimanStyleSlider::mouseMoveEvent(QMouseEvent *qme) +void KaimanStyleSlider::mouseMoveEvent(TQMouseEvent *qme) { KaimanStyleMasked::mouseMoveEvent( qme ); @@ -391,7 +391,7 @@ void KaimanStyleSlider::mouseMoveEvent(QMouseEvent *qme) } } -void KaimanStyleSlider::mousePressEvent(QMouseEvent *qme) +void KaimanStyleSlider::mousePressEvent(TQMouseEvent *qme) { if ( !_down ) { @@ -407,7 +407,7 @@ void KaimanStyleSlider::mousePressEvent(QMouseEvent *qme) } -void KaimanStyleSlider::mouseReleaseEvent(QMouseEvent *qme) +void KaimanStyleSlider::mouseReleaseEvent(TQMouseEvent *qme) { if ( _down ) { @@ -424,13 +424,13 @@ void KaimanStyleSlider::mouseReleaseEvent(QMouseEvent *qme) } -void KaimanStyleSlider::paintEvent(QPaintEvent */*qpe*/) +void KaimanStyleSlider::paintEvent(TQPaintEvent */*qpe*/) { // draw background bitBlt( this, 0, 0, pixmaps[0] ); // draw optional handle - QPixmap *handle; + TQPixmap *handle; if ( _down ) handle = pixmaps[2]; else @@ -460,7 +460,7 @@ void KaimanStyleSlider::paintEvent(QPaintEvent */*qpe*/) } } -void KaimanStyleSlider::enterEvent ( QEvent * e ) +void KaimanStyleSlider::enterEvent ( TQEvent * e ) { if ( !_lit && optionPrelight ) { @@ -471,7 +471,7 @@ void KaimanStyleSlider::enterEvent ( QEvent * e ) KaimanStyleMasked::enterEvent( e ); } -void KaimanStyleSlider::leaveEvent ( QEvent * e ) +void KaimanStyleSlider::leaveEvent ( TQEvent * e ) { if ( _lit ) { @@ -486,7 +486,7 @@ void KaimanStyleSlider::leaveEvent ( QEvent * e ) /***********************************************************************/ -KaimanStyleBackground::KaimanStyleBackground(QWidget *parent, const char *name) +KaimanStyleBackground::KaimanStyleBackground(TQWidget *parent, const char *name) : KaimanStyleMasked( parent, name ) { i_b_move = false; @@ -496,22 +496,22 @@ KaimanStyleBackground::~KaimanStyleBackground() { } -void KaimanStyleBackground::mouseReleaseEvent(QMouseEvent *qme) +void KaimanStyleBackground::mouseReleaseEvent(TQMouseEvent *qme) { i_b_move = false; KaimanStyleMasked::mouseReleaseEvent( qme ); } -void KaimanStyleBackground::mouseMoveEvent(QMouseEvent *qme) +void KaimanStyleBackground::mouseMoveEvent(TQMouseEvent *qme) { - QPoint diff = qme->globalPos() - i_point_lastPos; + TQPoint diff = qme->globalPos() - i_point_lastPos; if ( abs(diff.x()) > 10 || abs(diff.y()) > 10) { // Moving starts only, when passing a drag border i_b_move = true; } if ( i_b_move ) { - QWidget *p = parentWidget()->parentWidget(); + TQWidget *p = parentWidget()->parentWidget(); if ( !p ) p = parentWidget(); p->move( qme->globalPos() - i_point_dragStart ); @@ -520,7 +520,7 @@ void KaimanStyleBackground::mouseMoveEvent(QMouseEvent *qme) KaimanStyleMasked::mouseMoveEvent( qme ); } -void KaimanStyleBackground::mousePressEvent(QMouseEvent *qme) +void KaimanStyleBackground::mousePressEvent(TQMouseEvent *qme) { // On the background we move the shaped toplevel around if (!i_b_move) { @@ -533,7 +533,7 @@ void KaimanStyleBackground::mousePressEvent(QMouseEvent *qme) /***********************************************************************/ -KaimanStyleValue::KaimanStyleValue(int min, int max, QWidget *parent, const char *name) +KaimanStyleValue::KaimanStyleValue(int min, int max, TQWidget *parent, const char *name) : KaimanStyleMasked( parent, name ) { _min = min; @@ -571,12 +571,12 @@ void KaimanStyleValue::setValue( int value, int min, int max ) /***********************************************************************/ -KaimanStyleNumber::KaimanStyleNumber(QWidget *parent, const char *name) +KaimanStyleNumber::KaimanStyleNumber(TQWidget *parent, const char *name) : KaimanStyleElement( parent, name ) { //kdDebug(66666) << k_funcinfo << "name = '" << name << "'" << endl; _value = 0; - if (QCString(name) == "In_Rate_Number") + if (TQCString(name) == "In_Rate_Number") digits = 3; else digits = 2; @@ -587,7 +587,7 @@ KaimanStyleNumber::~KaimanStyleNumber() } -void KaimanStyleNumber::loadPixmaps(QString &val_s_filename) +void KaimanStyleNumber::loadPixmaps(TQString &val_s_filename) { KaimanStyleElement::loadPixmaps( val_s_filename ); resize( digits*pixmaps[0]->width(),pixmaps[0]->height() ); @@ -603,7 +603,7 @@ void KaimanStyleNumber::setValue( int value ) } } -void KaimanStyleNumber::paintEvent(QPaintEvent */*qpe*/) +void KaimanStyleNumber::paintEvent(TQPaintEvent */*qpe*/) { // check for overflow int v = _value; @@ -631,22 +631,22 @@ void KaimanStyleNumber::paintEvent(QPaintEvent */*qpe*/) bitBlt(this, x, 0, pixmaps[0] ); } /* - QPainter p( this ); + TQPainter p( this ); p.setBrush( NoBrush ); - p.setPen( QColor(255,255,255) ); + p.setPen( TQColor(255,255,255) ); p.drawRect( 0, 0, width(), height() ); p.drawText( 2, 16, name() );*/ } /***********************************************************************/ -KaimanStyleText::KaimanStyleText(QWidget *parent, const char *name) +KaimanStyleText::KaimanStyleText(TQWidget *parent, const char *name) : KaimanStyleElement( parent, name ) { _pos = 0; - _timer = new QTimer( this ); + _timer = new TQTimer( this ); _delay = 500; - connect( _timer, SIGNAL(timeout()), this, SLOT(timeout()) ); + connect( _timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(timeout()) ); } KaimanStyleText::~KaimanStyleText() @@ -654,14 +654,14 @@ KaimanStyleText::~KaimanStyleText() } -void KaimanStyleText::loadPixmaps(QString &val_s_filename) +void KaimanStyleText::loadPixmaps(TQString &val_s_filename) { KaimanStyleElement::loadPixmaps( val_s_filename ); resize( digits*pixmaps[0]->width(), pixmaps[0]->height() ); } -void KaimanStyleText::setValue( QString value ) +void KaimanStyleText::setValue( TQString value ) { if ( value!=_value ) { _pos = 0; @@ -708,7 +708,7 @@ void KaimanStyleText::timeout() } -void KaimanStyleText::paintEvent(QPaintEvent */*qpe*/) +void KaimanStyleText::paintEvent(TQPaintEvent */*qpe*/) { // draw number int p; @@ -718,30 +718,30 @@ void KaimanStyleText::paintEvent(QPaintEvent */*qpe*/) if ( pmNum>=96 ) pmNum = '?' - ' '; if ( pmNum<0 ) pmNum = '?' - ' '; - QPixmap *pm = pixmaps[pmNum]; + TQPixmap *pm = pixmaps[pmNum]; if ( pm ) bitBlt(this, p*pixmaps[0]->width(), 0, pm ); } - QPixmap *pm = pixmaps[0]; + TQPixmap *pm = pixmaps[0]; for ( ; pwidth(), 0, pm ); -/* QPainter pnt( this ); +/* TQPainter pnt( this ); pnt.setBrush( NoBrush ); - pnt.setPen( QColor(255,255,255) ); + pnt.setPen( TQColor(255,255,255) ); pnt.drawRect( 0, 0, width(), height() ); pnt.drawText( 2, 16, name() );*/ } /***********************************************************************/ -KaimanStyleAnimation::KaimanStyleAnimation(int delay, QWidget *parent, const char *name) +KaimanStyleAnimation::KaimanStyleAnimation(int delay, TQWidget *parent, const char *name) : KaimanStyleMasked( parent, name ) { _delay = delay; _frame = 0; - _timer = new QTimer( this ); - connect( _timer, SIGNAL(timeout()), this, SLOT(timeout()) ); + _timer = new TQTimer( this ); + connect( _timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(timeout()) ); } KaimanStyleAnimation::~KaimanStyleAnimation() @@ -774,7 +774,7 @@ void KaimanStyleAnimation::timeout() /***********************************************************************/ -KaimanStyleState::KaimanStyleState(QWidget *parent, const char *name) +KaimanStyleState::KaimanStyleState(TQWidget *parent, const char *name) : KaimanStyleMasked( parent, name ) { _value = 0; @@ -790,7 +790,7 @@ void KaimanStyleState::setValue( int value ) setPixmap( _value ); } -void KaimanStyleState::mousePressEvent(QMouseEvent *qme) +void KaimanStyleState::mousePressEvent(TQMouseEvent *qme) { emit clicked(); KaimanStyleMasked::mouseReleaseEvent( qme ); @@ -799,8 +799,8 @@ void KaimanStyleState::mousePressEvent(QMouseEvent *qme) /***********************************************************************/ -KaimanStyle::KaimanStyle( QWidget *parent, const char *name ) - : QWidget( parent, name ) +KaimanStyle::KaimanStyle( TQWidget *parent, const char *name ) + : TQWidget( parent, name ) { i_qw_parent = parent; i_eventSemaphore = false; @@ -812,17 +812,17 @@ KaimanStyle::~KaimanStyle() } -int KaimanStyle::parseStyleFile(QString &l_s_tmpName) +int KaimanStyle::parseStyleFile(TQString &l_s_tmpName) { int l_i_ret = false; - QStringList l_s_tokens; + TQStringList l_s_tokens; - QFile l_fd(l_s_tmpName); + TQFile l_fd(l_s_tmpName); if ( l_fd.open(IO_ReadOnly) ) { // file opened successfully - QTextStream l_ts_line( &l_fd ); - QString l_s_textLine, l_s_token; + TQTextStream l_ts_line( &l_fd ); + TQString l_s_textLine, l_s_token; while ( !l_ts_line.eof() ) { // Clear list of tokens (we are going to fill them now) l_s_tokens.clear(); @@ -865,15 +865,15 @@ int KaimanStyle::parseStyleFile(QString &l_s_tmpName) /* This function gets a list of tokens and inserts a new KaimanStyleElement in I_styleElem. */ -void KaimanStyle::interpretTokens(QStringList& ref_s_tokens) +void KaimanStyle::interpretTokens(TQStringList& ref_s_tokens) { if ( ref_s_tokens.count() < 1 ) { // A list with less than 1 item is useless to us return; } - QString l_s_tokenTypes; - const QString &l_s_elem = ref_s_tokens.first(); + TQString l_s_tokenTypes; + const TQString &l_s_elem = ref_s_tokens.first(); bool l_vertPixmaps = false; int l_i_pmIndex[KaimanStyleButton::StateListEND]; for (int i=0; ii_s_styleName = styleName; - i_s_styleBase = QString("skins/kaiman/") + i_s_styleName + QString("/"); + i_s_styleBase = TQString("skins/kaiman/") + i_s_styleName + TQString("/"); l_s_tmpName = locate("appdata", i_s_styleBase + descFile ); if ( l_s_tmpName.isNull() ) { @@ -1390,14 +1390,14 @@ bool KaimanStyle::loadStyle(const QString &styleName, const QString &descFile) return l_b_ret; } -bool KaimanStyle::eventFilter( QObject *o, QEvent *e ) +bool KaimanStyle::eventFilter( TQObject *o, TQEvent *e ) { /* HACK! HACK! HACK! */ if ( !i_eventSemaphore ) - if ( e->type()==QEvent::MouseMove || e->type()==QEvent::MouseButtonPress || - e->type()==QEvent::MouseButtonRelease ) + if ( e->type()==TQEvent::MouseMove || e->type()==TQEvent::MouseButtonPress || + e->type()==TQEvent::MouseButtonRelease ) { - QMouseEvent *m = (QMouseEvent*)e; + TQMouseEvent *m = (TQMouseEvent*)e; // handle noatun context menu if (m->button()==RightButton) { @@ -1405,37 +1405,37 @@ bool KaimanStyle::eventFilter( QObject *o, QEvent *e ) return true; } - QPoint mousePos( m->x()+static_cast(o)->x(), - m->y()+static_cast(o)->y() ); - QWidget *slider = 0; + TQPoint mousePos( m->x()+static_cast(o)->x(), + m->y()+static_cast(o)->y() ); + TQWidget *slider = 0; /* find slider that is under the mouse position */ - for ( QWidget *s = i_sliders.first(); s!=0; s=i_sliders.next() ) + for ( TQWidget *s = i_sliders.first(); s!=0; s=i_sliders.next() ) { - QRect sliderRect( s->pos(), s->size() ); + TQRect sliderRect( s->pos(), s->size() ); if ( sliderRect.contains(mousePos) ) slider = s; } /* the slider the mouse events instead of the visible widget */ if ( slider ) { - QMouseEvent newMouseEvent( m->type(), mousePos-slider->pos(), + TQMouseEvent newMouseEvent( m->type(), mousePos-slider->pos(), m->globalPos(), m->button(), m->state() ); i_eventSemaphore = true; - bool ret = QApplication::sendEvent( slider, &newMouseEvent ); + bool ret = TQApplication::sendEvent( slider, &newMouseEvent ); i_eventSemaphore = false; return ret; } } - return QWidget::eventFilter( o, e ); // standard event processing + return TQWidget::eventFilter( o, e ); // standard event processing } bool KaimanStyle::loadPixmaps() { - QString l_s_tmpName; - QPixmap *l_pixmap_Background = 0, *l_pixmap_Mask = 0; + TQString l_s_tmpName; + TQPixmap *l_pixmap_Background = 0, *l_pixmap_Mask = 0; KaimanStyleElement *l_kse_elem; for ( uint l_i_elem = 0; l_i_elemwidth(); int l_i_height_Mask = l_pixmap_Mask->height(); - QImage l_image_MaskOrig = l_pixmap_Mask->convertToImage(); + TQImage l_image_MaskOrig = l_pixmap_Mask->convertToImage(); - QImage l_image_Mask(l_i_width_Mask,l_i_height_Mask, 1, 2, QImage::LittleEndian); + TQImage l_image_Mask(l_i_width_Mask,l_i_height_Mask, 1, 2, TQImage::LittleEndian); l_image_Mask.setColor( 0, 0x00ffffff ); l_image_Mask.setColor( 1, 0 ); l_image_Mask.fill( 0xff ); @@ -1487,7 +1487,7 @@ bool KaimanStyle::loadPixmaps() } -QBitmap* KaimanStyle::Mask() +TQBitmap* KaimanStyle::Mask() { return &i_bitmap_Mask; } @@ -1495,7 +1495,7 @@ QBitmap* KaimanStyle::Mask() KaimanStyleElement* KaimanStyle::find(const char *val_s_elemName) { for (uint i=0; i< I_styleElem.count(); i++) { - if ( I_styleElem[i]->element == QString(val_s_elemName)) { + if ( I_styleElem[i]->element == TQString(val_s_elemName)) { return I_styleElem[i]; } } diff --git a/noatun/modules/kaiman/style.h b/noatun/modules/kaiman/style.h index 4266bc42..1f2bc788 100644 --- a/noatun/modules/kaiman/style.h +++ b/noatun/modules/kaiman/style.h @@ -21,27 +21,27 @@ #ifndef KaimanStyle_H #define KaimanStyle_H -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include class KaimanStyleElement : public QWidget { Q_OBJECT public: - KaimanStyleElement(QWidget *parent, const char *name=0); + KaimanStyleElement(TQWidget *parent, const char *name=0); ~KaimanStyleElement(); - virtual void loadPixmaps(QString &val_s_filename); + virtual void loadPixmaps(TQString &val_s_filename); - QString element; - QString filename; - QPoint upperLeft; - QSize dimension; + TQString element; + TQString filename; + TQPoint upperLeft; + TQSize dimension; bool options[3]; int digits; @@ -52,15 +52,15 @@ public: int pixmapLines; int pixmapColumns; - QPtrVector pixmaps; + TQPtrVector pixmaps; public slots: void setPixmap( int num ); protected: - void paintEvent(QPaintEvent *qpe); - void dropEvent( QDropEvent *event ); - void dragEnterEvent( QDragEnterEvent *event ); + void paintEvent(TQPaintEvent *qpe); + void dropEvent( TQDropEvent *event ); + void dragEnterEvent( TQDragEnterEvent *event ); int pixmapNum; @@ -73,10 +73,10 @@ class KaimanStyleMasked : public KaimanStyleElement { Q_OBJECT public: - KaimanStyleMasked(QWidget *parent, const char *name=0) + KaimanStyleMasked(TQWidget *parent, const char *name=0) : KaimanStyleElement( parent, name ) {}; - virtual void loadPixmaps(QString &val_s_filename) + virtual void loadPixmaps(TQString &val_s_filename) { KaimanStyleElement::loadPixmaps( val_s_filename ); if(pixmaps[0]->mask()) @@ -89,13 +89,13 @@ class KaimanStyleButton : public KaimanStyleMasked { Q_OBJECT public: - KaimanStyleButton(QWidget *parent, const char *name=0); + KaimanStyleButton(TQWidget *parent, const char *name=0); ~KaimanStyleButton(); // Button states. enum { NormalUp=0, NormalDown, LitUp, LitDown, PrelightUp, PrelightLitUp, StateListEND }; - QPtrVector I_pmIndex; + TQPtrVector I_pmIndex; void setLit(bool); void setPrelight(bool); @@ -109,10 +109,10 @@ signals: void clicked(); protected: - void mousePressEvent(QMouseEvent *qme); - void mouseReleaseEvent(QMouseEvent *qme); - void enterEvent(QEvent * ); - void leaveEvent ( QEvent * ); + void mousePressEvent(TQMouseEvent *qme); + void mouseReleaseEvent(TQMouseEvent *qme); + void enterEvent(TQEvent * ); + void leaveEvent ( TQEvent * ); private: int i_i_currentState; @@ -126,7 +126,7 @@ class KaimanStyleSlider : public KaimanStyleMasked { Q_OBJECT public: - KaimanStyleSlider(int min, int max, QWidget *parent, const char *name=0); + KaimanStyleSlider(int min, int max, TQWidget *parent, const char *name=0); ~KaimanStyleSlider(); int value() { return _value; }; @@ -144,12 +144,12 @@ signals: void newValueDrop( int value ); protected: - void mouseMoveEvent(QMouseEvent *qme); - void mousePressEvent(QMouseEvent *qme); - void mouseReleaseEvent(QMouseEvent *qme); - void paintEvent(QPaintEvent *qpe); - void enterEvent(QEvent * ); - void leaveEvent ( QEvent * ); + void mouseMoveEvent(TQMouseEvent *qme); + void mousePressEvent(TQMouseEvent *qme); + void mouseReleaseEvent(TQMouseEvent *qme); + void paintEvent(TQPaintEvent *qpe); + void enterEvent(TQEvent * ); + void leaveEvent ( TQEvent * ); int pos2value( int x, int y ); @@ -164,18 +164,18 @@ class KaimanStyleBackground : public KaimanStyleMasked { Q_OBJECT public: - KaimanStyleBackground(QWidget *parent, const char *name=0); + KaimanStyleBackground(TQWidget *parent, const char *name=0); ~KaimanStyleBackground(); protected: - void mousePressEvent(QMouseEvent *qme); - void mouseReleaseEvent(QMouseEvent *qme); - void mouseMoveEvent(QMouseEvent *qme); + void mousePressEvent(TQMouseEvent *qme); + void mouseReleaseEvent(TQMouseEvent *qme); + void mouseMoveEvent(TQMouseEvent *qme); private: bool i_b_move; - QPoint i_point_dragStart; - QPoint i_point_lastPos; + TQPoint i_point_dragStart; + TQPoint i_point_lastPos; }; @@ -183,7 +183,7 @@ class KaimanStyleValue : public KaimanStyleMasked { Q_OBJECT public: - KaimanStyleValue(int min, int max, QWidget *parent, const char *name=0); + KaimanStyleValue(int min, int max, TQWidget *parent, const char *name=0); ~KaimanStyleValue(); int value() { return _value; }; @@ -201,7 +201,7 @@ class KaimanStyleState : public KaimanStyleMasked { Q_OBJECT public: - KaimanStyleState(QWidget *parent, const char *name=0); + KaimanStyleState(TQWidget *parent, const char *name=0); ~KaimanStyleState(); int value() { return _value; }; @@ -213,7 +213,7 @@ signals: void clicked(); protected: - void mousePressEvent(QMouseEvent *qme); + void mousePressEvent(TQMouseEvent *qme); private: int _value; @@ -224,10 +224,10 @@ class KaimanStyleNumber : public KaimanStyleElement { Q_OBJECT public: - KaimanStyleNumber(QWidget *parent, const char *name=0); + KaimanStyleNumber(TQWidget *parent, const char *name=0); ~KaimanStyleNumber(); - virtual void loadPixmaps(QString &val_s_filename); + virtual void loadPixmaps(TQString &val_s_filename); static const bool optionCentered = 1; @@ -237,7 +237,7 @@ public slots: void setValue( int value ); protected: - void paintEvent(QPaintEvent *qpe); + void paintEvent(TQPaintEvent *qpe); private: int _value; @@ -248,33 +248,33 @@ class KaimanStyleText : public KaimanStyleElement { Q_OBJECT public: - KaimanStyleText(QWidget *parent, const char *name=0); + KaimanStyleText(TQWidget *parent, const char *name=0); ~KaimanStyleText(); - virtual void loadPixmaps(QString &val_s_filename); + virtual void loadPixmaps(TQString &val_s_filename); static const bool optionExtended; - QString value() { return _value; }; + TQString value() { return _value; }; void startAnimation( int delay ); void stopAnimation(); public slots: - void setValue( QString value ); + void setValue( TQString value ); protected: - void paintEvent(QPaintEvent *qpe); + void paintEvent(TQPaintEvent *qpe); protected slots: void timeout(); private: - QString _value; + TQString _value; int _pos; int _direction; int _delay; - QTimer *_timer; + TQTimer *_timer; }; @@ -282,7 +282,7 @@ class KaimanStyleAnimation : public KaimanStyleMasked { Q_OBJECT public: - KaimanStyleAnimation(int delay, QWidget *parent, const char *name=0); + KaimanStyleAnimation(int delay, TQWidget *parent, const char *name=0); ~KaimanStyleAnimation(); public slots: @@ -295,14 +295,14 @@ protected: private: int _delay,_frame; - QTimer *_timer; + TQTimer *_timer; }; class KaimanStyle : public QWidget { Q_OBJECT public: - KaimanStyle(QWidget *parent, const char *name=0); + KaimanStyle(TQWidget *parent, const char *name=0); ~KaimanStyle(); enum { background, mask, play_Button, stop_Button, pause_Button, prev_Button, next_Button, repeat_Button, shuffle_Button, playlist_Button, mixer_Button, exit_Button, Iconify_Button, Config_Button, Alt_Skin_Button, Minute_Number, Second_Number, in_Rate_Number, in_Hz_Number, song_Number, status_Item, cPU_Number, digit_Large, digit_Small_Default, title, volume_Item, volume_Slider, position_Item, position_Slider }; @@ -313,43 +313,43 @@ public: KaimanStyleElement* find(const char* val_s_elemName); /// Tries to load the given style and returns success (true) or failure (false) - bool loadStyle(const QString &styleName, const QString &descFile="skindata" ); - QString skinName() { return i_skinName; }; + bool loadStyle(const TQString &styleName, const TQString &descFile="skindata" ); + TQString skinName() { return i_skinName; }; /// Returns the mask - QBitmap* Mask(); + TQBitmap* Mask(); - virtual bool eventFilter( QObject *o, QEvent *e ); + virtual bool eventFilter( TQObject *o, TQEvent *e ); private: // Parses the "skindata" file and returns success (true) or failure (false) - int parseStyleFile(QString &l_s_tmpName); - QString getToken(QString &val_s_string, char val_c_separator); - void interpretTokens(QStringList& ref_s_tokens); + int parseStyleFile(TQString &l_s_tmpName); + TQString getToken(TQString &val_s_string, char val_c_separator); + void interpretTokens(TQStringList& ref_s_tokens); bool loadPixmaps(); /// The name of the style, e.g. "k9" - QString i_s_styleName; + TQString i_s_styleName; /// The base directory, where the style is found. For example /// "/opt/kde/share/apps/kaiman/Skins/k9/" or "/opt/kde/share/apps/kaiman/Skins/k9.tgz" - QString i_s_styleBase; + TQString i_s_styleBase; // The mask of the complete style. Used for doing shaped windows - QBitmap i_bitmap_Mask; + TQBitmap i_bitmap_Mask; /// All style elements are stored here. - QPtrVector I_styleElem; + TQPtrVector I_styleElem; // The parent window. In other words: The container that holds all the KaimanStyleElement's - QWidget* i_qw_parent; + TQWidget* i_qw_parent; - QPtrList i_sliders; + TQPtrList i_sliders; bool i_eventSemaphore; - QString i_smallFont; - QString i_largeFont; - QString i_skinName; + TQString i_smallFont; + TQString i_largeFont; + TQString i_skinName; }; diff --git a/noatun/modules/kaiman/userinterface.cpp b/noatun/modules/kaiman/userinterface.cpp index 08036a59..b1ae2570 100644 --- a/noatun/modules/kaiman/userinterface.cpp +++ b/noatun/modules/kaiman/userinterface.cpp @@ -30,13 +30,13 @@ #include "userinterface.h" #include "pref.h" -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -84,7 +84,7 @@ Kaiman::Kaiman() config->setGroup("Kaiman"); // load skin - QString skinName = config->readEntry( "SkinResource", DEFAULT_SKIN ); + TQString skinName = config->readEntry( "SkinResource", DEFAULT_SKIN ); if ( !changeStyle(skinName, "skindata") ) { @@ -92,22 +92,22 @@ Kaiman::Kaiman() if ( !changeStyle( DEFAULT_SKIN, "skindata" ) ) { KMessageBox::error( this, i18n("Cannot load default skin %1.").arg(DEFAULT_SKIN) ); - QTimer::singleShot( 0, this, SLOT(close()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(close()) ); return; } } // global connects - connect( napp, SIGNAL(hideYourself()), this, SLOT(hide()) ); - connect( napp, SIGNAL(showYourself()), this, SLOT(show()) ); + connect( napp, TQT_SIGNAL(hideYourself()), this, TQT_SLOT(hide()) ); + connect( napp, TQT_SIGNAL(showYourself()), this, TQT_SLOT(show()) ); - connect( napp->player(), SIGNAL(playing()), this, SLOT(updateMode())); - connect( napp->player(), SIGNAL(stopped()), this, SLOT(updateMode())); - connect( napp->player(), SIGNAL(paused()), this, SLOT(updateMode())); - connect( napp->player(), SIGNAL(timeout()), this, SLOT(timeout())); - connect( napp->player(), SIGNAL(loopTypeChange(int)), this, SLOT(loopTypeChange(int))); - connect( napp->player(), SIGNAL(newSongLen(int,int)), this, SLOT(newSongLen(int,int))); - connect( napp->player(), SIGNAL(newSong()), this, SLOT(newSong())); + connect( napp->player(), TQT_SIGNAL(playing()), this, TQT_SLOT(updateMode())); + connect( napp->player(), TQT_SIGNAL(stopped()), this, TQT_SLOT(updateMode())); + connect( napp->player(), TQT_SIGNAL(paused()), this, TQT_SLOT(updateMode())); + connect( napp->player(), TQT_SIGNAL(timeout()), this, TQT_SLOT(timeout())); + connect( napp->player(), TQT_SIGNAL(loopTypeChange(int)), this, TQT_SLOT(loopTypeChange(int))); + connect( napp->player(), TQT_SIGNAL(newSongLen(int,int)), this, TQT_SLOT(newSongLen(int,int))); + connect( napp->player(), TQT_SIGNAL(newSong()), this, TQT_SLOT(newSong())); if( napp->player()->isPlaying() ) newSong(); @@ -123,9 +123,9 @@ Kaiman::~Kaiman() } -bool Kaiman::changeStyle( const QString &style, const QString &desc ) +bool Kaiman::changeStyle( const TQString &style, const TQString &desc ) { - QString ldesc = desc; + TQString ldesc = desc; if ( ldesc.isEmpty() ) ldesc = _altSkin ? "alt_skindata" : "skindata"; @@ -146,7 +146,7 @@ bool Kaiman::changeStyle( const QString &style, const QString &desc ) } -bool Kaiman::loadStyle( const QString &style, const QString &desc ) +bool Kaiman::loadStyle( const TQString &style, const TQString &desc ) { if ( _style ) delete _style; _style = new KaimanStyle(this); @@ -165,7 +165,7 @@ bool Kaiman::loadStyle( const QString &style, const QString &desc ) } KaimanStyleElement* item = _style->find("Background"); - setBackgroundMode(QWidget::NoBackground); + setBackgroundMode(TQWidget::NoBackground); if ( item!=0 ) { _style->resize( item->width(), item->height()); @@ -174,64 +174,64 @@ bool Kaiman::loadStyle( const QString &style, const QString &desc ) } item = _style->find("Playlist_Button"); - if( item!=0 ) connect( item, SIGNAL(clicked()), napp->player(), SLOT(toggleListView()) ); + if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(toggleListView()) ); item = _style->find("Play_Button"); - if( item!=0 ) connect( item, SIGNAL(clicked()), napp->player(), SLOT(playpause()) ); + if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(playpause()) ); item = _style->find("Pause_Button"); - if( item!=0 ) connect( item, SIGNAL(clicked()), napp->player(), SLOT(playpause()) ); + if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(playpause()) ); item = _style->find("Stop_Button"); - if( item!=0 ) connect( item, SIGNAL(clicked()), napp->player(), SLOT(stop()) ); + if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(stop()) ); item = _style->find("Next_Button"); - if( item!=0 ) connect( item, SIGNAL(clicked()), napp->player(), SLOT(forward()) ); + if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(forward()) ); item = _style->find("Prev_Button"); - if( item!=0 ) connect( item, SIGNAL(clicked()), napp->player(), SLOT(back()) ); + if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(back()) ); item = _style->find("Exit_Button"); - if( item!=0 ) connect( item, SIGNAL(clicked()), this, SLOT(close()) ); + if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), this, TQT_SLOT(close()) ); item = _style->find("Mixer_Button"); - if( item!=0 ) connect( item, SIGNAL(clicked()), this, SLOT(execMixer()) ); + if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), this, TQT_SLOT(execMixer()) ); item = _style->find("Iconify_Button"); - if( item!=0 ) connect( item, SIGNAL(clicked()), this, SLOT(showMinimized()) ); + if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), this, TQT_SLOT(showMinimized()) ); item = _style->find("Alt_Skin_Button"); - if( item!=0 ) connect( item, SIGNAL(clicked()), this, SLOT(toggleSkin()) ); + if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), this, TQT_SLOT(toggleSkin()) ); item = _style->find("Repeat_Button"); - if( item!=0 ) connect( item, SIGNAL(clicked()), this, SLOT(toggleLoop()) ); + if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), this, TQT_SLOT(toggleLoop()) ); item = _style->find("Shuffle_Button"); - if( item!=0 ) connect( item, SIGNAL(clicked()), this, SLOT(toggleShuffle()) ); + if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), this, TQT_SLOT(toggleShuffle()) ); item = _style->find("Config_Button"); - if( item!=0 ) connect( item, SIGNAL(clicked()), napp, SLOT(preferences()) ); + if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), napp, TQT_SLOT(preferences()) ); item = _style->find("Volume_Up_Button"); - if( item!=0 ) connect( item, SIGNAL(clicked()), this,SLOT(volumeUp())); + if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), this,TQT_SLOT(volumeUp())); item = _style->find("Volume_Down_Button"); - if( item!=0 ) connect( item, SIGNAL(clicked()), this,SLOT(volumeDown())); + if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), this,TQT_SLOT(volumeDown())); KaimanStyleSlider* slider = static_cast(_style->find("Position_Slider")); if( slider!=0 ) { - connect( slider, SIGNAL(newValueDrag(int)), this, SLOT(seekStart(int)) ); - connect( slider, SIGNAL(newValue(int)), this, SLOT(seekDrag(int)) ); - connect( slider, SIGNAL(newValueDrop(int)), this, SLOT(seekStop(int)) ); + connect( slider, TQT_SIGNAL(newValueDrag(int)), this, TQT_SLOT(seekStart(int)) ); + connect( slider, TQT_SIGNAL(newValue(int)), this, TQT_SLOT(seekDrag(int)) ); + connect( slider, TQT_SIGNAL(newValueDrop(int)), this, TQT_SLOT(seekStop(int)) ); slider->setValue( 0, 0, 1000 ); } slider = static_cast(_style->find("Volume_Slider")); if ( slider!=0 ) { - connect(slider, SIGNAL(newValue(int)), this, SLOT(setVolume(int))); + connect(slider, TQT_SIGNAL(newValue(int)), this, TQT_SLOT(setVolume(int))); slider->setValue( napp->player()->volume(), 0, 100 ); } @@ -247,25 +247,25 @@ bool Kaiman::loadStyle( const QString &style, const QString &desc ) } -void Kaiman::closeEvent(QCloseEvent*) +void Kaiman::closeEvent(TQCloseEvent*) { unload(); } -void Kaiman::dragEnterEvent( QDragEnterEvent *event ) +void Kaiman::dragEnterEvent( TQDragEnterEvent *event ) { event->accept( KURLDrag::canDecode(event) ); } -void Kaiman::dropEvent( QDropEvent *event ) +void Kaiman::dropEvent( TQDropEvent *event ) { doDropEvent(event); } -void Kaiman::doDropEvent(QDropEvent *event) +void Kaiman::doDropEvent(TQDropEvent *event) { KURL::List uri; if (KURLDrag::decode(event, uri)) @@ -330,18 +330,18 @@ void Kaiman::toggleSkin() { _altSkin = !_altSkin; - QString skinName = _style->skinName(); + TQString skinName = _style->skinName(); - QString oldDesc, newDesc; + TQString oldDesc, newDesc; if ( _altSkin ) { - oldDesc = QString::fromLatin1("skindata"); - newDesc = QString::fromLatin1("alt_skindata"); + oldDesc = TQString::fromLatin1("skindata"); + newDesc = TQString::fromLatin1("alt_skindata"); } else { - newDesc = QString::fromLatin1("skindata"); - oldDesc = QString::fromLatin1("alt_skindata"); + newDesc = TQString::fromLatin1("skindata"); + oldDesc = TQString::fromLatin1("alt_skindata"); } if ( !changeStyle(skinName, newDesc) ) @@ -372,7 +372,7 @@ void Kaiman::volumeDown() void Kaiman::execMixer() { - kapp->startServiceByDesktopName ( QString::fromLatin1("kmix"), QString::null ); + kapp->startServiceByDesktopName ( TQString::fromLatin1("kmix"), TQString::null ); } @@ -424,7 +424,7 @@ void Kaiman::timeout() if ( numItem ) numItem->setValue(item.property("bitrate").toInt()); - QString hzString = item.property("samplerate"); + TQString hzString = item.property("samplerate"); hzString.truncate(2); numItem = static_cast(_style->find("In_Hz_Number")); @@ -513,7 +513,7 @@ void Kaiman::newSong() KaimanStyleText* titleItem = static_cast(_style->find("Title")); if ( titleItem ) { - QString title = i18n("Noatun"); + TQString title = i18n("Noatun"); if ( napp->player()->current() ) { title = napp->player()->current().title(); @@ -546,7 +546,7 @@ void Kaiman::toggleLoop() (int)(Player::Random)); loopMenu->setItemChecked((int)napp->player()->loopStyle(), true); // select current loopstyle in menu - selectedItem = loopMenu->exec(QCursor::pos()); + selectedItem = loopMenu->exec(TQCursor::pos()); if (selectedItem != -1) napp->player()->loop(selectedItem); // set new loopstyle diff --git a/noatun/modules/kaiman/userinterface.h b/noatun/modules/kaiman/userinterface.h index 9df9cb3c..63b4133e 100644 --- a/noatun/modules/kaiman/userinterface.h +++ b/noatun/modules/kaiman/userinterface.h @@ -39,12 +39,12 @@ Q_OBJECT Kaiman(); virtual ~Kaiman(); - bool changeStyle( const QString &style, const QString &desc=QString::null ); + bool changeStyle( const TQString &style, const TQString &desc=TQString::null ); public slots: - void dropEvent( QDropEvent * ); - void doDropEvent( QDropEvent * ); - void dragEnterEvent( QDragEnterEvent * ); - void closeEvent(QCloseEvent*); + void dropEvent( TQDropEvent * ); + void doDropEvent( TQDropEvent * ); + void dragEnterEvent( TQDragEnterEvent * ); + void closeEvent(TQCloseEvent*); protected slots: void seekStart( int ); @@ -73,7 +73,7 @@ Q_OBJECT static Kaiman *kaiman; protected: - bool loadStyle( const QString &style, const QString &desc ); + bool loadStyle( const TQString &style, const TQString &desc ); bool _seeking; diff --git a/noatun/modules/keyz/keyz.cpp b/noatun/modules/keyz/keyz.cpp index 7b32cf98..f35fddc7 100644 --- a/noatun/modules/keyz/keyz.cpp +++ b/noatun/modules/keyz/keyz.cpp @@ -3,12 +3,12 @@ #include #include -#include +#include #include #include #include -#include +#include #include "keyz.h" @@ -22,7 +22,7 @@ extern "C" KGlobalAccel * Keyz::s_accel = 0L; -Keyz::Keyz() : QObject( 0L, "Keyz" ), Plugin(), preMuteVol(0) +Keyz::Keyz() : TQObject( 0L, "Keyz" ), Plugin(), preMuteVol(0) { NOATUNPLUGINC(Keyz); Player *player = napp->player(); @@ -30,58 +30,58 @@ Keyz::Keyz() : QObject( 0L, "Keyz" ), Plugin(), preMuteVol(0) if ( !s_accel ) { s_accel = new KGlobalAccel( this, "noatunglobalaccel" ); - s_accel->insert( "PlayPause", i18n("Play/Pause"), QString::null, + s_accel->insert( "PlayPause", i18n("Play/Pause"), TQString::null, CTRL+ALT+Key_P, KKey::QtWIN+CTRL+Key_P, - player, SLOT( playpause() )); - s_accel->insert( "Stop", i18n("Stop Playing"), QString::null, + player, TQT_SLOT( playpause() )); + s_accel->insert( "Stop", i18n("Stop Playing"), TQString::null, CTRL+ALT+Key_S, KKey::QtWIN+CTRL+Key_S, - player, SLOT( stop() )); - s_accel->insert( "Back", i18n("Back"), QString::null, + player, TQT_SLOT( stop() )); + s_accel->insert( "Back", i18n("Back"), TQString::null, CTRL+ALT+Key_Left, KKey::QtWIN+CTRL+Key_Left, - player, SLOT( back() )); - s_accel->insert( "Forward", i18n("Forward"), QString::null, + player, TQT_SLOT( back() )); + s_accel->insert( "Forward", i18n("Forward"), TQString::null, CTRL+ALT+Key_Right, KKey::QtWIN+CTRL+Key_Right, - player, SLOT( forward() )); - s_accel->insert( "Playlist", i18n("Show/Hide Playlist"), QString::null, + player, TQT_SLOT( forward() )); + s_accel->insert( "Playlist", i18n("Show/Hide Playlist"), TQString::null, CTRL+ALT+Key_L, KKey::QtWIN+CTRL+Key_L, - player, SLOT( toggleListView() )); - s_accel->insert( "OpenFile", i18n("Open File to Play"), QString::null, + player, TQT_SLOT( toggleListView() )); + s_accel->insert( "OpenFile", i18n("Open File to Play"), TQString::null, CTRL+ALT+Key_O, KKey::QtWIN+CTRL+Key_O, - napp, SLOT( fileOpen() )); - s_accel->insert( "Effects", i18n("Effects Configuration"), QString::null, + napp, TQT_SLOT( fileOpen() )); + s_accel->insert( "Effects", i18n("Effects Configuration"), TQString::null, CTRL+ALT+Key_E, KKey::QtWIN+CTRL+Key_E, - napp, SLOT( effectView() )); - s_accel->insert( "Preferences", i18n("Preferences"), QString::null, + napp, TQT_SLOT( effectView() )); + s_accel->insert( "Preferences", i18n("Preferences"), TQString::null, CTRL+ALT+Key_F, KKey::QtWIN+CTRL+Key_F, - napp, SLOT( preferences() )); - s_accel->insert( "VolumeUp", i18n("Volume Up"), QString::null, + napp, TQT_SLOT( preferences() )); + s_accel->insert( "VolumeUp", i18n("Volume Up"), TQString::null, CTRL+ALT+SHIFT+Key_Up, KKey::QtWIN+CTRL+SHIFT+Key_Up, - this, SLOT( slotVolumeUp() )); - s_accel->insert( "VolumeDown", i18n("Volume Down"), QString::null, + this, TQT_SLOT( slotVolumeUp() )); + s_accel->insert( "VolumeDown", i18n("Volume Down"), TQString::null, CTRL+ALT+SHIFT+Key_Down, KKey::QtWIN+CTRL+SHIFT+Key_Down, - this, SLOT( slotVolumeDown() )); - s_accel->insert( "Mute", i18n("Mute"), QString::null, + this, TQT_SLOT( slotVolumeDown() )); + s_accel->insert( "Mute", i18n("Mute"), TQString::null, CTRL+ALT+Key_M, KKey::QtWIN+CTRL+Key_M, - this, SLOT( slotMute() )); - s_accel->insert( "SeekForward", i18n("Seek Forward"), QString::null, + this, TQT_SLOT( slotMute() )); + s_accel->insert( "SeekForward", i18n("Seek Forward"), TQString::null, CTRL+ALT+SHIFT+Key_Right, KKey::QtWIN+CTRL+SHIFT+Key_Right, - this, SLOT( slotForward() )); - s_accel->insert( "SeekBackward", i18n("Seek Backward"), QString::null, + this, TQT_SLOT( slotForward() )); + s_accel->insert( "SeekBackward", i18n("Seek Backward"), TQString::null, CTRL+ALT+SHIFT+Key_Left, KKey::QtWIN+CTRL+SHIFT+Key_Left, - this, SLOT( slotBackward() )); - s_accel->insert( "NextSection", i18n("Next Section"), QString::null, + this, TQT_SLOT( slotBackward() )); + s_accel->insert( "NextSection", i18n("Next Section"), TQString::null, 0, 0, - this, SLOT( slotNextSection() )); - s_accel->insert( "PrevSection", i18n("Previous Section"), QString::null, + this, TQT_SLOT( slotNextSection() )); + s_accel->insert( "PrevSection", i18n("Previous Section"), TQString::null, 0, 0, - this, SLOT( slotPrevSection() )); - s_accel->insert( "CopyTitle", i18n("Copy Song Title to Clipboard"), QString::null, + this, TQT_SLOT( slotPrevSection() )); + s_accel->insert( "CopyTitle", i18n("Copy Song Title to Clipboard"), TQString::null, CTRL+ALT+Key_C, KKey::QtWIN+CTRL+Key_C, - this, SLOT( slotCopyTitle() )); + this, TQT_SLOT( slotCopyTitle() )); - s_accel->insert( "ToggleGUI", i18n("Show/Hide Main Window"), QString::null, + s_accel->insert( "ToggleGUI", i18n("Show/Hide Main Window"), TQString::null, CTRL+ALT+Key_W, KKey::QtWIN+CTRL+Key_W, - napp, SLOT( toggleInterfaces() )); + napp, TQT_SLOT( toggleInterfaces() )); s_accel->readSettings(); s_accel->updateConnections(); @@ -170,11 +170,11 @@ void Keyz::slotMute() /////////////////////////////////////////////////////////////////// -KeyzPrefs::KeyzPrefs( QObject *parent ) : +KeyzPrefs::KeyzPrefs( TQObject *parent ) : CModule( i18n("Keyz"), i18n("Shortcut Configuration"), "key_bindings", parent ) { - QVBoxLayout *layout = new QVBoxLayout( this ); + TQVBoxLayout *layout = new TQVBoxLayout( this ); m_chooser = new KKeyChooser( Keyz::accel(), this ); layout->addWidget( m_chooser ); } diff --git a/noatun/modules/keyz/keyz.h b/noatun/modules/keyz/keyz.h index 929e6c67..e6682531 100644 --- a/noatun/modules/keyz/keyz.h +++ b/noatun/modules/keyz/keyz.h @@ -4,7 +4,7 @@ #include #include -class Keyz : public QObject, public Plugin +class Keyz : public TQObject, public Plugin { Q_OBJECT NOATUNPLUGIND @@ -37,7 +37,7 @@ class KeyzPrefs : public CModule Q_OBJECT public: - KeyzPrefs( QObject *parent ); + KeyzPrefs( TQObject *parent ); virtual void save(); private: diff --git a/noatun/modules/kjofol-skin/helpers.cpp b/noatun/modules/kjofol-skin/helpers.cpp index b38822a6..0a2a9e67 100644 --- a/noatun/modules/kjofol-skin/helpers.cpp +++ b/noatun/modules/kjofol-skin/helpers.cpp @@ -43,9 +43,9 @@ static int isGray(QRgb r) // UPDATE: should work on both little and big endian now (haven't tested that!) // this code is taken from the QT-docu and I hope that this example // is one of the working ones ;) -inline void setPixel1BPP(QImage &image, int x, int y, bool value) +inline void setPixel1BPP(TQImage &image, int x, int y, bool value) { - if ( image.bitOrder() == QImage::LittleEndian ) + if ( image.bitOrder() == TQImage::LittleEndian ) { if (value) *(image.scanLine(y) + (x >> 3)) |= 1 << (x & 7); diff --git a/noatun/modules/kjofol-skin/kjbackground.cpp b/noatun/modules/kjofol-skin/kjbackground.cpp index 83c19ace..1c99b6ff 100644 --- a/noatun/modules/kjofol-skin/kjbackground.cpp +++ b/noatun/modules/kjofol-skin/kjbackground.cpp @@ -12,18 +12,18 @@ KJBackground::KJBackground(KJLoader *parent) : KJWidget(parent) { - QImage ibackground; + TQImage ibackground; mBackground = parent->pixmap(parser()["backgroundimage"][1]); ibackground = parent->image(parser()["backgroundimage"][1]); parent->setMask( getMask(ibackground) ); - parent->setFixedSize ( QSize(mBackground.width(), mBackground.height()) ); + parent->setFixedSize ( TQSize(mBackground.width(), mBackground.height()) ); setRect(0,0,parent->width(),parent->height()); } -void KJBackground::paint(QPainter *painter, const QRect &rect) +void KJBackground::paint(TQPainter *painter, const TQRect &rect) { bitBlt(painter->device(), rect.topLeft(), &mBackground, rect, Qt::CopyROP); } diff --git a/noatun/modules/kjofol-skin/kjbackground.h b/noatun/modules/kjofol-skin/kjbackground.h index 502611c5..d09d22c5 100644 --- a/noatun/modules/kjofol-skin/kjbackground.h +++ b/noatun/modules/kjofol-skin/kjbackground.h @@ -5,17 +5,17 @@ //#include "kjloader.h" class KJLoader; -#include +#include class KJBackground : public KJWidget { public: KJBackground(KJLoader *); - virtual void paint(QPainter *, const QRect &rect); - virtual bool mousePress(const QPoint &) {return false;} - virtual void mouseRelease(const QPoint &, bool) {} + virtual void paint(TQPainter *, const TQRect &rect); + virtual bool mousePress(const TQPoint &) {return false;} + virtual void mouseRelease(const TQPoint &, bool) {} private: - QPixmap mBackground; + TQPixmap mBackground; }; #endif diff --git a/noatun/modules/kjofol-skin/kjbutton.cpp b/noatun/modules/kjofol-skin/kjbutton.cpp index 403ea61e..d051777e 100644 --- a/noatun/modules/kjofol-skin/kjbutton.cpp +++ b/noatun/modules/kjofol-skin/kjbutton.cpp @@ -16,7 +16,7 @@ #include #include -#include +#include #include #include #include @@ -30,8 +30,8 @@ * KJButton *******************************************/ -KJButton::KJButton(const QStringList &i, KJLoader *parent) - : QObject(0), KJWidget(parent), mTitle(i[0]), mShowPressed(false) +KJButton::KJButton(const TQStringList &i, KJLoader *parent) + : TQObject(0), KJWidget(parent), mTitle(i[0]), mShowPressed(false) { // kdDebug(66666) << k_funcinfo << "new button: " << i[0].latin1() << endl; mPushedPixmap = (i.count() >= 7); @@ -44,18 +44,18 @@ KJButton::KJButton(const QStringList &i, KJLoader *parent) ys=i[4].toInt()-y; // height setRect ( x, y, xs, ys ); - QStringList temp = i; + TQStringList temp = i; // search for selected button-type // can be either BMPx where x is a number representing one // of the background-images // or darken which means just darken the button on click bool gotBack = false; // in case any of these keys is duplicated - for(QStringList::Iterator it = temp.begin(); it != temp.end(); ++it) + for(TQStringList::Iterator it = temp.begin(); it != temp.end(); ++it) { if((*it).contains("bmp")) { - QString pressedTmp = backgroundPressed((*it)); + TQString pressedTmp = backgroundPressed((*it)); if(!pressedTmp.isEmpty()) { mPressed = parent->pixmap(pressedTmp); @@ -68,7 +68,7 @@ KJButton::KJButton(const QStringList &i, KJLoader *parent) // FIXME: what KPixmapEffect causes the desired effect? // intensity is the wrong one KPixmap temp = parent->pixmap(parser()["backgroundimage"][1]); - mPressed = (QPixmap)KPixmapEffect::intensity ( temp, 1.2f ); + mPressed = (TQPixmap)KPixmapEffect::intensity ( temp, 1.2f ); gotBack = true; } if(gotBack) @@ -87,24 +87,24 @@ KJButton::KJButton(const QStringList &i, KJLoader *parent) if (mTitle=="playlistbutton") { mShowPressed = napp->playlist()->listVisible(); - connect( napp->player(), SIGNAL(playlistShown()), this, SLOT(slotPlaylistShown()) ); - connect( napp->player(), SIGNAL(playlistHidden()), this, SLOT(slotPlaylistHidden()) ); + connect( napp->player(), TQT_SIGNAL(playlistShown()), this, TQT_SLOT(slotPlaylistShown()) ); + connect( napp->player(), TQT_SIGNAL(playlistHidden()), this, TQT_SLOT(slotPlaylistHidden()) ); } else if ( mTitle=="equalizeroffbutton") // same goes for EQ buttons { mShowPressed = (!napp->vequalizer()->isEnabled()); - connect( napp->vequalizer(), SIGNAL(enabled(bool)), SLOT(slotEqEnabled(bool))); + connect( napp->vequalizer(), TQT_SIGNAL(enabled(bool)), TQT_SLOT(slotEqEnabled(bool))); } else if (mTitle=="equalizeronbutton") { mShowPressed = napp->vequalizer()->isEnabled(); - connect( napp->vequalizer(), SIGNAL(enabled(bool)), SLOT(slotEqEnabled(bool))); + connect( napp->vequalizer(), TQT_SIGNAL(enabled(bool)), TQT_SLOT(slotEqEnabled(bool))); } } -QString KJButton::tip() +TQString KJButton::tip() { - QString str; + TQString str; if (mTitle=="closebutton") str=i18n("Close"); else if (mTitle=="minimizebutton") @@ -149,13 +149,13 @@ QString KJButton::tip() return str; } -void KJButton::paint(QPainter *, const QRect &) +void KJButton::paint(TQPainter *, const TQRect &) { if (mShowPressed) bitBlt(KJWidget::parent(), rect().topLeft(), &mPressed, rect(), Qt::CopyROP); } -bool KJButton::mousePress(const QPoint &) +bool KJButton::mousePress(const TQPoint &) { bitBlt(KJWidget::parent(), rect().topLeft(), &mPressed, rect(), Qt::CopyROP); return true; @@ -191,7 +191,7 @@ void KJButton::slotEqEnabled(bool on) showPressed(!on); } -void KJButton::mouseRelease(const QPoint &, bool in) +void KJButton::mouseRelease(const TQPoint &, bool in) { // repaint with default image (player-background) repaint(false); @@ -233,7 +233,7 @@ void KJButton::mouseRelease(const QPoint &, bool in) loopMenu->insertItem(i18n("&Random"), static_cast(Player::Random)); loopMenu->setItemChecked(static_cast(napp->player()->loopStyle()), true); // select current loopstyle in menu - selectedItem = loopMenu->exec(QCursor::pos()); + selectedItem = loopMenu->exec(TQCursor::pos()); if (selectedItem != -1) napp->player()->loop(selectedItem); // set new loopstyle diff --git a/noatun/modules/kjofol-skin/kjbutton.h b/noatun/modules/kjofol-skin/kjbutton.h index 4af4fcb0..e995c533 100644 --- a/noatun/modules/kjofol-skin/kjbutton.h +++ b/noatun/modules/kjofol-skin/kjbutton.h @@ -2,21 +2,21 @@ #define KJBUTTON_H #include "kjwidget.h" -#include +#include class KJLoader; -class KJButton : public QObject, public KJWidget +class KJButton : public TQObject, public KJWidget { Q_OBJECT public: - KJButton(const QStringList&, KJLoader *); + KJButton(const TQStringList&, KJLoader *); - virtual void paint(QPainter *, const QRect &rect); - virtual bool mousePress(const QPoint &pos); - virtual void mouseRelease(const QPoint &pos, bool); + virtual void paint(TQPainter *, const TQRect &rect); + virtual bool mousePress(const TQPoint &pos); + virtual void mouseRelease(const TQPoint &pos, bool); virtual void showPressed(bool b=true); - virtual QString tip(); + virtual TQString tip(); private slots: void slotPlaylistShown(void); @@ -24,10 +24,10 @@ private slots: void slotEqEnabled(bool on); private: - QPixmap mBackground; + TQPixmap mBackground; bool mPushedPixmap; - QPixmap mPressed; - QString mTitle; + TQPixmap mPressed; + TQString mTitle; bool mShowPressed; }; diff --git a/noatun/modules/kjofol-skin/kjequalizer.cpp b/noatun/modules/kjofol-skin/kjequalizer.cpp index 3f0716e4..51d50e97 100644 --- a/noatun/modules/kjofol-skin/kjequalizer.cpp +++ b/noatun/modules/kjofol-skin/kjequalizer.cpp @@ -8,16 +8,16 @@ #include "kjequalizer.h" #include "kjequalizer.moc" -#include -#include +#include +#include #include #include #include -KJEqualizer::KJEqualizer(const QStringList &l, KJLoader *p) - : QObject(0), KJWidget(p), mBack(0), mView(0), mInterpEq(0) +KJEqualizer::KJEqualizer(const TQStringList &l, KJLoader *p) + : TQObject(0), KJWidget(p), mBack(0), mView(0), mInterpEq(0) { int x=l[1].toInt(); int y=l[2].toInt(); @@ -32,12 +32,12 @@ KJEqualizer::KJEqualizer(const QStringList &l, KJLoader *p) // background under equalizer // needed to only blit onto screen ONCE and not for every band - QPixmap tmp = p->pixmap(p->item("backgroundimage")[1]); - mBack = new KPixmap ( QSize(xs,ys) ); + TQPixmap tmp = p->pixmap(p->item("backgroundimage")[1]); + mBack = new KPixmap ( TQSize(xs,ys) ); bitBlt( mBack, 0, 0, &tmp, x, y, xs, ys, Qt::CopyROP ); // buffer for view - mView = new QPixmap ( xs, ys ); + mView = new TQPixmap ( xs, ys ); mBandWidth=parser()["EqualizerBmp"][1].toInt(); mBandHalfHeight=parser()["EqualizerBmp"][2].toInt(); @@ -47,7 +47,7 @@ KJEqualizer::KJEqualizer(const QStringList &l, KJLoader *p) kdDebug(66666) << "[KJEqualizer] creating VInterpolation for " << mBands << " bands..." << endl; mInterpEq = new VInterpolation(mBands); // napp->vequalizer()->setBands(mBands); // FIXME: hack because spline sucks :P - connect(napp->vequalizer(), SIGNAL(changed()), this, SLOT(slotUpdateBuffer())); + connect(napp->vequalizer(), TQT_SIGNAL(changed()), this, TQT_SLOT(slotUpdateBuffer())); slotUpdateBuffer(); // fill mView pixmap with valid data } @@ -59,38 +59,38 @@ KJEqualizer::~KJEqualizer(void) delete mBack; } -int KJEqualizer::barNum(const QPoint &pos) const +int KJEqualizer::barNum(const TQPoint &pos) const { int x = pos.x(); x = x / mXSpace; return mInterpEq->bands() * x / mBands; } -int KJEqualizer::level(const QPoint &pos) const +int KJEqualizer::level(const TQPoint &pos) const { int y = ((-pos.y()) + mBandHalfHeight+1) * (200/mBandHalfHeight); return y; } -void KJEqualizer::paint(QPainter *p, const QRect &) +void KJEqualizer::paint(TQPainter *p, const TQRect &) { - QPixmap temp(rect().width(), rect().height()); + TQPixmap temp(rect().width(), rect().height()); // draw background into buffer bitBlt ( &temp, 0, 0, mBack, 0, 0, -1, -1, Qt::CopyROP ); // draw band sliders into buffer bitBlt( &temp, 0, 0, mView, 0, 0, rect().width(), rect().height(), Qt::CopyROP); // and draw it on screen - bitBlt(p->device(), rect().topLeft(), &temp, QRect(0,0,-1,-1), Qt::CopyROP); + bitBlt(p->device(), rect().topLeft(), &temp, TQRect(0,0,-1,-1), Qt::CopyROP); } void KJEqualizer::slotUpdateBuffer() { // kdDebug(66666) << "[KJEqualizer] slotUpdateBuffer() called." << endl; - QBitmap regionMask( rect().width(), rect().height(), true); // fully transparent mask - QPainter mask( ®ionMask ); + TQBitmap regionMask( rect().width(), rect().height(), true); // fully transparent mask + TQPainter mask( ®ionMask ); - QPoint destX = QPoint(0, 0); + TQPoint destX = TQPoint(0, 0); for (int band=0; bandband( barNum(p) ); diff --git a/noatun/modules/kjofol-skin/kjequalizer.h b/noatun/modules/kjofol-skin/kjequalizer.h index f3f13bd5..be5535eb 100644 --- a/noatun/modules/kjofol-skin/kjequalizer.h +++ b/noatun/modules/kjofol-skin/kjequalizer.h @@ -6,20 +6,20 @@ class KJLoader; class VInterpolation; -#include +#include -class KJEqualizer : public QObject, public KJWidget +class KJEqualizer : public TQObject, public KJWidget { Q_OBJECT public: - KJEqualizer(const QStringList &, KJLoader *parent); + KJEqualizer(const TQStringList &, KJLoader *parent); ~KJEqualizer(void); - virtual void mouseMove(const QPoint &pos, bool); - virtual bool mousePress(const QPoint&); - virtual void paint(QPainter *p, const QRect &rect); - int barNum(const QPoint &pos) const; - int level(const QPoint &pos) const; + virtual void mouseMove(const TQPoint &pos, bool); + virtual bool mousePress(const TQPoint&); + virtual void paint(TQPainter *p, const TQRect &rect); + int barNum(const TQPoint &pos) const; + int level(const TQPoint &pos) const; public slots: void slotUpdateBuffer(); @@ -30,9 +30,9 @@ private: int mBandWidth; int mBandHalfHeight; - QPixmap mBars; // holds all slider images - QPixmap *mBack; // holds background of EQ for easy repaint - QPixmap *mView; // holds prepared img of all sliders + TQPixmap mBars; // holds all slider images + TQPixmap *mBack; // holds background of EQ for easy repaint + TQPixmap *mView; // holds prepared img of all sliders VInterpolation *mInterpEq; }; diff --git a/noatun/modules/kjofol-skin/kjfont.cpp b/noatun/modules/kjofol-skin/kjfont.cpp index df2abed3..c6b16b77 100644 --- a/noatun/modules/kjofol-skin/kjfont.cpp +++ b/noatun/modules/kjofol-skin/kjfont.cpp @@ -16,16 +16,16 @@ #include #include -#include -#include +#include +#include /******************************************* * KJFont *******************************************/ -KJFont::KJFont(const QString &prefix, KJLoader *parent) : mTextMask(0), mTransparentRGB(0) +KJFont::KJFont(const TQString &prefix, KJLoader *parent) : mTextMask(0), mTransparentRGB(0) { -// kdDebug(66666) << "KJFont::KJFont(const QString &prefix, KJLoader *parent)" << prefix.latin1() << endl; +// kdDebug(66666) << "KJFont::KJFont(const TQString &prefix, KJLoader *parent)" << prefix.latin1() << endl; if (prefix=="timefont") { @@ -86,7 +86,7 @@ KJFont::KJFont(const QString &prefix, KJLoader *parent) : mTextMask(0), mTranspa // define color in font that will be transparent later on if ( mTransparent ) { - QImage ibackground = mText.convertToImage(); + TQImage ibackground = mText.convertToImage(); mTransparentRGB = ibackground.pixel( ibackground.width()-1, ibackground.height()-1 ); // kdDebug(66666) << "color (" << qRed(mTransparentRGB) << "," << qGreen(mTransparentRGB) << "," << qBlue(mTransparentRGB) << ") will be transparent for " << prefix.latin1() << endl; mTextMask = KJWidget::getMask(ibackground,mTransparentRGB); @@ -105,8 +105,8 @@ void KJFont::recalcSysFont(void) mUseSysFont = KJLoader::kjofol->prefs()->useSysFont(); if (!mUseSysFont) return; - sysFont = QFont(KJLoader::kjofol->prefs()->sysFont()); - sysFont.setStyleStrategy( QFont::NoAntialias ); + sysFont = TQFont(KJLoader::kjofol->prefs()->sysFont()); + sysFont.setStyleStrategy( TQFont::NoAntialias ); if ( sysFontMetrics ) delete sysFontMetrics; sysFontColor = KJLoader::kjofol->prefs()->sysFontColor(); @@ -117,7 +117,7 @@ void KJFont::recalcSysFont(void) for(fSize = mHeight; fSize>=4; fSize--) { sysFont.setPixelSize ( fSize ); - sysFontMetrics = new QFontMetrics(sysFont); + sysFontMetrics = new TQFontMetrics(sysFont); // kdDebug(66666) << "wanted fSize=" << fSize << ", metric h=" << sysFontMetrics->height() << endl; // either found a small enough font or found no proper font at all if ( sysFontMetrics->height() <= mHeight || fSize==4 ) @@ -129,7 +129,7 @@ void KJFont::recalcSysFont(void) } } -QPixmap KJFont::draw(const QCString &str, int wide, const QPoint &pos) const +TQPixmap KJFont::draw(const TQCString &str, int wide, const TQPoint &pos) const { if ( mUseSysFont ) return drawSysFont(str,wide,pos); @@ -137,24 +137,24 @@ QPixmap KJFont::draw(const QCString &str, int wide, const QPoint &pos) const return drawPixmapFont(str,wide,pos); } -QPixmap KJFont::drawSysFont(const QCString &s, int wide, const QPoint &pos) const +TQPixmap KJFont::drawSysFont(const TQCString &s, int wide, const TQPoint &pos) const { // kdDebug(66666) << k_funcinfo << "BEGIN, s='" << s << "'" << endl; - QPoint to(pos); - QString string(s); + TQPoint to(pos); + TQString string(s); int stringWidth = sysFontMetrics->width( string ); // kdDebug(66666) << "final metrics; w=" << stringWidth << ", h=" << sysFontMetrics->height() << endl; - QPixmap region( + TQPixmap region( (stringWidth > wide ? stringWidth : wide), mHeight); - QPainter rp(®ion); // region painter + TQPainter rp(®ion); // region painter - QBitmap regionMask( + TQBitmap regionMask( (stringWidth > wide ? stringWidth : wide), mHeight, true); // fully transparent mask - QPainter mp(®ionMask); // mask painter + TQPainter mp(®ionMask); // mask painter // kdDebug(66666) << "region; w=" << region.width() << ", h=" << region.height() << endl; @@ -164,7 +164,7 @@ QPixmap KJFont::drawSysFont(const QCString &s, int wide, const QPoint &pos) cons { freeSpace = wide - stringWidth; mp.fillRect ( to.x(), 0, (freeSpace/2), mHeight, Qt::color0 ); - to += QPoint ( (freeSpace/2), 0 ); + to += TQPoint ( (freeSpace/2), 0 ); // kdDebug(66666) << "centering text, freeSpace=" << freeSpace << endl; } @@ -176,13 +176,13 @@ QPixmap KJFont::drawSysFont(const QCString &s, int wide, const QPoint &pos) cons mp.setPen(Qt::color1); mp.drawText(to.x(), to.y(), region.width()-freeSpace, mHeight, Qt::AlignLeft|Qt::AlignTop, string); - to += QPoint(region.width()-freeSpace,0); + to += TQPoint(region.width()-freeSpace,0); // kdDebug(66666) << "text width=" << region.width()-freeSpace << endl; if (freeSpace > 0) { mp.fillRect ( to.x(), 0, (freeSpace/2), mHeight, Qt::color0 ); - to += QPoint ( (freeSpace/2), 0 ); + to += TQPoint ( (freeSpace/2), 0 ); // kdDebug(66666) << "centering text, freeSpace=" << freeSpace << endl; } @@ -192,22 +192,22 @@ QPixmap KJFont::drawSysFont(const QCString &s, int wide, const QPoint &pos) cons return region; } -QPixmap KJFont::drawPixmapFont(const QCString &str, int wide, const QPoint &pos) const +TQPixmap KJFont::drawPixmapFont(const TQCString &str, int wide, const TQPoint &pos) const { // kdDebug(66666) << k_funcinfo << "BEGIN" << endl; - QPoint to(pos); + TQPoint to(pos); - QCString string = str.lower(); - QPixmap region( + TQCString string = str.lower(); + TQPixmap region( (string.length()*mWidth+string.length()*mSpacing > (unsigned int)wide ? string.length()*mWidth+string.length()*mSpacing : wide), mHeight); - QBitmap regionMask( + TQBitmap regionMask( (string.length()*mWidth+string.length()*mSpacing > (unsigned int)wide ? string.length()*mWidth+string.length()*mSpacing : wide), mHeight, true); // fully transparent mask - QPainter mask( ®ionMask ); + TQPainter mask( ®ionMask ); // kdDebug(66666) << "draw: {" << str << "}" << endl; @@ -217,7 +217,7 @@ QPixmap KJFont::drawPixmapFont(const QCString &str, int wide, const QPoint &pos) { freeSpace = wide - string.length()*mWidth+string.length()*mSpacing; mask.fillRect ( to.x(), 0, (freeSpace/2), mHeight, Qt::color0 ); - to += QPoint ( (freeSpace/2), 0 ); + to += TQPoint ( (freeSpace/2), 0 ); } // kdDebug(66666) << k_funcinfo << "pixmap width=" << region.width() << endl; @@ -229,20 +229,20 @@ QPixmap KJFont::drawPixmapFont(const QCString &str, int wide, const QPoint &pos) char c = string[charPos]; // the character to be drawn next drawCharacter(®ion, ®ionMask, to, c); - to += QPoint(mWidth, 0); + to += TQPoint(mWidth, 0); // draw according to "spacing" if ( (charPos < string.length()-1) && mSpacing > 0 ) { // make the spacing-area transparent mask.fillRect ( to.x(), 0, mSpacing, mHeight, Qt::color0 ); - to += QPoint ( mSpacing, 0 ); + to += TQPoint ( mSpacing, 0 ); } } if (freeSpace > 0) { mask.fillRect ( to.x(), 0, (freeSpace/2), mHeight, Qt::color0 ); - to += QPoint ( (freeSpace/2), 0 ); + to += TQPoint ( (freeSpace/2), 0 ); } region.setMask( regionMask ); @@ -250,24 +250,24 @@ QPixmap KJFont::drawPixmapFont(const QCString &str, int wide, const QPoint &pos) return region; } -void KJFont::drawCharacter(QPixmap *dev, QBitmap *devMask, const QPoint &to, char c) const +void KJFont::drawCharacter(TQPixmap *dev, TQBitmap *devMask, const TQPoint &to, char c) const { - QPoint src=charSource(c); + TQPoint src=charSource(c); int x=src.x(); int y=src.y(); int xs=mWidth; int ys=mHeight; - bitBlt(dev, to, &mText, QRect(x,y,xs,ys), Qt::CopyROP); + bitBlt(dev, to, &mText, TQRect(x,y,xs,ys), Qt::CopyROP); // bitBlt mask for transparency if ( mTransparent ) { - bitBlt(devMask, to, &mTextMask, QRect(x,y,xs,ys), Qt::OrROP); + bitBlt(devMask, to, &mTextMask, TQRect(x,y,xs,ys), Qt::OrROP); } else // fill mask { - QPainter tempPainter (devMask); + TQPainter tempPainter (devMask); tempPainter.fillRect ( to.x(), 0, xs,ys, Qt::color1 ); } } @@ -276,14 +276,14 @@ void KJFont::drawCharacter(QPixmap *dev, QBitmap *devMask, const QPoint &to, cha #include // searches for top/left coordinate of a given character inside the font-pixmap -QPoint KJFont::charSource(char c) const +TQPoint KJFont::charSource(char c) const { for (int i=0; i<3; i++) { const char *pos = strchr(mString[i], c); if (!pos) continue; - return QPoint(mWidth*((int)(pos-mString[i])), mHeight*i); + return TQPoint(mWidth*((int)(pos-mString[i])), mHeight*i); } return charSource(mNullChar); diff --git a/noatun/modules/kjofol-skin/kjfont.h b/noatun/modules/kjofol-skin/kjfont.h index 4ea5319b..a40e7854 100644 --- a/noatun/modules/kjofol-skin/kjfont.h +++ b/noatun/modules/kjofol-skin/kjfont.h @@ -1,21 +1,21 @@ #ifndef KJFONT_H #define KJFONT_H -#include -#include -#include -#include +#include +#include +#include +#include class KJLoader; class KJFont { public: - KJFont(const QString &prefix, KJLoader *parent); + KJFont(const TQString &prefix, KJLoader *parent); // draw the string str to dev at position pos, within rectangle limit in relation to pos - QPixmap draw(const QCString &str, int wide, const QPoint &pt=QPoint(0,0)) const; - QPixmap draw(const QString &str, int wide, const QPoint &pt=QPoint(0,0)) const - { return draw(QCString(str.latin1()), wide, pt); } + TQPixmap draw(const TQCString &str, int wide, const TQPoint &pt=TQPoint(0,0)) const; + TQPixmap draw(const TQString &str, int wide, const TQPoint &pt=TQPoint(0,0)) const + { return draw(TQCString(str.latin1()), wide, pt); } int fontHeight() const {return mHeight;} int fontWidth() const {return mWidth;} @@ -26,24 +26,24 @@ public: void recalcSysFont(void); protected: - QPixmap drawSysFont(const QCString &s, int wide, const QPoint &pos=QPoint(0,0)) const; - QPixmap drawPixmapFont(const QCString &, int, const QPoint &pos=QPoint(0,0)) const; + TQPixmap drawSysFont(const TQCString &s, int wide, const TQPoint &pos=TQPoint(0,0)) const; + TQPixmap drawPixmapFont(const TQCString &, int, const TQPoint &pos=TQPoint(0,0)) const; - void drawCharacter(QPixmap *dev, QBitmap *devMask, const QPoint &to, char c) const; - QPoint charSource(char c) const; + void drawCharacter(TQPixmap *dev, TQBitmap *devMask, const TQPoint &to, char c) const; + TQPoint charSource(char c) const; private: - QPixmap mText; - QBitmap mTextMask; + TQPixmap mText; + TQBitmap mTextMask; QRgb mTransparentRGB; // this color will be transparent int mSpacing; int mWidth, mHeight; bool mTransparent; // indicates wether there's transparency const char *mString[3]; char mNullChar; - QFontMetrics *sysFontMetrics; - QFont sysFont; - QColor sysFontColor; + TQFontMetrics *sysFontMetrics; + TQFont sysFont; + TQColor sysFontColor; bool mUseSysFont; }; diff --git a/noatun/modules/kjofol-skin/kjloader.cpp b/noatun/modules/kjofol-skin/kjloader.cpp index 11f96b7a..7a9d70c4 100644 --- a/noatun/modules/kjofol-skin/kjloader.cpp +++ b/noatun/modules/kjofol-skin/kjloader.cpp @@ -41,16 +41,16 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -73,19 +73,19 @@ class KJToolTip : public QToolTip { public: KJToolTip(KJLoader *parent) - : QToolTip(parent), mParent(parent) + : TQToolTip(parent), mParent(parent) {} protected: - virtual void maybeTip(const QPoint &p) + virtual void maybeTip(const TQPoint &p) { if ( !mParent->prefs()->displayTooltips() ) return; - QPtrList things=mParent->widgetsAt(p); + TQPtrList things=mParent->widgetsAt(p); for (KJWidget *i=things.first(); i!=0; i=things.next()) { - QString string=i->tip(); + TQString string=i->tip(); if (string.length()) { tip(i->rect(), string); @@ -103,7 +103,7 @@ KJLoader *KJLoader::kjofol=0; KJLoader::KJLoader() - : QWidget(0, "NoatunKJLoader", + : TQWidget(0, "NoatunKJLoader", WType_TopLevel | WStyle_NoBorder | WRepaintNoErase ), UserInterface(), moving(false), @@ -132,10 +132,10 @@ KJLoader::KJLoader() subwidgets.setAutoDelete(true); mPrefs = new KJPrefs(this); - connect ( mPrefs, SIGNAL(configChanged()), this, SLOT(readConfig()) ); + connect ( mPrefs, TQT_SIGNAL(configChanged()), this, TQT_SLOT(readConfig()) ); - QString skin = mPrefs->skin(); - if ( QFile(skin).exists() ) + TQString skin = mPrefs->skin(); + if ( TQFile(skin).exists() ) { loadSkin(skin); } @@ -147,22 +147,22 @@ KJLoader::KJLoader() } mHelpMenu = new KHelpMenu(this, kapp->aboutData()); - connect(napp->player(), SIGNAL(timeout()), SLOT(timeUpdate())); - connect(napp->player(), SIGNAL(stopped()), SLOT(timeUpdate())); - connect(napp->player(), SIGNAL(newSong()), SLOT(newSong())); + connect(napp->player(), TQT_SIGNAL(timeout()), TQT_SLOT(timeUpdate())); + connect(napp->player(), TQT_SIGNAL(stopped()), TQT_SLOT(timeUpdate())); + connect(napp->player(), TQT_SIGNAL(newSong()), TQT_SLOT(newSong())); - connect(napp, SIGNAL(hideYourself()), SLOT(hide())); - connect(napp, SIGNAL(showYourself()), SLOT(show())); -// KStdAction::quit(napp, SLOT(quit()), actionCollection()); + connect(napp, TQT_SIGNAL(hideYourself()), TQT_SLOT(hide())); + connect(napp, TQT_SIGNAL(showYourself()), TQT_SLOT(show())); +// KStdAction::quit(napp, TQT_SLOT(quit()), actionCollection()); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); // newSong(); } -QPtrList KJLoader::widgetsAt(const QPoint &pt) const +TQPtrList KJLoader::widgetsAt(const TQPoint &pt) const { - QPtrList things; - for ( QPtrListIterator i(subwidgets); i.current(); ++i ) + TQPtrList things; + for ( TQPtrListIterator i(subwidgets); i.current(); ++i ) if ( (*i)->rect().contains(pt) ) things.append((*i)); @@ -184,9 +184,9 @@ void KJLoader::addChild(KJWidget *c) // The BIG one ;) // this methode does all the hard work on loading these weird skins -void KJLoader::loadSkin(const QString &file) +void KJLoader::loadSkin(const TQString &file) { -// kdDebug(66666) << "" << endl; +// kdDebug(66666) << "" << endl; // kdDebug(66666) << " file = " << file.latin1() << endl; if ( file == mCurrentSkin ) // we don't load the same skin again @@ -371,12 +371,12 @@ void KJLoader::loadSkin(const QString &file) // I cant believe it, there are skins without a seeker, now THATS stupid :) if (exist("seekregion")) - QTimer::singleShot(0, this, SLOT(loadSeeker())); + TQTimer::singleShot(0, this, TQT_SLOT(loadSeeker())); // all the regular buttons - for (QDictIterator i(*this); i.current(); ++i) + for (TQDictIterator i(*this); i.current(); ++i) { - QString d=i.currentKey(); + TQString d=i.currentKey(); if(d.contains("button") && !d.startsWith("playlistwindow") && // don't add buttons that belong to the playlistwindow d != "pitchcontrolbutton" && // both already handled above as they aren't buttons but sliders @@ -399,7 +399,7 @@ void KJLoader::loadSkin(const QString &file) if (napp->player()->isPlaying()) newSong(); -// kdDebug(66666) << "" << endl; +// kdDebug(66666) << "" << endl; } void KJLoader::loadSeeker() @@ -451,19 +451,19 @@ void KJLoader::minimize() showMinimized(); } -void KJLoader::closeEvent(QCloseEvent*) +void KJLoader::closeEvent(TQCloseEvent*) { -// kdDebug(66666) << "KJLoader::closeEvent(QCloseEvent*)" << endl; +// kdDebug(66666) << "KJLoader::closeEvent(TQCloseEvent*)" << endl; unload(); } -void KJLoader::dragEnterEvent(QDragEnterEvent *event) +void KJLoader::dragEnterEvent(TQDragEnterEvent *event) { // accept uri drops only event->accept(KURLDrag::canDecode(event)); } -void KJLoader::dropEvent(QDropEvent *event) +void KJLoader::dropEvent(TQDropEvent *event) { KURL::List urls; if ( KURLDrag::decode(event,urls) ) @@ -473,7 +473,7 @@ void KJLoader::dropEvent(QDropEvent *event) } } -void KJLoader::wheelEvent(QWheelEvent *e) +void KJLoader::wheelEvent(TQWheelEvent *e) { // from QT-Docu: delta() is 120 for one step if (e->state() & ControlButton) napp->player()->setVolume ( napp->player()->volume() + (e->delta()/8) ); // 15% volumechange @@ -487,11 +487,11 @@ void KJLoader::switchToDockmode() // kdDebug(66666) << "KJLoader::switchToDockmode()" << endl; loadSkin( mCurrentDockModeSkin ); - connect(mWin, SIGNAL(activeWindowChanged(WId)), this, SLOT(slotWindowActivate(WId))); - connect(mWin, SIGNAL(windowRemoved(WId)), this, SLOT(slotWindowRemove(WId))); - connect(mWin, SIGNAL(stackingOrderChanged()), this, SLOT(slotStackingChanged())); - connect(mWin, SIGNAL(windowChanged(WId)), this, SLOT(slotWindowChange(WId))); - connect(mWin, SIGNAL(currentDesktopChanged(int)), this, SLOT(slotDesktopChange(int))); + connect(mWin, TQT_SIGNAL(activeWindowChanged(WId)), this, TQT_SLOT(slotWindowActivate(WId))); + connect(mWin, TQT_SIGNAL(windowRemoved(WId)), this, TQT_SLOT(slotWindowRemove(WId))); + connect(mWin, TQT_SIGNAL(stackingOrderChanged()), this, TQT_SLOT(slotStackingChanged())); + connect(mWin, TQT_SIGNAL(windowChanged(WId)), this, TQT_SLOT(slotWindowChange(WId))); + connect(mWin, TQT_SIGNAL(currentDesktopChanged(int)), this, TQT_SLOT(slotDesktopChange(int))); WId activeWin = mWin->activeWindow(); if (activeWin && (activeWin != winId())) @@ -676,7 +676,7 @@ void KJLoader::slotStackingChanged() // We seem to get this signal before the window has been restacked, // so we just schedule a restack. - QTimer::singleShot ( 10, this, SLOT(restack()) ); + TQTimer::singleShot ( 10, this, TQT_SLOT(restack()) ); // kdDebug(66666) << "END slotStackingChanged()" << endl; } @@ -708,45 +708,45 @@ KJLoader::~KJLoader() delete mWin; } -void KJLoader::paintEvent(QPaintEvent *e) +void KJLoader::paintEvent(TQPaintEvent *e) { - QPainter p(this); + TQPainter p(this); for (KJWidget* i=subwidgets.first(); i!=0; i=subwidgets.next()) if (i->rect().intersects(e->rect())) i->paint(&p, e->rect().intersect(i->rect())); -// QWidget::paintEvent(e); +// TQWidget::paintEvent(e); } -void KJLoader::mouseMoveEvent(QMouseEvent *e) +void KJLoader::mouseMoveEvent(TQMouseEvent *e) { if (moving) { - move ( QCursor::pos()-mMousePoint ); + move ( TQCursor::pos()-mMousePoint ); return; } -// QWidget::mouseMoveEvent(e); +// TQWidget::mouseMoveEvent(e); // not on background but on a widget: pass event to subwidget if ( !moving && mClickedIn && subwidgets.findRef(mClickedIn) != -1 ) { mClickedIn->mouseMove ( e->pos()-mClickedIn->rect().topLeft(), - mClickedIn->rect().contains(mapFromGlobal(QCursor::pos())) ); + mClickedIn->rect().contains(mapFromGlobal(TQCursor::pos())) ); } } -void KJLoader::mousePressEvent(QMouseEvent *e) +void KJLoader::mousePressEvent(TQMouseEvent *e) { -// kdDebug(66666) << "KJLoader::mousePressEvent(QMouseEvent *e)" << endl; +// kdDebug(66666) << "KJLoader::mousePressEvent(TQMouseEvent *e)" << endl; -// QWidget::mousePressEvent(e); +// TQWidget::mousePressEvent(e); if ( e->button()==RightButton ) NoatunStdAction::ContextMenu::showContextMenu(); else /* if ( e->button()==LeftButton ) */ { - mMousePoint = mapFromGlobal(QCursor::pos()); + mMousePoint = mapFromGlobal(TQCursor::pos()); // try to find a KJWidget that is here for (KJWidget* i=subwidgets.first(); i!=0; i=subwidgets.next()) if (i->rect().contains(mMousePoint)) @@ -763,18 +763,18 @@ void KJLoader::mousePressEvent(QMouseEvent *e) } } -void KJLoader::mouseReleaseEvent(QMouseEvent */*e*/) +void KJLoader::mouseReleaseEvent(TQMouseEvent */*e*/) { -// kdDebug(66666) << "KJLoader::mouseReleaseEvent(QMouseEvent *e)" << endl; +// kdDebug(66666) << "KJLoader::mouseReleaseEvent(TQMouseEvent *e)" << endl; -// QWidget::mouseReleaseEvent(e); +// TQWidget::mouseReleaseEvent(e); if (!moving && mClickedIn && subwidgets.findRef(mClickedIn)!=-1) { - mClickedIn->mouseRelease(mapFromGlobal(QCursor::pos())- + mClickedIn->mouseRelease(mapFromGlobal(TQCursor::pos())- mClickedIn->rect().topLeft(), mClickedIn->rect().contains( - mapFromGlobal(QCursor::pos()))); + mapFromGlobal(TQCursor::pos()))); mClickedIn=0; } @@ -804,17 +804,17 @@ void KJLoader::readConfig() void KJLoader::showSplash() { - splashScreen = new QLabel( 0L, "SplashScreen", + splashScreen = new TQLabel( 0L, "SplashScreen", WType_TopLevel | WStyle_NoBorder | WRepaintNoErase | WX11BypassWM ); - QPixmap splashPix = pixmap(item("splashscreen")[1]); + TQPixmap splashPix = pixmap(item("splashscreen")[1]); splashScreen->setPixmap( splashPix ); splashScreen->setBackgroundMode ( NoBackground ); splashScreen->setMask( KJWidget::getMask(image(item("splashscreen")[1])) ); - QSize sh = splashScreen->sizeHint(); + TQSize sh = splashScreen->sizeHint(); - QRect desk = KGlobalSettings::splashScreenDesktopGeometry(); + TQRect desk = KGlobalSettings::splashScreenDesktopGeometry(); splashScreen->move (desk.x() + (desk.width() - sh.width())/2, desk.y() + (desk.height() - sh.height())/2 ); @@ -822,7 +822,7 @@ void KJLoader::showSplash() splashScreen->show(); napp->processEvents(); // we want this one time to get the splash actually displayed ASAP - QTimer::singleShot(3000, this, SLOT(hideSplash()) ); + TQTimer::singleShot(3000, this, TQT_SLOT(hideSplash()) ); } void KJLoader::hideSplash() diff --git a/noatun/modules/kjofol-skin/kjloader.h b/noatun/modules/kjofol-skin/kjloader.h index 44b507d6..2510b14d 100644 --- a/noatun/modules/kjofol-skin/kjloader.h +++ b/noatun/modules/kjofol-skin/kjloader.h @@ -13,10 +13,10 @@ #include // system includes -#include -#include -#include -#include +#include +#include +#include +#include #include @@ -30,7 +30,7 @@ class KJFont; class KJPrefs; -class KJLoader : public QWidget, public UserInterface, public Parser +class KJLoader : public TQWidget, public UserInterface, public Parser { Q_OBJECT NOATUNPLUGIND @@ -43,30 +43,30 @@ public: public: void minimize(); KHelpMenu *helpMenu() const { return mHelpMenu; } - QStringList &item(const QString &key) { return *Parser::find(key); } + TQStringList &item(const TQString &key) { return *Parser::find(key); } // returns path to currently loaded configfile // can be either a newly loaded one or one of the three below - QString currentSkin() { return mCurrentSkin; } + TQString currentSkin() { return mCurrentSkin; } // returns path to mainskin-configfile - QString currentDefaultSkin() { return mCurrentDefaultSkin; } + TQString currentDefaultSkin() { return mCurrentDefaultSkin; } //returns path to dockmode-configfile if present - QString currentDockModeSkin() { return mCurrentDockModeSkin; } + TQString currentDockModeSkin() { return mCurrentDockModeSkin; } //returns path to winshademode-configfile if present (not supported yet) - QString currentWinshadeModeSkin() { return mCurrentWinshadeModeSkin; } + TQString currentWinshadeModeSkin() { return mCurrentWinshadeModeSkin; } KJPrefs *prefs() const { return mPrefs; } - QPtrList widgetsAt(const QPoint &pt) const; + TQPtrList widgetsAt(const TQPoint &pt) const; void removeChild(KJWidget *c); void addChild(KJWidget *c); public slots: - void loadSkin(const QString &file); + void loadSkin(const TQString &file); void readConfig(); void switchToDockmode(); void returnFromDockmode(); @@ -90,15 +90,15 @@ private slots: void hideSplash(); protected: - virtual void mouseMoveEvent(QMouseEvent *e); - virtual void mousePressEvent(QMouseEvent *e); - virtual void mouseReleaseEvent(QMouseEvent *e); - virtual void paintEvent(QPaintEvent *e); - virtual void closeEvent(QCloseEvent*e); - virtual void wheelEvent(QWheelEvent *e); + virtual void mouseMoveEvent(TQMouseEvent *e); + virtual void mousePressEvent(TQMouseEvent *e); + virtual void mouseReleaseEvent(TQMouseEvent *e); + virtual void paintEvent(TQPaintEvent *e); + virtual void closeEvent(TQCloseEvent*e); + virtual void wheelEvent(TQWheelEvent *e); - virtual void dragEnterEvent(QDragEnterEvent *event); - virtual void dropEvent(QDropEvent *event); + virtual void dragEnterEvent(TQDragEnterEvent *event); + virtual void dropEvent(TQDropEvent *event); public: static KJLoader* kjofol; @@ -108,20 +108,20 @@ private: KWinModule *mWin; WId mDockToWin; int mDockPositionX, mDockPositionY, mDockPosition; - QRect mDockWindowRect; + TQRect mDockWindowRect; // ==== end of docking stuff ==== bool moving; - QPoint mMousePoint; - QPtrList subwidgets; + TQPoint mMousePoint; + TQPtrList subwidgets; KJWidget *mClickedIn; KHelpMenu *mHelpMenu; KJFont *mText, *mNumbers, *mVolumeFont, *mPitchFont; - QLabel *splashScreen; + TQLabel *splashScreen; KJToolTip *mTooltips; - QString mCurrentSkin; - QString mCurrentDefaultSkin; - QString mCurrentDockModeSkin; - QString mCurrentWinshadeModeSkin; + TQString mCurrentSkin; + TQString mCurrentDefaultSkin; + TQString mCurrentDockModeSkin; + TQString mCurrentWinshadeModeSkin; KJPrefs *mPrefs; }; diff --git a/noatun/modules/kjofol-skin/kjprefs.cpp b/noatun/modules/kjofol-skin/kjprefs.cpp index 0cadc5ac..4231d0ff 100644 --- a/noatun/modules/kjofol-skin/kjprefs.cpp +++ b/noatun/modules/kjofol-skin/kjprefs.cpp @@ -14,19 +14,19 @@ #include "parser.h" // system includes -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -43,19 +43,19 @@ #include #include -static QString expand(QString s); +static TQString expand(TQString s); -KJPrefs::KJPrefs(QObject* parent) +KJPrefs::KJPrefs(TQObject* parent) : CModule(i18n("K-Jöfol Skins"), i18n("Skin Selection For the K-Jöfol Plugin"), "style", parent) { cfg = KGlobal::config(); - QVBoxLayout *vbox = new QVBoxLayout(this); + TQVBoxLayout *vbox = new TQVBoxLayout(this); vbox->setAutoAdd(true); vbox->setSpacing( 0 ); vbox->setMargin( 0 ); - mTabWidget = new QTabWidget( this, "mTabWidget" ); + mTabWidget = new TQTabWidget( this, "mTabWidget" ); mSkinselectorWidget = new KJSkinselector ( mTabWidget, "mSkinselectorWidget" ); mGuiSettingsWidget = new KJGuiSettings ( mTabWidget, "mGuiSettingsWidget" ); @@ -63,9 +63,9 @@ KJPrefs::KJPrefs(QObject* parent) mTabWidget->insertTab( mSkinselectorWidget, i18n("&Skin Selector") ); mTabWidget->insertTab( mGuiSettingsWidget, i18n("O&ther Settings") ); - connect ( mSkinselectorWidget->mSkins, SIGNAL(activated(const QString&)), SLOT(showPreview(const QString&)) ); - connect ( mSkinselectorWidget->installButton, SIGNAL(clicked()), this, SLOT(installNewSkin()) ); - connect ( mSkinselectorWidget->mRemoveButton, SIGNAL(clicked()), this, SLOT(removeSelectedSkin()) ); + connect ( mSkinselectorWidget->mSkins, TQT_SIGNAL(activated(const TQString&)), TQT_SLOT(showPreview(const TQString&)) ); + connect ( mSkinselectorWidget->installButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(installNewSkin()) ); + connect ( mSkinselectorWidget->mRemoveButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(removeSelectedSkin()) ); reopen(); // fill the skinlist and draw a preview } @@ -88,7 +88,7 @@ void KJPrefs::reopen() // reload config and set stuff in dialog mGuiSettingsWidget->useSysFont->setChecked( cfg->readBoolEntry("Use SysFont", false) ); mGuiSettingsWidget->cmbSysFont->setCurrentFont( cfg->readEntry("SysFont Family", KGlobalSettings::generalFont().family()) ); - QColor tmpColor = QColor(255,255,255); + TQColor tmpColor = TQColor(255,255,255); mGuiSettingsWidget->cmbSysFontColor->setColor( cfg->readColorEntry("SysFont Color", &tmpColor)); @@ -127,18 +127,18 @@ void KJPrefs::reopen() // reload config and set stuff in dialog break; } - QStringList skins; - QStringList skinLocations = KGlobal::dirs()->findDirs("data", "noatun/skins/kjofol"); + TQStringList skins; + TQStringList skinLocations = KGlobal::dirs()->findDirs("data", "noatun/skins/kjofol"); // iterate through all paths where Noatun is searching for kjofol-skins for (uint i = 0; i < skinLocations.count(); ++i ) { - QStringList skinDirs = QDir(skinLocations[i]).entryList(); + TQStringList skinDirs = TQDir(skinLocations[i]).entryList(); // iterate trough all dirs (normally, users can fsck every dir-struct *g*) containing a skin for (uint k = 2; k < skinDirs.count(); ++k ) { - QDir skinDirCnt = QDir ( skinLocations[i]+skinDirs[k], "*.rc", QDir::Name|QDir::IgnoreCase, QDir::Files ); + TQDir skinDirCnt = TQDir ( skinLocations[i]+skinDirs[k], "*.rc", TQDir::Name|TQDir::IgnoreCase, TQDir::Files ); // make a list of all .rc-files in a skindir - QStringList rcFiles = skinDirCnt.entryList(); + TQStringList rcFiles = skinDirCnt.entryList(); // iterate trough all those rc.-files in a skindir for (uint j = 0; j < rcFiles.count(); j++ ) { @@ -150,14 +150,14 @@ void KJPrefs::reopen() // reload config and set stuff in dialog skins.sort(); - QString loaded = cfg->readEntry("SkinResource", locate("data", "noatun/skins/kjofol/kjofol/kjofol.rc") ); + TQString loaded = cfg->readEntry("SkinResource", locate("data", "noatun/skins/kjofol/kjofol/kjofol.rc") ); loaded = loaded.mid(loaded.findRev("/")+1); // remove path loaded = loaded.left( loaded.length() - 3 ); // remove ".rc" mSkinselectorWidget->mSkins->clear(); int index = 0; - for (QStringList::Iterator i=skins.begin(); i!=skins.end(); ++i) + for (TQStringList::Iterator i=skins.begin(); i!=skins.end(); ++i) { *i = (*i).left( (*i).length() - 3 ); mSkinselectorWidget->mSkins->insertItem(*i); @@ -174,7 +174,7 @@ void KJPrefs::reopen() // reload config and set stuff in dialog void KJPrefs::save() { // kdDebug(66666) << k_funcinfo << "called." << endl; - QString skin=::expand ( mSkinselectorWidget->mSkins->currentText() ); + TQString skin=::expand ( mSkinselectorWidget->mSkins->currentText() ); // first load skin and then save config to prevent // reloading a broken skin after a crash @@ -206,7 +206,7 @@ void KJPrefs::save() emit configChanged(); } -QString KJPrefs::skin( void ) const +TQString KJPrefs::skin( void ) const { // return full path to currently loaded skin return ::expand( mSkinselectorWidget->mSkins->currentText() ); @@ -312,24 +312,24 @@ void KJPrefs::setUseSysFont( bool mode ) save(); // not sure if that's a good idea or doing saving by hand in here } -QFont KJPrefs::sysFont(void) const +TQFont KJPrefs::sysFont(void) const { - QString family = mGuiSettingsWidget->cmbSysFont->currentFont(); + TQString family = mGuiSettingsWidget->cmbSysFont->currentFont(); // kdDebug(66666) << k_funcinfo << "family=" << family << endl; - return QFont( family ); + return TQFont( family ); } -void KJPrefs::setSysFont(QFont &fnt) +void KJPrefs::setSysFont(TQFont &fnt) { mGuiSettingsWidget->cmbSysFont->setCurrentFont( fnt.family() ); } -QColor KJPrefs::sysFontColor(void) const +TQColor KJPrefs::sysFontColor(void) const { return mGuiSettingsWidget->cmbSysFontColor->color(); } -void KJPrefs::sysFontColor(QColor &c) +void KJPrefs::sysFontColor(TQColor &c) { mGuiSettingsWidget->cmbSysFontColor->setColor( c ); } @@ -345,19 +345,19 @@ bool KJPrefs::displaySplash( void ) const } -void KJPrefs::showPreview(const QString &_skin) +void KJPrefs::showPreview(const TQString &_skin) { Parser p; p.open( ::expand(_skin) ); - QImage image = p.image(p["BackgroundImage"][1]); + TQImage image = p.image(p["BackgroundImage"][1]); if (!image.isNull()) { mPixmap.convertFromImage(image); mPixmap.setMask( KJWidget::getMask(image) ); } else - mPixmap=QPixmap(); + mPixmap=TQPixmap(); mSkinselectorWidget->mPreview->setPixmap(mPixmap); mSkinselectorWidget->mAboutText->setText(p.about()); @@ -406,7 +406,7 @@ void KJPrefs::installNewSkin( void ) // create a dir with name of the skinarchive // path to unpack to: pathToTmp/filename.ext/ - QString tmpUnpackPath = locateLocal("tmp", srcFile.fileName()+"/" ); + TQString tmpUnpackPath = locateLocal("tmp", srcFile.fileName()+"/" ); kdDebug(66666) << "tmpUnpackPath: " << tmpUnpackPath.latin1() << endl; // Our extract-process, TODO: wanna have kio_(un)zip instead :) @@ -429,10 +429,10 @@ void KJPrefs::installNewSkin( void ) return; } - QDir tmpCnt = QDir ( tmpUnpackPath ); - tmpCnt.setFilter ( QDir::Dirs ); + TQDir tmpCnt = TQDir ( tmpUnpackPath ); + tmpCnt.setFilter ( TQDir::Dirs ); - QStringList dirList = tmpCnt.entryList(); + TQStringList dirList = tmpCnt.entryList(); // Iterate trough all subdirs of tmpUnpackPath (including "."!) for ( unsigned int i = 0; i < dirList.count(); i++ ) { @@ -440,8 +440,8 @@ void KJPrefs::installNewSkin( void ) if ( dirList[i] == ".." ) continue; - QDir tmpSubCnt = QDir( tmpUnpackPath + dirList[i], "*.rc;*.RC;*.Rc;*.rC", QDir::Name|QDir::IgnoreCase, QDir::Files ); - kdDebug(66666) << "Searching for *.rc in " << QString(tmpUnpackPath+dirList[i]).latin1() << endl; + TQDir tmpSubCnt = TQDir( tmpUnpackPath + dirList[i], "*.rc;*.RC;*.Rc;*.rC", TQDir::Name|TQDir::IgnoreCase, TQDir::Files ); + kdDebug(66666) << "Searching for *.rc in " << TQString(tmpUnpackPath+dirList[i]).latin1() << endl; // oh, no .rc file in current dir, let's go to next dir in list if ( tmpSubCnt.count() == 0 ) @@ -488,7 +488,7 @@ void KJPrefs::installNewSkin( void ) kdDebug(66666) << "src: " << src.path().latin1() << endl; kdDebug(66666) << "dst: " << dst.path().latin1() << endl; KIO::Job *job = KIO::copy(src,dst); - connect ( job, SIGNAL(result(KIO::Job*)), this, SLOT(slotResult(KIO::Job*)) ); + connect ( job, TQT_SIGNAL(result(KIO::Job*)), this, TQT_SLOT(slotResult(KIO::Job*)) ); skinInstalled = true; } } // END iterate trough dirList @@ -508,43 +508,43 @@ void KJPrefs::installNewSkin( void ) void KJPrefs::removeSelectedSkin( void ) { - QString question = i18n("Are you sure you want to remove %1?\n" + TQString question = i18n("Are you sure you want to remove %1?\n" "This will delete the files installed by this skin "). arg ( mSkinselectorWidget->mSkins->currentText() ); cfg->setGroup("KJofol-Skins"); - QString loadedSkin = cfg->readEntry("SkinResource", "kjofol"); -// kdDebug(66666) << "loaded Skin Name: " << QFileInfo(loadedSkin).baseName().latin1() << endl; + TQString loadedSkin = cfg->readEntry("SkinResource", "kjofol"); +// kdDebug(66666) << "loaded Skin Name: " << TQFileInfo(loadedSkin).baseName().latin1() << endl; int r = KMessageBox::warningContinueCancel ( this, question, i18n("Confirmation"), KStdGuiItem::del() ); if ( r != KMessageBox::Continue ) return; - bool deletingCurrentSkin = ( mSkinselectorWidget->mSkins->currentText() == QFileInfo(loadedSkin).baseName() ); + bool deletingCurrentSkin = ( mSkinselectorWidget->mSkins->currentText() == TQFileInfo(loadedSkin).baseName() ); // Now find the dir to delete !!! - QString dirToDelete = QString (""); - QStringList skinLocations = KGlobal::dirs()->findDirs("data", "noatun/skins/kjofol"); + TQString dirToDelete = TQString (""); + TQStringList skinLocations = KGlobal::dirs()->findDirs("data", "noatun/skins/kjofol"); // iterate through all paths where Noatun is searching for kjofol-skins for (uint i = 0; i < skinLocations.count(); ++i ) { - QStringList skinDirs = QDir(skinLocations[i]).entryList(); + TQStringList skinDirs = TQDir(skinLocations[i]).entryList(); // iterate trough all dirs containing a skin for (uint k = 0; k < skinDirs.count(); ++k ) { - QDir skinDirCnt = QDir ( skinLocations[i]+skinDirs[k], "*.rc", QDir::Name|QDir::IgnoreCase, QDir::Files ); + TQDir skinDirCnt = TQDir ( skinLocations[i]+skinDirs[k], "*.rc", TQDir::Name|TQDir::IgnoreCase, TQDir::Files ); // make a list of all .rc-files in a skindir - QStringList rcFiles = skinDirCnt.entryList(); + TQStringList rcFiles = skinDirCnt.entryList(); // iterate trough all those rc.-files in a skindir for (uint j = 0; j < rcFiles.count(); j++ ) { if ( rcFiles[j].left(rcFiles[j].length()-3) == mSkinselectorWidget->mSkins->currentText() ) // found skinname.rc :) { - dirToDelete = QString ( skinLocations[i]+skinDirs[k] ); + dirToDelete = TQString ( skinLocations[i]+skinDirs[k] ); kdDebug(66666) << "FOUND SKIN @ " << dirToDelete.latin1() << endl; } } @@ -555,7 +555,7 @@ void KJPrefs::removeSelectedSkin( void ) { kdDebug(66666) << "Deleting Skindir: " << dirToDelete.latin1() << endl; KIO::Job *job = KIO::del( dirToDelete, false, true ); - connect ( job, SIGNAL(result(KIO::Job*)), this, SLOT(slotResult(KIO::Job*)) ); + connect ( job, TQT_SIGNAL(result(KIO::Job*)), this, TQT_SLOT(slotResult(KIO::Job*)) ); } int item = -1; @@ -597,51 +597,51 @@ void KJPrefs::slotResult(KIO::Job *job ) // takes name of rc-file without .rc at the end and returns full path to rc-file -static QString expand(QString s) +static TQString expand(TQString s) { // kdDebug(66666) << "expand( "<< s.latin1() << " )" << endl; - QStringList skinLocations = KGlobal::dirs()->findDirs("data", "noatun/skins/kjofol"); + TQStringList skinLocations = KGlobal::dirs()->findDirs("data", "noatun/skins/kjofol"); // iterate through all paths where Noatun is searching for kjofol-skins for (uint i = 0; i < skinLocations.count(); ++i ) { - QStringList skinDirs = QDir(skinLocations[i]).entryList(); + TQStringList skinDirs = TQDir(skinLocations[i]).entryList(); // iterate trough all dirs containing a skin for (uint k = 0; k < skinDirs.count(); ++k ) { - QDir skinDirCnt = QDir ( skinLocations[i]+skinDirs[k], "*.rc", QDir::Name|QDir::IgnoreCase, QDir::Files ); + TQDir skinDirCnt = TQDir ( skinLocations[i]+skinDirs[k], "*.rc", TQDir::Name|TQDir::IgnoreCase, TQDir::Files ); // make a list of all .rc-files in a skindir - QStringList rcFiles = skinDirCnt.entryList(); + TQStringList rcFiles = skinDirCnt.entryList(); // iterate trough all those rc.-files in a skindir for (uint j = 0; j < rcFiles.count(); j++ ) { if ( rcFiles[j].left(rcFiles[j].length()-3) == s ) // found $s.rc :) { -// kdDebug(66666) << "expand() found: " << QString(skinLocations[i]+skinDirs[k]+"/"+rcFiles[j]).latin1() << endl; +// kdDebug(66666) << "expand() found: " << TQString(skinLocations[i]+skinDirs[k]+"/"+rcFiles[j]).latin1() << endl; return (skinLocations[i]+skinDirs[k]+"/"+rcFiles[j]); } } } } - return QString(); + return TQString(); } -QString filenameNoCase(const QString &filename, int badNodes) +TQString filenameNoCase(const TQString &filename, int badNodes) { - QStringList names=QStringList::split('/', filename); - QString full; + TQStringList names=TQStringList::split('/', filename); + TQString full; int number=(int)names.count(); - for (QStringList::Iterator i=names.begin(); i!=names.end(); ++i) + for (TQStringList::Iterator i=names.begin(); i!=names.end(); ++i) { full+="/"; if (number<=badNodes) { - QDir d(full); - QStringList files=d.entryList(); - files=files.grep(QRegExp("^"+ (*i) + "$", false)); + TQDir d(full); + TQStringList files=d.entryList(); + files=files.grep(TQRegExp("^"+ (*i) + "$", false)); if (!files.count()) return ""; *i=files.grep(*i, false)[0]; diff --git a/noatun/modules/kjofol-skin/kjprefs.h b/noatun/modules/kjofol-skin/kjprefs.h index ce1725d5..fcd6dc98 100644 --- a/noatun/modules/kjofol-skin/kjprefs.h +++ b/noatun/modules/kjofol-skin/kjprefs.h @@ -6,7 +6,7 @@ #include "kjguisettingswidget.h" // system includes -#include +#include #include #include @@ -26,7 +26,7 @@ class KJPrefs : public CModule { Q_OBJECT public: - KJPrefs(QObject* parent); + KJPrefs(TQObject* parent); // Save which Skin is currently selected virtual void save(); @@ -34,7 +34,7 @@ public: // Rebuild the Skinlist virtual void reopen(); - QString skin( void ) const; + TQString skin( void ) const; int minimumPitch( void ) const; int maximumPitch( void ) const; @@ -50,11 +50,11 @@ public: bool useSysFont( void ) const; void setUseSysFont( bool ); - QFont sysFont(void) const; - void setSysFont(QFont&); + TQFont sysFont(void) const; + void setSysFont(TQFont&); - QColor sysFontColor(void) const; - void sysFontColor(QColor &); + TQColor sysFontColor(void) const; + void sysFontColor(TQColor &); bool displayTooltips( void ) const; bool displaySplash( void ) const; @@ -67,7 +67,7 @@ public slots: void removeSelectedSkin ( void ); // Show a preview of "skin" in mPixmap - void showPreview(const QString &skin); + void showPreview(const TQString &skin); // gets called after a KIO-action has finished // KIO is used for installing/removing skins @@ -77,11 +77,11 @@ signals: void configChanged(); private: - QPixmap mPixmap; // preview Pixmap + TQPixmap mPixmap; // preview Pixmap KConfig *cfg; // Dialog-Widgets - QTabWidget *mTabWidget; + TQTabWidget *mTabWidget; KJSkinselector *mSkinselectorWidget; KJGuiSettings *mGuiSettingsWidget; }; @@ -91,6 +91,6 @@ private: * badNodes is the amount of directories/files (at the end) * that aren't known) **/ -QString filenameNoCase(const QString &filename, int badNodes=1); +TQString filenameNoCase(const TQString &filename, int badNodes=1); #endif // KJPREFS_H diff --git a/noatun/modules/kjofol-skin/kjseeker.cpp b/noatun/modules/kjofol-skin/kjseeker.cpp index 41e4db13..b9b441b1 100644 --- a/noatun/modules/kjofol-skin/kjseeker.cpp +++ b/noatun/modules/kjofol-skin/kjseeker.cpp @@ -15,9 +15,9 @@ #include -KJSeeker::KJSeeker(const QStringList &i, KJLoader *l) : KJWidget(l), g(0) +KJSeeker::KJSeeker(const TQStringList &i, KJLoader *l) : KJWidget(l), g(0) { - QString activeBg = backgroundPressed("bmp1"); + TQString activeBg = backgroundPressed("bmp1"); if(activeBg.isEmpty()) { kdDebug(66666) << k_funcinfo << "No pressed background found for seeker," << @@ -28,7 +28,7 @@ KJSeeker::KJSeeker(const QStringList &i, KJLoader *l) : KJWidget(l), g(0) mActive = parent()->image(activeBg); mScale = parent()->image(parser()["seekimage"][1]); - QImage pixmapNoPress = parent()->image(parser()["backgroundimage"][1]); + TQImage pixmapNoPress = parent()->image(parser()["backgroundimage"][1]); // generate transparent mask int x, y, xs, ys; @@ -37,7 +37,7 @@ KJSeeker::KJSeeker(const QStringList &i, KJLoader *l) : KJWidget(l), g(0) xs=i[3].toInt()-x; ys=i[4].toInt()-y; setRect(x,y,xs,ys); - QImage transmask(xs, ys, 1, 2, QImage::LittleEndian); + TQImage transmask(xs, ys, 1, 2, TQImage::LittleEndian); #if QT_VERSION < 0x030300 transmask.setColor(0, qRgb(0,0,0)); transmask.setColor(1, qRgb(255,255,255)); @@ -47,8 +47,8 @@ KJSeeker::KJSeeker(const QStringList &i, KJLoader *l) : KJWidget(l), g(0) #endif // clear the pointers - memset(barmodeImages, 0, 256*sizeof(QImage*)); - memset(barmode, 0, 256*sizeof(QPixmap*)); + memset(barmodeImages, 0, 256*sizeof(TQImage*)); + memset(barmode, 0, 256*sizeof(TQPixmap*)); // Now do the pixel føking // kdDebug(66666) << "creating Pixmaps for Seeker" << endl; @@ -76,7 +76,7 @@ KJSeeker::KJSeeker(const QStringList &i, KJLoader *l) : KJWidget(l), g(0) for(int i=0; iscanLine(iy-y); l[ix-x]=inactiveColor; } @@ -84,7 +84,7 @@ KJSeeker::KJSeeker(const QStringList &i, KJLoader *l) : KJWidget(l), g(0) do { if (!barmodeImages[level]) - barmodeImages[level]=new QImage(xs,ys, 32); + barmodeImages[level]=new TQImage(xs,ys, 32); QRgb *l=(QRgb*)barmodeImages[level]->scanLine(iy-y); l[ix-x]=activeColor; } while (level++<255); @@ -93,8 +93,8 @@ KJSeeker::KJSeeker(const QStringList &i, KJLoader *l) : KJWidget(l), g(0) // kdDebug(66666) << "finished creating Pixmaps" << endl; // create the blank one - barmode[0]=new QPixmap(xs, ys); - QPixmap px=parent()->pixmap(parser()["backgroundimage"][1]); + barmode[0]=new TQPixmap(xs, ys); + TQPixmap px=parent()->pixmap(parser()["backgroundimage"][1]); bitBlt(barmode[0], 0, 0, &px, x, y, xs, ys, Qt::CopyROP); px.convertFromImage(transmask); barModeMask=px; @@ -102,11 +102,11 @@ KJSeeker::KJSeeker(const QStringList &i, KJLoader *l) : KJWidget(l), g(0) // kdDebug(66666) << "END KJSeeker constructor" << endl; } -QPixmap *KJSeeker::toPixmap(int n) +TQPixmap *KJSeeker::toPixmap(int n) { if (!barmodeImages[n]) return barmode[n]; - barmode[n]=new QPixmap( + barmode[n]=new TQPixmap( barmodeImages[n]->width(), barmodeImages[n]->height() ); @@ -129,21 +129,21 @@ KJSeeker::~KJSeeker() } } -void KJSeeker::paint(QPainter *p, const QRect &) +void KJSeeker::paint(TQPainter *p, const TQRect &) { closest(); - QPixmap *pixmap = toPixmap(g); + TQPixmap *pixmap = toPixmap(g); pixmap->setMask(barModeMask); bitBlt(p->device(), rect().topLeft().x(), rect().topLeft().y(), pixmap, 0, 0, rect().width(), rect().height(), Qt::CopyROP); } -bool KJSeeker::mousePress(const QPoint &pos) +bool KJSeeker::mousePress(const TQPoint &pos) { return (isGray(mScale.pixel(rect().topLeft().x()+pos.x(), rect().topLeft().y()+pos.y()))); } -void KJSeeker::mouseRelease(const QPoint &pos, bool in) +void KJSeeker::mouseRelease(const TQPoint &pos, bool in) { int x = rect().topLeft().x()+pos.x(); int y = rect().topLeft().y()+pos.y(); @@ -185,7 +185,7 @@ void KJSeeker::timeUpdate(int sec) g = sec * 255 / length; //kdDebug(66666) << "sec: " << sec << " len: " << length << " g: " << g << endl; - QPainter p(parent()); + TQPainter p(parent()); paint(&p, rect()); } diff --git a/noatun/modules/kjofol-skin/kjseeker.h b/noatun/modules/kjofol-skin/kjseeker.h index 78fea6fb..048d5127 100644 --- a/noatun/modules/kjofol-skin/kjseeker.h +++ b/noatun/modules/kjofol-skin/kjseeker.h @@ -5,32 +5,32 @@ //#include "kjloader.h" class KJLoader; -#include +#include class KJSeeker : public KJWidget { public: - KJSeeker(const QStringList &i, KJLoader *); + KJSeeker(const TQStringList &i, KJLoader *); ~KJSeeker(); - virtual void paint(QPainter *, const QRect &rect); - virtual bool mousePress(const QPoint &pos); - virtual void mouseRelease(const QPoint &pos, bool); + virtual void paint(TQPainter *, const TQRect &rect); + virtual bool mousePress(const TQPoint &pos); + virtual void mouseRelease(const TQPoint &pos, bool); void timeUpdate(int mille); void closest(); private: - QPixmap *toPixmap(int n); + TQPixmap *toPixmap(int n); private: - QImage mScale; - QImage mActive; - QPixmap *barmode[256]; - QImage *barmodeImages[256]; - QBitmap barModeMask; + TQImage mScale; + TQImage mActive; + TQPixmap *barmode[256]; + TQImage *barmodeImages[256]; + TQBitmap barModeMask; int g; }; diff --git a/noatun/modules/kjofol-skin/kjsliders.cpp b/noatun/modules/kjofol-skin/kjsliders.cpp index 8cadd04f..7b884853 100644 --- a/noatun/modules/kjofol-skin/kjsliders.cpp +++ b/noatun/modules/kjofol-skin/kjsliders.cpp @@ -32,7 +32,7 @@ * KJVolumeBar *******************************************/ -KJVolumeBar::KJVolumeBar(const QStringList &i, KJLoader *p) +KJVolumeBar::KJVolumeBar(const TQStringList &i, KJLoader *p) : KJWidget(p), mVolume(0), mText(0) { int x, y, xs, ys; @@ -48,18 +48,18 @@ KJVolumeBar::KJVolumeBar(const QStringList &i, KJLoader *p) mSlider = parent()->pixmap(parser()["volumecontrolimage"][1]); } -QString KJVolumeBar::tip() +TQString KJVolumeBar::tip() { return i18n("Volume"); } -void KJVolumeBar::paint(QPainter *p, const QRect &) +void KJVolumeBar::paint(TQPainter *p, const TQRect &) { // kdDebug(66666) << "x: " << rect().x() << " y: " << rect().y() << endl; // kdDebug(66666) << "vol x: " << rect().x()+(mVolume*rect().width())/100 << endl; // center of that slider-pixmap -// QPoint hotSpot = QPoint( mSlider.width()/2, mSlider.height()/2 ); +// TQPoint hotSpot = TQPoint( mSlider.width()/2, mSlider.height()/2 ); // draw our background bitBlt( @@ -89,7 +89,7 @@ void KJVolumeBar::paint(QPainter *p, const QRect &) mText->repaint(); } -bool KJVolumeBar::mousePress(const QPoint &pos) +bool KJVolumeBar::mousePress(const TQPoint &pos) { mVolume = (pos.x()*100) / rect().width(); // kdDebug(66666) << "volume: " << mVolume << endl; @@ -98,11 +98,11 @@ bool KJVolumeBar::mousePress(const QPoint &pos) return true; } -void KJVolumeBar::mouseRelease(const QPoint &, bool) +void KJVolumeBar::mouseRelease(const TQPoint &, bool) { } -void KJVolumeBar::mouseMove(const QPoint &pos, bool in) +void KJVolumeBar::mouseMove(const TQPoint &pos, bool in) { if (!in) return; @@ -120,7 +120,7 @@ void KJVolumeBar::timeUpdate(int) * KJVolumeBMP *******************************************/ -KJVolumeBMP::KJVolumeBMP(const QStringList &i, KJLoader *p) +KJVolumeBMP::KJVolumeBMP(const TQStringList &i, KJLoader *p) : KJWidget(p), mVolume(0), mOldVolume(0), mText(0) { int x, y, xs, ys; @@ -138,20 +138,20 @@ KJVolumeBMP::KJVolumeBMP(const QStringList &i, KJLoader *p) timeUpdate(0); } -QString KJVolumeBMP::tip() +TQString KJVolumeBMP::tip() { return i18n("Volume"); } -void KJVolumeBMP::paint(QPainter *p, const QRect &) +void KJVolumeBMP::paint(TQPainter *p, const TQRect &) { - QRect from(mVolume*mCount/100*mWidth, 0, mWidth, mImages.height()); + TQRect from(mVolume*mCount/100*mWidth, 0, mWidth, mImages.height()); bitBlt(p->device(), rect().topLeft(), &mImages, from, Qt::CopyROP); if (mText) mText->repaint(); } -bool KJVolumeBMP::mousePress(const QPoint &pos) +bool KJVolumeBMP::mousePress(const TQPoint &pos) { QRgb color = mPos.pixel ( rect().topLeft().x()+pos.x(), rect().topLeft().y()+pos.y() ); @@ -169,10 +169,10 @@ bool KJVolumeBMP::mousePress(const QPoint &pos) return true; } -void KJVolumeBMP::mouseRelease(const QPoint &, bool) +void KJVolumeBMP::mouseRelease(const TQPoint &, bool) {} -void KJVolumeBMP::mouseMove(const QPoint &pos, bool in) +void KJVolumeBMP::mouseMove(const TQPoint &pos, bool in) { if (!in) return; mousePress(pos); @@ -195,7 +195,7 @@ void KJVolumeBMP::timeUpdate(int) * KJPitchBMP *******************************************/ -KJPitchBMP::KJPitchBMP(const QStringList &i, KJLoader *p) +KJPitchBMP::KJPitchBMP(const TQStringList &i, KJLoader *p) : KJWidget(p), mText(0) { int x = i[1].toInt(); @@ -212,7 +212,7 @@ KJPitchBMP::KJPitchBMP(const QStringList &i, KJLoader *p) mPos = parent()->image(parser()["pitchcontrolimageposition"][1]); // makes all pixels with rgb(255,0,255) transparent - QImage ibackground; + TQImage ibackground; ibackground = parent()->image(parser()["pitchcontrolimage"][1]); mImages.setMask( getMask(ibackground) ); @@ -239,16 +239,16 @@ KJPitchBMP::KJPitchBMP(const QStringList &i, KJLoader *p) mText->repaint(); } -QString KJPitchBMP::tip() +TQString KJPitchBMP::tip() { return i18n("Pitch"); } -void KJPitchBMP::paint(QPainter *p, const QRect &) +void KJPitchBMP::paint(TQPainter *p, const TQRect &) { float xPos = (int)((mCurrentPitch-mMinPitch)*100.0) * mCount / (int)((mMaxPitch-mMinPitch)*100.0) * mWidth; - QRect from( (int)xPos, 0, mWidth, mImages.height()); + TQRect from( (int)xPos, 0, mWidth, mImages.height()); bitBlt(p->device(), rect().topLeft(), &mImages, from, Qt::CopyROP); @@ -256,7 +256,7 @@ void KJPitchBMP::paint(QPainter *p, const QRect &) mText->repaint(); } -bool KJPitchBMP::mousePress(const QPoint &pos) +bool KJPitchBMP::mousePress(const TQPoint &pos) { QRgb color = mPos.pixel ( rect().topLeft().x()+pos.x(), rect().topLeft().y()+pos.y() ); @@ -273,10 +273,10 @@ bool KJPitchBMP::mousePress(const QPoint &pos) return true; } -void KJPitchBMP::mouseRelease(const QPoint &, bool) +void KJPitchBMP::mouseRelease(const TQPoint &, bool) {} -void KJPitchBMP::mouseMove(const QPoint &pos, bool in) +void KJPitchBMP::mouseMove(const TQPoint &pos, bool in) { if (!in) return; mousePress(pos); diff --git a/noatun/modules/kjofol-skin/kjsliders.h b/noatun/modules/kjofol-skin/kjsliders.h index 94f10934..bd3c3324 100644 --- a/noatun/modules/kjofol-skin/kjsliders.h +++ b/noatun/modules/kjofol-skin/kjsliders.h @@ -2,7 +2,7 @@ #define KJSLIDERS_H #include "kjwidget.h" -#include +#include class KJLoader; class KJPitchText; @@ -12,21 +12,21 @@ class KJVolumeText; class KJVolumeBMP : public KJWidget { public: - KJVolumeBMP(const QStringList &, KJLoader *parent); + KJVolumeBMP(const TQStringList &, KJLoader *parent); - virtual void paint(QPainter *, const QRect &rect); - virtual bool mousePress(const QPoint &pos); - virtual void mouseRelease(const QPoint &pos, bool); + virtual void paint(TQPainter *, const TQRect &rect); + virtual bool mousePress(const TQPoint &pos); + virtual void mouseRelease(const TQPoint &pos, bool); virtual void timeUpdate(int); - virtual void mouseMove(const QPoint &pos, bool); + virtual void mouseMove(const TQPoint &pos, bool); - virtual QString tip(); + virtual TQString tip(); void setText(KJVolumeText *t) { mText=t; } private: - QPixmap mImages; - QImage mPos; + TQPixmap mImages; + TQImage mPos; int mVolume, mOldVolume; int mWidth, mCount; KJVolumeText *mText; @@ -36,21 +36,21 @@ private: class KJVolumeBar : public KJWidget { public: - KJVolumeBar(const QStringList &, KJLoader *parent); + KJVolumeBar(const TQStringList &, KJLoader *parent); - virtual void paint(QPainter *, const QRect &rect); - virtual bool mousePress(const QPoint &pos); - virtual void mouseRelease(const QPoint &pos, bool); + virtual void paint(TQPainter *, const TQRect &rect); + virtual bool mousePress(const TQPoint &pos); + virtual void mouseRelease(const TQPoint &pos, bool); virtual void timeUpdate(int); - virtual void mouseMove(const QPoint &pos, bool); + virtual void mouseMove(const TQPoint &pos, bool); - virtual QString tip(); + virtual TQString tip(); void setText(KJVolumeText *t) { mText=t; } private: - QPixmap mSlider; - QPixmap mBack; + TQPixmap mSlider; + TQPixmap mBack; int mVolume; KJVolumeText *mText; }; @@ -59,23 +59,23 @@ private: class KJPitchBMP : public KJWidget { public: - KJPitchBMP(const QStringList &, KJLoader *parent); + KJPitchBMP(const TQStringList &, KJLoader *parent); - virtual void paint(QPainter *, const QRect &rect); - virtual bool mousePress(const QPoint &pos); - virtual void mouseRelease(const QPoint &pos, bool); + virtual void paint(TQPainter *, const TQRect &rect); + virtual bool mousePress(const TQPoint &pos); + virtual void mouseRelease(const TQPoint &pos, bool); virtual void timeUpdate(int); virtual void newFile(); - virtual void mouseMove(const QPoint &pos, bool); + virtual void mouseMove(const TQPoint &pos, bool); virtual void readConfig(); - virtual QString tip(); + virtual TQString tip(); void setText(KJPitchText *t) { mText=t; } private: - QPixmap mImages; - QImage mPos; + TQPixmap mImages; + TQImage mPos; int mWidth, mCount; float mCurrentPitch; float mOldPitch; diff --git a/noatun/modules/kjofol-skin/kjtextdisplay.cpp b/noatun/modules/kjofol-skin/kjtextdisplay.cpp index 89f92526..c1a17139 100644 --- a/noatun/modules/kjofol-skin/kjtextdisplay.cpp +++ b/noatun/modules/kjofol-skin/kjtextdisplay.cpp @@ -35,8 +35,8 @@ * KJFilename *******************************************/ -KJFilename::KJFilename(const QStringList &l, KJLoader *p) - : QObject(0), KJWidget(p), mBack(0) +KJFilename::KJFilename(const TQStringList &l, KJLoader *p) + : TQObject(0), KJWidget(p), mBack(0) { int x = l[1].toInt(); int y = l[2].toInt(); @@ -50,8 +50,8 @@ KJFilename::KJFilename(const QStringList &l, KJLoader *p) ys = textFont().fontHeight(); // background under filename-scroller - QPixmap tmp = p->pixmap(p->item("backgroundimage")[1]); - mBack = new KPixmap ( QSize(xs,ys) ); + TQPixmap tmp = p->pixmap(p->item("backgroundimage")[1]); + mBack = new KPixmap ( TQSize(xs,ys) ); bitBlt( mBack, 0, 0, &tmp, x, y, xs, ys, Qt::CopyROP ); setRect(x,y,xs,ys); @@ -72,9 +72,9 @@ KJFilename::~KJFilename() delete mBack; } -void KJFilename::paint(QPainter *p, const QRect &) +void KJFilename::paint(TQPainter *p, const TQRect &) { - QPixmap temp ( rect().width(), rect().height() ); + TQPixmap temp ( rect().width(), rect().height() ); // draw background into buffer bitBlt ( &temp, 0, 0, mBack, 0, 0, -1, -1, Qt::CopyROP ); @@ -82,17 +82,17 @@ void KJFilename::paint(QPainter *p, const QRect &) bitBlt( &temp, 0, 0, &mView, 0, 0, rect().width(), rect().height(), Qt::CopyROP); // and draw it on screen bitBlt(p->device(), rect().topLeft(), &temp, - QRect(0,0,-1,-1), Qt::CopyROP); + TQRect(0,0,-1,-1), Qt::CopyROP); } -void KJFilename::timerEvent(QTimerEvent *) +void KJFilename::timerEvent(TQTimerEvent *) { int height = mView.height(); int width = mView.width(); - QBitmap cycleMask ( mDistance, height ); // temporary-space for moving parts of the mask - QPixmap cycle ( mDistance, height ); // temporary-space for moving parts of the pixmap - QBitmap newMask ( *mView.mask() ); // save old mask + TQBitmap cycleMask ( mDistance, height ); // temporary-space for moving parts of the mask + TQPixmap cycle ( mDistance, height ); // temporary-space for moving parts of the pixmap + TQBitmap newMask ( *mView.mask() ); // save old mask // copy mask like the same way we're doing it with the pixmap // a mask does not get copied on a bitblt automatically, we have to do @@ -111,12 +111,12 @@ void KJFilename::timerEvent(QTimerEvent *) repaint(); } -bool KJFilename::mousePress(const QPoint &) +bool KJFilename::mousePress(const TQPoint &) { return true; } -void KJFilename::mouseRelease(const QPoint &, bool in) +void KJFilename::mouseRelease(const TQPoint &, bool in) { if (!in) // only do something if users is still inside the button return; @@ -145,7 +145,7 @@ void KJFilename::readConfig() mLastTitle=""; // invalidate title so it gets repainted on next timeUpdate() } -void KJFilename::prepareString(const QCString &str) +void KJFilename::prepareString(const TQCString &str) { killTimers(); // i.e. stop timers @@ -159,19 +159,19 @@ void KJFilename::timeUpdate(int) if ( !napp->player()->current() ) // just for safety return; - QCString title = QCString( napp->player()->current().title().local8Bit() ); + TQCString title = TQCString( napp->player()->current().title().local8Bit() ); if ( title == mLastTitle ) return; mLastTitle = title; - QCString timestring = napp->player()->lengthString().local8Bit(); + TQCString timestring = napp->player()->lengthString().local8Bit(); timestring = timestring.mid(timestring.find('/')+1); prepareString ( title + " (" + timestring + ") "); } -QString KJFilename::tip() +TQString KJFilename::tip() { if ( !napp->player()->current() ) // just for safety return i18n("Filename"); @@ -184,7 +184,7 @@ QString KJFilename::tip() * KJTime *******************************************/ -KJTime::KJTime(const QStringList &l, KJLoader *p) +KJTime::KJTime(const TQStringList &l, KJLoader *p) : KJWidget(p), mBack(0) { int x = l[1].toInt(); @@ -204,8 +204,8 @@ KJTime::KJTime(const QStringList &l, KJLoader *p) xs = maxNeededWidth; // background under time-display - QPixmap tmp = p->pixmap(p->item("backgroundimage")[1]); - mBack = new KPixmap ( QSize(xs,ys) ); + TQPixmap tmp = p->pixmap(p->item("backgroundimage")[1]); + mBack = new KPixmap ( TQSize(xs,ys) ); bitBlt( mBack, 0, 0, &tmp, x, y, xs, ys, Qt::CopyROP ); setRect(x,y,xs,ys); @@ -220,10 +220,10 @@ KJTime::~KJTime() delete mBack; } -void KJTime::paint(QPainter *p, const QRect &) +void KJTime::paint(TQPainter *p, const TQRect &) { -// kdDebug(66666) << "KJTime::paint(QPainter *p, const QRect &)" << endl; - QPixmap temp ( rect().width(), rect().height() ); +// kdDebug(66666) << "KJTime::paint(TQPainter *p, const TQRect &)" << endl; + TQPixmap temp ( rect().width(), rect().height() ); // draw background into buffer bitBlt ( &temp, 0, 0, mBack, 0, 0, -1, -1, Qt::CopyROP ); @@ -232,15 +232,15 @@ void KJTime::paint(QPainter *p, const QRect &) // and draw it on screen bitBlt(p->device(), rect().topLeft(), &temp, - QRect(0,0, rect().width(), rect().height()), Qt::CopyROP); + TQRect(0,0, rect().width(), rect().height()), Qt::CopyROP); } -bool KJTime::mousePress(const QPoint &) +bool KJTime::mousePress(const TQPoint &) { return true; } -void KJTime::mouseRelease(const QPoint &, bool in) +void KJTime::mouseRelease(const TQPoint &, bool in) { if (!in) // only do something if users is still inside the button return; @@ -258,10 +258,10 @@ void KJTime::readConfig() mLastTime=""; // invalidate time so it gets repainted on next timeUpdate() } -QString KJTime::lengthString ( void ) +TQString KJTime::lengthString ( void ) { int pos = 0; - QString posString; + TQString posString; int secs = 0, seconds = 0, minutes = 0, @@ -316,9 +316,9 @@ void KJTime::timeUpdate(int) // kdDebug(66666) << "END KJTime::timeUpdate(int)" << endl; } -void KJTime::prepareString(const QCString &str) +void KJTime::prepareString(const TQCString &str) { -// kdDebug(66666) << "START KJTime::prepareString(const QCString &str)" << endl; +// kdDebug(66666) << "START KJTime::prepareString(const TQCString &str)" << endl; if ( str == mLastTime ) return; @@ -326,10 +326,10 @@ void KJTime::prepareString(const QCString &str) mTime = timeFont().draw(str, rect().width()); repaint(); -// kdDebug(66666) << "END KJTime::prepareString(const QCString &str)" << endl; +// kdDebug(66666) << "END KJTime::prepareString(const TQCString &str)" << endl; } -QString KJTime::tip() +TQString KJTime::tip() { if ( countDown ) return i18n("Play time left"); @@ -342,7 +342,7 @@ QString KJTime::tip() * KJVolumeText *******************************************/ -KJVolumeText::KJVolumeText(const QStringList &l, KJLoader *p) +KJVolumeText::KJVolumeText(const TQStringList &l, KJLoader *p) : KJWidget(p), mBack(0) { int x=l[1].toInt(); @@ -362,8 +362,8 @@ KJVolumeText::KJVolumeText(const QStringList &l, KJLoader *p) xs = tempWidth; // background under volumetext-display - QPixmap tmp = p->pixmap(p->item("backgroundimage")[1]); - mBack = new KPixmap ( QSize(xs,ys) ); + TQPixmap tmp = p->pixmap(p->item("backgroundimage")[1]); + mBack = new KPixmap ( TQSize(xs,ys) ); bitBlt( mBack, 0, 0, &tmp, x, y, xs, ys, Qt::CopyROP ); setRect(x,y,xs,ys); @@ -376,9 +376,9 @@ KJVolumeText::~KJVolumeText() delete mBack; } -void KJVolumeText::paint(QPainter *p, const QRect &) +void KJVolumeText::paint(TQPainter *p, const TQRect &) { - QPixmap temp ( rect().width(), rect().height() ); + TQPixmap temp ( rect().width(), rect().height() ); // draw background into buffer bitBlt ( &temp, 0, 0, mBack, 0, 0, -1, -1, Qt::CopyROP ); @@ -387,10 +387,10 @@ void KJVolumeText::paint(QPainter *p, const QRect &) // and draw it on screen bitBlt(p->device(), rect().topLeft(), &temp, - QRect(0,0,-1,-1), Qt::CopyROP); + TQRect(0,0,-1,-1), Qt::CopyROP); } -bool KJVolumeText::mousePress(const QPoint &) +bool KJVolumeText::mousePress(const TQPoint &) { return false; } @@ -403,7 +403,7 @@ void KJVolumeText::readConfig() void KJVolumeText::timeUpdate(int) { - QCString volume; + TQCString volume; if (!napp->player()->current()) return; @@ -413,7 +413,7 @@ void KJVolumeText::timeUpdate(int) prepareString(volume); } -void KJVolumeText::prepareString(const QCString &str) +void KJVolumeText::prepareString(const TQCString &str) { if ( str == mLastVolume ) return; @@ -424,7 +424,7 @@ void KJVolumeText::prepareString(const QCString &str) repaint(); } -QString KJVolumeText::tip() +TQString KJVolumeText::tip() { return i18n("Volume"); } @@ -434,7 +434,7 @@ QString KJVolumeText::tip() * KJPitchText *******************************************/ -KJPitchText::KJPitchText(const QStringList &l, KJLoader *p) +KJPitchText::KJPitchText(const TQStringList &l, KJLoader *p) : KJWidget(p), mBack(0) { int x = l[1].toInt(); @@ -452,8 +452,8 @@ KJPitchText::KJPitchText(const QStringList &l, KJLoader *p) xs = tempWidth; // background under time-display - QPixmap tmp = p->pixmap(p->item("backgroundimage")[1]); - mBack = new KPixmap ( QSize(xs,ys) ); + TQPixmap tmp = p->pixmap(p->item("backgroundimage")[1]); + mBack = new KPixmap ( TQSize(xs,ys) ); bitBlt( mBack, 0, 0, &tmp, x, y, xs, ys, Qt::CopyROP ); setRect(x,y,xs,ys); @@ -467,24 +467,24 @@ KJPitchText::~KJPitchText() } -void KJPitchText::paint(QPainter *p, const QRect &) +void KJPitchText::paint(TQPainter *p, const TQRect &) { - QPixmap temp ( rect().width(), rect().height() ); + TQPixmap temp ( rect().width(), rect().height() ); // draw background into buffer bitBlt ( &temp, 0, 0, mBack, 0, 0, -1, -1, Qt::CopyROP ); // draw time-display into buffer bitBlt( &temp, 0, 0, &mSpeed, 0, 0, rect().width(), rect().height(), Qt::CopyROP); // and draw it on screen - bitBlt(p->device(), rect().topLeft(), &temp, QRect(0,0,-1,-1), Qt::CopyROP); + bitBlt(p->device(), rect().topLeft(), &temp, TQRect(0,0,-1,-1), Qt::CopyROP); } -bool KJPitchText::mousePress(const QPoint &) +bool KJPitchText::mousePress(const TQPoint &) { return true; } -void KJPitchText::mouseRelease(const QPoint &, bool in) +void KJPitchText::mouseRelease(const TQPoint &, bool in) { if (!in) return; @@ -506,7 +506,7 @@ void KJPitchText::readConfig() void KJPitchText::timeUpdate(int) { - QCString speed; + TQCString speed; if (!napp->player()->current()) return; @@ -521,7 +521,7 @@ void KJPitchText::timeUpdate(int) prepareString ( speed ); } -void KJPitchText::prepareString(const QCString &str) +void KJPitchText::prepareString(const TQCString &str) { if ( str == mLastPitch ) return; @@ -532,7 +532,7 @@ void KJPitchText::prepareString(const QCString &str) repaint(); } -QString KJPitchText::tip() +TQString KJPitchText::tip() { return i18n("Pitch"); } @@ -542,7 +542,7 @@ QString KJPitchText::tip() * KJFileInfo *******************************************/ -KJFileInfo::KJFileInfo(const QStringList &l, KJLoader *p) +KJFileInfo::KJFileInfo(const TQStringList &l, KJLoader *p) : KJWidget(p), mBack(0) { mInfoType = l[0]; // type of info-display @@ -564,8 +564,8 @@ KJFileInfo::KJFileInfo(const QStringList &l, KJLoader *p) xs = maxNeededWidth; // background under info-display - QPixmap tmp = p->pixmap(p->item("backgroundimage")[1]); - mBack = new KPixmap ( QSize(xs,ys) ); + TQPixmap tmp = p->pixmap(p->item("backgroundimage")[1]); + mBack = new KPixmap ( TQSize(xs,ys) ); bitBlt( mBack, 0, 0, &tmp, x, y, xs, ys, Qt::CopyROP ); setRect(x,y,xs,ys); @@ -578,9 +578,9 @@ KJFileInfo::~KJFileInfo() delete mBack; } -void KJFileInfo::paint(QPainter *p, const QRect &) +void KJFileInfo::paint(TQPainter *p, const TQRect &) { - QPixmap temp ( rect().width(), rect().height() ); + TQPixmap temp ( rect().width(), rect().height() ); // draw background into buffer bitBlt ( &temp, 0, 0, mBack, 0, 0, -1, -1, Qt::CopyROP ); @@ -589,10 +589,10 @@ void KJFileInfo::paint(QPainter *p, const QRect &) // and draw it on screen bitBlt(p->device(), rect().topLeft(), &temp, - QRect(0,0, rect().width(), rect().height()), Qt::CopyROP); + TQRect(0,0, rect().width(), rect().height()), Qt::CopyROP); } -bool KJFileInfo::mousePress(const QPoint &) +bool KJFileInfo::mousePress(const TQPoint &) { return false; } @@ -609,7 +609,7 @@ void KJFileInfo::timeUpdate(int) return; const PlaylistItem &item = napp->player()->current(); - QString prop; + TQString prop; if ( mInfoType == "mp3khzwindow" ) { @@ -628,7 +628,7 @@ void KJFileInfo::timeUpdate(int) prepareString( prop.latin1() ); } -void KJFileInfo::prepareString(const QCString &str) +void KJFileInfo::prepareString(const TQCString &str) { if ( str == mLastTime ) return; @@ -637,14 +637,14 @@ void KJFileInfo::prepareString(const QCString &str) repaint(); } -QString KJFileInfo::tip() +TQString KJFileInfo::tip() { if ( mInfoType == "mp3khzwindow" ) return i18n("Sample rate in kHz"); else if ( mInfoType == "mp3kbpswindow" ) return i18n("Bitrate in kbps"); - return QString(); + return TQString(); } #include "kjtextdisplay.moc" diff --git a/noatun/modules/kjofol-skin/kjtextdisplay.h b/noatun/modules/kjofol-skin/kjtextdisplay.h index 11098b0c..893efac0 100644 --- a/noatun/modules/kjofol-skin/kjtextdisplay.h +++ b/noatun/modules/kjofol-skin/kjtextdisplay.h @@ -6,35 +6,35 @@ class KJLoader; class KPixmap; //#include "kjloader.h" -#include -#include +#include +#include -class KJFilename : public QObject, public KJWidget +class KJFilename : public TQObject, public KJWidget { Q_OBJECT public: - KJFilename(const QStringList &, KJLoader *parent); + KJFilename(const TQStringList &, KJLoader *parent); ~KJFilename(); - virtual void paint(QPainter *, const QRect &rect); - virtual bool mousePress(const QPoint &pos); - virtual void mouseRelease(const QPoint &, bool in); + virtual void paint(TQPainter *, const TQRect &rect); + virtual bool mousePress(const TQPoint &pos); + virtual void mouseRelease(const TQPoint &, bool in); // virtual void newFile(); virtual void timeUpdate(int); virtual void readConfig(); - void prepareString(const QCString &str); - virtual QString tip(); + void prepareString(const TQCString &str); + virtual TQString tip(); - virtual void timerEvent(QTimerEvent *); + virtual void timerEvent(TQTimerEvent *); private: - QCString mLastTitle; + TQCString mLastTitle; int mDistance; int mTimerUpdates; int mWidth; int mTickerPos; - QPixmap mView; + TQPixmap mView; KPixmap *mBack; }; @@ -42,29 +42,29 @@ private: class KJTime : public KJWidget { public: - KJTime(const QStringList &, KJLoader *parent); + KJTime(const TQStringList &, KJLoader *parent); ~KJTime(); - virtual void paint(QPainter *, const QRect &rect); - virtual bool mousePress(const QPoint &pos); - virtual void mouseRelease(const QPoint &, bool in); + virtual void paint(TQPainter *, const TQRect &rect); + virtual bool mousePress(const TQPoint &pos); + virtual void mouseRelease(const TQPoint &, bool in); virtual void timeUpdate(int); virtual void readConfig(); - void prepareString(const QCString &time); - virtual QString tip(); + void prepareString(const TQCString &time); + virtual TQString tip(); // enum countModes { Up=0, Down }; private: - QCString mLastTime; + TQCString mLastTime; int mWidth; bool countDown; - QPixmap mTime; + TQPixmap mTime; KPixmap *mBack; private: - QString lengthString ( void ); + TQString lengthString ( void ); }; @@ -72,21 +72,21 @@ private: class KJVolumeText : public KJWidget { public: - KJVolumeText(const QStringList &, KJLoader *parent); + KJVolumeText(const TQStringList &, KJLoader *parent); ~KJVolumeText(); - virtual void paint(QPainter *, const QRect &rect); - virtual bool mousePress(const QPoint &pos); + virtual void paint(TQPainter *, const TQRect &rect); + virtual bool mousePress(const TQPoint &pos); virtual void timeUpdate(int); virtual void readConfig(); - void prepareString(const QCString &time); - virtual QString tip(); + void prepareString(const TQCString &time); + virtual TQString tip(); private: - QCString mLastVolume; + TQCString mLastVolume; int mWidth; - QPixmap mVolume; + TQPixmap mVolume; KPixmap *mBack; }; @@ -94,22 +94,22 @@ private: class KJPitchText : public KJWidget { public: - KJPitchText(const QStringList &, KJLoader *parent); + KJPitchText(const TQStringList &, KJLoader *parent); ~KJPitchText(); - virtual void paint(QPainter *, const QRect &rect); - virtual bool mousePress(const QPoint &pos); - virtual void mouseRelease(const QPoint &, bool in); + virtual void paint(TQPainter *, const TQRect &rect); + virtual bool mousePress(const TQPoint &pos); + virtual void mouseRelease(const TQPoint &, bool in); virtual void timeUpdate(int); virtual void readConfig(); - void prepareString(const QCString &time); - virtual QString tip(); + void prepareString(const TQCString &time); + virtual TQString tip(); private: - QCString mLastPitch; + TQCString mLastPitch; int mWidth; - QPixmap mSpeed; + TQPixmap mSpeed; KPixmap *mBack; }; @@ -117,22 +117,22 @@ private: class KJFileInfo : public KJWidget { public: - KJFileInfo(const QStringList &, KJLoader *parent); + KJFileInfo(const TQStringList &, KJLoader *parent); ~KJFileInfo(); - virtual void paint(QPainter *, const QRect &rect); - virtual bool mousePress(const QPoint &pos); + virtual void paint(TQPainter *, const TQRect &rect); + virtual bool mousePress(const TQPoint &pos); virtual void timeUpdate(int); virtual void readConfig(); - void prepareString(const QCString &time); - virtual QString tip(); + void prepareString(const TQCString &time); + virtual TQString tip(); private: - QCString mLastTime; - QString mInfoType; + TQCString mLastTime; + TQString mInfoType; int mWidth; - QPixmap mTime; + TQPixmap mTime; KPixmap *mBack; }; diff --git a/noatun/modules/kjofol-skin/kjvis.cpp b/noatun/modules/kjofol-skin/kjvis.cpp index 71246089..3bd40f00 100644 --- a/noatun/modules/kjofol-skin/kjvis.cpp +++ b/noatun/modules/kjofol-skin/kjvis.cpp @@ -13,8 +13,8 @@ #include //qt includes -#include -#include +#include +#include //kde includes #include @@ -35,7 +35,7 @@ void KJVisScope::swapScope(Visuals newOne) { //kdDebug(66666) << k_funcinfo << endl; - QStringList line = parent()->item("analyzerwindow"); + TQStringList line = parent()->item("analyzerwindow"); KJLoader *p=parent(); p->removeChild(this); delete this; @@ -66,7 +66,7 @@ void KJVisScope::swapScope(Visuals newOne) * KJNullScope *******************************************/ -KJNullScope::KJNullScope(const QStringList &l, KJLoader *parent) +KJNullScope::KJNullScope(const TQStringList &l, KJLoader *parent) : KJVisScope(parent) { int x = l[1].toInt(); @@ -75,25 +75,25 @@ KJNullScope::KJNullScope(const QStringList &l, KJLoader *parent) int ys = l[4].toInt() - y; // background under vis - QPixmap tmp = parent->pixmap(parent->item("backgroundimage")[1]); - mBack = new KPixmap ( QSize(xs,ys) ); + TQPixmap tmp = parent->pixmap(parent->item("backgroundimage")[1]); + mBack = new KPixmap ( TQSize(xs,ys) ); bitBlt( mBack, 0, 0, &tmp, x, y, xs, ys, Qt::CopyROP ); setRect ( x, y, xs, ys ); repaint(); } -void KJNullScope::paint(QPainter *p, const QRect &) +void KJNullScope::paint(TQPainter *p, const TQRect &) { // just redraw the background - bitBlt ( p->device(), rect().topLeft(), mBack, QRect(0,0,-1,-1), Qt::CopyROP ); + bitBlt ( p->device(), rect().topLeft(), mBack, TQRect(0,0,-1,-1), Qt::CopyROP ); } -bool KJNullScope::mousePress(const QPoint &) +bool KJNullScope::mousePress(const TQPoint &) { return true; } -void KJNullScope::mouseRelease(const QPoint &, bool in) +void KJNullScope::mouseRelease(const TQPoint &, bool in) { if (!in) // only do something if users is still inside the button return; @@ -118,7 +118,7 @@ void KJNullScope::readConfig() * KJFFT - Analyzer like visualization, mono *************************************************/ -KJFFT::KJFFT(const QStringList &l, KJLoader *parent) +KJFFT::KJFFT(const TQStringList &l, KJLoader *parent) : KJVisScope(parent), MonoFFTScope(50), mGradient(0) { int x = l[1].toInt(); @@ -131,7 +131,7 @@ KJFFT::KJFFT(const QStringList &l, KJLoader *parent) if ( parent->exist("analyzercolor") ) { - QStringList &col = parser()["analyzercolor"]; + TQStringList &col = parser()["analyzercolor"]; mColor.setRgb ( col[1].toInt(), col[2].toInt(), col[3].toInt() ); } else // TODO: what should be default colors for Vis? @@ -140,15 +140,15 @@ KJFFT::KJFFT(const QStringList &l, KJLoader *parent) } // background under vis - QPixmap tmp = parent->pixmap(parent->item("backgroundimage")[1]); - mBack = new KPixmap ( QSize(xs,ys) ); + TQPixmap tmp = parent->pixmap(parent->item("backgroundimage")[1]); + mBack = new KPixmap ( TQSize(xs,ys) ); bitBlt( mBack, 0, 0, &tmp, x, y, xs, ys, Qt::CopyROP ); - mAnalyzer = new KPixmap ( QSize(xs,ys) ); + mAnalyzer = new KPixmap ( TQSize(xs,ys) ); bitBlt( mAnalyzer, 0, 0, &tmp, x, y, xs, ys, Qt::CopyROP ); // create a gradient for the bars going from 30% lighter to 30% darker than mColor - mGradient = new KPixmap ( QSize(xs,ys) ); + mGradient = new KPixmap ( TQSize(xs,ys) ); KPixmapEffect::gradient ( *mGradient, mColor.light(_KJ_GRADIENT_DIFF), mColor.dark(_KJ_GRADIENT_DIFF), KPixmapEffect::VerticalGradient ); @@ -170,8 +170,8 @@ void KJFFT::scopeEvent(float *d, int size) int x = 0; int h = rect().height(); - QBitmap mGradientMask ( rect().width(), h, true ); - QPainter mask( &mGradientMask ); + TQBitmap mGradientMask ( rect().width(), h, true ); + TQPainter mask( &mGradientMask ); float *start = d ; float *end = d + size /*- 1*/; @@ -206,20 +206,20 @@ void KJFFT::scopeEvent(float *d, int size) repaint(); } -void KJFFT::paint(QPainter *p, const QRect &) +void KJFFT::paint(TQPainter *p, const TQRect &) { // put that thing on screen if ( !napp->player()->isStopped() ) - bitBlt ( p->device(), rect().topLeft(), mAnalyzer, QRect(0,0,-1,-1), Qt::CopyROP ); + bitBlt ( p->device(), rect().topLeft(), mAnalyzer, TQRect(0,0,-1,-1), Qt::CopyROP ); } -bool KJFFT::mousePress(const QPoint &) +bool KJFFT::mousePress(const TQPoint &) { return true; } -void KJFFT::mouseRelease(const QPoint &, bool in) +void KJFFT::mouseRelease(const TQPoint &, bool in) { if (!in) // only do something if users is still inside the button return; @@ -250,7 +250,7 @@ void KJFFT::readConfig() * KJStereoFFT - Analyzer like visualization, stereo *************************************************/ -KJStereoFFT::KJStereoFFT(const QStringList &l, KJLoader *parent) +KJStereoFFT::KJStereoFFT(const TQStringList &l, KJLoader *parent) : KJVisScope(parent), StereoFFTScope(50), mGradient(0) { //kdDebug(66666) << k_funcinfo << endl; @@ -265,7 +265,7 @@ KJStereoFFT::KJStereoFFT(const QStringList &l, KJLoader *parent) if ( parent->exist("analyzercolor") ) { - QStringList &col = parser()["analyzercolor"]; + TQStringList &col = parser()["analyzercolor"]; mColor.setRgb ( col[1].toInt(), col[2].toInt(), col[3].toInt() ); } else // TODO: what should be default colors for Vis? @@ -274,15 +274,15 @@ KJStereoFFT::KJStereoFFT(const QStringList &l, KJLoader *parent) } // background under vis - QPixmap tmp = parent->pixmap(parent->item("backgroundimage")[1]); - mBack = new KPixmap ( QSize(xs,ys) ); + TQPixmap tmp = parent->pixmap(parent->item("backgroundimage")[1]); + mBack = new KPixmap ( TQSize(xs,ys) ); bitBlt( mBack, 0, 0, &tmp, x, y, xs, ys, Qt::CopyROP ); - mAnalyzer = new KPixmap ( QSize(xs,ys) ); + mAnalyzer = new KPixmap ( TQSize(xs,ys) ); bitBlt( mAnalyzer, 0, 0, &tmp, x, y, xs, ys, Qt::CopyROP ); // create a gradient for the bars going from 30% lighter to 30% darker than mColor - mGradient = new KPixmap ( QSize(xs,ys) ); + mGradient = new KPixmap ( TQSize(xs,ys) ); KPixmapEffect::gradient ( *mGradient, mColor.light(_KJ_GRADIENT_DIFF), mColor.dark(_KJ_GRADIENT_DIFF), KPixmapEffect::VerticalGradient ); @@ -304,8 +304,8 @@ void KJStereoFFT::scopeEvent(float *left, float *right, int len) unsigned int h = rect().height(); int hh = (int)(rect().height()/2); - QBitmap mGradientMask ( rect().width(), h, true ); - QPainter mask( &mGradientMask ); + TQBitmap mGradientMask ( rect().width(), h, true ); + TQPainter mask( &mGradientMask ); float *start = left; float *end = left + len; @@ -359,19 +359,19 @@ void KJStereoFFT::scopeEvent(float *left, float *right, int len) repaint(); } -void KJStereoFFT::paint(QPainter *p, const QRect &) +void KJStereoFFT::paint(TQPainter *p, const TQRect &) { // put that thing on screen if ( !napp->player()->isStopped() ) - bitBlt ( p->device(), rect().topLeft(), mAnalyzer, QRect(0,0,-1,-1), Qt::CopyROP ); + bitBlt ( p->device(), rect().topLeft(), mAnalyzer, TQRect(0,0,-1,-1), Qt::CopyROP ); } -bool KJStereoFFT::mousePress(const QPoint &) +bool KJStereoFFT::mousePress(const TQPoint &) { return true; } -void KJStereoFFT::mouseRelease(const QPoint &, bool in) +void KJStereoFFT::mouseRelease(const TQPoint &, bool in) { if (!in) // only do something if users is still inside the button return; @@ -399,7 +399,7 @@ void KJStereoFFT::readConfig() * KJScope - oscilloscope like visualization *************************************************/ -KJScope::KJScope(const QStringList &l, KJLoader *parent) +KJScope::KJScope(const TQStringList &l, KJLoader *parent) : KJVisScope(parent), MonoScope(50)/*, blurnum(0), mOsci(0)*/ { int x=l[1].toInt(); @@ -413,22 +413,22 @@ KJScope::KJScope(const QStringList &l, KJLoader *parent) if ( parent->exist("analyzercolor") ) { - QStringList &col = parser()["analyzercolor"]; + TQStringList &col = parser()["analyzercolor"]; mColor.setRgb ( col[1].toInt(), col[2].toInt(), col[3].toInt() ); } else // FIXME: what should be default colors for Vis? mColor.setRgb ( 255, 255, 255 ); // background under vis - QPixmap tmp = parent->pixmap(parent->item("backgroundimage")[1]); - mBack = new KPixmap ( QSize(xs,ys) ); + TQPixmap tmp = parent->pixmap(parent->item("backgroundimage")[1]); + mBack = new KPixmap ( TQSize(xs,ys) ); bitBlt( mBack, 0, 0, &tmp, x, y, xs, ys, Qt::CopyROP ); - mOsci = new KPixmap ( QSize(xs,ys) ); + mOsci = new KPixmap ( TQSize(xs,ys) ); bitBlt( mOsci, 0, 0, &tmp, x, y, xs, ys, Qt::CopyROP ); // create a gradient - mGradient = new KPixmap ( QSize(xs,ys) ); + mGradient = new KPixmap ( TQSize(xs,ys) ); KPixmapEffect::gradient ( *mGradient, mColor.light(_KJ_GRADIENT_DIFF), mColor.dark(_KJ_GRADIENT_DIFF), KPixmapEffect::VerticalGradient ); @@ -459,7 +459,7 @@ void KJScope::scopeEvent(float *d, int size) int heightHalf = rect().height()/2 /* -1 */; int x = 0; - QPainter tempP( mOsci ); + TQPainter tempP( mOsci ); if ( blurnum == 3 ) { // clear whole Vis @@ -487,12 +487,12 @@ void KJScope::scopeEvent(float *d, int size) // tempP.drawLine(x, heightHalf, x, heightHalf+amp); if ( amp > 0 ) { - bitBlt ( tempP.device(), QPoint(x,heightHalf), mGradient, QRect(x,heightHalf,1,amp), Qt::CopyROP ); + bitBlt ( tempP.device(), TQPoint(x,heightHalf), mGradient, TQRect(x,heightHalf,1,amp), Qt::CopyROP ); } else { amp = -amp; - bitBlt ( tempP.device(), QPoint(x,heightHalf-amp), mGradient, QRect(x,(heightHalf-amp),1,amp), Qt::CopyROP ); + bitBlt ( tempP.device(), TQPoint(x,heightHalf-amp), mGradient, TQRect(x,(heightHalf-amp),1,amp), Qt::CopyROP ); } x++; } @@ -500,18 +500,18 @@ void KJScope::scopeEvent(float *d, int size) repaint(); } -void KJScope::paint(QPainter *p, const QRect &) +void KJScope::paint(TQPainter *p, const TQRect &) { // put that thing on screen - bitBlt ( p->device(), rect().topLeft(), mOsci, QRect(0,0,-1,-1), Qt::CopyROP ); + bitBlt ( p->device(), rect().topLeft(), mOsci, TQRect(0,0,-1,-1), Qt::CopyROP ); } -bool KJScope::mousePress(const QPoint &) +bool KJScope::mousePress(const TQPoint &) { return true; } -void KJScope::mouseRelease(const QPoint &, bool in) +void KJScope::mouseRelease(const TQPoint &, bool in) { if (!in) // only do something if users is still inside the button return; diff --git a/noatun/modules/kjofol-skin/kjvis.h b/noatun/modules/kjofol-skin/kjvis.h index d2a43700..a05103d8 100644 --- a/noatun/modules/kjofol-skin/kjvis.h +++ b/noatun/modules/kjofol-skin/kjvis.h @@ -19,10 +19,10 @@ public: class KJNullScope : public KJVisScope { public: - KJNullScope(const QStringList &, KJLoader *parent); - virtual void paint(QPainter *p, const QRect &); - virtual bool mousePress(const QPoint&); - virtual void mouseRelease(const QPoint &, bool in); + KJNullScope(const TQStringList &, KJLoader *parent); + virtual void paint(TQPainter *p, const TQRect &); + virtual bool mousePress(const TQPoint&); + virtual void mouseRelease(const TQPoint &, bool in); virtual void readConfig(void); private: @@ -35,16 +35,16 @@ private: class KJFFT : public KJVisScope, public MonoFFTScope { public: - KJFFT(const QStringList &, KJLoader *parent); - virtual void paint(QPainter *p, const QRect &); + KJFFT(const TQStringList &, KJLoader *parent); + virtual void paint(TQPainter *p, const TQRect &); virtual void scopeEvent(float *d, int size); - virtual bool mousePress(const QPoint&); - virtual void mouseRelease(const QPoint &, bool in); + virtual bool mousePress(const TQPoint&); + virtual void mouseRelease(const TQPoint &, bool in); virtual void readConfig(void); private: - QColor mColor; + TQColor mColor; KPixmap *mGradient; KPixmap *mBack; KPixmap *mAnalyzer; @@ -57,16 +57,16 @@ private: class KJStereoFFT : public KJVisScope, public StereoFFTScope { public: - KJStereoFFT(const QStringList &, KJLoader *parent); - virtual void paint(QPainter *p, const QRect &); + KJStereoFFT(const TQStringList &, KJLoader *parent); + virtual void paint(TQPainter *p, const TQRect &); virtual void scopeEvent(float *left, float *right, int len); - virtual bool mousePress(const QPoint&); - virtual void mouseRelease(const QPoint &, bool in); + virtual bool mousePress(const TQPoint&); + virtual void mouseRelease(const TQPoint &, bool in); virtual void readConfig(void); private: - QColor mColor; + TQColor mColor; KPixmap *mGradient; KPixmap *mBack; KPixmap *mAnalyzer; @@ -79,16 +79,16 @@ private: class KJScope : public KJVisScope, public MonoScope { public: - KJScope ( const QStringList &, KJLoader *parent); - virtual void paint(QPainter *p, const QRect &); + KJScope ( const TQStringList &, KJLoader *parent); + virtual void paint(TQPainter *p, const TQRect &); virtual void scopeEvent(float *d, int size); - virtual bool mousePress(const QPoint&); - virtual void mouseRelease(const QPoint &, bool in); + virtual bool mousePress(const TQPoint&); + virtual void mouseRelease(const TQPoint &, bool in); virtual void readConfig(void); private: - QColor mColor; + TQColor mColor; KPixmap *mGradient; KPixmap *mBack; KPixmap *mOsci; diff --git a/noatun/modules/kjofol-skin/kjwidget.cpp b/noatun/modules/kjofol-skin/kjwidget.cpp index e7b6a4d1..b46fb651 100644 --- a/noatun/modules/kjofol-skin/kjwidget.cpp +++ b/noatun/modules/kjofol-skin/kjwidget.cpp @@ -12,15 +12,15 @@ // ugly static functions and stuff #include "helpers.cpp" -#include +#include KJWidget::KJWidget(KJLoader *p) : mParent(p) { } -QBitmap KJWidget::getMask(const QImage &_rect, register QRgb transparent) +TQBitmap KJWidget::getMask(const TQImage &_rect, register QRgb transparent) { - QImage result(_rect.width(), _rect.height(), 1,2, QImage::LittleEndian); + TQImage result(_rect.width(), _rect.height(), 1,2, TQImage::LittleEndian); #if QT_VERSION < 0x030300 result.setColor(0, qRgb(0,0,0)); //TODO: maybe use Qt::color0 and Qt::color1 result.setColor(1, qRgb(255,255,255)); @@ -34,36 +34,36 @@ QBitmap KJWidget::getMask(const QImage &_rect, register QRgb transparent) for(int width=0; width<_rect.width(); width++) setPixel1BPP(result, width, height, _rect.pixel(width, height)!=transparent); } - QBitmap bm; + TQBitmap bm; bm.convertFromImage(result); return bm; } -void KJWidget::repaint(bool me, const QRect &r, bool clear) +void KJWidget::repaint(bool me, const TQRect &r, bool clear) { - QPainter p(parent()); + TQPainter p(parent()); if (me) paint(&p, r.isValid() ? r : rect()); else parent()->repaint(r.isValid() ? r : rect(), clear); } -const QString &KJWidget::backgroundPressed(const QString &bmp) const +const TQString &KJWidget::backgroundPressed(const TQString &bmp) const { if(bmp.isEmpty()) // play safe { -// kdDebug(66666) << k_funcinfo << "empty argument 'bmp', returning QString::null!" << endl; - return QString::null; +// kdDebug(66666) << k_funcinfo << "empty argument 'bmp', returning TQString::null!" << endl; + return TQString::null; } // kdDebug(66666) << k_funcinfo << "Returning pressed pixmap for '" << bmp.latin1() << "'" << endl; // make absolutely sure the wanted backgroundimagepressedX line is there - QStringList item = parser()["backgroundimagepressed"+QString::number(bmp.mid(3).toInt())]; + TQStringList item = parser()["backgroundimagepressed"+TQString::number(bmp.mid(3).toInt())]; if(item.count() < 2) { // kdDebug(66666) << k_funcinfo << "backgroundimagepressed doesn't have enough keys in its line!" << endl; - return QString::null; + return TQString::null; } else return item[1]; diff --git a/noatun/modules/kjofol-skin/kjwidget.h b/noatun/modules/kjofol-skin/kjwidget.h index cc7ddf53..3f63671b 100644 --- a/noatun/modules/kjofol-skin/kjwidget.h +++ b/noatun/modules/kjofol-skin/kjwidget.h @@ -9,14 +9,14 @@ public: KJWidget(KJLoader *); virtual ~KJWidget() {}; // called when the widget should paint - virtual void paint(QPainter *, const QRect &) {}; + virtual void paint(TQPainter *, const TQRect &) {}; // called to receive the rect this widget is in - virtual QRect rect() const { return mRect; } + virtual TQRect rect() const { return mRect; } // called when pressed in this widget - virtual bool mousePress(const QPoint &) {return false; } + virtual bool mousePress(const TQPoint &) {return false; } // called when the mouse is released after clicked in this widget - virtual void mouseRelease(const QPoint &, bool){} - virtual void mouseMove(const QPoint &, bool) {} + virtual void mouseRelease(const TQPoint &, bool){} + virtual void mouseMove(const TQPoint &, bool) {} // called with the current time (mille) virtual void timeUpdate(int) {} // called when a new song is playing, player() is ready with it too @@ -26,15 +26,15 @@ public: // called when the mouse is moved while clicked in this widget // repaint myself - virtual void repaint(bool me=true, const QRect &rect=QRect(), bool clear=false); + virtual void repaint(bool me=true, const TQRect &rect=TQRect(), bool clear=false); - virtual QString tip() { return 0; } + virtual TQString tip() { return 0; } public: - static QBitmap getMask(const QImage &color, register QRgb=qRgb(255,0,255)); + static TQBitmap getMask(const TQImage &color, register QRgb=qRgb(255,0,255)); protected: - const QString &backgroundPressed(const QString &bmp) const; + const TQString &backgroundPressed(const TQString &bmp) const; KJLoader *parent() const {return mParent;} KJLoader &parser() const {return *mParent;} @@ -43,11 +43,11 @@ protected: KJFont &volumeFont() const {return *mParent->mVolumeFont;} KJFont &pitchFont() const {return *mParent->mPitchFont;} - void setRect(const QRect& rect) {mRect=rect;} - void setRect(int x, int y, int xs, int ys) {mRect=QRect(x,y,xs,ys);} + void setRect(const TQRect& rect) {mRect=rect;} + void setRect(int x, int y, int xs, int ys) {mRect=TQRect(x,y,xs,ys);} private: KJLoader *mParent; - QRect mRect; + TQRect mRect; }; #endif diff --git a/noatun/modules/kjofol-skin/parser.cpp b/noatun/modules/kjofol-skin/parser.cpp index df5fdc40..aae5b12e 100644 --- a/noatun/modules/kjofol-skin/parser.cpp +++ b/noatun/modules/kjofol-skin/parser.cpp @@ -10,14 +10,14 @@ #include "kjprefs.h" // system includes -#include -#include -#include +#include +#include +#include #include #include #include -Parser::Parser() : QDict(17,false) +Parser::Parser() : TQDict(17,false) { mSkinAbout=""; mImageCache.setAutoDelete(true); @@ -29,27 +29,27 @@ void Parser::conserveMemory() mImageCache.clear(); } -void Parser::open(const QString &file) +void Parser::open(const TQString &file) { clear(); mImageCache.clear(); mSkinAbout=""; mDir=KURL(file).directory(); - QFile f(file); + TQFile f(file); if ( !f.exists() ) return; f.open(IO_ReadOnly); f.at(0); - QTextStream stream(&f); + TQTextStream stream(&f); while (!stream.eof()) { - QString line=stream.readLine(); + TQString line=stream.readLine(); line=line.simplifyWhiteSpace(); if ((!line.length()) || line[0]=='#') continue; - QStringList *l=new QStringList(QStringList::split(" ", (line.lower()))); - QString first=l->first(); + TQStringList *l=new TQStringList(TQStringList::split(" ", (line.lower()))); + TQString first=l->first(); // special handling for about-texts as the key "about" can appear multiple // times and thus does not fit into qdict. @@ -67,17 +67,17 @@ void Parser::open(const QString &file) } } -QString Parser::fileItem(const QString &i) const +TQString Parser::fileItem(const TQString &i) const { return dir()+'/'+i; } -QString Parser::dir() const +TQString Parser::dir() const { return mDir; } -Parser::ImagePixmap* Parser::getPair(const QString &filenameOld) const +Parser::ImagePixmap* Parser::getPair(const TQString &filenameOld) const { // is it in there? ImagePixmap *pair; @@ -87,9 +87,9 @@ Parser::ImagePixmap* Parser::getPair(const QString &filenameOld) const return pair; } - QString filename=fileItem(filenameOld); + TQString filename=fileItem(filenameOld); - QImage image; + TQImage image; // Determine file-format trough mimetype (no stupid .ext test) KMimeMagicResult * result = KMimeMagic::self()->findFileType( filename ); @@ -97,7 +97,7 @@ Parser::ImagePixmap* Parser::getPair(const QString &filenameOld) const if ( result->mimeType() == "image/png" ) { // image = NoatunApp::readPNG(filenameNoCase(filename)); - QImageIO iio; + TQImageIO iio; iio.setFileName( filenameNoCase(filename) ); // forget about gamma-value, fix for broken PNGs iio.setGamma( 0.00000001 ); @@ -113,12 +113,12 @@ Parser::ImagePixmap* Parser::getPair(const QString &filenameOld) const } else { - image = QImage(filenameNoCase(filename)); + image = TQImage(filenameNoCase(filename)); } //add to the cache - QPixmap pixmap; - pixmap.convertFromImage(image, QPixmap::AutoColor|QPixmap::ThresholdDither|QPixmap::AvoidDither); + TQPixmap pixmap; + pixmap.convertFromImage(image, TQPixmap::AutoColor|TQPixmap::ThresholdDither|TQPixmap::AvoidDither); pair = new Parser::ImagePixmap; pair->mImage = image; pair->mPixmap = pixmap; @@ -126,7 +126,7 @@ Parser::ImagePixmap* Parser::getPair(const QString &filenameOld) const return pair; } -bool Parser::exist(const QString &i) const +bool Parser::exist(const TQString &i) const { return (bool)find(i); } diff --git a/noatun/modules/kjofol-skin/parser.h b/noatun/modules/kjofol-skin/parser.h index 97e20d99..3f691253 100644 --- a/noatun/modules/kjofol-skin/parser.h +++ b/noatun/modules/kjofol-skin/parser.h @@ -2,48 +2,48 @@ #define PARSER_H // system includes -#include -#include -#include -#include +#include +#include +#include +#include -class Parser : public QDict +class Parser : public TQDict { class ImagePixmap { public: ImagePixmap() : mImage(0), mPixmap(0) {} ~ImagePixmap() {} - QImage mImage; - QPixmap mPixmap; + TQImage mImage; + TQPixmap mPixmap; }; public: Parser(); void conserveMemory(); - void open(const QString &file); + void open(const TQString &file); - QString dir() const; - QPixmap pixmap(const QString &pixmap) const + TQString dir() const; + TQPixmap pixmap(const TQString &pixmap) const { return getPair(pixmap)->mPixmap; } - QImage image(const QString &image) const + TQImage image(const TQString &image) const { return getPair(image)->mImage; } - QString about() const { return mSkinAbout; }; + TQString about() const { return mSkinAbout; }; - QString fileItem(const QString &file) const; + TQString fileItem(const TQString &file) const; - bool exist(const QString &i) const; + bool exist(const TQString &i) const; public: - QStringList& operator[](const QString &l) { return *find(l);} + TQStringList& operator[](const TQString &l) { return *find(l);} private: - ImagePixmap *getPair(const QString &i) const; + ImagePixmap *getPair(const TQString &i) const; private: - mutable QDict mImageCache; - QString mDir; - QString mSkinAbout; + mutable TQDict mImageCache; + TQString mDir; + TQString mSkinAbout; }; #endif // PARSER_H diff --git a/noatun/modules/marquis/marquis.cpp b/noatun/modules/marquis/marquis.cpp index 29ca7364..15a298c3 100644 --- a/noatun/modules/marquis/marquis.cpp +++ b/noatun/modules/marquis/marquis.cpp @@ -78,9 +78,9 @@ Marquis::Marquis() // for testing: uncomment this and use // dcop `dcop | grep noatun` Marquis activateAction dynamicRestore // and dynamicSave accordingly. -// (void) new KAction("Restore", 0, this, SLOT( dynamicRestore() ), actionCollection(), "dynamicRestore" ); -// (void) new KAction("Save", 0, this, SLOT( dynamicSave() ), actionCollection(), "dynamicSave" ); - connect( napp, SIGNAL( saveYourself() ), SLOT( dynamicSave() )); +// (void) new KAction("Restore", 0, this, TQT_SLOT( dynamicRestore() ), actionCollection(), "dynamicRestore" ); +// (void) new KAction("Save", 0, this, TQT_SLOT( dynamicSave() ), actionCollection(), "dynamicSave" ); + connect( napp, TQT_SIGNAL( saveYourself() ), TQT_SLOT( dynamicSave() )); } Marquis::~Marquis() @@ -93,7 +93,7 @@ void Marquis::restore(void) dynamicRestore(); } -// unload every window, and save the config as QStringList of those loaded +// unload every window, and save the config as TQStringList of those loaded void Marquis::saveSessionConfig(KConfig *c) { kdDebug(66666) << k_funcinfo << endl; @@ -107,20 +107,20 @@ void Marquis::saveSessionConfig(KConfig *c) if ( !player->current().isNull() ) { KURL songURL = player->current().url(); - songURL.setPass( QString::null ); // don't save passwords + songURL.setPass( TQString::null ); // don't save passwords c->writePathEntry("Current Song", songURL.url()); } else - c->writePathEntry("Current Song", QString::null); + c->writePathEntry("Current Song", TQString::null); c->writeEntry("Current Position", player->getTime()); c->writeEntry("PlayStatus", getPlayStatus( player )); // borrowed from Plugin config dialog - QStringList specList; + TQStringList specList; - QValueList loaded = napp->libraryLoader()->loaded(); - for( QValueList::Iterator i = loaded.begin(); i != loaded.end(); ++i) + TQValueList loaded = napp->libraryLoader()->loaded(); + for( TQValueList::Iterator i = loaded.begin(); i != loaded.end(); ++i) { if(!specList.contains((*i).specfile) && napp->libraryLoader()->isLoaded((*i).specfile) @@ -139,7 +139,7 @@ void Marquis::readSessionConfig(KConfig *c) { Player *player = napp->player(); - c->setGroup(QString::null); + c->setGroup(TQString::null); // First set volume, then load modules, some module could start // playback and that would be with 100% volume! @@ -147,10 +147,10 @@ void Marquis::readSessionConfig(KConfig *c) //player->setVolume( 0 ); player->loop( c->readNumEntry("Loop Style", (int) Player::None) ); - QStringList list = c->readListEntry("Loaded Plugins"); + TQStringList list = c->readListEntry("Loaded Plugins"); /* kdDebug(66666) << "Marquis::readSessionConfig()" << endl; - for(QStringList::ConstIterator i=list.begin(); i!=list.end(); ++i) + for(TQStringList::ConstIterator i=list.begin(); i!=list.end(); ++i) kdDebug(66666) << *i << endl; kdDebug(66666) << "Marquis::readSessionConfig() there we go" << endl; */ diff --git a/noatun/modules/metatag/edit.cpp b/noatun/modules/metatag/edit.cpp index d5ccb0c4..beb0fd0d 100644 --- a/noatun/modules/metatag/edit.cpp +++ b/noatun/modules/metatag/edit.cpp @@ -1,44 +1,44 @@ #include -#include +#include #include -#include -#include +#include +#include #include #include -#include +#include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include #include #include -#include +#include #include "metatag.h" #include "edit.h" Editor::Editor() -: KDialogBase((QWidget*)0L, 0, false, i18n("Tag Editor"), Ok | Cancel) +: KDialogBase((TQWidget*)0L, 0, false, i18n("Tag Editor"), Ok | Cancel) { mMainWidget = makeMainWidget(); // mMainWidget->setMinimumWidth(325); - mGrid = new QGridLayout(mMainWidget, 1, 1, 0, spacingHint(), "Editor::mGrid"); + mGrid = new TQGridLayout(mMainWidget, 1, 1, 0, spacingHint(), "Editor::mGrid"); mGrid->setColStretch(1, 1); mGrid->setColStretch(2, 1); - QHBox *heading = new QHBox(mMainWidget, "Editor::heading"); + TQHBox *heading = new TQHBox(mMainWidget, "Editor::heading"); heading->setSpacing(4); - mFileIcon = new QLabel(heading); + mFileIcon = new TQLabel(heading); mFileIcon->setAlignment(AlignVCenter | AlignLeft); - mFile = new QLabel(heading); + mFile = new TQLabel(heading); mFile->setAlignment(AlignVCenter | AlignLeft); heading->setStretchFactor(mFile, 2); mGrid->addMultiCellWidget(heading, 0, 0, 0, 2); @@ -49,8 +49,8 @@ Editor::Editor() mControls.setAutoDelete(true); mNextRow = 2; - connect(this, SIGNAL(closeClicked()), SLOT(delayedDestruct())); - connect(this, SIGNAL(okClicked()), SLOT(save())); + connect(this, TQT_SIGNAL(closeClicked()), TQT_SLOT(delayedDestruct())); + connect(this, TQT_SIGNAL(okClicked()), TQT_SLOT(save())); enableButtonSeparator(true); setFixedHeight(sizeHint().height()); @@ -65,12 +65,12 @@ void Editor::open(const PlaylistItem & file) mDirty = false; mFile->setText("" + file.url().fileName(false) + ""); - QToolTip::add(mFile, file.url().prettyURL()); + TQToolTip::add(mFile, file.url().prettyURL()); mFileIcon-> setPixmap(KMimeType::pixmapForURL(file.url(), 0, KIcon::Small)); if (file.url().isLocalFile()) { - QFileInfo file_info(file.file()); + TQFileInfo file_info(file.file()); mFileWritable = file_info.isWritable(); } else { @@ -81,13 +81,13 @@ void Editor::open(const PlaylistItem & file) if ( !file_meta_info.isValid() ) // go ahead people, nothing to see here return; - mControls.append(createControl(file_meta_info, i18n("&Title"), "Title", QVariant::String, false, mMainWidget)); - mControls.append(createControl(file_meta_info, i18n("&Artist"), "Artist", QVariant::String, false, mMainWidget)); - mControls.append(createControl(file_meta_info, i18n("A&lbum"), "Album", QVariant::String, false, mMainWidget)); - mControls.append(createControl(file_meta_info, i18n("&Date"), "Date", QVariant::String, false, mMainWidget)); - mControls.append(createControl(file_meta_info, i18n("T&rack"), "Tracknumber", QVariant::UInt, false, mMainWidget)); - mControls.append(createControl(file_meta_info, i18n("&Genre"), "Genre", QVariant::String, false, mMainWidget)); - mControls.append(createControl(file_meta_info, i18n("Co&mment"), "Comment", QVariant::String, false, mMainWidget)); + mControls.append(createControl(file_meta_info, i18n("&Title"), "Title", TQVariant::String, false, mMainWidget)); + mControls.append(createControl(file_meta_info, i18n("&Artist"), "Artist", TQVariant::String, false, mMainWidget)); + mControls.append(createControl(file_meta_info, i18n("A&lbum"), "Album", TQVariant::String, false, mMainWidget)); + mControls.append(createControl(file_meta_info, i18n("&Date"), "Date", TQVariant::String, false, mMainWidget)); + mControls.append(createControl(file_meta_info, i18n("T&rack"), "Tracknumber", TQVariant::UInt, false, mMainWidget)); + mControls.append(createControl(file_meta_info, i18n("&Genre"), "Genre", TQVariant::String, false, mMainWidget)); + mControls.append(createControl(file_meta_info, i18n("Co&mment"), "Comment", TQVariant::String, false, mMainWidget)); } void Editor::save() @@ -116,20 +116,20 @@ void Editor::save() } void Editor::saveControl(KFileMetaInfo& meta_info, const MetaWidget &meta_widget) { - QVariant value; + TQVariant value; const KFileMimeTypeInfo *info = KFileMetaInfoProvider::self()->mimeTypeInfo( meta_info.mimeType() ); if (!meta_widget.widget->isEnabled()) return; - if (meta_widget.widget->inherits("QSpinBox")) - value = static_cast(meta_widget.widget)->value(); - else if (meta_widget.widget->inherits("QComboBox")) - value = static_cast(meta_widget.widget)->currentText(); - else if (meta_widget.widget->inherits("QLineEdit")) - value = static_cast(meta_widget.widget)->text(); + if (meta_widget.widget->inherits("TQSpinBox")) + value = static_cast(meta_widget.widget)->value(); + else if (meta_widget.widget->inherits("TQComboBox")) + value = static_cast(meta_widget.widget)->currentText(); + else if (meta_widget.widget->inherits("TQLineEdit")) + value = static_cast(meta_widget.widget)->text(); - QString group = keyGroup(meta_info, meta_widget.key); + TQString group = keyGroup(meta_info, meta_widget.key); if (group.isNull()) { kdWarning() << "Cannot find group for " << meta_widget.key << endl; @@ -158,13 +158,13 @@ void Editor::saveControl(KFileMetaInfo& meta_info, const MetaWidget &meta_widget kdWarning() << "Cannot save " << meta_widget.key << " as required type." << endl; } -MetaWidget* Editor::createControl(KFileMetaInfo& meta_info, const QString &label, const QString &key, QVariant::Type default_type, bool optional, QWidget *parent) { - QLabel *tmp_label = 0L; +MetaWidget* Editor::createControl(KFileMetaInfo& meta_info, const TQString &label, const TQString &key, TQVariant::Type default_type, bool optional, TQWidget *parent) { + TQLabel *tmp_label = 0L; KFileMetaInfoItem info_item = meta_info.item(key); - QVariant::Type type; + TQVariant::Type type; MetaWidget *meta_widget = 0L; - QValidator *validator = 0L; - QString groupName = keyGroup(meta_info, key); + TQValidator *validator = 0L; + TQString groupName = keyGroup(meta_info, key); bool known_key = ((!groupName.isNull()) && meta_info.group(groupName).contains(key)); bool addable = keyAddable(meta_info, key); const KFileMimeTypeInfo *info = KFileMetaInfoProvider::self()->mimeTypeInfo( meta_info.mimeType() ); @@ -188,9 +188,9 @@ MetaWidget* Editor::createControl(KFileMetaInfo& meta_info, const QString &label meta_widget = new MetaWidget; meta_widget->key = key; - if ((type == QVariant::Int) || (type == QVariant::UInt)) { + if ((type == TQVariant::Int) || (type == TQVariant::UInt)) { // We're an int, make a spin box - QSpinBox *box = new QSpinBox(parent); + TQSpinBox *box = new TQSpinBox(parent); // Well, normally metatag doesn't care that much about suffixes // and prefixes, but this is just too easy. @@ -204,10 +204,10 @@ MetaWidget* Editor::createControl(KFileMetaInfo& meta_info, const QString &label box->setValidator(validator); // Is it an integer validator - if (validator->inherits("QIntValidator")) { - QIntValidator *int_validator = static_cast(validator); + if (validator->inherits("TQIntValidator")) { + TQIntValidator *int_validator = static_cast(validator); - // FIXME: Why the -hell- doesn't QSpinBox::setValidator() do this?? + // FIXME: Why the -hell- doesn't TQSpinBox::setValidator() do this?? box->setMinValue(int_validator->bottom()); box->setMaxValue(int_validator->top()); } @@ -215,18 +215,18 @@ MetaWidget* Editor::createControl(KFileMetaInfo& meta_info, const QString &label box->setValue(info_item.value().toInt()); - connect(box, SIGNAL(valueChanged(int)), this, SLOT(modified())); + connect(box, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(modified())); meta_widget->widget = box; } else { - // We're not an int, make a KLineEdit/QComboBox, depending on our validator + // We're not an int, make a KLineEdit/TQComboBox, depending on our validator bool combo_box = false; if (validator) combo_box = validator->isA("KStringListValidator"); if (combo_box) { - QComboBox *combo = new QComboBox(parent); + TQComboBox *combo = new TQComboBox(parent); combo->clear(); combo->insertStringList(static_cast< @@ -234,7 +234,7 @@ MetaWidget* Editor::createControl(KFileMetaInfo& meta_info, const QString &label >(validator)->stringList()); combo->setCurrentText(info_item.value().toString()); - connect(combo, SIGNAL(activated(int)), this, SLOT(modified())); + connect(combo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(modified())); meta_widget->widget = combo; } @@ -244,7 +244,7 @@ MetaWidget* Editor::createControl(KFileMetaInfo& meta_info, const QString &label edit = new KLineEdit(parent); edit->setText(info_item.value().toString()); edit->setValidator(validator); - connect(edit, SIGNAL(textChanged(const QString &)), this, SLOT(modified())); + connect(edit, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(modified())); meta_widget->widget = edit; } @@ -258,7 +258,7 @@ MetaWidget* Editor::createControl(KFileMetaInfo& meta_info, const QString &label mGrid->addMultiCellWidget(meta_widget->widget, mNextRow, mNextRow, 1, 2); // Add our label. This is the easy part - tmp_label = new QLabel(meta_widget->widget, label + ":", parent); + tmp_label = new TQLabel(meta_widget->widget, label + ":", parent); mGrid->addWidget(tmp_label, mNextRow, 0); @@ -267,25 +267,25 @@ MetaWidget* Editor::createControl(KFileMetaInfo& meta_info, const QString &label return meta_widget; } -QString Editor::keyGroup(const KFileMetaInfo& i, QString key) { +TQString Editor::keyGroup(const KFileMetaInfo& i, TQString key) { const KFileMimeTypeInfo *info = KFileMetaInfoProvider::self()->mimeTypeInfo( i.mimeType() ); - QStringList groups = info->supportedGroups(); + TQStringList groups = info->supportedGroups(); - for (QStringList::Iterator it = groups.begin();it != groups.end();++it) { + for (TQStringList::Iterator it = groups.begin();it != groups.end();++it) { if (info->groupInfo(*it)->itemInfo(key)) { return *it; } } - return QString::null; + return TQString::null; } -bool Editor::keyAddable(const KFileMetaInfo &i, QString key) { +bool Editor::keyAddable(const KFileMetaInfo &i, TQString key) { const KFileMimeTypeInfo *info = KFileMetaInfoProvider::self()->mimeTypeInfo( i.mimeType() ); - QStringList groups = info->supportedGroups(); + TQStringList groups = info->supportedGroups(); kdDebug(66666) << "Testing if " << key << " is addable" << endl; - for (QStringList::Iterator it = groups.begin();it != groups.end();++it) { + for (TQStringList::Iterator it = groups.begin();it != groups.end();++it) { if (info->groupInfo(*it)->supportsVariableKeys()) { kdDebug(66666) << "Group " << *it << " supports variable keys" << endl; return true; diff --git a/noatun/modules/metatag/edit.h b/noatun/modules/metatag/edit.h index d6b0ab9c..ad928ff0 100644 --- a/noatun/modules/metatag/edit.h +++ b/noatun/modules/metatag/edit.h @@ -3,16 +3,16 @@ #include #include -#include -#include +#include +#include class KFileMetaInfo; class KFileMetaInfoItem; class QGridLayout; struct MetaWidget { - QWidget *widget; - QString key; + TQWidget *widget; + TQString key; }; class Editor:public KDialogBase { @@ -31,23 +31,23 @@ class Editor:public KDialogBase { void modified(); protected: - bool keyAddable(const KFileMetaInfo &, QString); - QString keyGroup(const KFileMetaInfo &, QString); + bool keyAddable(const KFileMetaInfo &, TQString); + TQString keyGroup(const KFileMetaInfo &, TQString); void saveControl(KFileMetaInfo& meta_info, const MetaWidget&); - MetaWidget *createControl(KFileMetaInfo& meta_info, const QString &label, const QString &key, QVariant::Type default_type, bool optional, QWidget *parent); + MetaWidget *createControl(KFileMetaInfo& meta_info, const TQString &label, const TQString &key, TQVariant::Type default_type, bool optional, TQWidget *parent); - QPtrList mControls; + TQPtrList mControls; - QWidget *mMainWidget; - QGridLayout *mGrid; + TQWidget *mMainWidget; + TQGridLayout *mGrid; int mNextRow; bool mFileWritable; bool mDirty; - QLabel *mFile; - QLabel *mFileIcon; + TQLabel *mFile; + TQLabel *mFileIcon; const char *filename; PlaylistItem item; }; diff --git a/noatun/modules/metatag/metatag.cpp b/noatun/modules/metatag/metatag.cpp index d0531092..1ec54cbf 100644 --- a/noatun/modules/metatag/metatag.cpp +++ b/noatun/modules/metatag/metatag.cpp @@ -7,10 +7,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -32,7 +32,7 @@ extern "C" MetaTagLoader::MetaTagLoader():Plugin() { - mAction = new KAction(i18n("&Tag Editor..."), "edit", 0, this, SLOT(editTag()), this, "edittag"); + mAction = new KAction(i18n("&Tag Editor..."), "edit", 0, this, TQT_SLOT(editTag()), this, "edittag"); napp->pluginActionMenu()->insert(mAction); } @@ -52,8 +52,8 @@ void MetaTagLoader::editTag() e->open(i); e->show(); - connect(e, SIGNAL(saved(PlaylistItem &)), - SLOT(update(PlaylistItem &))); + connect(e, TQT_SIGNAL(saved(PlaylistItem &)), + TQT_SLOT(update(PlaylistItem &))); } bool MetaTagLoader::update(PlaylistItem & item) @@ -94,7 +94,7 @@ bool MetaTagLoader::update(PlaylistItem & item) return true; } -bool MetaTagLoader::setProperty(KFileMetaInfo &info, PlaylistItem &item, const QString &key, const QString &property) +bool MetaTagLoader::setProperty(KFileMetaInfo &info, PlaylistItem &item, const TQString &key, const TQString &property) { KFileMetaInfoItem info_item = info.item(key); diff --git a/noatun/modules/metatag/metatag.h b/noatun/modules/metatag/metatag.h index ff5c277f..4559edaf 100644 --- a/noatun/modules/metatag/metatag.h +++ b/noatun/modules/metatag/metatag.h @@ -6,12 +6,12 @@ #include #include -#include +#include class KFileMetaInfo; class KAction; -class MetaTagLoader:public QObject, public Tags, public Plugin { +class MetaTagLoader:public TQObject, public Tags, public Plugin { Q_OBJECT public: MetaTagLoader(); @@ -22,7 +22,7 @@ class MetaTagLoader:public QObject, public Tags, public Plugin { void editTag(); private: - bool setProperty(KFileMetaInfo &info, PlaylistItem &item, const QString &key, const QString &property); + bool setProperty(KFileMetaInfo &info, PlaylistItem &item, const TQString &key, const TQString &property); int menuID; KAction *mAction; }; diff --git a/noatun/modules/monoscope/monoscope.cpp b/noatun/modules/monoscope/monoscope.cpp index 5ab63ecc..758d3950 100644 --- a/noatun/modules/monoscope/monoscope.cpp +++ b/noatun/modules/monoscope/monoscope.cpp @@ -2,7 +2,7 @@ #include #include #include -#include +#include #include #include #include @@ -15,7 +15,7 @@ extern "C" } } -Monoscope::Monoscope() : QWidget(0,0,WRepaintNoErase), MonoScope(30), Plugin() +Monoscope::Monoscope() : TQWidget(0,0,WRepaintNoErase), MonoScope(30), Plugin() { NOATUNPLUGINC(Monoscope); @@ -27,7 +27,7 @@ Monoscope::Monoscope() : QWidget(0,0,WRepaintNoErase), MonoScope(30), Plugin() setCaption(i18n("Monoscope")); show(); resizeEvent(0); - repaint(0,0, QWidget::width(), height(), false); + repaint(0,0, TQWidget::width(), height(), false); resizeEvent(0); setBackgroundColor(mLowColor); } @@ -41,7 +41,7 @@ Monoscope::~Monoscope() void Monoscope::init() { mAction = new KToggleAction(i18n("Toggle Monoscope"), 0, 0, - this, SLOT(toggle()), this, "togglemonoscope"); + this, TQT_SLOT(toggle()), this, "togglemonoscope"); mAction->setChecked(!isHidden()); napp->pluginActionMenu()->insert(mAction); } @@ -54,12 +54,12 @@ void Monoscope::toggle(void) hide(); } -void Monoscope::closeEvent(QCloseEvent *) +void Monoscope::closeEvent(TQCloseEvent *) { hide(); } -void Monoscope::resizeEvent(QResizeEvent *) +void Monoscope::resizeEvent(TQResizeEvent *) { setSamples(width()); } @@ -79,9 +79,9 @@ void Monoscope::scopeEvent(float *d, int size) int heightHalf=viewHeight/4; int y=viewHeight/2; // reduce flicker - QPixmap buffer(viewWidth, viewHeight, -1, QPixmap::BestOptim); + TQPixmap buffer(viewWidth, viewHeight, -1, TQPixmap::BestOptim); buffer.fill(mLowColor); - QPainter p(&buffer); + TQPainter p(&buffer); p.setPen(mHighColor); repaint(rect()); diff --git a/noatun/modules/monoscope/monoscope.h b/noatun/modules/monoscope/monoscope.h index 37031a4b..0f9ddcff 100644 --- a/noatun/modules/monoscope/monoscope.h +++ b/noatun/modules/monoscope/monoscope.h @@ -5,7 +5,7 @@ class KToggleAction; -class Monoscope : public QWidget, public MonoScope, public Plugin +class Monoscope : public TQWidget, public MonoScope, public Plugin { Q_OBJECT NOATUNPLUGIND @@ -20,10 +20,10 @@ public slots: void toggle(void); protected: - virtual void closeEvent(QCloseEvent *); + virtual void closeEvent(TQCloseEvent *); virtual void scopeEvent(float *data, int bands); - virtual void resizeEvent(QResizeEvent *); + virtual void resizeEvent(TQResizeEvent *); private: QRgb mHighColor, mLowColor; diff --git a/noatun/modules/net/net.cpp b/noatun/modules/net/net.cpp index 5e3ba707..f5898c71 100644 --- a/noatun/modules/net/net.cpp +++ b/noatun/modules/net/net.cpp @@ -11,10 +11,10 @@ extern "C" } -Net::Net() : QServerSocket(7539, 10), Plugin() +Net::Net() : TQServerSocket(7539, 10), Plugin() { mFDs.setAutoDelete(true); - connect(napp->player(), SIGNAL(newSong()), SLOT(newSong())); + connect(napp->player(), TQT_SIGNAL(newSong()), TQT_SLOT(newSong())); } Net::~Net() @@ -24,7 +24,7 @@ Net::~Net() void Net::newConnection(int fd) { - QSocket *s=new QSocket; + TQSocket *s=new QSocket; s->setSocket(fd); mFDs.append(s); } @@ -34,9 +34,9 @@ void Net::newSong() if (!napp->player()->current()) return; - for (QSocket *i=mFDs.first(); i!=0; i=mFDs.next()) + for (TQSocket *i=mFDs.first(); i!=0; i=mFDs.next()) { - QCString line; + TQCString line; line=napp->player()->current().title().latin1(); line+='\n'; ::write(i->socket(), (const void*)line.data(), line.length()); @@ -45,7 +45,7 @@ void Net::newSong() void Net::closed() { - for (QSocket *i=mFDs.first(); i!=0; i=mFDs.next()) + for (TQSocket *i=mFDs.first(); i!=0; i=mFDs.next()) { if (sender()==i) mFDs.removeRef(i); diff --git a/noatun/modules/net/net.h b/noatun/modules/net/net.h index 7d0fcb11..41c07438 100644 --- a/noatun/modules/net/net.h +++ b/noatun/modules/net/net.h @@ -3,11 +3,11 @@ #include #include -#include -#include +#include +#include #include -class Net : public QServerSocket, public Plugin +class Net : public TQServerSocket, public Plugin { Q_OBJECT @@ -24,7 +24,7 @@ protected: virtual void newConnection(int socket); private: - QPtrList mFDs; + TQPtrList mFDs; }; #endif diff --git a/noatun/modules/noatunui/userinterface.cpp b/noatun/modules/noatunui/userinterface.cpp index c13d4d6d..0302efe6 100644 --- a/noatun/modules/noatunui/userinterface.cpp +++ b/noatun/modules/noatunui/userinterface.cpp @@ -12,12 +12,12 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -28,55 +28,55 @@ #include #include -MilkChocolate::MilkChocolate() : QWidget(0,"NoatunUI"), UserInterface() +MilkChocolate::MilkChocolate() : TQWidget(0,"NoatunUI"), UserInterface() { setAcceptDrops(true); static const int buttonSize=32; { // The buttons - mBack=new QPushButton(this); + mBack=new TQPushButton(this); mBack->setFixedSize(buttonSize,buttonSize); mBack->setPixmap(BarIcon("noatunback")); - connect(mBack, SIGNAL(clicked()), napp->player(), SLOT(back())); - QToolTip::add(mBack,i18n("Back")); + connect(mBack, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(back())); + TQToolTip::add(mBack,i18n("Back")); - mStop=new QPushButton(this); + mStop=new TQPushButton(this); mStop->setFixedSize(buttonSize,buttonSize); mStop->setPixmap(BarIcon("noatunstop")); - connect(mStop, SIGNAL(clicked()), napp->player(), SLOT(stop())); - QToolTip::add(mStop, i18n("Stop")); + connect(mStop, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(stop())); + TQToolTip::add(mStop, i18n("Stop")); - mPlay=new QPushButton(this); + mPlay=new TQPushButton(this); mPlay->setToggleButton(true); mPlay->setFixedSize(buttonSize,buttonSize); mPlay->setPixmap(BarIcon("noatunplay")); - connect(mPlay, SIGNAL(clicked()), napp->player(), SLOT(playpause())); - QToolTip::add(mPlay, i18n("Play")); + connect(mPlay, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(playpause())); + TQToolTip::add(mPlay, i18n("Play")); - mForward=new QPushButton(this); + mForward=new TQPushButton(this); mForward->setFixedSize(buttonSize,buttonSize); mForward->setPixmap(BarIcon("noatunforward")); - connect(mForward, SIGNAL(clicked()), napp->player(), SLOT(forward())); - QToolTip::add(mForward, i18n("Forward")); + connect(mForward, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(forward())); + TQToolTip::add(mForward, i18n("Forward")); - mPlaylist=new QPushButton(this); + mPlaylist=new TQPushButton(this); mPlaylist->setToggleButton(true); mPlaylist->setFixedSize(buttonSize,buttonSize); mPlaylist->setPixmap(BarIcon("noatunplaylist")); - connect(mPlaylist, SIGNAL(clicked()), napp->player(), SLOT(toggleListView())); - QToolTip::add(mPlaylist, i18n("Playlist")); + connect(mPlaylist, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(toggleListView())); + TQToolTip::add(mPlaylist, i18n("Playlist")); - mLoop=new QPushButton(this); + mLoop=new TQPushButton(this); mLoop->setFixedSize(buttonSize,buttonSize); mLoop->setPixmap(BarIcon("noatunloopnone")); - connect(mLoop, SIGNAL(clicked()), napp->player(), SLOT(loop())); - QToolTip::add(mLoop, i18n("Change loop style")); + connect(mLoop, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(loop())); + TQToolTip::add(mLoop, i18n("Change loop style")); - mPopup=new QPushButton(this); + mPopup=new TQPushButton(this); mPopup->setFixedSize(buttonSize,buttonSize); mPopup->setPixmap(BarIcon("noatun")); - connect(mPopup, SIGNAL(clicked()), SLOT(popup())); -// QToolTip::add(mRemoveCurrent, i18n("Remove current file from playlist")); + connect(mPopup, TQT_SIGNAL(clicked()), TQT_SLOT(popup())); +// TQToolTip::add(mRemoveCurrent, i18n("Remove current file from playlist")); } @@ -87,7 +87,7 @@ MilkChocolate::MilkChocolate() : QWidget(0,"NoatunUI"), UserInterface() mStatusBar=new KStatusBar(this); - QGridLayout *l=new QGridLayout(this); + TQGridLayout *l=new TQGridLayout(this); l->addWidget(mBack,0,0); l->addWidget(mStop,0,1); l->addWidget(mPlay,0,2); @@ -104,35 +104,35 @@ MilkChocolate::MilkChocolate() : QWidget(0,"NoatunUI"), UserInterface() statusBar()->message(i18n("No File Loaded")); statusBar()->insertItem("--:--/--:--", 1, 0, true); - connect(napp, SIGNAL(hideYourself()), this, SLOT(hide()) ); - connect(napp, SIGNAL(showYourself()), this, SLOT(show()) ); + connect(napp, TQT_SIGNAL(hideYourself()), this, TQT_SLOT(hide()) ); + connect(napp, TQT_SIGNAL(showYourself()), this, TQT_SLOT(show()) ); - connect(napp->player(), SIGNAL(playing()), this, SLOT(slotPlaying())); - connect(napp->player(), SIGNAL(stopped()), this, SLOT(slotStopped())); - connect(napp->player(), SIGNAL(paused()), this, SLOT(slotPaused())); + connect(napp->player(), TQT_SIGNAL(playing()), this, TQT_SLOT(slotPlaying())); + connect(napp->player(), TQT_SIGNAL(stopped()), this, TQT_SLOT(slotStopped())); + connect(napp->player(), TQT_SIGNAL(paused()), this, TQT_SLOT(slotPaused())); napp->player()->handleButtons(); - connect(napp->player(), SIGNAL(timeout()), this, SLOT(slotTimeout())); - connect(napp->player(), SIGNAL(loopTypeChange(int)), this, SLOT(changeLoopType(int))); + connect(napp->player(), TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimeout())); + connect(napp->player(), TQT_SIGNAL(loopTypeChange(int)), this, TQT_SLOT(changeLoopType(int))); // if(seeker()) { /* This skipToWrapper is needed to pass milliseconds to Player() as everybody * below the GUI is based on milliseconds instead of some unprecise thingy * like seconds or mille */ - connect(seeker(), SIGNAL(userChanged(int)), this, SLOT(skipToWrapper(int))); - connect(this, SIGNAL(skipTo(int)), napp->player(), SLOT(skipTo(int))); - connect(seeker(), SIGNAL(sliderMoved(int)), SLOT(sliderMoved(int))); + connect(seeker(), TQT_SIGNAL(userChanged(int)), this, TQT_SLOT(skipToWrapper(int))); + connect(this, TQT_SIGNAL(skipTo(int)), napp->player(), TQT_SLOT(skipTo(int))); + connect(seeker(), TQT_SIGNAL(sliderMoved(int)), TQT_SLOT(sliderMoved(int))); } - connect(mVolume, SIGNAL(sliderMoved(int)), napp->player(), SLOT(setVolume(int))); - connect(mVolume, SIGNAL(userChanged(int)), napp->player(), SLOT(setVolume(int))); + connect(mVolume, TQT_SIGNAL(sliderMoved(int)), napp->player(), TQT_SLOT(setVolume(int))); + connect(mVolume, TQT_SIGNAL(userChanged(int)), napp->player(), TQT_SLOT(setVolume(int))); - connect(napp->player(), SIGNAL(playlistShown()), SLOT(playlistShown())); - connect(napp->player(), SIGNAL(playlistHidden()), SLOT(playlistHidden())); + connect(napp->player(), TQT_SIGNAL(playlistShown()), TQT_SLOT(playlistShown())); + connect(napp->player(), TQT_SIGNAL(playlistHidden()), TQT_SLOT(playlistHidden())); // Event Filter for the RMB - for (QPtrListIterator i(*children()); i.current(); ++i) + for (TQPtrListIterator i(*children()); i.current(); ++i) (*i)->installEventFilter(this); setCaption("Noatun"); @@ -150,23 +150,23 @@ MilkChocolate::~MilkChocolate() // delete prefDlg; } -void MilkChocolate::closeEvent(QCloseEvent*) +void MilkChocolate::closeEvent(TQCloseEvent*) { unload(); } -void MilkChocolate::showEvent(QShowEvent*e) +void MilkChocolate::showEvent(TQShowEvent*e) { - QWidget::showEvent(e); + TQWidget::showEvent(e); } -void MilkChocolate::dragEnterEvent(QDragEnterEvent *event) +void MilkChocolate::dragEnterEvent(TQDragEnterEvent *event) { // accept uri drops only event->accept(KURLDrag::canDecode(event)); } -void MilkChocolate::dropEvent(QDropEvent *event) +void MilkChocolate::dropEvent(TQDropEvent *event) { KURL::List uri; if (KURLDrag::decode(event, uri)) @@ -176,14 +176,14 @@ void MilkChocolate::dropEvent(QDropEvent *event) } } -void MilkChocolate::mouseReleaseEvent(QMouseEvent *e) +void MilkChocolate::mouseReleaseEvent(TQMouseEvent *e) { - QWidget::mouseReleaseEvent(e); + TQWidget::mouseReleaseEvent(e); if (e->button()!=RightButton) return; NoatunStdAction::ContextMenu::showContextMenu(); } -void MilkChocolate::changeStatusbar(const QString& text, const QString &text2) +void MilkChocolate::changeStatusbar(const TQString& text, const TQString &text2) { if (!text2.isNull()) statusBar()->changeItem(text2, 1); @@ -191,7 +191,7 @@ void MilkChocolate::changeStatusbar(const QString& text, const QString &text2) statusBar()->message(!text.isNull() ? text : napp->player()->current().title()); } -void MilkChocolate::changeCaption(const QString& text) +void MilkChocolate::changeCaption(const TQString& text) { setCaption(text); } @@ -205,7 +205,7 @@ void MilkChocolate::popup() void MilkChocolate::slotPlaying() { -// connect(kwinmodule, SIGNAL(windowAdded(WId)), view, SLOT(attemptReparent(WId))); +// connect(kwinmodule, TQT_SIGNAL(windowAdded(WId)), view, TQT_SLOT(attemptReparent(WId))); changeStatusbar(napp->player()->current().title(), napp->player()->lengthString()); mPlay->setOn(true); mStop->setEnabled(true); @@ -278,21 +278,21 @@ void MilkChocolate::changeLoopType(int t) } -bool MilkChocolate::eventFilter(QObject *o, QEvent *e) +bool MilkChocolate::eventFilter(TQObject *o, TQEvent *e) { - if ((e->type() == QEvent::MouseButtonRelease) - && ((static_cast(e))->button()==RightButton)) + if ((e->type() == TQEvent::MouseButtonRelease) + && ((static_cast(e))->button()==RightButton)) { - mouseReleaseEvent(static_cast(e)); + mouseReleaseEvent(static_cast(e)); return true; } - if (e->type() == QEvent::Wheel) + if (e->type() == TQEvent::Wheel) { - wheelEvent(static_cast(e)); + wheelEvent(static_cast(e)); return true; } - return QWidget::eventFilter(o, e); + return TQWidget::eventFilter(o, e); } void MilkChocolate::playlistShown() @@ -305,7 +305,7 @@ void MilkChocolate::playlistHidden() mPlaylist->setOn(false); } -void MilkChocolate::wheelEvent(QWheelEvent *e) +void MilkChocolate::wheelEvent(TQWheelEvent *e) { int delta=e->delta(); mVolume->setValue(mVolume->value()+(delta/120)); diff --git a/noatun/modules/noatunui/userinterface.h b/noatun/modules/noatunui/userinterface.h index 94dc9c44..1df5b160 100644 --- a/noatun/modules/noatunui/userinterface.h +++ b/noatun/modules/noatunui/userinterface.h @@ -21,25 +21,25 @@ class KStatusBar; * @author Charles Samuels * @version 0.1 */ -class MilkChocolate : public QWidget, public UserInterface +class MilkChocolate : public TQWidget, public UserInterface { Q_OBJECT public: MilkChocolate(); virtual ~MilkChocolate(); - void load(const QString& url); + void load(const TQString& url); protected: - virtual void dragEnterEvent(QDragEnterEvent *event); - virtual void dropEvent(QDropEvent *event); - virtual void closeEvent(QCloseEvent*); - virtual void showEvent(QShowEvent*e); - virtual void mouseReleaseEvent(QMouseEvent *); - virtual bool eventFilter(QObject*, QEvent*); - virtual void wheelEvent(QWheelEvent *e); + virtual void dragEnterEvent(TQDragEnterEvent *event); + virtual void dropEvent(TQDropEvent *event); + virtual void closeEvent(TQCloseEvent*); + virtual void showEvent(TQShowEvent*e); + virtual void mouseReleaseEvent(TQMouseEvent *); + virtual bool eventFilter(TQObject*, TQEvent*); + virtual void wheelEvent(TQWheelEvent *e); protected: - QSlider *seeker() const { return mSeeker; } + TQSlider *seeker() const { return mSeeker; } KStatusBar *statusBar() const { return mStatusBar; } public slots: @@ -59,13 +59,13 @@ signals: void skipTo( int ); // emitted by skipToWrapper() private slots: - void changeStatusbar(const QString& text, const QString &text2=0); - void changeCaption(const QString& text); + void changeStatusbar(const TQString& text, const TQString &text2=0); + void changeCaption(const TQString& text); void popup(); private: - QPushButton *mBack, *mStop, *mPlay, *mForward, *mPlaylist, *mPopup, *mLoop; - QSlider *mSeeker, *mVolume; + TQPushButton *mBack, *mStop, *mPlay, *mForward, *mPlaylist, *mPopup, *mLoop; + TQSlider *mSeeker, *mVolume; KStatusBar *mStatusBar; }; diff --git a/noatun/modules/simple/propertiesdialog.ui.h b/noatun/modules/simple/propertiesdialog.ui.h index a712d776..ef6f14f9 100644 --- a/noatun/modules/simple/propertiesdialog.ui.h +++ b/noatun/modules/simple/propertiesdialog.ui.h @@ -16,22 +16,22 @@ void PropertiesDialog::setPlayObject( PlaylistItem pi, Arts::PlayObject po ) if (!po.isNull()) { Arts::poCapabilities ncaps = po.capabilities(); - QCheckListItem *item; + TQCheckListItem *item; descriptionLabel->setText( po.description().c_str() ); // Determine capabilities - if (!(item = (QCheckListItem *)capsList->findItem( "capSeek", 0 ))) + if (!(item = (TQCheckListItem *)capsList->findItem( "capSeek", 0 ))) { - item = new QCheckListItem( capsList, "capSeek", - QCheckListItem::CheckBox ); + item = new TQCheckListItem( capsList, "capSeek", + TQCheckListItem::CheckBox ); } item->setOn( (ncaps & Arts::capSeek) ); - if (!(item = (QCheckListItem *)capsList->findItem( "capPause", 0 ))) + if (!(item = (TQCheckListItem *)capsList->findItem( "capPause", 0 ))) { - item = new QCheckListItem( capsList, "capPause", - QCheckListItem::CheckBox ); + item = new TQCheckListItem( capsList, "capPause", + TQCheckListItem::CheckBox ); } item->setOn( (ncaps & Arts::capPause) ); diff --git a/noatun/modules/simple/userinterface.cpp b/noatun/modules/simple/userinterface.cpp index 6e7b486f..685b2467 100644 --- a/noatun/modules/simple/userinterface.cpp +++ b/noatun/modules/simple/userinterface.cpp @@ -30,14 +30,14 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include "userinterface.h" @@ -63,14 +63,14 @@ SimpleUI::SimpleUI() setupGUI( StatusBar|Create, "simpleui.rc" ); - connect( napp->player(), SIGNAL(playing()), SLOT(slotPlaying()) ); - connect( napp->player(), SIGNAL(stopped()), SLOT(slotStopped()) ); - connect( napp->player(), SIGNAL(paused()), SLOT(slotPaused()) ); - connect( napp->player(), SIGNAL(timeout()), SLOT(slotTimeout()) ); - connect( napp->player(), SIGNAL(newSong()), SLOT(slotChanged()) ); - connect( napp->player(), SIGNAL(volumeChanged(int)), SLOT(slotVolumeChanged(int)) ); - connect( napp, SIGNAL(hideYourself()), SLOT(hide()) ); - connect( napp, SIGNAL(showYourself()), SLOT(show()) ); + connect( napp->player(), TQT_SIGNAL(playing()), TQT_SLOT(slotPlaying()) ); + connect( napp->player(), TQT_SIGNAL(stopped()), TQT_SLOT(slotStopped()) ); + connect( napp->player(), TQT_SIGNAL(paused()), TQT_SLOT(slotPaused()) ); + connect( napp->player(), TQT_SIGNAL(timeout()), TQT_SLOT(slotTimeout()) ); + connect( napp->player(), TQT_SIGNAL(newSong()), TQT_SLOT(slotChanged()) ); + connect( napp->player(), TQT_SIGNAL(volumeChanged(int)), TQT_SLOT(slotVolumeChanged(int)) ); + connect( napp, TQT_SIGNAL(hideYourself()), TQT_SLOT(hide()) ); + connect( napp, TQT_SIGNAL(showYourself()), TQT_SLOT(show()) ); napp->player()->handleButtons(); @@ -85,7 +85,7 @@ SimpleUI::SimpleUI() // Load configuration KConfig &config = *KGlobal::config(); config.setGroup( "Simple" ); - QString str = config.readEntry( "View", "NormalSize" ); + TQString str = config.readEntry( "View", "NormalSize" ); if (str == "HalfSize") video->setHalfSize(); @@ -107,7 +107,7 @@ SimpleUI::~SimpleUI() KConfig &config = *KGlobal::config(); saveMainWindowSettings( &config, "Simple" ); config.setGroup( "Simple" ); - QString str; + TQString str; if (video->isHalfSize()) str = "HalfSize"; @@ -126,10 +126,10 @@ SimpleUI::~SimpleUI() void SimpleUI::setupActions() { - KStdAction::open( napp, SLOT(fileOpen()), actionCollection(), "_file_open" ); - new KAction( i18n("&Properties"), 0, propertiesDialog, SLOT(show()), + KStdAction::open( napp, TQT_SLOT(fileOpen()), actionCollection(), "_file_open" ); + new KAction( i18n("&Properties"), 0, propertiesDialog, TQT_SLOT(show()), actionCollection(), "_file_properties" ); - KStdAction::quit( napp, SLOT(quit()), actionCollection(), "_file_quit"); + KStdAction::quit( napp, TQT_SLOT(quit()), actionCollection(), "_file_quit"); NoatunStdAction::playlist( actionCollection(), "view_playlist" ); actionCollection()->insert(video->action( "half_size" )); @@ -139,14 +139,14 @@ void SimpleUI::setupActions() actionCollection()->insert(napp->pluginActionMenu()); - menubarAction = KStdAction::showMenubar(this, SLOT(showMenubar()), + menubarAction = KStdAction::showMenubar(this, TQT_SLOT(showMenubar()), actionCollection()); - statusbarAction = KStdAction::showStatusbar(this, SLOT(showStatusbar()), + statusbarAction = KStdAction::showStatusbar(this, TQT_SLOT(showStatusbar()), actionCollection()); NoatunStdAction::effects( actionCollection(), "effects" ); NoatunStdAction::equalizer( actionCollection(), "equalizer" ); NoatunStdAction::loop( actionCollection(), "loop_style" ); - KStdAction::preferences( napp, SLOT(preferences()), actionCollection() ); + KStdAction::preferences( napp, TQT_SLOT(preferences()), actionCollection() ); } void SimpleUI::showMenubar() @@ -168,89 +168,89 @@ void SimpleUI::showStatusbar() void SimpleUI::setupCentralWidget() { - QVBox *npWidget = new QVBox( this ); + TQVBox *npWidget = new TQVBox( this ); npWidget->setMargin( 0 ); npWidget->setSpacing( 0 ); - positionLabel = new QLabel( statusBar() ); + positionLabel = new TQLabel( statusBar() ); positionLabel->setAlignment( AlignVCenter | AlignCenter ); positionLabel->setFixedSize( fontMetrics().size( 0, " 00:00/00:00 " ) ); statusBar()->addWidget( positionLabel, 0, true ); video = new VideoFrame( npWidget ); - connect( video, SIGNAL(adaptSize(int,int)), - SLOT(slotAdaptSize(int,int)) ); - connect( video, SIGNAL(rightButtonPressed(const QPoint &)), - SLOT(slotContextMenu(const QPoint &)) ); + connect( video, TQT_SIGNAL(adaptSize(int,int)), + TQT_SLOT(slotAdaptSize(int,int)) ); + connect( video, TQT_SIGNAL(rightButtonPressed(const TQPoint &)), + TQT_SLOT(slotContextMenu(const TQPoint &)) ); - QHBox *ctlFrame = new QHBox( npWidget ); + TQHBox *ctlFrame = new TQHBox( npWidget ); ctlFrame->setFixedHeight( 38 ); - ctlFrame->setFrameShape( QFrame::StyledPanel ); - ctlFrame->setFrameShadow( QFrame::Raised ); + ctlFrame->setFrameShape( TQFrame::StyledPanel ); + ctlFrame->setFrameShadow( TQFrame::Raised ); ctlFrame->setMargin( 6 ); ctlFrame->setSpacing( 6 ); - QPushButton *backButton = new QPushButton( ctlFrame ); + TQPushButton *backButton = new TQPushButton( ctlFrame ); backButton->setFixedSize( 24, 24 ); - backButton->setPixmap( QPixmap( back_xpm ) ); - QToolTip::add( backButton, i18n("Back") ); - connect( backButton, SIGNAL(clicked()), napp->player(), SLOT(back()) ); + backButton->setPixmap( TQPixmap( back_xpm ) ); + TQToolTip::add( backButton, i18n("Back") ); + connect( backButton, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(back()) ); - stopButton = new QPushButton( ctlFrame ); + stopButton = new TQPushButton( ctlFrame ); stopButton->setFixedSize( 24, 24 ); - stopButton->setPixmap( QPixmap( stop_xpm ) ); - QToolTip::add( stopButton, i18n("Stop") ); - connect( stopButton, SIGNAL(clicked()), napp->player(), SLOT(stop()) ); + stopButton->setPixmap( TQPixmap( stop_xpm ) ); + TQToolTip::add( stopButton, i18n("Stop") ); + connect( stopButton, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(stop()) ); - playButton = new QPushButton( ctlFrame ); + playButton = new TQPushButton( ctlFrame ); playButton->setFixedSize( 24, 24 ); - playButton->setPixmap( QPixmap( play_xpm ) ); - QToolTip::add( playButton, i18n("Play / Pause") ); - connect( playButton, SIGNAL(clicked()), napp->player(), SLOT(playpause()) ); + playButton->setPixmap( TQPixmap( play_xpm ) ); + TQToolTip::add( playButton, i18n("Play / Pause") ); + connect( playButton, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(playpause()) ); - QPushButton *forwButton = new QPushButton( ctlFrame ); + TQPushButton *forwButton = new TQPushButton( ctlFrame ); forwButton->setFixedSize( 24, 24 ); - forwButton->setPixmap( QPixmap( forward_xpm ) ); - QToolTip::add( forwButton, i18n("Forward") ); - connect( forwButton, SIGNAL(clicked()), napp->player(), SLOT(forward()) ); + forwButton->setPixmap( TQPixmap( forward_xpm ) ); + TQToolTip::add( forwButton, i18n("Forward") ); + connect( forwButton, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(forward()) ); slider = new L33tSlider( 0, 1000, 10, 0, L33tSlider::Horizontal, ctlFrame ); slider->setFixedHeight( 24 ); slider->setMinimumWidth( 100 ); - slider->setTickmarks( QSlider::NoMarks ); - connect( slider, SIGNAL(userChanged(int)), SLOT(slotSkipTo(int)) ); - connect( slider, SIGNAL(sliderMoved(int)), SLOT(slotSliderMoved(int)) ); + slider->setTickmarks( TQSlider::NoMarks ); + connect( slider, TQT_SIGNAL(userChanged(int)), TQT_SLOT(slotSkipTo(int)) ); + connect( slider, TQT_SIGNAL(sliderMoved(int)), TQT_SLOT(slotSliderMoved(int)) ); - QPushButton *playlistButton = new QPushButton( ctlFrame ); + TQPushButton *playlistButton = new TQPushButton( ctlFrame ); playlistButton->setFixedSize( 24, 24 ); - playlistButton->setPixmap( QPixmap( playlist_xpm ) ); - QToolTip::add( playlistButton, i18n("Playlist") ); - connect( playlistButton, SIGNAL(clicked()), napp->player(), SLOT(toggleListView()) ); + playlistButton->setPixmap( TQPixmap( playlist_xpm ) ); + TQToolTip::add( playlistButton, i18n("Playlist") ); + connect( playlistButton, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(toggleListView()) ); - volumeButton = new QPushButton( ctlFrame ); + volumeButton = new TQPushButton( ctlFrame ); volumeButton->setFixedSize( 24, 24 ); - volumeButton->setPixmap( QPixmap( volume_xpm ) ); - QToolTip::add( volumeButton, i18n("Volume") ); + volumeButton->setPixmap( TQPixmap( volume_xpm ) ); + TQToolTip::add( volumeButton, i18n("Volume") ); - volumeFrame = new QVBox( this, "Volume", WStyle_Customize | WType_Popup ); - volumeFrame->setFrameStyle( QFrame::PopupPanel ); + volumeFrame = new TQVBox( this, "Volume", WStyle_Customize | WType_Popup ); + volumeFrame->setFrameStyle( TQFrame::PopupPanel ); volumeFrame->setMargin( 4 ); - volumeLabel = new QLabel( volumeFrame ); + volumeLabel = new TQLabel( volumeFrame ); volumeLabel->setText( "100%" ); volumeLabel->setAlignment( AlignCenter ); volumeLabel->setFixedSize( volumeLabel->sizeHint() ); - QHBox *volumeSubFrame = new QHBox( volumeFrame ); + TQHBox *volumeSubFrame = new TQHBox( volumeFrame ); volumeSlider = new L33tSlider( 0, 100, 10, 0, Vertical, volumeSubFrame ); volumeSlider->setValue( 100 - napp->player()->volume() ); volumeSlider->setFixedSize( volumeSlider->sizeHint() ); volumeFrame->resize( volumeFrame->sizeHint() ); - connect( volumeSlider, SIGNAL(sliderMoved(int)), SLOT(slotVolumeSliderMoved(int)) ); - connect( volumeSlider, SIGNAL(userChanged(int)), SLOT(slotVolumeSliderMoved(int)) ); - connect( volumeButton, SIGNAL(clicked()), SLOT(slotVolumeFrame()) ); + connect( volumeSlider, TQT_SIGNAL(sliderMoved(int)), TQT_SLOT(slotVolumeSliderMoved(int)) ); + connect( volumeSlider, TQT_SIGNAL(userChanged(int)), TQT_SLOT(slotVolumeSliderMoved(int)) ); + connect( volumeButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotVolumeFrame()) ); setCentralWidget( npWidget ); @@ -261,17 +261,17 @@ void SimpleUI::setupCentralWidget() propertiesDialog->resize( 375, 285 ); } -void SimpleUI::closeEvent( QCloseEvent * ) +void SimpleUI::closeEvent( TQCloseEvent * ) { unload(); } -void SimpleUI::dragEnterEvent( QDragEnterEvent *event ) +void SimpleUI::dragEnterEvent( TQDragEnterEvent *event ) { event->accept( KURLDrag::canDecode( event ) ); } -void SimpleUI::dropEvent( QDropEvent *event ) +void SimpleUI::dropEvent( TQDropEvent *event ) { KURL::List uri; if (KURLDrag::decode( event, uri )) @@ -285,7 +285,7 @@ void SimpleUI::slotAdaptSize( int width, int height ) void SimpleUI::slotPlaying() { - playButton->setPixmap( QPixmap( pause_xpm ) ); + playButton->setPixmap( TQPixmap( pause_xpm ) ); stopButton->setEnabled( true ); slider->setEnabled( true ); @@ -295,7 +295,7 @@ void SimpleUI::slotPlaying() void SimpleUI::slotStopped() { - playButton->setPixmap( QPixmap( play_xpm ) ); + playButton->setPixmap( TQPixmap( play_xpm ) ); stopButton->setEnabled( false ); slider->setEnabled( false ); slider->setValue( 0 ); @@ -305,7 +305,7 @@ void SimpleUI::slotStopped() void SimpleUI::slotPaused() { - playButton->setPixmap( QPixmap( play_xpm ) ); + playButton->setPixmap( TQPixmap( play_xpm ) ); slider->setEnabled( true ); } @@ -330,7 +330,7 @@ void SimpleUI::slotChanged() napp->player()->engine()->playObject() ); } -void SimpleUI::slotContextMenu( const QPoint &pos ) +void SimpleUI::slotContextMenu( const TQPoint &pos ) { contextMenu->exec( pos ); } @@ -343,7 +343,7 @@ void SimpleUI::slotSliderMoved( int sec ) void SimpleUI::slotVolumeChanged( int volume ) { - volumeLabel->setText( QString::number( volume ) + "%" ); + volumeLabel->setText( TQString::number( volume ) + "%" ); volumeSlider->setValue( 100 - volume ); } @@ -358,8 +358,8 @@ void SimpleUI::slotVolumeFrame() int x = (volumeButton->width() - volumeFrame->width()) / 2; int y = -(volumeFrame->height() + 5); - QPoint point( volumeButton->mapToGlobal( QPoint( x, y ) ) ); - QRect deskRect = KGlobalSettings::desktopGeometry( point ); + TQPoint point( volumeButton->mapToGlobal( TQPoint( x, y ) ) ); + TQRect deskRect = KGlobalSettings::desktopGeometry( point ); bool bottom = (point.y() + volumeFrame->height()) > (deskRect.y() + deskRect.height()); bool right = (point.x() + volumeFrame->width()) > (deskRect.x() + deskRect.width()); diff --git a/noatun/modules/simple/userinterface.h b/noatun/modules/simple/userinterface.h index c545fd2c..e3a84f84 100644 --- a/noatun/modules/simple/userinterface.h +++ b/noatun/modules/simple/userinterface.h @@ -17,11 +17,11 @@ #include #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "propertiesdialog.h" @@ -37,9 +37,9 @@ protected: void setupActions(); void setupCentralWidget(); - virtual void closeEvent( QCloseEvent * ); - virtual void dragEnterEvent( QDragEnterEvent *event ); - virtual void dropEvent( QDropEvent *event ); + virtual void closeEvent( TQCloseEvent * ); + virtual void dragEnterEvent( TQDragEnterEvent *event ); + virtual void dropEvent( TQDropEvent *event ); public slots: void slotAdaptSize( int width, int height ); @@ -49,7 +49,7 @@ public slots: void slotTimeout(); void slotSkipTo( int sec ); void slotChanged(); - void slotContextMenu( const QPoint &pos ); + void slotContextMenu( const TQPoint &pos ); private slots: void slotSliderMoved( int sec ); @@ -61,13 +61,13 @@ private slots: private: PropertiesDialog *propertiesDialog; - QPopupMenu *contextMenu; - QPushButton *stopButton; - QPushButton *playButton; - QPushButton *volumeButton; - QVBox *volumeFrame; - QLabel *volumeLabel; - QLabel *positionLabel; + TQPopupMenu *contextMenu; + TQPushButton *stopButton; + TQPushButton *playButton; + TQPushButton *volumeButton; + TQVBox *volumeFrame; + TQLabel *volumeLabel; + TQLabel *positionLabel; VideoFrame *video; L33tSlider *volumeSlider; L33tSlider *slider; diff --git a/noatun/modules/splitplaylist/find.cpp b/noatun/modules/splitplaylist/find.cpp index b6e196d9..5d378a79 100644 --- a/noatun/modules/splitplaylist/find.cpp +++ b/noatun/modules/splitplaylist/find.cpp @@ -1,17 +1,17 @@ #include "find.h" -#include +#include #include -#include -#include +#include +#include #include -Finder::Finder(QWidget *parent) : KDialogBase(parent, 0, false, i18n("Find"), Close | User1, User1, false, KGuiItem(i18n("&Find"),"find")) +Finder::Finder(TQWidget *parent) : KDialogBase(parent, 0, false, i18n("Find"), Close | User1, User1, false, KGuiItem(i18n("&Find"),"find")) { - QWidget *mainWidget = new QWidget(this); + TQWidget *mainWidget = new TQWidget(this); mainWidget->setMinimumWidth(320); setMainWidget(mainWidget); - QGridLayout *layout=new QGridLayout(mainWidget); + TQGridLayout *layout=new TQGridLayout(mainWidget); layout->setSpacing(KDialog::spacingHint()); mText=new KHistoryCombo(mainWidget); @@ -19,22 +19,22 @@ Finder::Finder(QWidget *parent) : KDialogBase(parent, 0, false, i18n("Find"), Cl mText->setFocus(); - mRegexp=new QCheckBox(i18n("&Regular expression"), mainWidget); - mBackwards=new QCheckBox(i18n("Find &backwards"), mainWidget); + mRegexp=new TQCheckBox(i18n("&Regular expression"), mainWidget); + mBackwards=new TQCheckBox(i18n("Find &backwards"), mainWidget); layout->addMultiCellWidget(mText, 0, 0, 0, 1); layout->addWidget(mRegexp, 1, 0); layout->addWidget(mBackwards, 1, 1); - connect(this, SIGNAL(user1Clicked()), SLOT(clicked())); + connect(this, TQT_SIGNAL(user1Clicked()), TQT_SLOT(clicked())); - connect(mText, SIGNAL(activated(int)), SLOT(clicked())); - connect(mText, SIGNAL(textChanged(const QString &)), SLOT(textChanged(const QString &))); + connect(mText, TQT_SIGNAL(activated(int)), TQT_SLOT(clicked())); + connect(mText, TQT_SIGNAL(textChanged(const TQString &)), TQT_SLOT(textChanged(const TQString &))); enableButton(User1, false); } -void Finder::textChanged(const QString &text) { +void Finder::textChanged(const TQString &text) { enableButton(User1, !text.isEmpty()); } @@ -54,7 +54,7 @@ void Finder::clicked() emit search(this); } -QString Finder::string() const +TQString Finder::string() const { return mText->currentText(); } diff --git a/noatun/modules/splitplaylist/find.h b/noatun/modules/splitplaylist/find.h index a4791339..752bc8dd 100644 --- a/noatun/modules/splitplaylist/find.h +++ b/noatun/modules/splitplaylist/find.h @@ -11,22 +11,22 @@ class Finder : public KDialogBase { Q_OBJECT public: - Finder(QWidget *parent); + Finder(TQWidget *parent); bool regexp() const; bool isForward() const; - QString string() const; + TQString string() const; signals: void search(Finder *); public slots: - void textChanged(const QString &); + void textChanged(const TQString &); void clicked(); private: KHistoryCombo *mText; - QCheckBox *mRegexp, *mBackwards; + TQCheckBox *mRegexp, *mBackwards; }; #endif diff --git a/noatun/modules/splitplaylist/playlist.cpp b/noatun/modules/splitplaylist/playlist.cpp index 57d6fb48..d0ded140 100644 --- a/noatun/modules/splitplaylist/playlist.cpp +++ b/noatun/modules/splitplaylist/playlist.cpp @@ -20,9 +20,9 @@ SplitPlaylist::SplitPlaylist() void SplitPlaylist::init() { view=new View(this); // 195 - connect(view->listView(), SIGNAL(executed(QListViewItem*)), SLOT(listItemSelected(QListViewItem*))); - connect(view, SIGNAL(shown()), SIGNAL(listShown())); - connect(view, SIGNAL(hidden()), SIGNAL(listHidden())); + connect(view->listView(), TQT_SIGNAL(executed(TQListViewItem*)), TQT_SLOT(listItemSelected(TQListViewItem*))); + connect(view, TQT_SIGNAL(shown()), TQT_SIGNAL(listShown())); + connect(view, TQT_SIGNAL(hidden()), TQT_SIGNAL(listHidden())); view->init(); // 1000 } @@ -112,7 +112,7 @@ PlaylistItem SplitPlaylist::previous() List *list = view->listView(); // check if the item still exists (hackitude: 50%) bool found=false; - for (QListViewItem *i = list->firstChild(); i; i = i->nextSibling()) + for (TQListViewItem *i = list->firstChild(); i; i = i->nextSibling()) { if (i == static_cast(randomPrevious.data())) { @@ -215,15 +215,15 @@ void SplitPlaylist::setCurrent(const PlaylistItem &i, bool emitC) // remove the old icon SafeListViewItem *now=static_cast(current().data()); if (now) - now->setPixmap(0, QPixmap()); + now->setPixmap(0, TQPixmap()); - QRect rect(view->listView()->itemRect(static_cast(current().data()))); + TQRect rect(view->listView()->itemRect(static_cast(current().data()))); rect.setWidth(view->listView()->viewport()->width()); currentItem=i; view->listView()->viewport()->repaint(rect,true); view->listView()->ensureItemVisible(static_cast(current().data())); - QRect currentRect= view->listView()->itemRect(static_cast(current().data())); + TQRect currentRect= view->listView()->itemRect(static_cast(current().data())); view->listView()->viewport()->repaint(currentRect); now=static_cast(current().data()); @@ -240,7 +240,7 @@ void SplitPlaylist::remove(const PlaylistItem &) // delete i; } -void SplitPlaylist::listItemSelected(QListViewItem *i) +void SplitPlaylist::listItemSelected(TQListViewItem *i) { setCurrent(PlaylistItem(static_cast(i)), false); emit playCurrent(); @@ -253,8 +253,8 @@ void SplitPlaylist::randomize() view->setSorting(false); List *lview = view->listView(); // eeeeevil :) - QPtrList list; - QPtrList items; + TQPtrList list; + TQPtrList items; for(int i = 0; i < lview->childCount(); i++) { list.append( (void*) i ); diff --git a/noatun/modules/splitplaylist/playlist.h b/noatun/modules/splitplaylist/playlist.h index 04cb648d..204d97c2 100644 --- a/noatun/modules/splitplaylist/playlist.h +++ b/noatun/modules/splitplaylist/playlist.h @@ -10,8 +10,8 @@ class PlaylistItem PlaylistItem(const KURL &u=0); virtual ~PlaylistItem(); - QString title() const; - virtual void setTitle(const QString &t); + TQString title() const; + virtual void setTitle(const TQString &t); KURL url() const; virtual void setUrl(const KURL &u); @@ -77,7 +77,7 @@ public slots: void setCurrent(const PlaylistItem &, bool emitC); void setCurrent(const PlaylistItem &); - void listItemSelected(QListViewItem*); + void listItemSelected(TQListViewItem*); void randomize(); @@ -90,7 +90,7 @@ signals: private: bool mExiting; // HACK HACK HACK HACK!!! View *view; -// QRect currentRect; +// TQRect currentRect; static SplitPlaylist *Self; }; diff --git a/noatun/modules/splitplaylist/view.cpp b/noatun/modules/splitplaylist/view.cpp index 7f5584f9..8df38afd 100644 --- a/noatun/modules/splitplaylist/view.cpp +++ b/noatun/modules/splitplaylist/view.cpp @@ -10,13 +10,13 @@ // Abandon All Hope, Ye Who Enter Here -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -43,8 +43,8 @@ #define SPL SplitPlaylist::SPL() -SafeListViewItem::SafeListViewItem(QListView *parent, QListViewItem *after, const KURL &text) - : QCheckListItem(parent,0, QCheckListItem::CheckBox), PlaylistItemData(), removed(false) +SafeListViewItem::SafeListViewItem(TQListView *parent, TQListViewItem *after, const KURL &text) + : TQCheckListItem(parent,0, TQCheckListItem::CheckBox), PlaylistItemData(), removed(false) { addRef(); setUrl(text); @@ -65,8 +65,8 @@ SafeListViewItem::SafeListViewItem(QListView *parent, QListViewItem *after, cons PlaylistItemData::added(); } -SafeListViewItem::SafeListViewItem(QListView *parent, QListViewItem *after, const QMap &props) - : QCheckListItem(parent, 0, QCheckListItem::CheckBox), removed(false) +SafeListViewItem::SafeListViewItem(TQListView *parent, TQListViewItem *after, const TQMap &props) + : TQCheckListItem(parent, 0, TQCheckListItem::CheckBox), removed(false) { addRef(); @@ -75,10 +75,10 @@ SafeListViewItem::SafeListViewItem(QListView *parent, QListViewItem *after, cons // A version of setProperty that assumes a key is unique, // and doesn't call modified for every new key. // Ugly, but this function is a very hot path on playlist loading - for (QMap::ConstIterator i=props.begin(); i!=props.end(); ++i ) + for (TQMap::ConstIterator i=props.begin(); i!=props.end(); ++i ) { - QString n = i.key(); - QString val = i.data(); + TQString n = i.key(); + TQString val = i.data(); if (n=="enabled") { @@ -109,12 +109,12 @@ SafeListViewItem::~SafeListViewItem() remove(); } -QString SafeListViewItem::file() const +TQString SafeListViewItem::file() const { return localFilename(); } -static void pad(QString &str) +static void pad(TQString &str) { int len=str.length(); int at = 0; @@ -123,11 +123,11 @@ static void pad(QString &str) static const int paddingsize=12; // not static for reason - const QChar chars[paddingsize] = + const TQChar chars[paddingsize] = { - QChar('0'), QChar('0'), QChar('0'), QChar('0'), - QChar('0'), QChar('0'), QChar('0'), QChar('0'), - QChar('0'), QChar('0'), QChar('0'), QChar('0') + TQChar('0'), TQChar('0'), TQChar('0'), TQChar('0'), + TQChar('0'), TQChar('0'), TQChar('0'), TQChar('0'), + TQChar('0'), TQChar('0'), TQChar('0'), TQChar('0') }; for (int i=0; i < len; i++) @@ -155,19 +155,19 @@ static void pad(QString &str) } } -int SafeListViewItem::compare(QListViewItem * i, int col, bool) const +int SafeListViewItem::compare(TQListViewItem * i, int col, bool) const { - QString text1 = text(col); - QString text2 = i->text(col); + TQString text1 = text(col); + TQString text2 = i->text(col); pad(text1); pad(text2); return text1.compare(text2); } -QString SafeListViewItem::property(const QString &n, const QString &def) const +TQString SafeListViewItem::property(const TQString &n, const TQString &def) const { - for (QValueList::ConstIterator i=mProperties.begin(); i != mProperties.end(); ++i) + for (TQValueList::ConstIterator i=mProperties.begin(); i != mProperties.end(); ++i) { if ((*i).key==n) return (*i).value; @@ -180,7 +180,7 @@ QString SafeListViewItem::property(const QString &n, const QString &def) const return def; } -void SafeListViewItem::setProperty(const QString &n, const QString &val) +void SafeListViewItem::setProperty(const TQString &n, const TQString &val) { if (n=="enabled") { @@ -201,7 +201,7 @@ void SafeListViewItem::setProperty(const QString &n, const QString &val) modified(); } -void SafeListViewItem::clearProperty(const QString &n) +void SafeListViewItem::clearProperty(const TQString &n) { if (n=="enabled") { @@ -210,7 +210,7 @@ void SafeListViewItem::clearProperty(const QString &n) return; } - for (QValueList::Iterator i=mProperties.begin(); i != mProperties.end(); ++i) + for (TQValueList::Iterator i=mProperties.begin(); i != mProperties.end(); ++i) { if ((*i).key==n) { @@ -221,18 +221,18 @@ void SafeListViewItem::clearProperty(const QString &n) } } -QStringList SafeListViewItem::properties() const +TQStringList SafeListViewItem::properties() const { - QStringList list; - for (QValueList::ConstIterator i=mProperties.begin(); i != mProperties.end(); ++i) + TQStringList list; + for (TQValueList::ConstIterator i=mProperties.begin(); i != mProperties.end(); ++i) list += (*i).key; list += "enabled"; return list; } -bool SafeListViewItem::isProperty(const QString &n) const +bool SafeListViewItem::isProperty(const TQString &n) const { - for (QValueList::ConstIterator i=mProperties.begin(); i != mProperties.end(); ++i) + for (TQValueList::ConstIterator i=mProperties.begin(); i != mProperties.end(); ++i) { if ((*i).key==n) return true; @@ -243,7 +243,7 @@ bool SafeListViewItem::isProperty(const QString &n) const void SafeListViewItem::downloaded(int percent) { if (!removed) - setText(1, QString::number(percent)+'%'); + setText(1, TQString::number(percent)+'%'); } void SafeListViewItem::downloadTimeout() @@ -285,25 +285,25 @@ void SafeListViewItem::stateChange(bool s) // if you uncheck this, uncheck thet others that // are selected too - QPtrList list=SPL->view->listView()->selectedItems(); + TQPtrList list=SPL->view->listView()->selectedItems(); // but not if I'm not selected if (list.containsRef(this)) - for (QListViewItem *i=list.first(); i != 0; i=list.next()) - static_cast(i)->setOn(s); + for (TQListViewItem *i=list.first(); i != 0; i=list.next()) + static_cast(i)->setOn(s); else - QCheckListItem::stateChange(s); + TQCheckListItem::stateChange(s); } -void SafeListViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int align) +void SafeListViewItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int align) { - QCheckListItem::paintCell(p, cg, column, width, align); + TQCheckListItem::paintCell(p, cg, column, width, align); if (SPL->current() == this) { p->save(); p->setRasterOp(XorROP); - p->fillRect(0, 0, width, height(), QColor(255,255,255)); + p->fillRect(0, 0, width, height(), TQColor(255,255,255)); p->restore(); } @@ -354,11 +354,11 @@ List::List(View *parent) setDropVisualizer(true); setDragEnabled(true); setItemsMovable(true); - setSelectionMode(QListView::Extended); - connect(this, SIGNAL(dropped(QDropEvent*, QListViewItem*)), SLOT(dropEvent(QDropEvent*, QListViewItem*))); - connect(this, SIGNAL(moved()), SLOT(move())); - connect(this, SIGNAL(aboutToMove()), parent, SLOT(setNoSorting())); - connect(this, SIGNAL(deleteCurrentItem()), parent, SLOT(deleteSelected())); + setSelectionMode(TQListView::Extended); + connect(this, TQT_SIGNAL(dropped(TQDropEvent*, TQListViewItem*)), TQT_SLOT(dropEvent(TQDropEvent*, TQListViewItem*))); + connect(this, TQT_SIGNAL(moved()), TQT_SLOT(move())); + connect(this, TQT_SIGNAL(aboutToMove()), parent, TQT_SLOT(setNoSorting())); + connect(this, TQT_SIGNAL(deleteCurrentItem()), parent, TQT_SLOT(deleteSelected())); } List::~List() @@ -370,12 +370,12 @@ void List::move() emit modified(); } -bool List::acceptDrag(QDropEvent *event) const +bool List::acceptDrag(TQDropEvent *event) const { return KURLDrag::canDecode(event) || KListView::acceptDrag(event); } -void List::dropEvent(QDropEvent *event, QListViewItem *after) +void List::dropEvent(TQDropEvent *event, TQListViewItem *after) { static_cast(parent())->setNoSorting(); KURL::List textlist; @@ -390,7 +390,7 @@ void List::dropEvent(QDropEvent *event, QListViewItem *after) emit modified(); } -void List::keyPressEvent(QKeyEvent *e) +void List::keyPressEvent(TQKeyEvent *e) { if (e->key()==Key_Enter || e->key()==Key_Return) { @@ -425,18 +425,18 @@ class NoatunSaver : public PlaylistSaver List *mList; SafeListViewItem *after, *mFirst; public: - NoatunSaver(List *l, QListViewItem *after=0) + NoatunSaver(List *l, TQListViewItem *after=0) : mList(l) { this->after = static_cast(after); mFirst = 0; } - QListViewItem *getAfter() { return after; } - QListViewItem *getFirst() { return mFirst; } + TQListViewItem *getAfter() { return after; } + TQListViewItem *getFirst() { return mFirst; } protected: - virtual void readItem(const QMap &properties) + virtual void readItem(const TQMap &properties) { after = new SafeListViewItem(mList, after, properties); if (mFirst==0) @@ -474,10 +474,10 @@ bool View::saveToURL(const KURL &url) void View::exportTo(const KURL &url) { - QString local(napp->tempSaveName(url.path())); - QFile saver(local); + TQString local(napp->tempSaveName(url.path())); + TQFile saver(local); saver.open(IO_ReadWrite | IO_Truncate); - QTextStream t(&saver); + TQTextStream t(&saver); // navigate the list for (SafeListViewItem *i=static_cast(listView()->firstChild()); i != 0; i=static_cast(i->itemBelow())) @@ -495,7 +495,7 @@ void View::exportTo(const KURL &url) saver.remove(); } -QListViewItem *List::openGlobal(const KURL &u, QListViewItem *after) +TQListViewItem *List::openGlobal(const KURL &u, TQListViewItem *after) { clear(); NoatunSaver saver(this, after); @@ -505,7 +505,7 @@ QListViewItem *List::openGlobal(const KURL &u, QListViewItem *after) } // for m3u files -QListViewItem *List::importGlobal(const KURL &u, QListViewItem *after) +TQListViewItem *List::importGlobal(const KURL &u, TQListViewItem *after) { NoatunSaver saver(this, after); if (!saver.metalist(u)) @@ -524,7 +524,7 @@ QListViewItem *List::importGlobal(const KURL &u, QListViewItem *after) return saver.getAfter(); } -QListViewItem *List::addFile(const KURL& url, bool play, QListViewItem *after) +TQListViewItem *List::addFile(const KURL& url, bool play, TQListViewItem *after) { // when a new item is added, we don't want to sort anymore SPL->view->setNoSorting(); @@ -536,7 +536,7 @@ QListViewItem *List::addFile(const KURL& url, bool play, QListViewItem *after) ) { // a playlist is requested - QListViewItem *i = importGlobal(url, after); + TQListViewItem *i = importGlobal(url, after); if (play) SPL->listItemSelected(i); return i; @@ -552,7 +552,7 @@ QListViewItem *List::addFile(const KURL& url, bool play, QListViewItem *after) } else { - QListViewItem *i = new SafeListViewItem(this, after, url); + TQListViewItem *i = new SafeListViewItem(this, after, url); if (play) SPL->listItemSelected(i); return i; @@ -569,22 +569,22 @@ void List::addNextPendingDirectory() currentJobURL= *pendingIt; listJob= KIO::listRecursive(currentJobURL, false,false); connect( - listJob, SIGNAL(entries(KIO::Job*, const KIO::UDSEntryList&)), - SLOT(slotEntries(KIO::Job*, const KIO::UDSEntryList&)) + listJob, TQT_SIGNAL(entries(KIO::Job*, const KIO::UDSEntryList&)), + TQT_SLOT(slotEntries(KIO::Job*, const KIO::UDSEntryList&)) ); connect( - listJob, SIGNAL(result(KIO::Job *)), - SLOT(slotResult(KIO::Job *)) + listJob, TQT_SIGNAL(result(KIO::Job *)), + TQT_SLOT(slotResult(KIO::Job *)) ); connect( - listJob, SIGNAL(redirection(KIO::Job *, const KURL &)), - SLOT(slotRedirection(KIO::Job *, const KURL &)) + listJob, TQT_SIGNAL(redirection(KIO::Job *, const KURL &)), + TQT_SLOT(slotRedirection(KIO::Job *, const KURL &)) ); pendingAddDirectories.remove(pendingIt); } } -void List::addDirectoryRecursive(const KURL &dir, QListViewItem *after) +void List::addDirectoryRecursive(const KURL &dir, TQListViewItem *after) { if (!after) after=lastItem(); recursiveAddAfter= after; @@ -602,7 +602,7 @@ void List::slotResult(KIO::Job *job) void List::slotEntries(KIO::Job *, const KIO::UDSEntryList &entries) { - QMap __list; // temp list to sort entries + TQMap __list; // temp list to sort entries KIO::UDSEntryListConstIterator it = entries.begin(); KIO::UDSEntryListConstIterator end = entries.end(); @@ -619,7 +619,7 @@ void List::slotEntries(KIO::Job *, const KIO::UDSEntryList &entries) if (!file.isDir()) __list.insert(file.url().path(), file.url()); } - QMap::Iterator __it; + TQMap::Iterator __it; for( __it = __list.begin(); __it != __list.end(); ++__it ) { recursiveAddAfter= addFile(__it.data(), false, recursiveAddAfter); @@ -638,25 +638,25 @@ View::View(SplitPlaylist *) { list=new List(this); setCentralWidget(list); - connect(list, SIGNAL(modified(void)), this, SLOT(setModified(void)) ); + connect(list, TQT_SIGNAL(modified(void)), this, TQT_SLOT(setModified(void)) ); // connect the click on the header with sorting - connect(list->header(),SIGNAL(clicked(int)),this,SLOT(headerClicked(int)) ); + connect(list->header(),TQT_SIGNAL(clicked(int)),this,TQT_SLOT(headerClicked(int)) ); - mOpen=new KAction(i18n("Add &Files..."), "queue", 0, this, SLOT(addFiles()), actionCollection(), "add_files"); - (void) new KAction(i18n("Add Fol&ders..."), "folder", 0, this, SLOT(addDirectory()), actionCollection(), "add_dir"); - mDelete=new KAction(i18n("Delete"), "editdelete", Key_Delete, this, SLOT(deleteSelected()), actionCollection(), "delete"); + mOpen=new KAction(i18n("Add &Files..."), "queue", 0, this, TQT_SLOT(addFiles()), actionCollection(), "add_files"); + (void) new KAction(i18n("Add Fol&ders..."), "folder", 0, this, TQT_SLOT(addDirectory()), actionCollection(), "add_dir"); + mDelete=new KAction(i18n("Delete"), "editdelete", Key_Delete, this, TQT_SLOT(deleteSelected()), actionCollection(), "delete"); - mClose=KStdAction::close(this, SLOT(close()), actionCollection()); - mFind=KStdAction::find(this, SLOT(find()), actionCollection()); + mClose=KStdAction::close(this, TQT_SLOT(close()), actionCollection()); + mFind=KStdAction::find(this, TQT_SLOT(find()), actionCollection()); - (void) KStdAction::configureToolbars(this, SLOT(configureToolBars()), actionCollection()); - mOpenNew=KStdAction::openNew(this, SLOT(openNew()), actionCollection()); - mOpenpl=KStdAction::open(this, SLOT(open()), actionCollection()); - mSave=KStdAction::save(this, SLOT(save()), actionCollection()); - mSaveAs=KStdAction::saveAs(this, SLOT(saveAs()), actionCollection()); + (void) KStdAction::configureToolbars(this, TQT_SLOT(configureToolBars()), actionCollection()); + mOpenNew=KStdAction::openNew(this, TQT_SLOT(openNew()), actionCollection()); + mOpenpl=KStdAction::open(this, TQT_SLOT(open()), actionCollection()); + mSave=KStdAction::save(this, TQT_SLOT(save()), actionCollection()); + mSaveAs=KStdAction::saveAs(this, TQT_SLOT(saveAs()), actionCollection()); - (void) new KAction(i18n("Shuffle"), "misc", 0, SPL, SLOT( randomize() ), actionCollection(), "shuffle"); - (void) new KAction(i18n("Clear"), "editclear", 0, list, SLOT( clear() ), actionCollection(), "clear"); + (void) new KAction(i18n("Shuffle"), "misc", 0, SPL, TQT_SLOT( randomize() ), actionCollection(), "shuffle"); + (void) new KAction(i18n("Clear"), "editclear", 0, list, TQT_SLOT( clear() ), actionCollection(), "clear"); createGUI("splui.rc"); @@ -669,10 +669,10 @@ View::View(SplitPlaylist *) void View::find() { mFinder->show(); - connect(mFinder, SIGNAL(search(Finder*)), SLOT(findIt(Finder*))); + connect(mFinder, TQT_SIGNAL(search(Finder*)), TQT_SLOT(findIt(Finder*))); } -static bool testWord(QListViewItem *i, const QString &finder) +static bool testWord(TQListViewItem *i, const TQString &finder) { PlaylistItemData *item=static_cast(i); if (item->title().find(finder, 0, false) >=0) @@ -688,7 +688,7 @@ static bool testWord(QListViewItem *i, const QString &finder) return false; } -static bool testWord(QListViewItem *i, const QRegExp &finder) +static bool testWord(TQListViewItem *i, const TQRegExp &finder) { PlaylistItemData *item=static_cast(i); if (item->title().find(finder) >=0) @@ -706,7 +706,7 @@ static bool testWord(QListViewItem *i, const QRegExp &finder) void View::findIt(Finder *f) { - QListViewItem *search=list->currentItem(); + TQListViewItem *search=list->currentItem(); if (list->currentItem()) { @@ -728,7 +728,7 @@ void View::findIt(Finder *f) { if (f->regexp()) { - if (testWord(search, QRegExp(f->string(), false))) + if (testWord(search, TQRegExp(f->string(), false))) break; } else @@ -746,12 +746,12 @@ void View::findIt(Finder *f) { if (f->isForward()) { - if (KMessageBox::questionYesNo(this, i18n("End of playlist reached. Continue searching from beginning?"),QString::null,KStdGuiItem::cont(),KStdGuiItem::cancel()) == KMessageBox::Yes) + if (KMessageBox::questionYesNo(this, i18n("End of playlist reached. Continue searching from beginning?"),TQString::null,KStdGuiItem::cont(),KStdGuiItem::cancel()) == KMessageBox::Yes) search=list->firstChild(); } else { - if (KMessageBox::questionYesNo(this, i18n("Beginning of playlist reached. Continue searching from end?"),QString::null,KStdGuiItem::cont(),KStdGuiItem::cancel()) == KMessageBox::Yes) + if (KMessageBox::questionYesNo(this, i18n("Beginning of playlist reached. Continue searching from end?"),TQString::null,KStdGuiItem::cont(),KStdGuiItem::cancel()) == KMessageBox::Yes) search=list->lastChild(); } } @@ -760,8 +760,8 @@ void View::findIt(Finder *f) if (search) { { // select none - QPtrList sel=list->selectedItems(); - for (QListViewItem *i=sel.first(); i!=0; i=sel.next()) + TQPtrList sel=list->selectedItems(); + for (TQListViewItem *i=sel.first(); i!=0; i=sel.next()) list->setSelected(i, false); } list->setSelected(search, true); @@ -781,7 +781,7 @@ View::~View() void View::init() { // see if we are importing an old-style list - bool importing= ! QFile(napp->dirs()->saveLocation("data", "noatun/") + "splitplaylist.xml").exists(); + bool importing= ! TQFile(napp->dirs()->saveLocation("data", "noatun/") + "splitplaylist.xml").exists(); if (importing) { @@ -802,7 +802,7 @@ void View::init() // this has to come after openGlobal, since openGlobal emits modified() setModified(config.readBoolEntry("modified", false)); - QString path = config.readPathEntry("file"); + TQString path = config.readPathEntry("file"); // don't call setPath with an empty path, that would make the url "valid" if ( !path.isEmpty() ) mPlaylistFile.setPath(path); @@ -860,18 +860,18 @@ void List::clear() { SPL->setCurrent(0); - QListView::clear(); + TQListView::clear(); } void View::deleteSelected() { - QPtrList items(list->selectedItems()); + TQPtrList items(list->selectedItems()); bool stopped=false; // noatun shouldn't play files for now - QListViewItem *afterLast=0; + TQListViewItem *afterLast=0; - for (QPtrListIterator it(items); it.current(); ++it) + for (TQPtrListIterator it(items); it.current(); ++it) { SafeListViewItem *i = static_cast(*it); if (!stopped && SPL->current() == i) @@ -895,7 +895,7 @@ void View::addFiles() { KURL::List files=KFileDialog::getOpenURLs(":mediadir", napp->mimeTypes(), this, i18n("Select File to Play")); - QListViewItem *last = list->lastItem(); + TQListViewItem *last = list->lastItem(); for(KURL::List::Iterator it=files.begin(); it!=files.end(); ++it) last = addFile(KURL(*it), false); @@ -904,7 +904,7 @@ void View::addFiles() void View::addDirectory() { - QString file=KFileDialog::getExistingDirectory(0, this, i18n("Select Folder")); + TQString file=KFileDialog::getExistingDirectory(0, this, i18n("Select Folder")); if (!file) return; KURL url; @@ -914,17 +914,17 @@ void View::addDirectory() setModified(true); } -void View::closeEvent(QCloseEvent*) +void View::closeEvent(TQCloseEvent*) { hide(); } -void View::showEvent(QShowEvent *) +void View::showEvent(TQShowEvent *) { emit shown(); } -void View::hideEvent(QHideEvent *) +void View::hideEvent(TQHideEvent *) { emit hidden(); } @@ -964,7 +964,7 @@ void View::configureToolBars() { saveMainWindowSettings(KGlobal::config(), "SPL Window"); KEditToolbar dlg(actionCollection(), "splui.rc"); - connect(&dlg, SIGNAL(newToolbarConfig()), SLOT(newToolBarConfig())); + connect(&dlg, TQT_SIGNAL(newToolbarConfig()), TQT_SLOT(newToolBarConfig())); dlg.exec(); } diff --git a/noatun/modules/splitplaylist/view.h b/noatun/modules/splitplaylist/view.h index 18dc917a..785608fd 100644 --- a/noatun/modules/splitplaylist/view.h +++ b/noatun/modules/splitplaylist/view.h @@ -1,12 +1,12 @@ #ifndef VIEW_H #define VIEW_H -#include -#include +#include +#include #include #include -#include -#include +#include +#include #include #include @@ -21,19 +21,19 @@ class SafeListViewItem , public DownloadItem { public: - SafeListViewItem(QListView *parent, QListViewItem *after, const KURL &text); - SafeListViewItem(QListView *parent, QListViewItem *after, const QMap &properties); + SafeListViewItem(TQListView *parent, TQListViewItem *after, const KURL &text); + SafeListViewItem(TQListView *parent, TQListViewItem *after, const TQMap &properties); virtual ~SafeListViewItem(); - virtual QString property(const QString &, const QString & = 0) const; - virtual void setProperty(const QString &, const QString &); - virtual void clearProperty(const QString &); - virtual QStringList properties() const; - virtual bool isProperty(const QString &) const; + virtual TQString property(const TQString &, const TQString & = 0) const; + virtual void setProperty(const TQString &, const TQString &); + virtual void clearProperty(const TQString &); + virtual TQStringList properties() const; + virtual bool isProperty(const TQString &) const; - virtual QString file() const; + virtual TQString file() const; - int compare(QListViewItem * i, int col, bool ascending) const; + int compare(TQListViewItem * i, int col, bool ascending) const; virtual void remove(); protected: @@ -43,15 +43,15 @@ protected: virtual void modified(); virtual void stateChange(bool s); - void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int align); + void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int align); private: struct Property { - QString key; - QString value; + TQString key; + TQString value; }; - QValueList mProperties; + TQValueList mProperties; bool removed; }; @@ -62,10 +62,10 @@ friend class View; public: List(View *parent); virtual ~List(); - QListViewItem *openGlobal(const KURL&, QListViewItem * =0); - QListViewItem *importGlobal(const KURL&, QListViewItem * =0); - QListViewItem *addFile(const KURL&, bool play=false, QListViewItem * =0); - void addDirectoryRecursive(const KURL &dir, QListViewItem *after= 0); + TQListViewItem *openGlobal(const KURL&, TQListViewItem * =0); + TQListViewItem *importGlobal(const KURL&, TQListViewItem * =0); + TQListViewItem *addFile(const KURL&, bool play=false, TQListViewItem * =0); + void addDirectoryRecursive(const KURL &dir, TQListViewItem *after= 0); public slots: virtual void clear(); @@ -75,15 +75,15 @@ signals: void deleteCurrentItem(); protected: - virtual bool acceptDrag(QDropEvent *event) const; - virtual void keyPressEvent(QKeyEvent *e); + virtual bool acceptDrag(TQDropEvent *event) const; + virtual void keyPressEvent(TQKeyEvent *e); protected slots: - virtual void dropEvent(QDropEvent *event, QListViewItem *after); + virtual void dropEvent(TQDropEvent *event, TQListViewItem *after); void move(); protected: - QListViewItem *recursiveAddAfter; + TQListViewItem *recursiveAddAfter; protected slots: // used when adding directories via KIO::listRecursive @@ -111,7 +111,7 @@ public: void init(); virtual ~View(); List *listView() const { return list; } - QListViewItem *addFile(const KURL &u, bool play=false) + TQListViewItem *addFile(const KURL &u, bool play=false) { return list->addFile(u, play, list->lastItem()); } @@ -143,9 +143,9 @@ protected: void exportTo(const KURL &); void setModified(bool); - virtual void closeEvent(QCloseEvent*e); - virtual void showEvent(QShowEvent *); - virtual void hideEvent(QHideEvent *); + virtual void closeEvent(TQCloseEvent*e); + virtual void showEvent(TQShowEvent *); + virtual void hideEvent(TQHideEvent *); signals: void hidden(); diff --git a/noatun/modules/systray/cmodule.cpp b/noatun/modules/systray/cmodule.cpp index 4adf7e44..c0e04fd3 100644 --- a/noatun/modules/systray/cmodule.cpp +++ b/noatun/modules/systray/cmodule.cpp @@ -30,25 +30,25 @@ #include //#include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include -YHModule::YHModule(QObject *_parent) +YHModule::YHModule(TQObject *_parent) : CModule(i18n("System Tray Icon"), i18n("Configure System Tray Icon"), "bottom", _parent) { - QVBoxLayout *top = new QVBoxLayout(this); + TQVBoxLayout *top = new TQVBoxLayout(this); mWidget = new YHConfigWidget(this); top->addWidget(mWidget); @@ -58,9 +58,9 @@ YHModule::YHModule(QObject *_parent) mWidget->cmbModifier->insertItem(i18n("Ctrl"), YHConfig::Ctrl); mWidget->cmbModifier->setCurrentItem(YHConfig::None); - connect(mWidget->chkUsePopup, SIGNAL(toggled(bool)), this, SLOT(slotUsePopupToggled(bool))); - connect(mWidget->cmbModifier, SIGNAL(activated(int)), this, SLOT(slotModifierActivated(int))); - connect(mWidget->grpMwheel, SIGNAL(clicked(int)), this, SLOT(slotMwheelClicked(int))); + connect(mWidget->chkUsePopup, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotUsePopupToggled(bool))); + connect(mWidget->cmbModifier, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotModifierActivated(int))); + connect(mWidget->grpMwheel, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(slotMwheelClicked(int))); reopen(); } diff --git a/noatun/modules/systray/cmodule.h b/noatun/modules/systray/cmodule.h index fecc70e3..fd9cae2c 100644 --- a/noatun/modules/systray/cmodule.h +++ b/noatun/modules/systray/cmodule.h @@ -26,7 +26,7 @@ #ifndef CMODULE_H #define CMODULE_H -#include +#include #include class YHConfigWidget; @@ -35,7 +35,7 @@ class YHModule : public CModule { Q_OBJECT public: - YHModule(QObject *_parent); + YHModule(TQObject *_parent); virtual void save(); virtual void reopen(); @@ -44,7 +44,7 @@ Q_OBJECT private: YHConfigWidget *mWidget; - QMap mActionMap; + TQMap mActionMap; private slots: void slotUsePopupToggled(bool on); diff --git a/noatun/modules/systray/kitsystemtray.cpp b/noatun/modules/systray/kitsystemtray.cpp index 5847d7da..8e42a3ed 100644 --- a/noatun/modules/systray/kitsystemtray.cpp +++ b/noatun/modules/systray/kitsystemtray.cpp @@ -33,7 +33,7 @@ #include #include -#include +#include #include "kitsystemtray.h" #include @@ -44,26 +44,26 @@ #include -KitSystemTray::KitSystemTray(const QString &contextMenu, KMainWindow *parent, const char *name) +KitSystemTray::KitSystemTray(const TQString &contextMenu, KMainWindow *parent, const char *name) : KSystemTray(parent, name) { setAlignment(AlignHCenter | AlignVCenter); menu = (KPopupMenu *)parent->guiFactory()->container(contextMenu, parent); - menu->insertTitle(SmallIcon("noatun"), QString::null, 0, 0); + menu->insertTitle(SmallIcon("noatun"), TQString::null, 0, 0); setAcceptDrops(true); } -void KitSystemTray::changeTitle(const QPixmap &pixmap, const QString &title) +void KitSystemTray::changeTitle(const TQPixmap &pixmap, const TQString &title) { menu->changeTitle(0, pixmap, title); } -void KitSystemTray::showEvent(QShowEvent *) +void KitSystemTray::showEvent(TQShowEvent *) { // empty } -void KitSystemTray::mousePressEvent(QMouseEvent *event) +void KitSystemTray::mousePressEvent(TQMouseEvent *event) { switch(event->button()) { @@ -82,12 +82,12 @@ void KitSystemTray::mousePressEvent(QMouseEvent *event) } } -void KitSystemTray::dragEnterEvent(QDragEnterEvent * event) +void KitSystemTray::dragEnterEvent(TQDragEnterEvent * event) { event->accept(KURLDrag::canDecode(event)); // accept uri drops only } -void KitSystemTray::dropEvent(QDropEvent * event) +void KitSystemTray::dropEvent(TQDropEvent * event) { KURL::List uris; if (KURLDrag::decode(event, uris)) @@ -98,7 +98,7 @@ void KitSystemTray::dropEvent(QDropEvent * event) } } -void KitSystemTray::wheelEvent(QWheelEvent *event) +void KitSystemTray::wheelEvent(TQWheelEvent *event) { YHConfig *c = YHConfig::self(); diff --git a/noatun/modules/systray/kitsystemtray.h b/noatun/modules/systray/kitsystemtray.h index 2f640adb..d697ca95 100644 --- a/noatun/modules/systray/kitsystemtray.h +++ b/noatun/modules/systray/kitsystemtray.h @@ -39,14 +39,14 @@ class KitSystemTray : public KSystemTray Q_OBJECT public: - KitSystemTray(const QString &contextMenu, KMainWindow *parent, const char *name = 0); - void changeTitle(const QPixmap &, const QString &); + KitSystemTray(const TQString &contextMenu, KMainWindow *parent, const char *name = 0); + void changeTitle(const TQPixmap &, const TQString &); protected: - virtual void showEvent(QShowEvent *); - virtual void mousePressEvent(QMouseEvent *); - virtual void dragEnterEvent(QDragEnterEvent *); - virtual void dropEvent(QDropEvent *); - virtual void wheelEvent(QWheelEvent *e); + virtual void showEvent(TQShowEvent *); + virtual void mousePressEvent(TQMouseEvent *); + virtual void dragEnterEvent(TQDragEnterEvent *); + virtual void dropEvent(TQDropEvent *); + virtual void wheelEvent(TQWheelEvent *e); KPopupMenu *menu; }; diff --git a/noatun/modules/systray/systray.cpp b/noatun/modules/systray/systray.cpp index c93080ca..2493bdbc 100644 --- a/noatun/modules/systray/systray.cpp +++ b/noatun/modules/systray/systray.cpp @@ -40,21 +40,21 @@ #include #include -#include +#include #include #include #include #include #include #include -#include -#include -#include -#include -#include -#include - -#include +#include +#include +#include +#include +#include +#include + +#include #include #include #include @@ -72,15 +72,15 @@ const int COVER_MAXH = 128; class PassivePopup : public KPassivePopup { public: - PassivePopup(QWidget *parent = 0, const char *name = 0) : KPassivePopup(parent, name) {} + PassivePopup(TQWidget *parent = 0, const char *name = 0) : KPassivePopup(parent, name) {} protected: - virtual void enterEvent(QEvent *) + virtual void enterEvent(TQEvent *) { setTimeout(3000000); // Make timeout damn near infinite } - virtual void leaveEvent(QEvent *) + virtual void leaveEvent(TQEvent *) { setTimeout(250); // Close quickly } @@ -100,9 +100,9 @@ NoatunSystray::NoatunSystray() : KMainWindow(0, "NoatunSystray"), Plugin(), removeCover(); // make sure any old temp cover is gone - KStdAction::quit(napp, SLOT(quit()), actionCollection()); - KStdAction::open(napp, SLOT(fileOpen()), actionCollection()); - KStdAction::preferences(napp, SLOT(preferences()), actionCollection()); + KStdAction::quit(napp, TQT_SLOT(quit()), actionCollection()); + KStdAction::open(napp, TQT_SLOT(fileOpen()), actionCollection()); + KStdAction::preferences(napp, TQT_SLOT(preferences()), actionCollection()); NoatunStdAction::back(actionCollection(), "back"); NoatunStdAction::stop(actionCollection(), "stop"); NoatunStdAction::playpause(actionCollection(), "play"); @@ -117,18 +117,18 @@ NoatunSystray::NoatunSystray() : KMainWindow(0, "NoatunSystray"), Plugin(), mTray = new KitSystemTray("tray", this); mTray->show(); - trayBase = renderIcon(BASEICON, QString::null); + trayBase = renderIcon(BASEICON, TQString::null); trayStatus = renderIcon(BASEICON, "player_stop"); mTray->changeTitle(*trayBase, i18n("Noatun")); showingTrayStatus = false; - mBlinkTimer = new QTimer(this); - connect(mBlinkTimer, SIGNAL(timeout()), this, SLOT(slotBlinkTimer())); + mBlinkTimer = new TQTimer(this); + connect(mBlinkTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotBlinkTimer())); - connect(napp->player(), SIGNAL(playing()), this, SLOT(slotPlayPause())); - connect(napp->player(), SIGNAL(paused()), this, SLOT(slotPlayPause())); - connect(napp->player(), SIGNAL(stopped()), this, SLOT(slotStopped())); + connect(napp->player(), TQT_SIGNAL(playing()), this, TQT_SLOT(slotPlayPause())); + connect(napp->player(), TQT_SIGNAL(paused()), this, TQT_SLOT(slotPlayPause())); + connect(napp->player(), TQT_SIGNAL(stopped()), this, TQT_SLOT(slotStopped())); //napp->player()->handleButtons(); } @@ -146,7 +146,7 @@ NoatunSystray::~NoatunSystray() void NoatunSystray::init() { YHModule *cmod = new YHModule(this); - connect(cmod, SIGNAL(saved()), this, SLOT(slotLoadSettings())); + connect(cmod, TQT_SIGNAL(saved()), this, TQT_SLOT(slotLoadSettings())); slotLoadSettings(); } @@ -165,9 +165,9 @@ void NoatunSystray::slotLoadSettings() if(c->tip()) - QToolTip::add(mTray, tipText); + TQToolTip::add(mTray, tipText); else - QToolTip::remove(mTray); + TQToolTip::remove(mTray); if (!c->passivePopupCovers()) removeCover(); @@ -184,7 +184,7 @@ void NoatunSystray::slotLoadSettings() } -void NoatunSystray::closeEvent(QCloseEvent*) +void NoatunSystray::closeEvent(TQCloseEvent*) { //kdDebug(66666) << k_funcinfo << "Called." << endl; disconnect(napp->player(), 0, 0, 0); @@ -194,7 +194,7 @@ void NoatunSystray::closeEvent(QCloseEvent*) void NoatunSystray::slotPlayPause() { - QString status; + TQString status; if(napp->player()->isPaused()) { @@ -208,26 +208,26 @@ void NoatunSystray::slotPlayPause() } const PlaylistItem item = napp->player()->current(); - QString s; + TQString s; if(!item.isProperty("title")) { // No metadata - s = QString("%1").arg(item.title()); + s = TQString("%1").arg(item.title()); } else { - s = QString("

%1

").arg(item.property("title")); + s = TQString("

%1

").arg(item.property("title")); if(item.isProperty("author")) - s += QString("%1
").arg(item.property("author")); + s += TQString("%1
").arg(item.property("author")); if(item.isProperty("album")) { if(item.isProperty("date")) - s += QString("%1 (%2)
").arg(item.property("album")).arg(item.property("date")); + s += TQString("%1 (%2)
").arg(item.property("album")).arg(item.property("date")); else - s += QString("%1
").arg(item.property("album")); + s += TQString("%1
").arg(item.property("album")); } } @@ -235,18 +235,18 @@ void NoatunSystray::slotPlayPause() if (YHConfig::self()->passivePopupCovers()) updateCover(); - if(YHConfig::self()->passivePopupCovers() && QFile::exists(tmpCoverPath)) + if(YHConfig::self()->passivePopupCovers() && TQFile::exists(tmpCoverPath)) { // QT always adds an empty line after the table so we add en empty line before the // table to get equal spacing on top and bottom - setTipText(QString("
" \ + setTipText(TQString("
" \ "" \ "" \ "

%1

%2
").arg(status).arg(s).arg(tmpCoverPath)); } else { - setTipText(QString("

%1

%2
").arg(status).arg(s)); + setTipText(TQString("

%1

%2
").arg(status).arg(s)); } } @@ -256,12 +256,12 @@ void NoatunSystray::slotStopped() if(!napp->player()->current()) return; changeTray("player_stop"); - setTipText(QString("

%1

").arg(i18n("Noatun - Stopped"))); + setTipText(TQString("

%1

").arg(i18n("Noatun - Stopped"))); } -void NoatunSystray::changeTray(const QString &pm) +void NoatunSystray::changeTray(const TQString &pm) { delete trayStatus; trayStatus = renderIcon(BASEICON, pm); @@ -297,19 +297,19 @@ void NoatunSystray::slotBlinkTimer() void NoatunSystray::updateCover() { //kdDebug(66666) << k_funcinfo << endl; - QString dir = napp->player()->current().url().directory(); - QString cover; + TQString dir = napp->player()->current().url().directory(); + TQString cover; // TODO: Maybe make these filenames configurable? - if(QFile::exists(dir + "/folder.png")) + if(TQFile::exists(dir + "/folder.png")) cover = dir + "/folder.png"; - else if(QFile::exists(dir + "/.folder.png")) + else if(TQFile::exists(dir + "/.folder.png")) cover = dir + "/.folder.png"; - else if(QFile::exists(dir + "/cover.png")) + else if(TQFile::exists(dir + "/cover.png")) cover = dir + "/cover.png"; - else if(QFile::exists(dir + "/cover.jpg")) + else if(TQFile::exists(dir + "/cover.jpg")) cover = dir + "/cover.jpg"; - else if(QFile::exists(dir + "/cover.jpeg")) + else if(TQFile::exists(dir + "/cover.jpeg")) cover = dir + "/cover.jpeg"; else // no cover { @@ -318,9 +318,9 @@ void NoatunSystray::updateCover() return; } - QString title = napp->player()->current().title(); + TQString title = napp->player()->current().title(); - QImage previmg; + TQImage previmg; previmg.load(tmpCoverPath); if(previmg.text("Title") != title) @@ -328,13 +328,13 @@ void NoatunSystray::updateCover() /*kdDebug(66666) << k_funcinfo << "Creating new temp cover for '" << cover << "'" << endl;*/ - QImage src; - QImage tmpimg; + TQImage src; + TQImage tmpimg; if(src.load(cover)) { if(src.width() >= COVER_MAXW || src.height() >= COVER_MAXH) - tmpimg = src.scale(COVER_MAXW, COVER_MAXH, QImage::ScaleMin); + tmpimg = src.scale(COVER_MAXW, COVER_MAXH, TQImage::ScaleMin); else tmpimg = src; @@ -351,12 +351,12 @@ void NoatunSystray::updateCover() void NoatunSystray::removeCover() { - if(QFile::exists(tmpCoverPath)) + if(TQFile::exists(tmpCoverPath)) KIO::NetAccess::del(KURL(tmpCoverPath), this); } -void NoatunSystray::setTipText(const QString& text) +void NoatunSystray::setTipText(const TQString& text) { if(text == tipText) // save the planet, save cpu cycles ;) return; @@ -364,10 +364,10 @@ void NoatunSystray::setTipText(const QString& text) YHConfig *c = YHConfig::self(); if(c->passivePopup()) - QTimer::singleShot(0, this, SLOT(showPassivePopup())); + TQTimer::singleShot(0, this, TQT_SLOT(showPassivePopup())); if(c->tip()) - QToolTip::add(mTray, tipText); + TQToolTip::add(mTray, tipText); } @@ -379,12 +379,12 @@ void NoatunSystray::showPassivePopup() return; } - mPassivePopup->reparent(0L, QPoint(0,0)); + mPassivePopup->reparent(0L, TQPoint(0,0)); if (YHConfig::self()->passivePopupButtons() && !napp->player()->isStopped()) { - QVBox *widget = mPassivePopup->standardView(QString::null, tipText, QPixmap()); - QHBox *box = new QHBox(mPassivePopup, "popupbox"); + TQVBox *widget = mPassivePopup->standardView(TQString::null, tipText, TQPixmap()); + TQHBox *box = new TQHBox(mPassivePopup, "popupbox"); box->setSpacing(8); @@ -394,52 +394,52 @@ void NoatunSystray::showPassivePopup() NETRect frame, win; ni.kdeGeometry(frame, win); - QRect bounds = KGlobalSettings::desktopGeometry(QPoint(win.pos.x, win.pos.y)); + TQRect bounds = KGlobalSettings::desktopGeometry(TQPoint(win.pos.x, win.pos.y)); if(win.pos.x < bounds.center().x()) { // Buttons to the left - QVBox *buttonBox = new QVBox(box); + TQVBox *buttonBox = new TQVBox(box); buttonBox->setSpacing(3); - QPushButton *forwardButton = new QPushButton(action("forward")->iconSet(), 0, buttonBox, "popup_forward"); + TQPushButton *forwardButton = new TQPushButton(action("forward")->iconSet(), 0, buttonBox, "popup_forward"); forwardButton->setFlat(true); - connect(forwardButton, SIGNAL(clicked()), action("forward"), SLOT(activate())); + connect(forwardButton, TQT_SIGNAL(clicked()), action("forward"), TQT_SLOT(activate())); - QPushButton *backButton = new QPushButton(action("back")->iconSet(), 0, buttonBox, "popup_back"); + TQPushButton *backButton = new TQPushButton(action("back")->iconSet(), 0, buttonBox, "popup_back"); backButton->setFlat(true); - connect(backButton, SIGNAL(clicked()), action("back"), SLOT(activate())); + connect(backButton, TQT_SIGNAL(clicked()), action("back"), TQT_SLOT(activate())); - QFrame *line = new QFrame(box); - line->setFrameShape(QFrame::VLine); + TQFrame *line = new TQFrame(box); + line->setFrameShape(TQFrame::VLine); - widget->reparent(box, QPoint(0, 0)); + widget->reparent(box, TQPoint(0, 0)); } else { // Buttons to the right - widget->reparent(box, QPoint(0, 0)); + widget->reparent(box, TQPoint(0, 0)); - QFrame *line = new QFrame(box); - line->setFrameShape(QFrame::VLine); + TQFrame *line = new TQFrame(box); + line->setFrameShape(TQFrame::VLine); - QVBox *buttonBox = new QVBox(box); + TQVBox *buttonBox = new TQVBox(box); buttonBox->setSpacing(3); - QPushButton *forwardButton = new QPushButton(action("forward")->iconSet(), 0, buttonBox, "popup_forward"); + TQPushButton *forwardButton = new TQPushButton(action("forward")->iconSet(), 0, buttonBox, "popup_forward"); forwardButton->setFlat(true); - connect(forwardButton, SIGNAL(clicked()), action("forward"), SLOT(activate())); + connect(forwardButton, TQT_SIGNAL(clicked()), action("forward"), TQT_SLOT(activate())); - QPushButton *backButton = new QPushButton(action("back")->iconSet(), 0, buttonBox, "popup_back"); + TQPushButton *backButton = new TQPushButton(action("back")->iconSet(), 0, buttonBox, "popup_back"); backButton->setFlat(true); - connect(backButton, SIGNAL(clicked()), action("back"), SLOT(activate())); + connect(backButton, TQT_SIGNAL(clicked()), action("back"), TQT_SLOT(activate())); } mPassivePopup->setView(box); } else { - mPassivePopup->setView(QString::null, tipText); + mPassivePopup->setView(TQString::null, tipText); } mPassivePopup->setTimeout(YHConfig::self()->passivePopupTimeout()*1000); @@ -447,17 +447,17 @@ void NoatunSystray::showPassivePopup() } -QPixmap *NoatunSystray::renderIcon(const QString& baseIcon, const QString &overlayIcon) const +TQPixmap *NoatunSystray::renderIcon(const TQString& baseIcon, const TQString &overlayIcon) const { - QPixmap *base = new QPixmap(KSystemTray::loadIcon(baseIcon)); + TQPixmap *base = new TQPixmap(KSystemTray::loadIcon(baseIcon)); if(!(overlayIcon.isNull())) // otherwise leave the base as-is { - QPixmap overlay = KSystemTray::loadIcon(overlayIcon); + TQPixmap overlay = KSystemTray::loadIcon(overlayIcon); if(!overlay.isNull()) { // draw the overlay on top of it - QPainter p(base); + TQPainter p(base); p.drawPixmap(0, 0, overlay); } } diff --git a/noatun/modules/systray/systray.h b/noatun/modules/systray/systray.h index f602c4e3..aa723eb5 100644 --- a/noatun/modules/systray/systray.h +++ b/noatun/modules/systray/systray.h @@ -30,7 +30,7 @@ #include #include -#include +#include #include @@ -47,34 +47,34 @@ public: virtual void init(); protected: - virtual void closeEvent(QCloseEvent *); + virtual void closeEvent(TQCloseEvent *); public slots: void slotPlayPause(); void slotStopped(); private slots: - void changeTray(const QString &); + void changeTray(const TQString &); void slotLoadSettings(); void slotBlinkTimer(); void showPassivePopup(); - QPixmap *renderIcon(const QString &, const QString &) const; + TQPixmap *renderIcon(const TQString &, const TQString &) const; private: - void setTipText(const QString&); + void setTipText(const TQString&); void updateCover(); void removeCover(); private: KitSystemTray *mTray; - QTimer *mBlinkTimer; - QPixmap *trayStatus; - QPixmap *trayBase; + TQTimer *mBlinkTimer; + TQPixmap *trayStatus; + TQPixmap *trayBase; PassivePopup *mPassivePopup; bool showingTrayStatus; - QString tipText; - QString tmpCoverPath; + TQString tipText; + TQString tmpCoverPath; }; #endif diff --git a/noatun/modules/voiceprint/prefs.cpp b/noatun/modules/voiceprint/prefs.cpp index 48998680..230c542f 100644 --- a/noatun/modules/voiceprint/prefs.cpp +++ b/noatun/modules/voiceprint/prefs.cpp @@ -3,33 +3,33 @@ #include #include -#include -#include +#include +#include #include #include -Prefs::Prefs(QObject* parent) +Prefs::Prefs(TQObject* parent) : CModule(i18n("Voiceprint"), i18n("Options for the Voiceprint Visualization"), "xapp", parent) { - QVBoxLayout *king=new QVBoxLayout(this); - QHBoxLayout *minor; + QVBoxLayout *king=new TQVBoxLayout(this); + TQHBoxLayout *minor; - QLabel *label; + TQLabel *label; mForeground=new KColorButton(this); - label=new QLabel(mForeground, i18n("&Foreground color:"), this); - minor=new QHBoxLayout(king); + label=new TQLabel(mForeground, i18n("&Foreground color:"), this); + minor=new TQHBoxLayout(king); minor->addWidget(label); minor->addWidget(mForeground); mBackground=new KColorButton(this); - label=new QLabel(mBackground, i18n("&Background color:"), this); - minor=new QHBoxLayout(king); + label=new TQLabel(mBackground, i18n("&Background color:"), this); + minor=new TQHBoxLayout(king); minor->addWidget(label); minor->addWidget(mBackground); mLine=new KColorButton(this); - label=new QLabel(mForeground, i18n("&Sweep color:"), this); - minor=new QHBoxLayout(king); + label=new TQLabel(mForeground, i18n("&Sweep color:"), this); + minor=new TQHBoxLayout(king); minor->addWidget(label); minor->addWidget(mLine); @@ -40,8 +40,8 @@ void Prefs::reopen() { KConfig *config=KGlobal::config(); config->setGroup("VoicePrint"); - QColor black(0, 0, 0); - QColor blue(0, 0, 222); + TQColor black(0, 0, 0); + TQColor blue(0, 0, 222); mBackground->setColor(config->readColorEntry("Background", &black)); mForeground->setColor(config->readColorEntry("Foreground", &blue)); mLine->setColor(config->readColorEntry("Line", &black)); diff --git a/noatun/modules/voiceprint/prefs.h b/noatun/modules/voiceprint/prefs.h index 6541b4de..65f4cf3d 100644 --- a/noatun/modules/voiceprint/prefs.h +++ b/noatun/modules/voiceprint/prefs.h @@ -1,7 +1,7 @@ #ifndef PREFS_H #define PREFS_H -#include +#include #include class KColorButton; @@ -10,7 +10,7 @@ class Prefs : public CModule { Q_OBJECT public: - Prefs(QObject* parent); + Prefs(TQObject* parent); virtual void save(); virtual void reopen(); diff --git a/noatun/modules/voiceprint/voiceprint.cpp b/noatun/modules/voiceprint/voiceprint.cpp index 4f6c7aea..0a82a1ab 100644 --- a/noatun/modules/voiceprint/voiceprint.cpp +++ b/noatun/modules/voiceprint/voiceprint.cpp @@ -2,7 +2,7 @@ #include #include #include -#include +#include #include "prefs.h" #include #include @@ -17,7 +17,7 @@ extern "C" VoicePrint *VoicePrint::voicePrint=0; -VoicePrint::VoicePrint() : QWidget(0,0,WRepaintNoErase), MonoFFTScope(50), Plugin() +VoicePrint::VoicePrint() : TQWidget(0,0,WRepaintNoErase), MonoFFTScope(50), Plugin() { voicePrint=this; mOffset=0; @@ -41,7 +41,7 @@ void VoicePrint::init() resizeEvent(0); } -void VoicePrint::setColors(const QColor &bg, const QColor &fg, const QColor &l) +void VoicePrint::setColors(const TQColor &bg, const TQColor &fg, const TQColor &l) { mProgress=l; mLowColor=bg.rgb(); @@ -49,17 +49,17 @@ void VoicePrint::setColors(const QColor &bg, const QColor &fg, const QColor &l) setBackgroundColor(mLowColor); } -void VoicePrint::closeEvent(QCloseEvent *) +void VoicePrint::closeEvent(TQCloseEvent *) { unload(); } -void VoicePrint::resizeEvent(QResizeEvent *) +void VoicePrint::resizeEvent(TQResizeEvent *) { mOffset=0; mBuffer.resize(size()); - QPainter paint(&mBuffer); - paint.fillRect(QRect(0,0, QWidget::width(), height()), QColor(mLowColor)); + TQPainter paint(&mBuffer); + paint.fillRect(TQRect(0,0, TQWidget::width(), height()), TQColor(mLowColor)); setBands(magic(height()/mSegmentWidth)); } @@ -78,7 +78,7 @@ inline static QRgb averageByIntensity(QRgb bgcolor, QRgb fgcolor, int octet) #undef COLOR -void VoicePrint::paintEvent(QPaintEvent *e) +void VoicePrint::paintEvent(TQPaintEvent *e) { bitBlt(this, e->rect().topLeft(), &mBuffer, e->rect(), Qt::CopyROP); } @@ -88,7 +88,7 @@ void VoicePrint::scopeEvent(float *data, int bands) // save cpu if(isHidden()) return; - QPainter paint(&mBuffer); + TQPainter paint(&mBuffer); // each square has a width of mSegmentWidth float brightness = float(bands * mSegmentWidth); for (int i=0; i255) band=255; else if (band<0) band=0; - QColor area(averageByIntensity(mLowColor, mHighColor, band)); + TQColor area(averageByIntensity(mLowColor, mHighColor, band)); int bandTop=i*height()/bands, bandBottom=(i+1)*height()/bands; paint.fillRect(mOffset, bandTop, mSegmentWidth,bandBottom-bandTop,area); } int newOffset = mOffset+mSegmentWidth; - if (newOffset>QWidget::width()) newOffset=0; + if (newOffset>TQWidget::width()) newOffset=0; paint.fillRect(newOffset, 0, mSegmentWidth, height(), mProgress); // redraw changes with the minimum amount of work diff --git a/noatun/modules/voiceprint/voiceprint.h b/noatun/modules/voiceprint/voiceprint.h index ab5af69d..4d78909a 100644 --- a/noatun/modules/voiceprint/voiceprint.h +++ b/noatun/modules/voiceprint/voiceprint.h @@ -3,7 +3,7 @@ #include -class VoicePrint : public QWidget, public MonoFFTScope, public Plugin +class VoicePrint : public TQWidget, public MonoFFTScope, public Plugin { Q_OBJECT @@ -11,21 +11,21 @@ public: VoicePrint(); virtual ~VoicePrint(); - void setColors(const QColor &bg, const QColor &fg, const QColor &l); + void setColors(const TQColor &bg, const TQColor &fg, const TQColor &l); void init(); protected: - virtual void closeEvent(QCloseEvent *); + virtual void closeEvent(TQCloseEvent *); virtual void scopeEvent(float *data, int bands); - virtual void resizeEvent(QResizeEvent *); - virtual void paintEvent(QPaintEvent *); + virtual void resizeEvent(TQResizeEvent *); + virtual void paintEvent(TQPaintEvent *); public: static VoicePrint* voicePrint; private: - QColor mProgress; - QPixmap mBuffer; + TQColor mProgress; + TQPixmap mBuffer; QRgb mLowColor, mHighColor; int mOffset, mSegmentWidth; }; diff --git a/noatun/modules/winskin/fileInfo.cpp b/noatun/modules/winskin/fileInfo.cpp index 69f93215..6e721cd9 100644 --- a/noatun/modules/winskin/fileInfo.cpp +++ b/noatun/modules/winskin/fileInfo.cpp @@ -1,14 +1,14 @@ #include #include -#include +#include #include #include "fileInfo.h" fileInfo::fileInfo(const PlaylistItem &item) { - QString prop; + TQString prop; prop = item.property("bitrate"); if (prop.isNull()) diff --git a/noatun/modules/winskin/guiSpectrumAnalyser.cpp b/noatun/modules/winskin/guiSpectrumAnalyser.cpp index d015e5da..583266e0 100644 --- a/noatun/modules/winskin/guiSpectrumAnalyser.cpp +++ b/noatun/modules/winskin/guiSpectrumAnalyser.cpp @@ -12,9 +12,9 @@ #include -#include -#include -#include +#include +#include +#include #include #include "waColor.h" @@ -28,11 +28,11 @@ GuiSpectrumAnalyser::GuiSpectrumAnalyser() : WaWidget(_WA_MAPPING_ANALYSER) { - connect(WaSkinModel::instance(), SIGNAL(skinChanged()), this, SLOT(pixmapChange())); + connect(WaSkinModel::instance(), TQT_SIGNAL(skinChanged()), this, TQT_SLOT(pixmapChange())); - contextMenu = new QPopupMenu(this); - visualizationMenu = new QPopupMenu(); - analyserMenu = new QPopupMenu(); + contextMenu = new TQPopupMenu(this); + visualizationMenu = new TQPopupMenu(); + analyserMenu = new TQPopupMenu(); contextMenu->insertItem(i18n("Visualization Mode"), visualizationMenu); contextMenu->insertItem(i18n("Analyzer Mode"), analyserMenu); @@ -40,13 +40,13 @@ GuiSpectrumAnalyser::GuiSpectrumAnalyser() visualizationMenu->insertItem(i18n("Analyzer"), (int)MODE_ANALYSER); visualizationMenu->insertItem(i18n("Disabled"), (int)MODE_DISABLED); visualizationMenu->setCheckable(true); - connect(visualizationMenu, SIGNAL(activated(int)), this, SLOT(setVisualizationMode(int))); + connect(visualizationMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(setVisualizationMode(int))); analyserMenu->insertItem(i18n("Normal"), (int)MODE_NORMAL); analyserMenu->insertItem(i18n("Fire"), (int)MODE_FIRE); analyserMenu->insertItem(i18n("Vertical Lines"), (int)MODE_VERTICAL_LINES); analyserMenu->setCheckable(true); - connect(analyserMenu, SIGNAL(activated(int)), this, SLOT(setAnalyserMode(int))); + connect(analyserMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(setAnalyserMode(int))); analyserCache = NULL; winSkinVis = NULL; @@ -70,7 +70,7 @@ GuiSpectrumAnalyser::~GuiSpectrumAnalyser() delete analyserCache; } -void GuiSpectrumAnalyser::mousePressEvent ( QMouseEvent *e ) +void GuiSpectrumAnalyser::mousePressEvent ( TQMouseEvent *e ) { if (e->button() == LeftButton) { if (visualization_mode == MODE_DISABLED) @@ -79,7 +79,7 @@ void GuiSpectrumAnalyser::mousePressEvent ( QMouseEvent *e ) setVisualizationMode(MODE_DISABLED); } else if (e->button() == RightButton) { - contextMenu->popup(mapToGlobal(QPoint(e->x(), e->y()))); + contextMenu->popup(mapToGlobal(TQPoint(e->x(), e->y()))); } } @@ -139,7 +139,7 @@ void GuiSpectrumAnalyser::setVisualizationMode(int mode) if (!winSkinVis) { winSkinVis=new WinSkinVis(this,"WinSkinVis"); - connect(winSkinVis,SIGNAL(doRepaint()),this,SLOT(updatePeaks())); + connect(winSkinVis,TQT_SIGNAL(doRepaint()),this,TQT_SLOT(updatePeaks())); } } else @@ -160,20 +160,20 @@ void GuiSpectrumAnalyser::freshenAnalyserCache() // The analyser cache is a 34x16 pixmap containing all the bits needed // to quickly draw the spectrum analyser - analyserCache = new QPixmap(34, 16); - QPainter p(analyserCache); + analyserCache = new TQPixmap(34, 16); + TQPainter p(analyserCache); for (unsigned int x = 0;x < 17;x++) { if (x != 16) { - p.setPen(QPen(colorScheme->skinColors[INDEX_BACKGROUND_COLOR])); + p.setPen(TQPen(colorScheme->skinColors[INDEX_BACKGROUND_COLOR])); p.drawLine(x * 2, 0, x * 2, 16 - x - 1); } for (unsigned int y = 0; y < (16 - x);y++) { if (y % 2) - p.setPen(QPen(colorScheme->skinColors[INDEX_GRID_COLOR])); + p.setPen(TQPen(colorScheme->skinColors[INDEX_GRID_COLOR])); else - p.setPen(QPen(colorScheme->skinColors[INDEX_BACKGROUND_COLOR])); + p.setPen(TQPen(colorScheme->skinColors[INDEX_BACKGROUND_COLOR])); p.drawPoint((x * 2) + 1, y); } @@ -184,13 +184,13 @@ void GuiSpectrumAnalyser::freshenAnalyserCache() switch (analyser_mode) { case MODE_FIRE: for (unsigned int y = (16 - x); y < 16; y++) { - p.setPen(QPen(colorScheme->skinColors[INDEX_SPEC_BASE + (y - (16 - x))])); + p.setPen(TQPen(colorScheme->skinColors[INDEX_SPEC_BASE + (y - (16 - x))])); p.drawPoint((x * 2), y); p.drawPoint((x * 2) + 1, y); } break; case MODE_VERTICAL_LINES: - p.setPen(QPen(colorScheme->skinColors[INDEX_SPEC_BASE + (16 - x)])); + p.setPen(TQPen(colorScheme->skinColors[INDEX_SPEC_BASE + (16 - x)])); p.drawLine((x * 2), (15 - x), (x * 2), 15); p.drawLine((x * 2) + 1, (15 - x), (x * 2) + 1, 15); break; @@ -198,7 +198,7 @@ void GuiSpectrumAnalyser::freshenAnalyserCache() // Fall through default: for (unsigned int y = (16 - x); y < 16; y++) { - p.setPen(QPen(colorScheme->skinColors[INDEX_SPEC_BASE + y])); + p.setPen(TQPen(colorScheme->skinColors[INDEX_SPEC_BASE + y])); p.drawPoint((x * 2), y); p.drawPoint((x * 2) + 1, y); } @@ -207,7 +207,7 @@ void GuiSpectrumAnalyser::freshenAnalyserCache() } } -void GuiSpectrumAnalyser::paintEvent (QPaintEvent *) +void GuiSpectrumAnalyser::paintEvent (TQPaintEvent *) { if (visualization_mode == MODE_DISABLED) paintBackground(); diff --git a/noatun/modules/winskin/guiSpectrumAnalyser.h b/noatun/modules/winskin/guiSpectrumAnalyser.h index ecef8d37..e2dd3431 100644 --- a/noatun/modules/winskin/guiSpectrumAnalyser.h +++ b/noatun/modules/winskin/guiSpectrumAnalyser.h @@ -34,7 +34,7 @@ class GuiSpectrumAnalyser : public WaWidget { GuiSpectrumAnalyser(); ~GuiSpectrumAnalyser(); - void mousePressEvent(QMouseEvent * mouseEvent); + void mousePressEvent(TQMouseEvent * mouseEvent); public slots: void pauseVisualization(); @@ -48,18 +48,18 @@ class GuiSpectrumAnalyser : public WaWidget { void setAnalyserMode(int); private: - void paintEvent(QPaintEvent *); + void paintEvent(TQPaintEvent *); - QPopupMenu *contextMenu; - QPopupMenu *visualizationMenu; - QPopupMenu *analyserMenu; + TQPopupMenu *contextMenu; + TQPopupMenu *visualizationMenu; + TQPopupMenu *analyserMenu; void freshenAnalyserCache(); int visualization_mode; int analyser_mode; - QPixmap *analyserCache; + TQPixmap *analyserCache; WinSkinVis *winSkinVis; }; #endif diff --git a/noatun/modules/winskin/skinMap.h b/noatun/modules/winskin/skinMap.h index f67f1557..1b9f8530 100644 --- a/noatun/modules/winskin/skinMap.h +++ b/noatun/modules/winskin/skinMap.h @@ -16,7 +16,7 @@ #ifndef _SKINMAP_H #define _SKINMAP_H -#include +#include typedef struct { int x; diff --git a/noatun/modules/winskin/waBalanceSlider.cpp b/noatun/modules/winskin/waBalanceSlider.cpp index 1ac1b562..cb6b0f19 100644 --- a/noatun/modules/winskin/waBalanceSlider.cpp +++ b/noatun/modules/winskin/waBalanceSlider.cpp @@ -38,10 +38,10 @@ void WaBalanceSlider::buildGui() ws->setValue(0); - connect(ws, SIGNAL(valueChanged(int)), this, - SIGNAL(balanceSetValue(int))); - connect(ws, SIGNAL(sliderPressed()), SIGNAL(sliderPressed())); - connect(ws, SIGNAL(sliderReleased()), SIGNAL(sliderReleased())); + connect(ws, TQT_SIGNAL(valueChanged(int)), this, + TQT_SIGNAL(balanceSetValue(int))); + connect(ws, TQT_SIGNAL(sliderPressed()), TQT_SIGNAL(sliderPressed())); + connect(ws, TQT_SIGNAL(sliderReleased()), TQT_SIGNAL(sliderReleased())); } diff --git a/noatun/modules/winskin/waButton.cpp b/noatun/modules/winskin/waButton.cpp index cac0275a..da113c87 100644 --- a/noatun/modules/winskin/waButton.cpp +++ b/noatun/modules/winskin/waButton.cpp @@ -10,7 +10,7 @@ */ -#include +#include #include "waButton.h" @@ -44,12 +44,12 @@ void WaButton::setPixmapDownSelected(int pixId) { nDownIdSelected=pixId; } -void WaButton::paintEvent(QPaintEvent *) { +void WaButton::paintEvent(TQPaintEvent *) { paintPixmap(getPixmapId()); } -void WaButton::mousePressEvent(QMouseEvent* e) { +void WaButton::mousePressEvent(TQMouseEvent* e) { if (e->button() != LeftButton) { // We can't deal with it, but maybe the widget can do something clever WaWidget::mousePressEvent(e); @@ -60,7 +60,7 @@ void WaButton::mousePressEvent(QMouseEvent* e) { } } -void WaButton::mouseReleaseEvent(QMouseEvent* e) { +void WaButton::mouseReleaseEvent(TQMouseEvent* e) { if (!pressed) { // We're not pressed, so just pass along the mouse event, it's not ours WaWidget::mouseReleaseEvent(e); diff --git a/noatun/modules/winskin/waButton.h b/noatun/modules/winskin/waButton.h index 50947216..bfaf43ff 100644 --- a/noatun/modules/winskin/waButton.h +++ b/noatun/modules/winskin/waButton.h @@ -16,7 +16,7 @@ #ifndef __WABUTTON_H #define __WABUTTON_H -#include +#include #include "waWidget.h" class WaButton : public WaWidget { @@ -37,18 +37,18 @@ class WaButton : public WaWidget { bool togglable() const { return _togglable; } int getPixmapId(); - void paintEvent(QPaintEvent*); + void paintEvent(TQPaintEvent*); private: - void mousePressEvent (QMouseEvent* e); - void mouseReleaseEvent (QMouseEvent* e); + void mousePressEvent (TQMouseEvent* e); + void mouseReleaseEvent (TQMouseEvent* e); int nUpId; int nDownId; int nDownIdSelected; int nUpIdSelected; - QPoint currentLocation; + TQPoint currentLocation; bool _toggled; bool _togglable; diff --git a/noatun/modules/winskin/waClutterbar.cpp b/noatun/modules/winskin/waClutterbar.cpp index 6ceb7d04..f4370e87 100644 --- a/noatun/modules/winskin/waClutterbar.cpp +++ b/noatun/modules/winskin/waClutterbar.cpp @@ -6,6 +6,6 @@ WaClutterbar::WaClutterbar() : WaWidget(_WA_MAPPING_CLUTTERBAR) { WaClutterbar::~WaClutterbar() { } -void WaClutterbar::paintEvent(QPaintEvent *) { +void WaClutterbar::paintEvent(TQPaintEvent *) { paintPixmap(_WA_SKIN_CLUTTERBAR_DISABLED); } diff --git a/noatun/modules/winskin/waClutterbar.h b/noatun/modules/winskin/waClutterbar.h index 69339c37..5a96993a 100644 --- a/noatun/modules/winskin/waClutterbar.h +++ b/noatun/modules/winskin/waClutterbar.h @@ -1,7 +1,7 @@ #ifndef __WACLUTTERBAR_H #define __WACLUTTERBAR_H -#include +#include #include "waWidget.h" class WaClutterbar : public WaWidget { @@ -12,7 +12,7 @@ class WaClutterbar : public WaWidget { ~WaClutterbar(); public slots: - void paintEvent(QPaintEvent *); + void paintEvent(TQPaintEvent *); }; #endif diff --git a/noatun/modules/winskin/waColor.cpp b/noatun/modules/winskin/waColor.cpp index e06b38bc..43fa5154 100644 --- a/noatun/modules/winskin/waColor.cpp +++ b/noatun/modules/winskin/waColor.cpp @@ -1,11 +1,11 @@ #include -#include +#include #include "waColor.h" WaColor *colorScheme = NULL; -WaColor::WaColor(QString filename) { +WaColor::WaColor(TQString filename) { int r, g, b; char comma; @@ -38,7 +38,7 @@ WaColor::WaColor(QString filename) { return; } - std::ifstream viscolor(QFile::encodeName(filename)); + std::ifstream viscolor(TQFile::encodeName(filename)); if (!viscolor) return; diff --git a/noatun/modules/winskin/waColor.h b/noatun/modules/winskin/waColor.h index a0e18484..e029b70b 100644 --- a/noatun/modules/winskin/waColor.h +++ b/noatun/modules/winskin/waColor.h @@ -3,8 +3,8 @@ #ifndef WACOLOR_H #define WACOLOR_H -#include -#include +#include +#include #define INDEX_BACKGROUND_COLOR 0 #define INDEX_GRID_COLOR 1 @@ -14,10 +14,10 @@ class WaColor { public: - WaColor(QString filename); + WaColor(TQString filename); ~WaColor(); - QColor skinColors[24]; + TQColor skinColors[24]; }; extern WaColor *colorScheme; diff --git a/noatun/modules/winskin/waDigit.cpp b/noatun/modules/winskin/waDigit.cpp index b775d7cf..15a3ae46 100644 --- a/noatun/modules/winskin/waDigit.cpp +++ b/noatun/modules/winskin/waDigit.cpp @@ -34,7 +34,7 @@ WaDigit::~WaDigit() config->writeEntry("timeReversed", reverse_time); } -void WaDigit::paintEvent(QPaintEvent *) +void WaDigit::paintEvent(TQPaintEvent *) { paintBackground(); @@ -49,7 +49,7 @@ void WaDigit::paintEvent(QPaintEvent *) int x = waSkinModel->getMapGeometry(mapping).x(); int y = waSkinModel->getMapGeometry(mapping).y(); - QRect mapRect; + TQRect mapRect; // We expect strings either in the form "xx:yy", or "-xx:yy" // If the string length is 6, we have it in the form of "-xx:yy" @@ -77,7 +77,7 @@ void WaDigit::paintEvent(QPaintEvent *) waSkinModel->getDigit(time[4], this, mapRect.x() - x, mapRect.y() - y); } -void WaDigit::mousePressEvent(QMouseEvent* e) { +void WaDigit::mousePressEvent(TQMouseEvent* e) { if (e->button() == LeftButton) { reverse_time = !reverse_time; emit digitsClicked(); diff --git a/noatun/modules/winskin/waDigit.h b/noatun/modules/winskin/waDigit.h index cefbfeb3..cee5da1d 100644 --- a/noatun/modules/winskin/waDigit.h +++ b/noatun/modules/winskin/waDigit.h @@ -16,7 +16,7 @@ #ifndef __WADIGIT_H #define __WADIGIT_H -#include +#include #include "waWidget.h" @@ -27,20 +27,20 @@ class WaDigit : public WaWidget { WaDigit(); ~WaDigit(); - void setTime(QString time) { timeString = time; update(); } - QString time() const { return timeString; } + void setTime(TQString time) { timeString = time; update(); } + TQString time() const { return timeString; } bool timeReversed() const { return reverse_time; } public slots: - void paintEvent(QPaintEvent * paintEvent); + void paintEvent(TQPaintEvent * paintEvent); private: - void mousePressEvent(QMouseEvent* e); + void mousePressEvent(TQMouseEvent* e); bool reverse_time; WaSkinModel *waSkinModel; - QString timeString; + TQString timeString; signals: void digitsClicked(); diff --git a/noatun/modules/winskin/waIndicator.cpp b/noatun/modules/winskin/waIndicator.cpp index 9c5efa84..1c6a64cc 100644 --- a/noatun/modules/winskin/waIndicator.cpp +++ b/noatun/modules/winskin/waIndicator.cpp @@ -25,7 +25,7 @@ WaIndicator::~WaIndicator() { } -void WaIndicator::paintEvent(QPaintEvent *) +void WaIndicator::paintEvent(TQPaintEvent *) { paintPixmap( _state ? _enabled_mapping : _disabled_mapping ); } diff --git a/noatun/modules/winskin/waIndicator.h b/noatun/modules/winskin/waIndicator.h index f367fe84..b4d37482 100644 --- a/noatun/modules/winskin/waIndicator.h +++ b/noatun/modules/winskin/waIndicator.h @@ -16,7 +16,7 @@ #ifndef __WAINDICATOR_H #define __WAINDICATOR_H -#include +#include #include "waWidget.h" @@ -31,7 +31,7 @@ class WaIndicator : public WaWidget { bool state() const { return _state; } public slots: - void paintEvent(QPaintEvent *); + void paintEvent(TQPaintEvent *); private: int _enabled_mapping; diff --git a/noatun/modules/winskin/waInfo.cpp b/noatun/modules/winskin/waInfo.cpp index c735a8e4..d64191da 100644 --- a/noatun/modules/winskin/waInfo.cpp +++ b/noatun/modules/winskin/waInfo.cpp @@ -12,8 +12,8 @@ */ -#include -#include +#include +#include #include @@ -25,18 +25,18 @@ WaInfo::WaInfo() : WaWidget(_WA_MAPPING_INFO) { - connect(WaSkinModel::instance(), SIGNAL(skinChanged()), - this, SLOT(pixmapChange())); + connect(WaSkinModel::instance(), TQT_SIGNAL(skinChanged()), + this, TQT_SLOT(pixmapChange())); - completePixmap = new QPixmap(); + completePixmap = new TQPixmap(); - QSize size = sizeHint(); + TQSize size = sizeHint(); completePixmap->resize(size.width(), size.height()); xGrabbedPos = -1; - timer = new QTimer(this); - connect(timer, SIGNAL(timeout()), this, SLOT(timeEvent())); + timer = new TQTimer(this); + connect(timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(timeEvent())); } WaInfo::~WaInfo() @@ -65,7 +65,7 @@ void WaInfo::scrollerSetup() xScrollPos = 0; xScrollDirection = 0; timer->stop(); - QSize size = sizeHint(); + TQSize size = sizeHint(); if (completePixmap->width() > size.width()) { xScrollDirection = 1; @@ -77,9 +77,9 @@ void WaInfo::scrollerSetup() } } -void WaInfo::paintEvent(QPaintEvent *) +void WaInfo::paintEvent(TQPaintEvent *) { - QSize size = sizeHint(); + TQSize size = sizeHint(); if (completePixmap->width() <= size.width()) { bitBlt(this, 0, 0, completePixmap); @@ -105,7 +105,7 @@ void WaInfo::paintEvent(QPaintEvent *) } -void WaInfo::setText(QString song) +void WaInfo::setText(TQString song) { if (_text != song) { _text = song; @@ -113,7 +113,7 @@ void WaInfo::setText(QString song) } } -QString WaInfo::text() const +TQString WaInfo::text() const { return _text; } @@ -127,7 +127,7 @@ void WaInfo::pixmapChange() int x = 0; int n=infoString ? strlen(infoString) : 0; - QSize size = sizeHint(); + TQSize size = sizeHint(); completePixmap->resize(QMAX(n * _WA_TEXT_WIDTH, size.width()), _WA_TEXT_HEIGHT); @@ -149,12 +149,12 @@ void WaInfo::pixmapChange() update(); } -void WaInfo::mousePressEvent (QMouseEvent *e) { +void WaInfo::mousePressEvent (TQMouseEvent *e) { if (e->button() == LeftButton) xGrabbedPos = (e->x() + xScrollPos) % completePixmap->width(); } -void WaInfo::mouseMoveEvent (QMouseEvent * e) { +void WaInfo::mouseMoveEvent (TQMouseEvent * e) { xScrollPos = -e->x() + xGrabbedPos; if (xScrollPos < 0) @@ -165,7 +165,7 @@ void WaInfo::mouseMoveEvent (QMouseEvent * e) { update(); } -void WaInfo::mouseReleaseEvent (QMouseEvent *) { +void WaInfo::mouseReleaseEvent (TQMouseEvent *) { xGrabbedPos = -1; } diff --git a/noatun/modules/winskin/waInfo.h b/noatun/modules/winskin/waInfo.h index 513ff3cc..32d310e4 100644 --- a/noatun/modules/winskin/waInfo.h +++ b/noatun/modules/winskin/waInfo.h @@ -16,8 +16,8 @@ #ifndef __WAINFO_H #define __WAINFO_H -#include -#include +#include +#include #include "waWidget.h" @@ -28,20 +28,20 @@ class WaInfo : public WaWidget { WaInfo(); ~WaInfo(); - void setText(QString song); - QString text() const; + void setText(TQString song); + TQString text() const; void scrollerSetup(); protected: - void paintEvent(QPaintEvent * paintEvent); + void paintEvent(TQPaintEvent * paintEvent); - void mousePressEvent (QMouseEvent * e); - void mouseMoveEvent (QMouseEvent * e); - void mouseReleaseEvent (QMouseEvent * e); + void mousePressEvent (TQMouseEvent * e); + void mouseMoveEvent (TQMouseEvent * e); + void mouseReleaseEvent (TQMouseEvent * e); - QPixmap *completePixmap; - QString _text; - QTimer *timer; + TQPixmap *completePixmap; + TQString _text; + TQTimer *timer; int xScrollPos; int xScrollDirection; int xGrabbedPos; diff --git a/noatun/modules/winskin/waJumpSlider.cpp b/noatun/modules/winskin/waJumpSlider.cpp index 51633300..b8750dc1 100644 --- a/noatun/modules/winskin/waJumpSlider.cpp +++ b/noatun/modules/winskin/waJumpSlider.cpp @@ -30,9 +30,9 @@ void WaJumpSlider::buildGui() ws->setRange(0, 100); ws->setValue(0); - connect(ws, SIGNAL(sliderPressed()), this, SIGNAL(sliderPressed())); - connect(ws, SIGNAL(sliderReleased()), this, SLOT(releasedSlider())); - connect(ws, SIGNAL(valueChanged(int)), this, SIGNAL(valueChanged(int))); + connect(ws, TQT_SIGNAL(sliderPressed()), this, TQT_SIGNAL(sliderPressed())); + connect(ws, TQT_SIGNAL(sliderReleased()), this, TQT_SLOT(releasedSlider())); + connect(ws, TQT_SIGNAL(valueChanged(int)), this, TQT_SIGNAL(valueChanged(int))); } void WaJumpSlider::setJumpRange(int val) @@ -63,11 +63,11 @@ void WaJumpSlider::releasedSlider() { emit(sliderReleased()); } -void WaJumpSlider::showEvent (QShowEvent *) { +void WaJumpSlider::showEvent (TQShowEvent *) { ws->show(); } -void WaJumpSlider::hideEvent (QHideEvent *) { +void WaJumpSlider::hideEvent (TQHideEvent *) { ws->hide(); } diff --git a/noatun/modules/winskin/waJumpSlider.h b/noatun/modules/winskin/waJumpSlider.h index 12c07808..e8a48b1f 100644 --- a/noatun/modules/winskin/waJumpSlider.h +++ b/noatun/modules/winskin/waJumpSlider.h @@ -35,8 +35,8 @@ class WaJumpSlider : public WaWidget { protected: WaSlider *ws; - void showEvent (QShowEvent *); - void hideEvent (QHideEvent *); + void showEvent (TQShowEvent *); + void hideEvent (TQHideEvent *); private slots: void releasedSlider(); diff --git a/noatun/modules/winskin/waLabel.cpp b/noatun/modules/winskin/waLabel.cpp index 8f3ddb60..54b7513b 100644 --- a/noatun/modules/winskin/waLabel.cpp +++ b/noatun/modules/winskin/waLabel.cpp @@ -11,20 +11,20 @@ */ -#include -#include +#include +#include #include "waLabel.h" #include "waSkinModel.h" WaLabel::WaLabel(int mapping) : WaWidget(mapping) { - connect(WaSkinModel::instance(), SIGNAL(skinChanged()), - this, SLOT(pixmapChange())); + connect(WaSkinModel::instance(), TQT_SIGNAL(skinChanged()), + this, TQT_SLOT(pixmapChange())); - completePixmap = new QPixmap(); + completePixmap = new TQPixmap(); - QSize size = sizeHint(); + TQSize size = sizeHint(); completePixmap->resize(size.width(), size.height()); } @@ -34,12 +34,12 @@ WaLabel::~WaLabel() delete completePixmap; } -void WaLabel::paintEvent(QPaintEvent *) +void WaLabel::paintEvent(TQPaintEvent *) { bitBlt(this, 0, 0, completePixmap); } -void WaLabel::setText(const QString &new_text) +void WaLabel::setText(const TQString &new_text) { int width = WaSkinModel::instance()->getMapGeometry(mapping).width(); diff --git a/noatun/modules/winskin/waLabel.h b/noatun/modules/winskin/waLabel.h index f1470902..ce7ad771 100644 --- a/noatun/modules/winskin/waLabel.h +++ b/noatun/modules/winskin/waLabel.h @@ -13,7 +13,7 @@ #ifndef __WABPS_H #define __WABPS_H -#include +#include #include "waWidget.h" class WaLabel : public WaWidget { @@ -23,14 +23,14 @@ class WaLabel : public WaWidget { WaLabel(int mapping); ~WaLabel(); - void setText(const QString &text); - QString text() const { return _text; } + void setText(const TQString &text); + TQString text() const { return _text; } private: - void paintEvent(QPaintEvent *); + void paintEvent(TQPaintEvent *); - QPixmap *completePixmap; - QString _text; + TQPixmap *completePixmap; + TQString _text; private slots: diff --git a/noatun/modules/winskin/waMain.cpp b/noatun/modules/winskin/waMain.cpp index a5bb7fdc..f66b8535 100644 --- a/noatun/modules/winskin/waMain.cpp +++ b/noatun/modules/winskin/waMain.cpp @@ -6,7 +6,7 @@ WaMain::WaMain() : WaWidget(_WA_MAPPING_MAIN) { WaMain::~WaMain() { } -void WaMain::paintEvent(QPaintEvent *) { +void WaMain::paintEvent(TQPaintEvent *) { paintPixmap(_WA_SKIN_MAIN); } diff --git a/noatun/modules/winskin/waMain.h b/noatun/modules/winskin/waMain.h index 06bcfe5d..fbc47a64 100644 --- a/noatun/modules/winskin/waMain.h +++ b/noatun/modules/winskin/waMain.h @@ -10,7 +10,7 @@ public: ~WaMain(); protected: - void paintEvent(QPaintEvent *); + void paintEvent(TQPaintEvent *); }; #endif diff --git a/noatun/modules/winskin/waRegion.cpp b/noatun/modules/winskin/waRegion.cpp index ab4d2e57..06f6851e 100644 --- a/noatun/modules/winskin/waRegion.cpp +++ b/noatun/modules/winskin/waRegion.cpp @@ -11,9 +11,9 @@ */ #include -#include -#include -#include +#include +#include +#include #include "waSkinModel.h" #include "waSkins.h" @@ -26,7 +26,7 @@ WaRegion *windowRegion = NULL; const char *pointListNames[] = {"PointList", "pointlist", "Pointlist", "pointList", "POINTLIST", 0}; const char *numPointsNames[] = {"NumPoints", "numpoints", "Numpoints", "numPoints", "NUMPOINTS", 0}; -WaRegion::WaRegion(QString filename) { +WaRegion::WaRegion(TQString filename) { // Load the region file, which happens to be in KConfig format KSimpleConfig regionFile(filename, true); @@ -35,19 +35,19 @@ WaRegion::WaRegion(QString filename) { shade_mask = 0; // Make the new bitmaps, default window size - window_mask = new QBitmap(WaSkinModel::instance()->getMapGeometry(_WA_MAPPING_MAIN).size(), true); - shade_mask = new QBitmap(WaSkinModel::instance()->getMapGeometry(_WA_MAPPING_TITLE).size(), true); + window_mask = new TQBitmap(WaSkinModel::instance()->getMapGeometry(_WA_MAPPING_MAIN).size(), true); + shade_mask = new TQBitmap(WaSkinModel::instance()->getMapGeometry(_WA_MAPPING_TITLE).size(), true); // Load the normal window mask data regionFile.setGroup("Normal"); - QValueList num_points; + TQValueList num_points; for (int x = 0;numPointsNames[x];x++) { if (regionFile.hasKey(numPointsNames[x])) num_points = parseList(regionFile.readEntry(numPointsNames[x])); } - QValueList point_list; + TQValueList point_list; for (int x = 0;pointListNames[x];x++) { if (regionFile.hasKey(pointListNames[x])) point_list = parseList(regionFile.readEntry(pointListNames[x])); @@ -71,27 +71,27 @@ WaRegion::~WaRegion() { delete shade_mask; } -void WaRegion::buildPixmap(const QValueList &num_points_list, const QValueList &points_list, QBitmap *dest) { +void WaRegion::buildPixmap(const TQValueList &num_points_list, const TQValueList &points_list, TQBitmap *dest) { if (!num_points_list.count()) { dest->fill(Qt::color1); return; } - QValueList::const_iterator points = points_list.begin(); + TQValueList::const_iterator points = points_list.begin(); - QPainter p(dest); + TQPainter p(dest); // Coordinates in REGION.TXT can go one pixel beyond the window size - QBitmap bm(dest->width()+1,dest->height()+1,true); - QPainter bmp(&bm); + TQBitmap bm(dest->width()+1,dest->height()+1,true); + TQPainter bmp(&bm); bmp.setBrush(Qt::color1); bmp.setPen(Qt::NoPen); // The polygon border itself should not be part of the visible window // Go over each "region" in the file - for (QValueList::const_iterator num_points = num_points_list.begin();num_points != num_points_list.end();num_points++) { + for (TQValueList::const_iterator num_points = num_points_list.begin();num_points != num_points_list.end();num_points++) { // Make a new point array - QPointArray point_array(*num_points); + TQPointArray point_array(*num_points); // Populate it for (int i = 0;i < *num_points;i++) { @@ -112,14 +112,14 @@ void WaRegion::buildPixmap(const QValueList &num_points_list, const QValueL // The winamp list format is absolutely insane, it will accept either // commas or whitespace as the delimiter. This function deals with // that. -QValueList WaRegion::parseList(const QString &list) const { - QValueList temp_list; +TQValueList WaRegion::parseList(const TQString &list) const { + TQValueList temp_list; if (list.isEmpty()) return temp_list; - QStringList open=QStringList::split(QRegExp("[,\\s]+"), list); - for (QStringList::Iterator i=open.begin(); i != open.end(); ++i) + TQStringList open=TQStringList::split(TQRegExp("[,\\s]+"), list); + for (TQStringList::Iterator i=open.begin(); i != open.end(); ++i) temp_list.append((*i).toInt()); return temp_list; diff --git a/noatun/modules/winskin/waRegion.h b/noatun/modules/winskin/waRegion.h index 853909c1..66c7c811 100644 --- a/noatun/modules/winskin/waRegion.h +++ b/noatun/modules/winskin/waRegion.h @@ -1,23 +1,23 @@ #ifndef WAREGION_H #define WAREGION_H -#include -#include +#include +#include class WaRegion { public: - WaRegion(QString filename); + WaRegion(TQString filename); ~WaRegion(); - const QBitmap *mainWindowMask() const { return window_mask; } - const QBitmap *mainWindowShadeMask() const { return shade_mask; } + const TQBitmap *mainWindowMask() const { return window_mask; } + const TQBitmap *mainWindowShadeMask() const { return shade_mask; } private: - QValueList parseList(const QString &list) const; - void buildPixmap(const QValueList &num_points, const QValueList &point_list, QBitmap *dest); + TQValueList parseList(const TQString &list) const; + void buildPixmap(const TQValueList &num_points, const TQValueList &point_list, TQBitmap *dest); - QBitmap *window_mask; - QBitmap *shade_mask; + TQBitmap *window_mask; + TQBitmap *shade_mask; }; extern WaRegion *windowRegion; diff --git a/noatun/modules/winskin/waSkin.cpp b/noatun/modules/winskin/waSkin.cpp index 7d95047d..d7b443ee 100644 --- a/noatun/modules/winskin/waSkin.cpp +++ b/noatun/modules/winskin/waSkin.cpp @@ -12,7 +12,7 @@ */ #include -#include +#include #include #include #include @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include #include @@ -57,7 +57,7 @@ WaSkin *_waskin_instance = NULL; -WaSkin::WaSkin() : QWidget(0, "NoatunWinampSkin"), UserInterface() +WaSkin::WaSkin() : TQWidget(0, "NoatunWinampSkin"), UserInterface() { mJumpPressed = false; mVolumePressed = false; @@ -83,22 +83,22 @@ WaSkin::WaSkin() : QWidget(0, "NoatunWinampSkin"), UserInterface() title_shaded = false; // These slots make Young Hickory love us - connect( napp, SIGNAL(hideYourself()), this, SLOT(hide()) ); - connect( napp, SIGNAL(showYourself()), this, SLOT(show()) ); - - connect(napp->player(), SIGNAL(playlistShown()), this, - SLOT(playlistShown())); - connect(napp->player(), SIGNAL(playlistHidden()), this, - SLOT(playlistHidden())); - connect(napp->player(), SIGNAL(loopTypeChange(int)), this, - SLOT(loopChange(int))); - connect(napp->player(), SIGNAL(newSong()), this, SLOT(newSong())); - - connect(napp->player(), SIGNAL(timeout()), this, SLOT(timetick())); + connect( napp, TQT_SIGNAL(hideYourself()), this, TQT_SLOT(hide()) ); + connect( napp, TQT_SIGNAL(showYourself()), this, TQT_SLOT(show()) ); + + connect(napp->player(), TQT_SIGNAL(playlistShown()), this, + TQT_SLOT(playlistShown())); + connect(napp->player(), TQT_SIGNAL(playlistHidden()), this, + TQT_SLOT(playlistHidden())); + connect(napp->player(), TQT_SIGNAL(loopTypeChange(int)), this, + TQT_SLOT(loopChange(int))); + connect(napp->player(), TQT_SIGNAL(newSong()), this, TQT_SLOT(newSong())); + + connect(napp->player(), TQT_SIGNAL(timeout()), this, TQT_SLOT(timetick())); KConfig *config=KGlobal::config(); config->setGroup("Winskin"); - QString skin = config->readEntry("CurrentSkin", WaSkin::defaultSkin()); + TQString skin = config->readEntry("CurrentSkin", WaSkin::defaultSkin()); loadSkin(skin); @@ -106,13 +106,13 @@ WaSkin::WaSkin() : QWidget(0, "NoatunWinampSkin"), UserInterface() setIcon(SmallIcon("noatun")); - QObject::connect(waTitleBar, SIGNAL(shaded()), this, SLOT(shadeEvent())); + TQObject::connect(waTitleBar, TQT_SIGNAL(shaded()), this, TQT_SLOT(shadeEvent())); // connect to players signals - so we can update our display if someone else // changes settings... - connect(napp->player(), SIGNAL(stopped()), this, SLOT(slotStopped())); - connect(napp->player(), SIGNAL(playing()), this, SLOT(slotPlaying())); - connect(napp->player(), SIGNAL(paused()), this, SLOT(slotPaused())); + connect(napp->player(), TQT_SIGNAL(stopped()), this, TQT_SLOT(slotStopped())); + connect(napp->player(), TQT_SIGNAL(playing()), this, TQT_SLOT(slotPlaying())); + connect(napp->player(), TQT_SIGNAL(paused()), this, TQT_SLOT(slotPaused())); napp->player()->handleButtons(); @@ -126,7 +126,7 @@ WaSkin::WaSkin() : QWidget(0, "NoatunWinampSkin"), UserInterface() newSong(); // HACK: We won't get focus events otherwise - setFocusPolicy(QWidget::ClickFocus); + setFocusPolicy(TQWidget::ClickFocus); show(); } @@ -138,7 +138,7 @@ WaSkin::~WaSkin() waSkinManager = 0L; } -void WaSkin::loadSkin(QString newSkinDir) +void WaSkin::loadSkin(TQString newSkinDir) { waSkinManager->loadSkin(newSkinDir); @@ -154,9 +154,9 @@ void WaSkin::loadSkin(QString newSkinDir) } } -QSize WaSkin::sizeHint() const +TQSize WaSkin::sizeHint() const { - QRect temp_rect; + TQRect temp_rect; temp_rect = waSkinModel->getGeometry(_WA_SKIN_MAIN); @@ -180,22 +180,22 @@ void WaSkin::createButtons() menu = new WaButton(_WA_MAPPING_TITLE_MENU); menu->setPixmapUp(_WA_SKIN_TITLE_MENU_NORM); menu->setPixmapDown(_WA_SKIN_TITLE_MENU_PRES); - connect(menu, SIGNAL(clicked()), this, SLOT(menuEvent())); + connect(menu, TQT_SIGNAL(clicked()), this, TQT_SLOT(menuEvent())); minimize = new WaButton(_WA_MAPPING_TITLE_MIN); minimize->setPixmapUp(_WA_SKIN_TITLE_MIN_NORM); minimize->setPixmapDown(_WA_SKIN_TITLE_MIN_PRES); - connect(minimize, SIGNAL(clicked()), this, SLOT(minimizeEvent())); + connect(minimize, TQT_SIGNAL(clicked()), this, TQT_SLOT(minimizeEvent())); titleshade = new WaButton(_WA_MAPPING_TITLE_SHADE); titleshade->setPixmapUp(_WA_SKIN_TITLE_SHADE_NORM); titleshade->setPixmapDown(_WA_SKIN_TITLE_SHADE_PRES); - connect(titleshade, SIGNAL(clicked()), this, SLOT(shadeEvent())); + connect(titleshade, TQT_SIGNAL(clicked()), this, TQT_SLOT(shadeEvent())); close = new WaButton(_WA_MAPPING_TITLE_CLOSE); close->setPixmapUp(_WA_SKIN_TITLE_CLOSE_NORM); close->setPixmapDown(_WA_SKIN_TITLE_CLOSE_PRES); - connect(close, SIGNAL(clicked()), this, SLOT(doClose())); + connect(close, TQT_SIGNAL(clicked()), this, TQT_SLOT(doClose())); shuffle->setTogglable(true); shuffle->show(); @@ -203,44 +203,44 @@ void WaSkin::createButtons() repeat->setTogglable(true); playlist->setTogglable(true); - connect(shuffle, SIGNAL(toggleEvent(bool)), - this, SLOT(shuffleClickedEvent(bool))); + connect(shuffle, TQT_SIGNAL(toggleEvent(bool)), + this, TQT_SLOT(shuffleClickedEvent(bool))); - connect(repeat, SIGNAL(toggleEvent(bool)), - this, SLOT(repeatClickedEvent(bool))); + connect(repeat, TQT_SIGNAL(toggleEvent(bool)), + this, TQT_SLOT(repeatClickedEvent(bool))); - connect(playlist, SIGNAL(toggleEvent(bool)), - this, SLOT(playlistClickedEvent(bool))); + connect(playlist, TQT_SIGNAL(toggleEvent(bool)), + this, TQT_SLOT(playlistClickedEvent(bool))); - connect(eq, SIGNAL(clicked()), - this, SLOT(eqClickedEvent())); + connect(eq, TQT_SIGNAL(clicked()), + this, TQT_SLOT(eqClickedEvent())); prev->setPixmapUp(_WA_SKIN_CBUTTONS_PREV_NORM); prev->setPixmapDown(_WA_SKIN_CBUTTONS_PREV_PRES); - connect(prev, SIGNAL(clicked()), napp->player(), SLOT(back())); + connect(prev, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(back())); play->setPixmapUp(_WA_SKIN_CBUTTONS_PLAY_NORM); play->setPixmapDown(_WA_SKIN_CBUTTONS_PLAY_PRES); - connect(play, SIGNAL(clicked()), this, SLOT(playCurrentEvent())); + connect(play, TQT_SIGNAL(clicked()), this, TQT_SLOT(playCurrentEvent())); pause->setPixmapUp(_WA_SKIN_CBUTTONS_PAUSE_NORM); pause->setPixmapDown(_WA_SKIN_CBUTTONS_PAUSE_PRES); - connect(pause, SIGNAL(clicked()), this, SLOT(playPauseEvent())); + connect(pause, TQT_SIGNAL(clicked()), this, TQT_SLOT(playPauseEvent())); stop->setPixmapUp(_WA_SKIN_CBUTTONS_STOP_NORM); stop->setPixmapDown(_WA_SKIN_CBUTTONS_STOP_PRES); - connect(stop, SIGNAL(clicked()), napp->player(), SLOT(stop())); + connect(stop, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(stop())); next->setPixmapUp(_WA_SKIN_CBUTTONS_NEXT_NORM); next->setPixmapDown(_WA_SKIN_CBUTTONS_NEXT_PRES); - connect(next, SIGNAL(clicked()), napp->player(), SLOT(forward())); + connect(next, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(forward())); eject->setPixmapUp(_WA_SKIN_CBUTTONS_EJECT_NORM); eject->setPixmapDown(_WA_SKIN_CBUTTONS_EJECT_PRESS); - connect(eject, SIGNAL(clicked()), napp, SLOT(fileOpen())); + connect(eject, TQT_SIGNAL(clicked()), napp, TQT_SLOT(fileOpen())); shuffle->setPixmapUp(_WA_SKIN_SHUFREP_SHUFFLE_NOT_SET_NORM); shuffle->setPixmapDown(_WA_SKIN_SHUFREP_SHUFFLE_NOT_SET_PRES); @@ -280,25 +280,25 @@ void WaSkin::createHighLevelElements() waVolumeSlider = new WaVolumeSlider(); waVolumeSlider->buildGui(); - connect(waVolumeSlider, SIGNAL(volumeSetValue(int)), - this, SLOT(volumeSetValue(int))); - connect(waVolumeSlider, SIGNAL(sliderPressed()), - this, SLOT(volumeSliderPressed())); - connect(waVolumeSlider, SIGNAL(sliderReleased()), - this, SLOT(volumeSliderReleased())); + connect(waVolumeSlider, TQT_SIGNAL(volumeSetValue(int)), + this, TQT_SLOT(volumeSetValue(int))); + connect(waVolumeSlider, TQT_SIGNAL(sliderPressed()), + this, TQT_SLOT(volumeSliderPressed())); + connect(waVolumeSlider, TQT_SIGNAL(sliderReleased()), + this, TQT_SLOT(volumeSliderReleased())); waBalanceSlider = new WaBalanceSlider(); waBalanceSlider->buildGui(); - connect(waBalanceSlider, SIGNAL(balanceSetValue(int)), - this, SLOT(balanceSetValue(int))); - connect(waBalanceSlider, SIGNAL(sliderPressed()), - this, SLOT(balanceSliderPressed())); - connect(waBalanceSlider, SIGNAL(sliderReleased()), - this, SLOT(balanceSliderReleased())); + connect(waBalanceSlider, TQT_SIGNAL(balanceSetValue(int)), + this, TQT_SLOT(balanceSetValue(int))); + connect(waBalanceSlider, TQT_SIGNAL(sliderPressed()), + this, TQT_SLOT(balanceSliderPressed())); + connect(waBalanceSlider, TQT_SIGNAL(sliderReleased()), + this, TQT_SLOT(balanceSliderReleased())); waDigit = new WaDigit(); - connect(waDigit, SIGNAL(digitsClicked()), this, SLOT(digitsClicked())); + connect(waDigit, TQT_SIGNAL(digitsClicked()), this, TQT_SLOT(digitsClicked())); waBPS = new WaLabel(_WA_MAPPING_BPS); waFreq = new WaLabel(_WA_MAPPING_FREQ); @@ -310,13 +310,13 @@ void WaSkin::createHighLevelElements() waStereo = new WaIndicator(_WA_MAPPING_MONOSTER_STEREO, _WA_SKIN_MONOSTER_STEREO_TRUE, _WA_SKIN_MONOSTER_STEREO_FALSE); waMono = new WaIndicator(_WA_MAPPING_MONOSTER_MONO, _WA_SKIN_MONOSTER_MONO_TRUE, _WA_SKIN_MONOSTER_MONO_FALSE); - connect(waJumpSlider, SIGNAL(jump(int)), this, SLOT(jump(int))); - connect(waJumpSlider, SIGNAL(sliderPressed()), - this, SLOT(jumpSliderPressed())); - connect(waJumpSlider, SIGNAL(sliderReleased()), - this, SLOT(jumpSliderReleased())); - connect(waJumpSlider, SIGNAL(valueChanged(int)), - this, SLOT(jumpValueChanged(int))); + connect(waJumpSlider, TQT_SIGNAL(jump(int)), this, TQT_SLOT(jump(int))); + connect(waJumpSlider, TQT_SIGNAL(sliderPressed()), + this, TQT_SLOT(jumpSliderPressed())); + connect(waJumpSlider, TQT_SIGNAL(sliderReleased()), + this, TQT_SLOT(jumpSliderReleased())); + connect(waJumpSlider, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(jumpValueChanged(int))); } @@ -352,7 +352,7 @@ void WaSkin::unshade() { title_shaded = false; } -void WaSkin::focusOutEvent( QFocusEvent * ) { +void WaSkin::focusOutEvent( TQFocusEvent * ) { menu->setPixmapUp(_WA_SKIN_TITLE_MENU_INACTIVE); menu->update(); @@ -368,7 +368,7 @@ void WaSkin::focusOutEvent( QFocusEvent * ) { waTitleBar->setState(false); } -void WaSkin::focusInEvent( QFocusEvent * ) { +void WaSkin::focusInEvent( TQFocusEvent * ) { menu->setPixmapUp(_WA_SKIN_TITLE_MENU_NORM); menu->update(); @@ -384,7 +384,7 @@ void WaSkin::focusInEvent( QFocusEvent * ) { waTitleBar->setState(true); } -void WaSkin::wheelEvent(QWheelEvent *e) { +void WaSkin::wheelEvent(TQWheelEvent *e) { // Get the current volume int newVolume = napp->player()->volume(); @@ -448,7 +448,7 @@ void WaSkin::jumpSliderReleased() void WaSkin::jumpValueChanged(int val) { if (mJumpPressed && !napp->player()->isStopped()) { - QString timeStr = i18n("Seek to: %1/%2 (%3%)"). + TQString timeStr = i18n("Seek to: %1/%2 (%3%)"). arg(getTimeString(val * 1000)). arg(getTimeString(napp->player()->getLength())). arg((val * 1000 * 100) / napp->player()->getLength()); @@ -456,15 +456,15 @@ void WaSkin::jumpValueChanged(int val) } } -QString WaSkin::getTitleString() { +TQString WaSkin::getTitleString() { int length; - QString title = ""; + TQString title = ""; if (!napp->playlist()->current()) { title = "Noatun "; - title += QString::number(NOATUN_MAJOR) + "."; - title += QString::number(NOATUN_MINOR) + "."; - title += QString::number(NOATUN_PATCHLEVEL); + title += TQString::number(NOATUN_MAJOR) + "."; + title += TQString::number(NOATUN_MINOR) + "."; + title += TQString::number(NOATUN_PATCHLEVEL); } else { length = napp->playlist()->current().length(); @@ -483,9 +483,9 @@ QString WaSkin::getTitleString() { return title; } -QString WaSkin::getTimeString(int milliseconds, bool truncate) { +TQString WaSkin::getTimeString(int milliseconds, bool truncate) { int seconds = abs(milliseconds / 1000); - QString ret = ""; + TQString ret = ""; // Do we need to convert to hours:minutes instead of minutes:seconds? if (truncate && (abs(seconds) >= (100 * 60))) @@ -498,7 +498,7 @@ QString WaSkin::getTimeString(int milliseconds, bool truncate) { } void WaSkin::menuEvent() { - NoatunStdAction::ContextMenu::showContextMenu(mapToGlobal(QPoint(0, 14))); + NoatunStdAction::ContextMenu::showContextMenu(mapToGlobal(TQPoint(0, 14))); } void WaSkin::minimizeEvent() { @@ -518,16 +518,16 @@ void WaSkin::doUnload() { } void WaSkin::doClose() { - QTimer::singleShot(0, this, SLOT(doUnload())); + TQTimer::singleShot(0, this, TQT_SLOT(doUnload())); } -void WaSkin::dragEnterEvent(QDragEnterEvent * event) +void WaSkin::dragEnterEvent(TQDragEnterEvent * event) { // accept uri drops only event->accept(KURLDrag::canDecode(event)); } -void WaSkin::dropEvent(QDropEvent * event) +void WaSkin::dropEvent(TQDropEvent * event) { KURL::List uri; if (KURLDrag::decode(event, uri)) @@ -690,12 +690,12 @@ void WaSkin::slotPlaying() if (!info.bps()) waBPS->setText(""); else - waBPS->setText(QString::number(info.bps())); + waBPS->setText(TQString::number(info.bps())); if (!info.KHz()) waFreq->setText(""); else - waFreq->setText(QString::number(info.KHz() / 1000)); + waFreq->setText(TQString::number(info.KHz() / 1000)); setChannels(info.channelCount()); guiSpectrumAnalyser->resumeVisualization(); @@ -736,7 +736,7 @@ void WaSkin::slotPaused() waStatus->setStatus(STATUS_PAUSED); } -void WaSkin::keyPressEvent(QKeyEvent *e) { +void WaSkin::keyPressEvent(TQKeyEvent *e) { switch(e->key()) { case Key_Up: napp->player()->setVolume(napp->player()->volume() + 5); @@ -793,7 +793,7 @@ void WaSkin::keyPressEvent(QKeyEvent *e) { } } -QString WaSkin::defaultSkin() { +TQString WaSkin::defaultSkin() { return "Winamp"; } diff --git a/noatun/modules/winskin/waSkin.h b/noatun/modules/winskin/waSkin.h index 7a2db9e1..947ce81e 100644 --- a/noatun/modules/winskin/waSkin.h +++ b/noatun/modules/winskin/waSkin.h @@ -19,7 +19,7 @@ #include #include #include -#include +#include // Use forward declarations so we compile in a finite time class WaSkinModel; @@ -44,7 +44,7 @@ class GuiSpectrumAnalyser; class WaSkin; extern WaSkin *_waskin_instance; -class WaSkin : public QWidget, public UserInterface { +class WaSkin : public TQWidget, public UserInterface { Q_OBJECT NOATUNPLUGIND WaSkinModel *waSkinModel; @@ -56,12 +56,12 @@ class WaSkin : public QWidget, public UserInterface { int getSkinId(); - void loadSkin(QString skinDir); + void loadSkin(TQString skinDir); void setChannels(int val); - QSize sizeHint() const; + TQSize sizeHint() const; - static QString defaultSkin(); + static TQString defaultSkin(); static WaSkin *instance() { return _waskin_instance; } public slots: @@ -117,21 +117,21 @@ class WaSkin : public QWidget, public UserInterface { void createButtons(); void createHighLevelElements(); - void keyPressEvent(QKeyEvent *); + void keyPressEvent(TQKeyEvent *); void shade(); void unshade(); - QString getTitleString(); - QString getTimeString(int milliseconds, bool truncate = false); + TQString getTitleString(); + TQString getTimeString(int milliseconds, bool truncate = false); - void focusOutEvent ( QFocusEvent * ); - void focusInEvent ( QFocusEvent * ); + void focusOutEvent ( TQFocusEvent * ); + void focusInEvent ( TQFocusEvent * ); - void dragEnterEvent(QDragEnterEvent * event); - void dropEvent(QDropEvent * event); + void dragEnterEvent(TQDragEnterEvent * event); + void dropEvent(TQDropEvent * event); - void wheelEvent(QWheelEvent *e); + void wheelEvent(TQWheelEvent *e); WaButton *prev; WaButton *play; diff --git a/noatun/modules/winskin/waSkinManager.cpp b/noatun/modules/winskin/waSkinManager.cpp index 5cde117b..cb5b0e2a 100644 --- a/noatun/modules/winskin/waSkinManager.cpp +++ b/noatun/modules/winskin/waSkinManager.cpp @@ -1,8 +1,8 @@ #include -#include -#include +#include +#include #include -#include +#include #include #include #include @@ -19,21 +19,21 @@ WaSkinManager::WaSkinManager() : DCOPObject("WaSkinManager") { WaSkinManager::~WaSkinManager() { } -QStringList WaSkinManager::availableSkins() { - QStringList skinDirs = KGlobal::dirs()->findDirs("data", "noatun/skins/winamp"); - QStringList skin_list; +TQStringList WaSkinManager::availableSkins() { + TQStringList skinDirs = KGlobal::dirs()->findDirs("data", "noatun/skins/winamp"); + TQStringList skin_list; // This loop adds them all to our skin list for(unsigned int x = 0;x < skinDirs.count();x++) { - QDir skinQDir(skinDirs[x]); + TQDir skinQDir(skinDirs[x]); // We only want directories, although there shouldn't be anything else - skinQDir.setFilter( QDir::Dirs ); + skinQDir.setFilter( TQDir::Dirs ); // I guess name is as good as any - skinQDir.setSorting( QDir::Name ); + skinQDir.setSorting( TQDir::Name ); for (unsigned int y = 0;y < skinQDir.count();y++) { - QStringList skins = skinQDir.entryList(QDir::Dirs, QDir::Name); + TQStringList skins = skinQDir.entryList(TQDir::Dirs, TQDir::Name); // We really don't care for '.' and '..' if (skinQDir[y][0] != (char)'.') { @@ -46,16 +46,16 @@ QStringList WaSkinManager::availableSkins() { return skin_list; } -QString WaSkinManager::currentSkin() { +TQString WaSkinManager::currentSkin() { return mCurrentSkin; } -QString WaSkinManager::defaultSkin() { +TQString WaSkinManager::defaultSkin() { return "Winamp"; } -bool WaSkinManager::loadSkin(QString skinName) { - QStringList skins = KGlobal::dirs()->findDirs("data", "noatun/skins/winamp/" + skinName); +bool WaSkinManager::loadSkin(TQString skinName) { + TQStringList skins = KGlobal::dirs()->findDirs("data", "noatun/skins/winamp/" + skinName); if (!skins.count()) mCurrentSkin = defaultSkin(); @@ -65,15 +65,15 @@ bool WaSkinManager::loadSkin(QString skinName) { return _waskinmodel_instance->load(skins[0]); } -bool WaSkinManager::installSkin(QString _url) { - QString location = KGlobal::dirs()->saveLocation("data", "noatun/skins/winamp"); +bool WaSkinManager::installSkin(TQString _url) { + TQString location = KGlobal::dirs()->saveLocation("data", "noatun/skins/winamp"); KURL url(_url); - QString mimetype = KMimeType::findByURL(_url)->name(); + TQString mimetype = KMimeType::findByURL(_url)->name(); if (mimetype == "inode/directory") { KIO::Job *job = KIO::copy(url, location, !url.isLocalFile()); - connect(job, SIGNAL(result(KIO::Job *)), this, SIGNAL(updateSkinList())); + connect(job, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SIGNAL(updateSkinList())); return true; } else if ((mimetype == "interface/x-winamp-skin") || (mimetype == "application/x-zip")) @@ -81,10 +81,10 @@ bool WaSkinManager::installSkin(QString _url) { if (!url.isLocalFile()) return false; - QString base_path; - base_path = location + "/" + QFileInfo(url.path()).baseName().replace(QRegExp("_"), " "); + TQString base_path; + base_path = location + "/" + TQFileInfo(url.path()).baseName().replace(TQRegExp("_"), " "); KIO::Job *job = KIO::copy("zip:" + url.path(), base_path); - connect(job, SIGNAL(result(KIO::Job *)), this, SIGNAL(updateSkinList())); + connect(job, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SIGNAL(updateSkinList())); return true; } @@ -92,30 +92,30 @@ bool WaSkinManager::installSkin(QString _url) { return false; } -bool WaSkinManager::removeSkin(QString skinName) { +bool WaSkinManager::removeSkin(TQString skinName) { if (!skinRemovable(skinName)) return false; - QStringList skins = KGlobal::dirs()->findDirs("data", "noatun/skins/winamp/" + skinName); + TQStringList skins = KGlobal::dirs()->findDirs("data", "noatun/skins/winamp/" + skinName); KIO::Job *job = KIO::del(KURL(skins[0]), false, false); - connect(job, SIGNAL(result(KIO::Job *)), this, SIGNAL(updateSkinList())); + connect(job, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SIGNAL(updateSkinList())); return true; } -bool WaSkinManager::skinRemovable(QString skinName) { - QStringList skins = KGlobal::dirs()->findDirs("data", "noatun/skins/winamp/" + skinName); +bool WaSkinManager::skinRemovable(TQString skinName) { + TQStringList skins = KGlobal::dirs()->findDirs("data", "noatun/skins/winamp/" + skinName); if (!skins.count()) return false; - QFileInfo info(skins[0]); + TQFileInfo info(skins[0]); return info.isWritable(); } -QStringList WaSkinManager::skinMimeTypes() { - QStringList temp; +TQStringList WaSkinManager::skinMimeTypes() { + TQStringList temp; temp.append("interface/x-winamp-skin"); temp.append("application/x-zip"); diff --git a/noatun/modules/winskin/waSkinManager.h b/noatun/modules/winskin/waSkinManager.h index 17b21daf..360826b1 100644 --- a/noatun/modules/winskin/waSkinManager.h +++ b/noatun/modules/winskin/waSkinManager.h @@ -2,12 +2,12 @@ #define _WASKINMANAGER_H #include -#include -#include -#include -#include +#include +#include +#include +#include -class WaSkinManager : public QObject, public DCOPObject { +class WaSkinManager : public TQObject, public DCOPObject { Q_OBJECT K_DCOP @@ -16,24 +16,24 @@ public: ~WaSkinManager(); k_dcop: - QStringList availableSkins(); - QString currentSkin(); - bool loadSkin(QString skinName); + TQStringList availableSkins(); + TQString currentSkin(); + bool loadSkin(TQString skinName); - QString defaultSkin(); + TQString defaultSkin(); - bool installSkin(QString url); + bool installSkin(TQString url); - bool skinRemovable(QString skinName); - bool removeSkin(QString skinName); + bool skinRemovable(TQString skinName); + bool removeSkin(TQString skinName); - QStringList skinMimeTypes(); + TQStringList skinMimeTypes(); signals: void updateSkinList(); private: - QString mCurrentSkin; + TQString mCurrentSkin; }; #endif diff --git a/noatun/modules/winskin/waSkinModel.cpp b/noatun/modules/winskin/waSkinModel.cpp index ff53b4e6..bbe20a39 100644 --- a/noatun/modules/winskin/waSkinModel.cpp +++ b/noatun/modules/winskin/waSkinModel.cpp @@ -13,9 +13,9 @@ #include -#include -#include -#include +#include +#include +#include #include #include @@ -39,7 +39,7 @@ int digit_height; struct WaPixmapEntry { const char *filename; - QPixmap *pixmap; + TQPixmap *pixmap; }; WaPixmapEntry waPixmapEntries[11] = { @@ -74,15 +74,15 @@ WaSkinModel::~WaSkinModel() delete colorScheme; } -bool WaSkinModel::load(QString skinDir) +bool WaSkinModel::load(TQString skinDir) { bool success = true; - QDir dir(skinDir); + TQDir dir(skinDir); if (findFile(dir, "main.bmp").isEmpty()) { // Ack, our skin dir doesn't exist, fall back to the default - dir = QDir(KGlobal::dirs()->findDirs("data", "noatun/skins/winamp/" + WaSkin::defaultSkin())[0]); + dir = TQDir(KGlobal::dirs()->findDirs("data", "noatun/skins/winamp/" + WaSkin::defaultSkin())[0]); success = false; } @@ -105,27 +105,27 @@ bool WaSkinModel::load(QString skinDir) // Filename -must- be lowercase, which is an nice optimization, since // this is a private API, and all our filenames are internally lowercase // anyway -QString WaSkinModel::findFile(const QDir &dir, const QString &filename) { - QFileInfo fileInfo; - QString ret = ""; +TQString WaSkinModel::findFile(const TQDir &dir, const TQString &filename) { + TQFileInfo fileInfo; + TQString ret = ""; - QStringList strList = dir.entryList(); + TQStringList strList = dir.entryList(); - for (QStringList::iterator file = strList.begin(); file != strList.end(); file++) { - QFileInfo fileInfo(*file); + for (TQStringList::iterator file = strList.begin(); file != strList.end(); file++) { + TQFileInfo fileInfo(*file); if (fileInfo.isDir()) continue; if (fileInfo.filePath().lower() == filename) - return dir.absPath() + "/" + QString(fileInfo.filePath()); + return dir.absPath() + "/" + TQString(fileInfo.filePath()); } return ""; } -void WaSkinModel::loadColors(const QDir &dir) { - QString colorFile = findFile(dir, "viscolor.txt"); +void WaSkinModel::loadColors(const TQDir &dir) { + TQString colorFile = findFile(dir, "viscolor.txt"); if (colorScheme) { delete colorScheme; @@ -134,8 +134,8 @@ void WaSkinModel::loadColors(const QDir &dir) { colorScheme = new WaColor(colorFile); } -void WaSkinModel::loadRegion(const QDir &dir) { - QString regionFile = findFile(dir, "region.txt"); +void WaSkinModel::loadRegion(const TQDir &dir) { + TQString regionFile = findFile(dir, "region.txt"); if (windowRegion) { delete windowRegion; @@ -145,12 +145,12 @@ void WaSkinModel::loadRegion(const QDir &dir) { windowRegion = new WaRegion(regionFile); } -int WaSkinModel::getPixmap(const QDir &dir, QString fname, - QPixmap *target) +int WaSkinModel::getPixmap(const TQDir &dir, TQString fname, + TQPixmap *target) { - QFileInfo fileInfo; - QStringList strList = dir.entryList(); - QString abspath; + TQFileInfo fileInfo; + TQStringList strList = dir.entryList(); + TQString abspath; abspath = findFile(dir, fname); @@ -161,46 +161,46 @@ int WaSkinModel::getPixmap(const QDir &dir, QString fname, // now the filename mapping 1.8x -> 2.0 if (fname == "volume.bmp") - return WaSkinModel::getPixmap(dir, QString("volbar.bmp"), target); + return WaSkinModel::getPixmap(dir, TQString("volbar.bmp"), target); if (fname == "numbers.bmp") - return WaSkinModel::getPixmap(dir, QString("nums_ex.bmp"), target); + return WaSkinModel::getPixmap(dir, TQString("nums_ex.bmp"), target); // Even 2.x themes can omit BALANCE, in which case we use VOLUME if (fname == "balance.bmp") - return WaSkinModel::getPixmap(dir, QString("volume.bmp"), target); + return WaSkinModel::getPixmap(dir, TQString("volume.bmp"), target); return false; } -QRect WaSkinModel::getGeometry(int id) { +TQRect WaSkinModel::getGeometry(int id) { if ( (id < 0) || (id >= _WA_SKIN_ENTRIES) ) { kdDebug() << "Array index out of range. WaSkinModel::getGeometry"<= _WA_MAPPING_ENTRIES) ) { kdDebug() << "Array index out of range. WaSkinModel::getMapGeometry"< -#include -#include +#include +#include +#include #include "waSkins.h" @@ -25,25 +25,25 @@ class QChar; class WaSkinModel; extern WaSkinModel *_waskinmodel_instance; -class WaSkinModel : public QObject { +class WaSkinModel : public TQObject { Q_OBJECT public: WaSkinModel(); ~WaSkinModel(); - void getDigit(char number, QPaintDevice *dest, int x, int y); - void getText(char text, QPaintDevice *dest, int x, int y); + void getDigit(char number, TQPaintDevice *dest, int x, int y); + void getText(char text, TQPaintDevice *dest, int x, int y); - void bltTo(int id, QPaintDevice *dest, int x, int y); - void bltTo(int id, QPaintDevice *dest, int x, int y, int argument); + void bltTo(int id, TQPaintDevice *dest, int x, int y); + void bltTo(int id, TQPaintDevice *dest, int x, int y, int argument); - void paintBackgroundTo(int mapping, QPaintDevice *dest, int x, int y); + void paintBackgroundTo(int mapping, TQPaintDevice *dest, int x, int y); - QRect getGeometry(int id); - QRect getMapGeometry(int id); + TQRect getGeometry(int id); + TQRect getMapGeometry(int id); - bool load(QString skinDir); + bool load(TQString skinDir); void setSkinModel(skin_models new_model); static WaSkinModel *instance() { return _waskinmodel_instance; } @@ -51,12 +51,12 @@ class WaSkinModel : public QObject { private: void resetSkinModel(); - QString findFile(const QDir &dir, const QString &filename); - QChar deaccent(QChar input); + TQString findFile(const TQDir &dir, const TQString &filename); + TQChar deaccent(TQChar input); - int getPixmap(const QDir &dir, QString fname, QPixmap * target); - void loadColors(const QDir &dir); - void loadRegion(const QDir &dir); + int getPixmap(const TQDir &dir, TQString fname, TQPixmap * target); + void loadColors(const TQDir &dir); + void loadRegion(const TQDir &dir); signals: void skinChanged(); diff --git a/noatun/modules/winskin/waSlider.cpp b/noatun/modules/winskin/waSlider.cpp index 4fff1b0d..99e52402 100644 --- a/noatun/modules/winskin/waSlider.cpp +++ b/noatun/modules/winskin/waSlider.cpp @@ -44,7 +44,7 @@ void WaSlider::setPixmapSliderBar(int pixId) update(); } -void WaSlider::paintEvent(QPaintEvent *) +void WaSlider::paintEvent(TQPaintEvent *) { // POSBAR.BMP does not have full height in all Winamp skins // Paint background before painting slider to be on the safe side @@ -58,7 +58,7 @@ void WaSlider::paintEvent(QPaintEvent *) } -void WaSlider::mouseMoveEvent(QMouseEvent * e) +void WaSlider::mouseMoveEvent(TQMouseEvent * e) { if (lDragging == false) { WaWidget::mouseMoveEvent(e); @@ -70,7 +70,7 @@ void WaSlider::mouseMoveEvent(QMouseEvent * e) if (newX < 0) newX = 0; - QSize size = sizeHint(); + TQSize size = sizeHint(); int maxX = size.width() - slider_width; @@ -101,7 +101,7 @@ void WaSlider::updateSliderPos(int value) update(); } -void WaSlider::mousePressEvent(QMouseEvent *e) { +void WaSlider::mousePressEvent(TQMouseEvent *e) { if (e->button() != LeftButton && e->button() != MidButton) { WaWidget::mousePressEvent(e); return; @@ -127,7 +127,7 @@ void WaSlider::mousePressEvent(QMouseEvent *e) { emit(sliderPressed()); } -void WaSlider::mouseReleaseEvent(QMouseEvent *e) +void WaSlider::mouseReleaseEvent(TQMouseEvent *e) { if (!lDragging) { WaWidget::mouseReleaseEvent(e); @@ -143,7 +143,7 @@ void WaSlider::mouseReleaseEvent(QMouseEvent *e) int WaSlider::pixel2Value(int xpos) { - QSize size = sizeHint(); + TQSize size = sizeHint(); int min = abs(minValue); int max = abs(maxValue); @@ -158,7 +158,7 @@ int WaSlider::pixel2Value(int xpos) int WaSlider::value2Pixel(int value) { - QSize size = sizeHint(); + TQSize size = sizeHint(); float min = (float) minValue; float max = (float) maxValue; float fmin = min; diff --git a/noatun/modules/winskin/waSlider.h b/noatun/modules/winskin/waSlider.h index 0003afd2..47630a6c 100644 --- a/noatun/modules/winskin/waSlider.h +++ b/noatun/modules/winskin/waSlider.h @@ -16,7 +16,7 @@ #ifndef __WASLIDER_H #define __WASLIDER_H -#include +#include #include "waWidget.h" #include "waButton.h" @@ -44,7 +44,7 @@ class WaSlider : public WaWidget { void setPixmapSliderBar(int pixId); private: - void paintEvent(QPaintEvent *); + void paintEvent(TQPaintEvent *); int pixel2Value(int xpos); int value2Pixel(int value); @@ -60,16 +60,16 @@ class WaSlider : public WaWidget { int sliderBarMapId; bool lDragging; - QPoint pressPoint; + TQPoint pressPoint; int currentValue; int minValue; int maxValue; - void mousePressEvent(QMouseEvent *e); - void mouseMoveEvent(QMouseEvent *e); - void mouseReleaseEvent(QMouseEvent *e); + void mousePressEvent(TQMouseEvent *e); + void mouseMoveEvent(TQMouseEvent *e); + void mouseReleaseEvent(TQMouseEvent *e); private slots: void updateSliderPos(int value); diff --git a/noatun/modules/winskin/waStatus.cpp b/noatun/modules/winskin/waStatus.cpp index e028b7f0..861e8677 100644 --- a/noatun/modules/winskin/waStatus.cpp +++ b/noatun/modules/winskin/waStatus.cpp @@ -23,7 +23,7 @@ WaStatus::~WaStatus() { } -void WaStatus::paintEvent(QPaintEvent *) +void WaStatus::paintEvent(TQPaintEvent *) { if (_status == STATUS_PLAYING) { paintPixmap(_WA_SKIN_PLAYPAUS_WORK_INDICATOR); diff --git a/noatun/modules/winskin/waStatus.h b/noatun/modules/winskin/waStatus.h index a3fe1bc8..e67054df 100644 --- a/noatun/modules/winskin/waStatus.h +++ b/noatun/modules/winskin/waStatus.h @@ -16,7 +16,7 @@ #ifndef __WASTATUS_H #define __WASTATUS_H -#include +#include #include "waWidget.h" @@ -33,7 +33,7 @@ class WaStatus : public WaWidget { status_enum status() const { return _status; } private: - void paintEvent(QPaintEvent * paintEvent); + void paintEvent(TQPaintEvent * paintEvent); status_enum _status; }; diff --git a/noatun/modules/winskin/waTitleBar.cpp b/noatun/modules/winskin/waTitleBar.cpp index 82b603f5..bba7386e 100644 --- a/noatun/modules/winskin/waTitleBar.cpp +++ b/noatun/modules/winskin/waTitleBar.cpp @@ -12,8 +12,8 @@ */ -#include -#include +#include +#include #include "waTitleBar.h" #include "waSkinModel.h" @@ -32,7 +32,7 @@ WaTitleBar::~WaTitleBar() { } -void WaTitleBar::mousePressEvent(QMouseEvent * e) +void WaTitleBar::mousePressEvent(TQMouseEvent * e) { if (e->button() != RightButton) { if (!moving) { @@ -49,11 +49,11 @@ void WaTitleBar::mousePressEvent(QMouseEvent * e) WaWidget::mousePressEvent(e); } -void WaTitleBar::mouseDoubleClickEvent(QMouseEvent *) { +void WaTitleBar::mouseDoubleClickEvent(TQMouseEvent *) { emit(shaded()); } -void WaTitleBar::mouseReleaseEvent(QMouseEvent * e) +void WaTitleBar::mouseReleaseEvent(TQMouseEvent * e) { if (e->button() != RightButton) { moving = false; @@ -64,9 +64,9 @@ void WaTitleBar::mouseReleaseEvent(QMouseEvent * e) WaWidget::mouseReleaseEvent(e); } -void WaTitleBar::mouseMoveEvent(QMouseEvent * e) +void WaTitleBar::mouseMoveEvent(TQMouseEvent * e) { - QPoint diff = e->globalPos() - mLastPos; + TQPoint diff = e->globalPos() - mLastPos; if (abs(diff.x()) > 10 || abs(diff.y()) > 10) { // Moving starts only, when passing a drag border moving = true; diff --git a/noatun/modules/winskin/waTitleBar.h b/noatun/modules/winskin/waTitleBar.h index 4e001394..30bfe29a 100644 --- a/noatun/modules/winskin/waTitleBar.h +++ b/noatun/modules/winskin/waTitleBar.h @@ -16,7 +16,7 @@ #ifndef __WATITLEBAR_H #define __WATITLEBAR_H -#include +#include #include "waIndicator.h" @@ -35,14 +35,14 @@ class WaTitleBar : public WaIndicator { ~WaTitleBar(); private: - void mouseDoubleClickEvent (QMouseEvent * e); - void mousePressEvent(QMouseEvent * e); - void mouseReleaseEvent(QMouseEvent * e); - void mouseMoveEvent(QMouseEvent * e); + void mouseDoubleClickEvent (TQMouseEvent * e); + void mousePressEvent(TQMouseEvent * e); + void mouseReleaseEvent(TQMouseEvent * e); + void mouseMoveEvent(TQMouseEvent * e); bool moving; - QPoint mLastPos; - QPoint mDragStart; + TQPoint mLastPos; + TQPoint mDragStart; signals: void shaded(); diff --git a/noatun/modules/winskin/waVolumeSlider.cpp b/noatun/modules/winskin/waVolumeSlider.cpp index d0a934d7..f61e22f1 100644 --- a/noatun/modules/winskin/waVolumeSlider.cpp +++ b/noatun/modules/winskin/waVolumeSlider.cpp @@ -33,10 +33,10 @@ void WaVolumeSlider::buildGui() ws->setPixmapSliderButtonDown(_WA_SKIN_VOLUME_SLIDER_PRES); ws->setPixmapSliderBar(_WA_SKIN_VOLUME_BAR); - connect(ws, SIGNAL(valueChanged(int)), this, - SIGNAL(volumeSetValue(int))); - connect(ws, SIGNAL(sliderPressed()), SIGNAL(sliderPressed())); - connect(ws, SIGNAL(sliderReleased()), SIGNAL(sliderReleased())); + connect(ws, TQT_SIGNAL(valueChanged(int)), this, + TQT_SIGNAL(volumeSetValue(int))); + connect(ws, TQT_SIGNAL(sliderPressed()), TQT_SIGNAL(sliderPressed())); + connect(ws, TQT_SIGNAL(sliderReleased()), TQT_SIGNAL(sliderReleased())); } void WaVolumeSlider::setVolumeValue(int val) diff --git a/noatun/modules/winskin/waWidget.cpp b/noatun/modules/winskin/waWidget.cpp index ffe2d3b4..a93537b9 100644 --- a/noatun/modules/winskin/waWidget.cpp +++ b/noatun/modules/winskin/waWidget.cpp @@ -3,10 +3,10 @@ #include "noatun/stdaction.h" #include "waSkin.h" -WaWidget::WaWidget(int _mapping) : QWidget(WaSkin::instance()) { +WaWidget::WaWidget(int _mapping) : TQWidget(WaSkin::instance()) { mapping = _mapping; setBackgroundMode(NoBackground); - connect (WaSkinModel::instance(), SIGNAL(skinChanged()), this, SLOT(skinChanged())); + connect (WaSkinModel::instance(), TQT_SIGNAL(skinChanged()), this, TQT_SLOT(skinChanged())); } WaWidget::~WaWidget() { @@ -41,11 +41,11 @@ void WaWidget::paintPixmap(int pixmap_mapping, int argument, int x, int y) { WaSkinModel::instance()->paintBackgroundTo(mapping, this, x, y); } -QSize WaWidget::sizeHint() { +TQSize WaWidget::sizeHint() { return WaSkinModel::instance()->getMapGeometry(mapping).size(); } -void WaWidget::mousePressEvent(QMouseEvent *e) { +void WaWidget::mousePressEvent(TQMouseEvent *e) { if (e->button() == RightButton) NoatunStdAction::ContextMenu::showContextMenu(); } diff --git a/noatun/modules/winskin/waWidget.h b/noatun/modules/winskin/waWidget.h index f2a41c82..076d0a5c 100644 --- a/noatun/modules/winskin/waWidget.h +++ b/noatun/modules/winskin/waWidget.h @@ -1,16 +1,16 @@ #ifndef _WAWIDGET_H #define _WAWIDGET_H -#include +#include #include "waSkinModel.h" -class WaWidget : public QWidget { +class WaWidget : public TQWidget { Q_OBJECT public: WaWidget(int mapping); virtual ~WaWidget(); - QSize sizeHint(); + TQSize sizeHint(); void paintPixmap(int wa_mapping); void paintPixmap(int wa_mapping, int number); @@ -21,7 +21,7 @@ public: void paintBackground() { WaSkinModel::instance()->paintBackgroundTo(mapping, this, 0, 0); } protected: - void mousePressEvent(QMouseEvent *); + void mousePressEvent(TQMouseEvent *); int mapping; private slots: diff --git a/noatun/modules/winskin/winSkinConfig.cpp b/noatun/modules/winskin/winSkinConfig.cpp index 649fd1fe..07352c7b 100644 --- a/noatun/modules/winskin/winSkinConfig.cpp +++ b/noatun/modules/winskin/winSkinConfig.cpp @@ -1,77 +1,77 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include -#include -#include -#include +#include +#include +#include #include #include #include #include #include #include -#include +#include #include "waSkin.h" #include "waInfo.h" #include "waSkinManager.h" #include "winSkinConfig.h" -WinSkinConfig::WinSkinConfig(QWidget * parent, WaSkinManager *waSkinManager) : +WinSkinConfig::WinSkinConfig(TQWidget * parent, WaSkinManager *waSkinManager) : CModule(i18n("Winskin"), i18n("Skin Selection for the Winskin Plugin"), "style", parent) { // Make a token horizontal layout box - vbox = new QVBoxLayout(this); + vbox = new TQVBoxLayout(this); vbox->setSpacing( 6 ); vbox->setMargin( 0 ); // Add a simple list of skins, populated in WinSkinConfig::reopen() - skin_list = new QListBox(this, "skin_list"); + skin_list = new TQListBox(this, "skin_list"); vbox->addWidget(skin_list); - QHBoxLayout* hbox = new QHBoxLayout( 0, 6, 6 ); + TQHBoxLayout* hbox = new TQHBoxLayout( 0, 6, 6 ); - QPushButton* buttonInstall = new QPushButton( i18n("&Install New Skin..."), this ); + TQPushButton* buttonInstall = new TQPushButton( i18n("&Install New Skin..."), this ); hbox->addWidget(buttonInstall); - buttonRemove = new QPushButton( i18n("&Remove Skin"), this ); + buttonRemove = new TQPushButton( i18n("&Remove Skin"), this ); buttonRemove->setEnabled(false); hbox->addWidget(buttonRemove); vbox->addLayout(hbox); - connect( skin_list, SIGNAL(highlighted(const QString &)), this, SLOT(selected())); - connect( buttonInstall, SIGNAL(clicked()), this, SLOT(install())); - connect( buttonRemove, SIGNAL(clicked()), this, SLOT(remove())); - connect(waSkinManager, SIGNAL(updateSkinList()), this, SLOT(reopen())); + connect( skin_list, TQT_SIGNAL(highlighted(const TQString &)), this, TQT_SLOT(selected())); + connect( buttonInstall, TQT_SIGNAL(clicked()), this, TQT_SLOT(install())); + connect( buttonRemove, TQT_SIGNAL(clicked()), this, TQT_SLOT(remove())); + connect(waSkinManager, TQT_SIGNAL(updateSkinList()), this, TQT_SLOT(reopen())); mWaSkinManager = waSkinManager; - QGroupBox *settingsBox = new QGroupBox( 1, Vertical, i18n("Settings"), this ); + TQGroupBox *settingsBox = new TQGroupBox( 1, Vertical, i18n("Settings"), this ); vbox->addWidget(settingsBox); - QHBox *box = new QHBox(settingsBox); - QLabel *label = new QLabel(i18n("T&itle scrolling speed:"), box); - new QLabel(i18n("None"), box); + TQHBox *box = new TQHBox(settingsBox); + TQLabel *label = new TQLabel(i18n("T&itle scrolling speed:"), box); + new TQLabel(i18n("None"), box); - scrollSpeed = new QSlider(box); + scrollSpeed = new TQSlider(box); label->setBuddy(scrollSpeed); - scrollSpeed->setMinimumSize( QSize( 80, 0 ) ); + scrollSpeed->setMinimumSize( TQSize( 80, 0 ) ); scrollSpeed->setMinValue( 0 ); scrollSpeed->setMaxValue( 50 ); scrollSpeed->setPageStep( 1 ); - scrollSpeed->setOrientation( QSlider::Horizontal ); - scrollSpeed->setTickmarks( QSlider::NoMarks ); + scrollSpeed->setOrientation( TQSlider::Horizontal ); + scrollSpeed->setTickmarks( TQSlider::NoMarks ); - label = new QLabel(i18n("Fast"), box); + label = new TQLabel(i18n("Fast"), box); reopen(); } @@ -99,7 +99,7 @@ void WinSkinConfig::reopen() { skin_list->clear(); // Get a list of skins - QStringList skins = mWaSkinManager->availableSkins(); + TQStringList skins = mWaSkinManager->availableSkins(); // This loop adds them all to our skin list for(unsigned int x = 0;x < skins.count();x++) { @@ -108,10 +108,10 @@ void WinSkinConfig::reopen() { } // Figure out our current skin - QString orig_skin = mWaSkinManager->currentSkin(); + TQString orig_skin = mWaSkinManager->currentSkin(); // Where is that skin in our big-list-o-skins? - QListBoxItem *item = skin_list->findItem(orig_skin); + TQListBoxItem *item = skin_list->findItem(orig_skin); if (item) { // Aha, found it... make it the currently selected skin @@ -135,14 +135,14 @@ void WinSkinConfig::selected() void WinSkinConfig::install() { - QString url; + TQString url; // Ask the user for directory containing a skin - KURLRequesterDlg* udlg = new KURLRequesterDlg( QString::null, this, "udlg", true ); + KURLRequesterDlg* udlg = new KURLRequesterDlg( TQString::null, this, "udlg", true ); udlg->urlRequester()->setFilter(mWaSkinManager->skinMimeTypes().join(" ")); udlg->urlRequester()->setMode( KFile::File | KFile::Directory | KFile::ExistingOnly ); - if( udlg->exec() == QDialog::Accepted ) { + if( udlg->exec() == TQDialog::Accepted ) { url = udlg->urlRequester()->url(); mWaSkinManager->installSkin( url ); } @@ -163,7 +163,7 @@ void WinSkinConfig::remove() // Ask the user first if( KMessageBox::warningContinueCancel( this, - i18n("Are you sure you want to remove the %1 skin?").arg( skin_list->currentText() ), QString::null, KStdGuiItem::del() ) + i18n("Are you sure you want to remove the %1 skin?").arg( skin_list->currentText() ), TQString::null, KStdGuiItem::del() ) == KMessageBox::Continue ) { mWaSkinManager->removeSkin( skin_list->currentText() ); diff --git a/noatun/modules/winskin/winSkinConfig.h b/noatun/modules/winskin/winSkinConfig.h index 22dca884..0aabb1f5 100644 --- a/noatun/modules/winskin/winSkinConfig.h +++ b/noatun/modules/winskin/winSkinConfig.h @@ -2,7 +2,7 @@ #define __WINSKINCONFIG_H #include -#include +#include class QVBoxLayout; class WaSkinManager; @@ -11,7 +11,7 @@ class QSlider; class WinSkinConfig:public CModule { Q_OBJECT public: - WinSkinConfig(QWidget * parent, WaSkinManager *waManager); + WinSkinConfig(TQWidget * parent, WaSkinManager *waManager); void save(); @@ -25,11 +25,11 @@ class WinSkinConfig:public CModule { private: WaSkinManager *mWaSkinManager; - QListBox *skin_list; - QString orig_skin; - QVBoxLayout *vbox; - QPushButton *buttonRemove; - QSlider *scrollSpeed; + TQListBox *skin_list; + TQString orig_skin; + TQVBoxLayout *vbox; + TQPushButton *buttonRemove; + TQSlider *scrollSpeed; }; #endif diff --git a/noatun/modules/winskin/winSkinVis.cpp b/noatun/modules/winskin/winSkinVis.cpp index f9937981..8ec025d2 100644 --- a/noatun/modules/winskin/winSkinVis.cpp +++ b/noatun/modules/winskin/winSkinVis.cpp @@ -17,8 +17,8 @@ #define __BANDS 75 #define __SPAHEIGHT 15 -WinSkinVis::WinSkinVis(QObject *parent, const char *name): - QObject(parent,name),Visualization(50) { +WinSkinVis::WinSkinVis(TQObject *parent, const char *name): + TQObject(parent,name),Visualization(50) { m_currentPeaks=new float[__BANDS]; diff --git a/noatun/modules/winskin/winSkinVis.h b/noatun/modules/winskin/winSkinVis.h index 7d139d0c..51c33205 100644 --- a/noatun/modules/winskin/winSkinVis.h +++ b/noatun/modules/winskin/winSkinVis.h @@ -14,7 +14,7 @@ #ifndef __WINSKINVIS_H #define __WINSKINVIS_H -#include +#include // These are needed for the Visualisation class #include @@ -23,11 +23,11 @@ #include "vis/winskinvis.h" -class WinSkinVis : public QObject, public Visualization { +class WinSkinVis : public TQObject, public Visualization { Q_OBJECT public: - WinSkinVis(QObject* parent,const char* name); + WinSkinVis(TQObject* parent,const char* name); ~WinSkinVis(); /** diff --git a/noatun/noatun20update.cpp b/noatun/noatun20update.cpp index e6a611f0..8ab0bbdb 100644 --- a/noatun/noatun20update.cpp +++ b/noatun/noatun20update.cpp @@ -1,8 +1,8 @@ // Convert Noatun 1.2 plugins that no longer exist to their closest 2.0 // counterparts. -#include -#include +#include +#include #ifndef stdin extern "C" FILE *stdin; @@ -14,26 +14,26 @@ extern "C" FILE *stdout; int main(int, char **) { - QFile qin, qout; + TQFile qin, qout; qin.open(IO_ReadOnly, stdin); qout.open(IO_WriteOnly, stdout); - QString text = qin.readAll(); + TQString text = qin.readAll(); // tag loaders bool tagloaders = text.contains("id3tag.plugin") || text.contains("oggtag.plugin") || text.contains("luckytag.plugin"); - text.replace(QRegExp("id3tag\\.plugin"), ""); - text.replace(QRegExp("oggtag\\.plugin"), ""); - text.replace(QRegExp("luckytag\\.plugin"), ""); + text.replace(TQRegExp("id3tag\\.plugin"), ""); + text.replace(TQRegExp("oggtag\\.plugin"), ""); + text.replace(TQRegExp("luckytag\\.plugin"), ""); - if(tagloaders) text.replace(QRegExp("Modules="), "Modules=metatag.plugin,"); + if(tagloaders) text.replace(TQRegExp("Modules="), "Modules=metatag.plugin,"); // playlists - text.replace(QRegExp("tron\\.plugin"), "splitplaylist.plugin"); - text.replace(QRegExp("liszt\\.plugin"), "splitplaylist.plugin"); + text.replace(TQRegExp("tron\\.plugin"), "splitplaylist.plugin"); + text.replace(TQRegExp("liszt\\.plugin"), "splitplaylist.plugin"); qout.writeBlock(text.local8Bit()); diff --git a/xine_artsplugin/tools/thumbnail/videocreator.cpp b/xine_artsplugin/tools/thumbnail/videocreator.cpp index 88f67292..ceea0da7 100644 --- a/xine_artsplugin/tools/thumbnail/videocreator.cpp +++ b/xine_artsplugin/tools/thumbnail/videocreator.cpp @@ -26,12 +26,12 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include @@ -140,7 +140,7 @@ static void xine_shared_exit( xine_t * ) pthread_mutex_unlock( &xine_mutex ); } -static QImage createThumbnail( xine_video_frame_t *frame, int width, int height ) +static TQImage createThumbnail( xine_video_frame_t *frame, int width, int height ) { unsigned char *base[3]; unsigned int pitches[3]; @@ -150,7 +150,7 @@ static QImage createThumbnail( xine_video_frame_t *frame, int width, int height else width = (int)(.5 + (height * frame->aspect_ratio)); - QImage image( width, height, 32 ); + TQImage image( width, height, 32 ); if (frame->colorspace == XINE_IMGFMT_YV12) { @@ -283,16 +283,16 @@ VideoCreator::~VideoCreator() { } -bool VideoCreator::create(const QString &path, int width, int height, QImage &img) +bool VideoCreator::create(const TQString &path, int width, int height, TQImage &img) { if (m_sprocketSmall.isNull()) { - QString pixmap = locate( "data", "videothumbnail/sprocket-small.png" ); - m_sprocketSmall = QPixmap(pixmap); + TQString pixmap = locate( "data", "videothumbnail/sprocket-small.png" ); + m_sprocketSmall = TQPixmap(pixmap); pixmap = locate( "data", "videothumbnail/sprocket-medium.png" ); - m_sprocketMedium = QPixmap(pixmap); + m_sprocketMedium = TQPixmap(pixmap); pixmap = locate( "data", "videothumbnail/sprocket-large.png" ); - m_sprocketLarge = QPixmap(pixmap); + m_sprocketLarge = TQPixmap(pixmap); } // The long term plan is to seek to frame 1, create thumbnail, see if is is @@ -309,7 +309,7 @@ bool VideoCreator::create(const QString &path, int width, int height, QImage &im xine_stream_t *stream = xine_stream_new( xine, ao_port, vo_port ); bool success = false; - if (xine_open( stream, QFile::encodeName ( path ).data() )) + if (xine_open( stream, TQFile::encodeName ( path ).data() )) { xine_video_frame_t frame; int length; @@ -337,9 +337,9 @@ bool VideoCreator::create(const QString &path, int width, int height, QImage &im // Create thumbnail image if (success) { - QPixmap pix( createThumbnail( &frame, width, height ) ); - QPainter painter( &pix ); - QPixmap sprocket; + TQPixmap pix( createThumbnail( &frame, width, height ) ); + TQPainter painter( &pix ); + TQPixmap sprocket; if (pix.height() < 60) sprocket = m_sprocketSmall; diff --git a/xine_artsplugin/tools/thumbnail/videocreator.h b/xine_artsplugin/tools/thumbnail/videocreator.h index 1c634e72..3af6d515 100644 --- a/xine_artsplugin/tools/thumbnail/videocreator.h +++ b/xine_artsplugin/tools/thumbnail/videocreator.h @@ -22,19 +22,19 @@ #include -class VideoCreator : public QObject, public ThumbCreator +class VideoCreator : public TQObject, public ThumbCreator { Q_OBJECT public: VideoCreator(); virtual ~VideoCreator(); - 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: - QPixmap m_sprocketSmall; - QPixmap m_sprocketMedium; - QPixmap m_sprocketLarge; + TQPixmap m_sprocketSmall; + TQPixmap m_sprocketMedium; + TQPixmap m_sprocketLarge; }; #endif -- cgit v1.2.3