summaryrefslogtreecommitdiffstats
path: root/kdeprint
diff options
context:
space:
mode:
Diffstat (limited to 'kdeprint')
-rw-r--r--kdeprint/cups/cupsaddsmb2.cpp90
-rw-r--r--kdeprint/cups/cupsaddsmb2.h14
-rw-r--r--kdeprint/cups/cupsdconf2/addressdialog.cpp34
-rw-r--r--kdeprint/cups/cupsdconf2/addressdialog.h8
-rw-r--r--kdeprint/cups/cupsdconf2/browsedialog.cpp52
-rw-r--r--kdeprint/cups/cupsdconf2/browsedialog.h8
-rw-r--r--kdeprint/cups/cupsdconf2/cupsdbrowsingpage.cpp124
-rw-r--r--kdeprint/cups/cupsdconf2/cupsdbrowsingpage.h6
-rw-r--r--kdeprint/cups/cupsdconf2/cupsdcomment.cpp32
-rw-r--r--kdeprint/cups/cupsdconf2/cupsdcomment.h26
-rw-r--r--kdeprint/cups/cupsdconf2/cupsdconf.cpp104
-rw-r--r--kdeprint/cups/cupsdconf2/cupsdconf.h94
-rw-r--r--kdeprint/cups/cupsdconf2/cupsddialog.cpp46
-rw-r--r--kdeprint/cups/cupsdconf2/cupsddialog.h12
-rw-r--r--kdeprint/cups/cupsdconf2/cupsddirpage.cpp42
-rw-r--r--kdeprint/cups/cupsdconf2/cupsddirpage.h6
-rw-r--r--kdeprint/cups/cupsdconf2/cupsdfilterpage.cpp38
-rw-r--r--kdeprint/cups/cupsdconf2/cupsdfilterpage.h6
-rw-r--r--kdeprint/cups/cupsdconf2/cupsdjobspage.cpp42
-rw-r--r--kdeprint/cups/cupsdconf2/cupsdjobspage.h6
-rw-r--r--kdeprint/cups/cupsdconf2/cupsdlogpage.cpp38
-rw-r--r--kdeprint/cups/cupsdconf2/cupsdlogpage.h6
-rw-r--r--kdeprint/cups/cupsdconf2/cupsdnetworkpage.cpp58
-rw-r--r--kdeprint/cups/cupsdconf2/cupsdnetworkpage.h6
-rw-r--r--kdeprint/cups/cupsdconf2/cupsdpage.cpp4
-rw-r--r--kdeprint/cups/cupsdconf2/cupsdpage.h20
-rw-r--r--kdeprint/cups/cupsdconf2/cupsdsecuritypage.cpp54
-rw-r--r--kdeprint/cups/cupsdconf2/cupsdsecuritypage.h10
-rw-r--r--kdeprint/cups/cupsdconf2/cupsdserverpage.cpp78
-rw-r--r--kdeprint/cups/cupsdconf2/cupsdserverpage.h6
-rw-r--r--kdeprint/cups/cupsdconf2/cupsdsplash.cpp30
-rw-r--r--kdeprint/cups/cupsdconf2/cupsdsplash.h6
-rw-r--r--kdeprint/cups/cupsdconf2/editlist.cpp34
-rw-r--r--kdeprint/cups/cupsdconf2/editlist.h20
-rw-r--r--kdeprint/cups/cupsdconf2/locationdialog.cpp86
-rw-r--r--kdeprint/cups/cupsdconf2/locationdialog.h6
-rw-r--r--kdeprint/cups/cupsdconf2/main.cpp2
-rw-r--r--kdeprint/cups/cupsdconf2/portdialog.cpp52
-rw-r--r--kdeprint/cups/cupsdconf2/portdialog.h8
-rw-r--r--kdeprint/cups/cupsdconf2/qdirlineedit.cpp20
-rw-r--r--kdeprint/cups/cupsdconf2/qdirlineedit.h10
-rw-r--r--kdeprint/cups/cupsdconf2/qdirmultilineedit.cpp38
-rw-r--r--kdeprint/cups/cupsdconf2/qdirmultilineedit.h12
-rw-r--r--kdeprint/cups/cupsdconf2/sizewidget.cpp26
-rw-r--r--kdeprint/cups/cupsdconf2/sizewidget.h12
-rw-r--r--kdeprint/cups/cupsinfos.cpp24
-rw-r--r--kdeprint/cups/cupsinfos.h26
-rw-r--r--kdeprint/cups/image.cpp4
-rw-r--r--kdeprint/cups/imageposition.cpp20
-rw-r--r--kdeprint/cups/imageposition.h14
-rw-r--r--kdeprint/cups/imagepreview.cpp18
-rw-r--r--kdeprint/cups/imagepreview.h14
-rw-r--r--kdeprint/cups/ippreportdlg.cpp12
-rw-r--r--kdeprint/cups/ippreportdlg.h4
-rw-r--r--kdeprint/cups/ipprequest.cpp86
-rw-r--r--kdeprint/cups/ipprequest.h142
-rw-r--r--kdeprint/cups/kcupsprinterimpl.cpp32
-rw-r--r--kdeprint/cups/kcupsprinterimpl.h6
-rw-r--r--kdeprint/cups/kmconfigcups.cpp6
-rw-r--r--kdeprint/cups/kmconfigcups.h2
-rw-r--r--kdeprint/cups/kmconfigcupsdir.cpp20
-rw-r--r--kdeprint/cups/kmconfigcupsdir.h2
-rw-r--r--kdeprint/cups/kmcupsconfigwidget.cpp82
-rw-r--r--kdeprint/cups/kmcupsconfigwidget.h4
-rw-r--r--kdeprint/cups/kmcupsjobmanager.cpp46
-rw-r--r--kdeprint/cups/kmcupsjobmanager.h16
-rw-r--r--kdeprint/cups/kmcupsmanager.cpp166
-rw-r--r--kdeprint/cups/kmcupsmanager.h24
-rw-r--r--kdeprint/cups/kmcupsuimanager.cpp22
-rw-r--r--kdeprint/cups/kmcupsuimanager.h6
-rw-r--r--kdeprint/cups/kmpropbanners.cpp18
-rw-r--r--kdeprint/cups/kmpropbanners.h2
-rw-r--r--kdeprint/cups/kmpropquota.cpp26
-rw-r--r--kdeprint/cups/kmpropquota.h2
-rw-r--r--kdeprint/cups/kmpropusers.cpp18
-rw-r--r--kdeprint/cups/kmpropusers.h2
-rw-r--r--kdeprint/cups/kmwbanners.cpp42
-rw-r--r--kdeprint/cups/kmwbanners.h6
-rw-r--r--kdeprint/cups/kmwfax.cpp16
-rw-r--r--kdeprint/cups/kmwfax.h4
-rw-r--r--kdeprint/cups/kmwipp.cpp14
-rw-r--r--kdeprint/cups/kmwipp.h4
-rw-r--r--kdeprint/cups/kmwippprinter.cpp56
-rw-r--r--kdeprint/cups/kmwippprinter.h6
-rw-r--r--kdeprint/cups/kmwippselect.cpp14
-rw-r--r--kdeprint/cups/kmwippselect.h4
-rw-r--r--kdeprint/cups/kmwother.cpp50
-rw-r--r--kdeprint/cups/kmwother.h4
-rw-r--r--kdeprint/cups/kmwquota.cpp36
-rw-r--r--kdeprint/cups/kmwquota.h4
-rw-r--r--kdeprint/cups/kmwusers.cpp22
-rw-r--r--kdeprint/cups/kmwusers.h2
-rw-r--r--kdeprint/cups/kphpgl2page.cpp42
-rw-r--r--kdeprint/cups/kphpgl2page.h6
-rw-r--r--kdeprint/cups/kpimagepage.cpp136
-rw-r--r--kdeprint/cups/kpimagepage.h6
-rw-r--r--kdeprint/cups/kpschedulepage.cpp74
-rw-r--r--kdeprint/cups/kpschedulepage.h8
-rw-r--r--kdeprint/cups/kptagspage.cpp44
-rw-r--r--kdeprint/cups/kptagspage.h12
-rw-r--r--kdeprint/cups/kptextpage.cpp96
-rw-r--r--kdeprint/cups/kptextpage.h6
-rw-r--r--kdeprint/driver.cpp140
-rw-r--r--kdeprint/driver.h112
-rw-r--r--kdeprint/driveritem.cpp16
-rw-r--r--kdeprint/driveritem.h8
-rw-r--r--kdeprint/driverview.cpp40
-rw-r--r--kdeprint/driverview.h12
-rw-r--r--kdeprint/droptionview.cpp122
-rw-r--r--kdeprint/droptionview.h36
-rw-r--r--kdeprint/ext/kextprinterimpl.cpp8
-rw-r--r--kdeprint/ext/kextprinterimpl.h4
-rw-r--r--kdeprint/ext/kmextmanager.cpp2
-rw-r--r--kdeprint/ext/kmextmanager.h6
-rw-r--r--kdeprint/ext/kmextuimanager.cpp2
-rw-r--r--kdeprint/ext/kmextuimanager.h2
-rw-r--r--kdeprint/foomatic/kfoomaticprinterimpl.cpp8
-rw-r--r--kdeprint/foomatic/kfoomaticprinterimpl.h6
-rw-r--r--kdeprint/foomatic/kmfoomaticmanager.cpp10
-rw-r--r--kdeprint/foomatic/kmfoomaticmanager.h6
-rw-r--r--kdeprint/foomatic2loader.cpp88
-rw-r--r--kdeprint/foomatic2loader.h20
-rw-r--r--kdeprint/fooparser.cpp10
-rw-r--r--kdeprint/fooscanner.cpp12
-rw-r--r--kdeprint/kdeprintcheck.cpp12
-rw-r--r--kdeprint/kdeprintcheck.h8
-rw-r--r--kdeprint/kdeprintd.cpp100
-rw-r--r--kdeprint/kdeprintd.h32
-rw-r--r--kdeprint/kfilelist.cpp116
-rw-r--r--kdeprint/kfilelist.h18
-rw-r--r--kdeprint/kmdbentry.h8
-rw-r--r--kdeprint/kmfactory.cpp54
-rw-r--r--kdeprint/kmfactory.h34
-rw-r--r--kdeprint/kmjob.cpp6
-rw-r--r--kdeprint/kmjob.h30
-rw-r--r--kdeprint/kmjobmanager.cpp50
-rw-r--r--kdeprint/kmjobmanager.h44
-rw-r--r--kdeprint/kmmanager.cpp70
-rw-r--r--kdeprint/kmmanager.h48
-rw-r--r--kdeprint/kmprinter.cpp20
-rw-r--r--kdeprint/kmprinter.h100
-rw-r--r--kdeprint/kmspecialmanager.cpp28
-rw-r--r--kdeprint/kmspecialmanager.h10
-rw-r--r--kdeprint/kmthreadjob.cpp22
-rw-r--r--kdeprint/kmthreadjob.h14
-rw-r--r--kdeprint/kmuimanager.cpp8
-rw-r--r--kdeprint/kmuimanager.h12
-rw-r--r--kdeprint/kmvirtualmanager.cpp74
-rw-r--r--kdeprint/kmvirtualmanager.h34
-rw-r--r--kdeprint/kpcopiespage.cpp136
-rw-r--r--kdeprint/kpcopiespage.h6
-rw-r--r--kdeprint/kpdriverpage.cpp12
-rw-r--r--kdeprint/kpdriverpage.h8
-rw-r--r--kdeprint/kpfileselectpage.cpp18
-rw-r--r--kdeprint/kpfileselectpage.h6
-rw-r--r--kdeprint/kpfilterpage.cpp116
-rw-r--r--kdeprint/kpfilterpage.h18
-rw-r--r--kdeprint/kpgeneralpage.cpp164
-rw-r--r--kdeprint/kpgeneralpage.h6
-rw-r--r--kdeprint/kpipeprocess.cpp10
-rw-r--r--kdeprint/kpipeprocess.h6
-rw-r--r--kdeprint/kpmarginpage.cpp34
-rw-r--r--kdeprint/kpmarginpage.h8
-rw-r--r--kdeprint/kpposterpage.cpp112
-rw-r--r--kdeprint/kpposterpage.h18
-rw-r--r--kdeprint/kpqtpage.cpp110
-rw-r--r--kdeprint/kpqtpage.h8
-rw-r--r--kdeprint/kprintaction.cpp24
-rw-r--r--kdeprint/kprintaction.h14
-rw-r--r--kdeprint/kprintdialog.cpp292
-rw-r--r--kdeprint/kprintdialog.h12
-rw-r--r--kdeprint/kprintdialogpage.cpp14
-rw-r--r--kdeprint/kprintdialogpage.h36
-rw-r--r--kdeprint/kprinter.cpp222
-rw-r--r--kdeprint/kprinter.h286
-rw-r--r--kdeprint/kprinterimpl.cpp104
-rw-r--r--kdeprint/kprinterimpl.h40
-rw-r--r--kdeprint/kprinterpropertydialog.cpp34
-rw-r--r--kdeprint/kprinterpropertydialog.h20
-rw-r--r--kdeprint/kprintpreview.cpp48
-rw-r--r--kdeprint/kprintpreview.h8
-rw-r--r--kdeprint/kprintprocess.cpp20
-rw-r--r--kdeprint/kprintprocess.h42
-rw-r--r--kdeprint/kxmlcommand.cpp138
-rw-r--r--kdeprint/kxmlcommand.h80
-rw-r--r--kdeprint/lpd/gschecker.cpp14
-rw-r--r--kdeprint/lpd/gschecker.h10
-rw-r--r--kdeprint/lpd/klpdprinterimpl.cpp10
-rw-r--r--kdeprint/lpd/klpdprinterimpl.h6
-rw-r--r--kdeprint/lpd/kmlpdfactory.cpp4
-rw-r--r--kdeprint/lpd/kmlpdfactory.h4
-rw-r--r--kdeprint/lpd/kmlpdmanager.cpp134
-rw-r--r--kdeprint/lpd/kmlpdmanager.h30
-rw-r--r--kdeprint/lpd/kmlpduimanager.cpp10
-rw-r--r--kdeprint/lpd/kmlpduimanager.h2
-rw-r--r--kdeprint/lpd/lpdtools.cpp38
-rw-r--r--kdeprint/lpd/lpdtools.h26
-rw-r--r--kdeprint/lpdunix/klpdunixprinterimpl.cpp22
-rw-r--r--kdeprint/lpdunix/klpdunixprinterimpl.h10
-rw-r--r--kdeprint/lpdunix/kmlpdunixmanager.cpp72
-rw-r--r--kdeprint/lpdunix/kmlpdunixmanager.h2
-rw-r--r--kdeprint/lpdunix/kmlpdunixuimanager.cpp2
-rw-r--r--kdeprint/lpdunix/kmlpdunixuimanager.h2
-rw-r--r--kdeprint/lpr/apshandler.cpp84
-rw-r--r--kdeprint/lpr/apshandler.h16
-rw-r--r--kdeprint/lpr/editentrydialog.cpp66
-rw-r--r--kdeprint/lpr/editentrydialog.h6
-rw-r--r--kdeprint/lpr/klprprinterimpl.cpp12
-rw-r--r--kdeprint/lpr/klprprinterimpl.h6
-rw-r--r--kdeprint/lpr/kmconfiglpr.cpp16
-rw-r--r--kdeprint/lpr/kmconfiglpr.h2
-rw-r--r--kdeprint/lpr/kmlprjobmanager.cpp14
-rw-r--r--kdeprint/lpr/kmlprjobmanager.h6
-rw-r--r--kdeprint/lpr/kmlprmanager.cpp44
-rw-r--r--kdeprint/lpr/kmlprmanager.h24
-rw-r--r--kdeprint/lpr/kmlpruimanager.cpp2
-rw-r--r--kdeprint/lpr/kmlpruimanager.h2
-rw-r--r--kdeprint/lpr/lpchelper.cpp48
-rw-r--r--kdeprint/lpr/lpchelper.h32
-rw-r--r--kdeprint/lpr/lpqhelper.cpp12
-rw-r--r--kdeprint/lpr/lpqhelper.h12
-rw-r--r--kdeprint/lpr/lprhandler.cpp46
-rw-r--r--kdeprint/lpr/lprhandler.h28
-rw-r--r--kdeprint/lpr/lprngtoolhandler.cpp66
-rw-r--r--kdeprint/lpr/lprngtoolhandler.h24
-rw-r--r--kdeprint/lpr/lprsettings.cpp20
-rw-r--r--kdeprint/lpr/lprsettings.h14
-rw-r--r--kdeprint/lpr/matichandler.cpp54
-rw-r--r--kdeprint/lpr/matichandler.h12
-rw-r--r--kdeprint/lpr/matichelper.cpp2
-rw-r--r--kdeprint/lpr/matichelper.h4
-rw-r--r--kdeprint/lpr/printcapentry.cpp8
-rw-r--r--kdeprint/lpr/printcapentry.h20
-rw-r--r--kdeprint/lpr/printcapreader.cpp20
-rw-r--r--kdeprint/lpr/printcapreader.h14
-rw-r--r--kdeprint/management/cjanuswidget.cpp72
-rw-r--r--kdeprint/management/cjanuswidget.h24
-rw-r--r--kdeprint/management/jobitem.cpp14
-rw-r--r--kdeprint/management/jobitem.h12
-rw-r--r--kdeprint/management/kdeprint_management_module.cpp8
-rw-r--r--kdeprint/management/kiconselectaction.cpp16
-rw-r--r--kdeprint/management/kiconselectaction.h6
-rw-r--r--kdeprint/management/kmconfigcommand.cpp16
-rw-r--r--kdeprint/management/kmconfigcommand.h2
-rw-r--r--kdeprint/management/kmconfigdialog.cpp14
-rw-r--r--kdeprint/management/kmconfigdialog.h6
-rw-r--r--kdeprint/management/kmconfigfilter.cpp48
-rw-r--r--kdeprint/management/kmconfigfilter.h2
-rw-r--r--kdeprint/management/kmconfigfonts.cpp62
-rw-r--r--kdeprint/management/kmconfigfonts.h4
-rw-r--r--kdeprint/management/kmconfiggeneral.cpp48
-rw-r--r--kdeprint/management/kmconfiggeneral.h4
-rw-r--r--kdeprint/management/kmconfigjobs.cpp12
-rw-r--r--kdeprint/management/kmconfigjobs.h2
-rw-r--r--kdeprint/management/kmconfigpage.cpp4
-rw-r--r--kdeprint/management/kmconfigpage.h16
-rw-r--r--kdeprint/management/kmconfigpreview.cpp22
-rw-r--r--kdeprint/management/kmconfigpreview.h2
-rw-r--r--kdeprint/management/kmdbcreator.cpp34
-rw-r--r--kdeprint/management/kmdbcreator.h12
-rw-r--r--kdeprint/management/kmdriverdb.cpp38
-rw-r--r--kdeprint/management/kmdriverdb.h28
-rw-r--r--kdeprint/management/kmdriverdbwidget.cpp92
-rw-r--r--kdeprint/management/kmdriverdbwidget.h20
-rw-r--r--kdeprint/management/kmdriverdialog.cpp2
-rw-r--r--kdeprint/management/kmdriverdialog.h2
-rw-r--r--kdeprint/management/kmiconview.cpp70
-rw-r--r--kdeprint/management/kmiconview.h26
-rw-r--r--kdeprint/management/kminfopage.cpp68
-rw-r--r--kdeprint/management/kminfopage.h6
-rw-r--r--kdeprint/management/kminstancepage.cpp72
-rw-r--r--kdeprint/management/kminstancepage.h12
-rw-r--r--kdeprint/management/kmjobviewer.cpp148
-rw-r--r--kdeprint/management/kmjobviewer.h30
-rw-r--r--kdeprint/management/kmlistview.cpp72
-rw-r--r--kdeprint/management/kmlistview.h22
-rw-r--r--kdeprint/management/kmmainview.cpp156
-rw-r--r--kdeprint/management/kmmainview.h18
-rw-r--r--kdeprint/management/kmpages.cpp6
-rw-r--r--kdeprint/management/kmpages.h8
-rw-r--r--kdeprint/management/kmprinterview.cpp32
-rw-r--r--kdeprint/management/kmprinterview.h16
-rw-r--r--kdeprint/management/kmpropbackend.cpp16
-rw-r--r--kdeprint/management/kmpropbackend.h2
-rw-r--r--kdeprint/management/kmpropcontainer.cpp20
-rw-r--r--kdeprint/management/kmpropcontainer.h4
-rw-r--r--kdeprint/management/kmpropdriver.cpp20
-rw-r--r--kdeprint/management/kmpropdriver.h2
-rw-r--r--kdeprint/management/kmpropertypage.cpp12
-rw-r--r--kdeprint/management/kmpropertypage.h6
-rw-r--r--kdeprint/management/kmpropgeneral.cpp20
-rw-r--r--kdeprint/management/kmpropgeneral.h2
-rw-r--r--kdeprint/management/kmpropmembers.cpp14
-rw-r--r--kdeprint/management/kmpropmembers.h2
-rw-r--r--kdeprint/management/kmpropwidget.cpp8
-rw-r--r--kdeprint/management/kmpropwidget.h10
-rw-r--r--kdeprint/management/kmspecialprinterdlg.cpp86
-rw-r--r--kdeprint/management/kmspecialprinterdlg.h4
-rw-r--r--kdeprint/management/kmtimer.cpp6
-rw-r--r--kdeprint/management/kmtimer.h4
-rw-r--r--kdeprint/management/kmwbackend.cpp34
-rw-r--r--kdeprint/management/kmwbackend.h10
-rw-r--r--kdeprint/management/kmwclass.cpp38
-rw-r--r--kdeprint/management/kmwclass.h4
-rw-r--r--kdeprint/management/kmwdriver.cpp20
-rw-r--r--kdeprint/management/kmwdriver.h4
-rw-r--r--kdeprint/management/kmwdriverselect.cpp20
-rw-r--r--kdeprint/management/kmwdriverselect.h4
-rw-r--r--kdeprint/management/kmwdrivertest.cpp32
-rw-r--r--kdeprint/management/kmwdrivertest.h2
-rw-r--r--kdeprint/management/kmwend.cpp24
-rw-r--r--kdeprint/management/kmwend.h2
-rw-r--r--kdeprint/management/kmwfile.cpp18
-rw-r--r--kdeprint/management/kmwfile.h4
-rw-r--r--kdeprint/management/kmwinfobase.cpp28
-rw-r--r--kdeprint/management/kmwinfobase.h18
-rw-r--r--kdeprint/management/kmwinfopage.cpp10
-rw-r--r--kdeprint/management/kmwinfopage.h2
-rw-r--r--kdeprint/management/kmwizard.cpp32
-rw-r--r--kdeprint/management/kmwizard.h12
-rw-r--r--kdeprint/management/kmwizardpage.cpp6
-rw-r--r--kdeprint/management/kmwizardpage.h8
-rw-r--r--kdeprint/management/kmwlocal.cpp64
-rw-r--r--kdeprint/management/kmwlocal.h12
-rw-r--r--kdeprint/management/kmwlpd.cpp10
-rw-r--r--kdeprint/management/kmwlpd.h4
-rw-r--r--kdeprint/management/kmwname.cpp16
-rw-r--r--kdeprint/management/kmwname.h4
-rw-r--r--kdeprint/management/kmwpassword.cpp54
-rw-r--r--kdeprint/management/kmwpassword.h10
-rw-r--r--kdeprint/management/kmwsmb.cpp44
-rw-r--r--kdeprint/management/kmwsmb.h8
-rw-r--r--kdeprint/management/kmwsocket.cpp48
-rw-r--r--kdeprint/management/kmwsocket.h6
-rw-r--r--kdeprint/management/kmwsocketutil.cpp60
-rw-r--r--kdeprint/management/kmwsocketutil.h16
-rw-r--r--kdeprint/management/kxmlcommanddlg.cpp388
-rw-r--r--kdeprint/management/kxmlcommanddlg.h42
-rw-r--r--kdeprint/management/kxmlcommandselector.cpp90
-rw-r--r--kdeprint/management/kxmlcommandselector.h14
-rw-r--r--kdeprint/management/networkscanner.cpp124
-rw-r--r--kdeprint/management/networkscanner.h18
-rw-r--r--kdeprint/management/pluginaction.cpp4
-rw-r--r--kdeprint/management/pluginaction.h2
-rw-r--r--kdeprint/management/sidepixmap.cpp16
-rw-r--r--kdeprint/management/sidepixmap.h10
-rw-r--r--kdeprint/management/smbview.cpp72
-rw-r--r--kdeprint/management/smbview.h10
-rw-r--r--kdeprint/marginpreview.cpp26
-rw-r--r--kdeprint/marginpreview.h18
-rw-r--r--kdeprint/marginvaluewidget.cpp4
-rw-r--r--kdeprint/marginvaluewidget.h2
-rw-r--r--kdeprint/marginwidget.cpp80
-rw-r--r--kdeprint/marginwidget.h10
-rw-r--r--kdeprint/messagewindow.cpp44
-rw-r--r--kdeprint/messagewindow.h20
-rw-r--r--kdeprint/plugincombobox.cpp36
-rw-r--r--kdeprint/plugincombobox.h8
-rw-r--r--kdeprint/posterpreview.cpp62
-rw-r--r--kdeprint/posterpreview.h32
-rw-r--r--kdeprint/ppdloader.cpp90
-rw-r--r--kdeprint/ppdloader.h52
-rw-r--r--kdeprint/ppdparser.cpp16
-rw-r--r--kdeprint/ppdscanner.cpp8
-rw-r--r--kdeprint/printerfilter.cpp4
-rw-r--r--kdeprint/printerfilter.h8
-rw-r--r--kdeprint/rlpr/kmconfigproxy.cpp6
-rw-r--r--kdeprint/rlpr/kmconfigproxy.h2
-rw-r--r--kdeprint/rlpr/kmproprlpr.cpp16
-rw-r--r--kdeprint/rlpr/kmproprlpr.h2
-rw-r--r--kdeprint/rlpr/kmproxywidget.cpp40
-rw-r--r--kdeprint/rlpr/kmproxywidget.h4
-rw-r--r--kdeprint/rlpr/kmrlprmanager.cpp22
-rw-r--r--kdeprint/rlpr/kmrlprmanager.h12
-rw-r--r--kdeprint/rlpr/kmrlpruimanager.cpp2
-rw-r--r--kdeprint/rlpr/kmrlpruimanager.h2
-rw-r--r--kdeprint/rlpr/kmwrlpr.cpp60
-rw-r--r--kdeprint/rlpr/kmwrlpr.h6
-rw-r--r--kdeprint/rlpr/krlprprinterimpl.cpp10
-rw-r--r--kdeprint/rlpr/krlprprinterimpl.h4
-rw-r--r--kdeprint/tests/drawdemo.cpp62
-rw-r--r--kdeprint/tests/drawdemo.h8
-rw-r--r--kdeprint/tests/helpwindow.cpp190
-rw-r--r--kdeprint/tests/helpwindow.h24
-rw-r--r--kdeprint/tests/main.cpp16
-rw-r--r--kdeprint/tests/richpage.cpp36
-rw-r--r--kdeprint/tests/richpage.h6
-rw-r--r--kdeprint/tools/escputil/escpwidget.cpp94
-rw-r--r--kdeprint/tools/escputil/escpwidget.h10
-rw-r--r--kdeprint/treecombobox.cpp34
-rw-r--r--kdeprint/treecombobox.h20
-rw-r--r--kdeprint/util.cpp18
-rw-r--r--kdeprint/util.h10
393 files changed, 6178 insertions, 6178 deletions
diff --git a/kdeprint/cups/cupsaddsmb2.cpp b/kdeprint/cups/cupsaddsmb2.cpp
index 993a72c9b..ef1b0f4e8 100644
--- a/kdeprint/cups/cupsaddsmb2.cpp
+++ b/kdeprint/cups/cupsaddsmb2.cpp
@@ -21,93 +21,93 @@
#include "cupsinfos.h"
#include "sidepixmap.h"
-#include <qtimer.h>
-#include <qprogressbar.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
+#include <tqtimer.h>
+#include <tqprogressbar.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
#include <klocale.h>
#include <kmessagebox.h>
-#include <qmessagebox.h>
-#include <qfile.h>
+#include <tqmessagebox.h>
+#include <tqfile.h>
#include <kio/passdlg.h>
#include <kdebug.h>
#include <kseparator.h>
#include <kactivelabel.h>
-#include <qwhatsthis.h>
+#include <tqwhatsthis.h>
#include <kpushbutton.h>
#include <kstdguiitem.h>
#include <cups/cups.h>
#include <ctype.h>
-CupsAddSmb::CupsAddSmb(QWidget *parent, const char *name)
+CupsAddSmb::CupsAddSmb(TQWidget *parent, const char *name)
: KDialog(parent, name)
{
m_state = None;
m_status = false;
m_actionindex = 0;
- connect(&m_proc, SIGNAL(receivedStdout(KProcess*,char*,int)), SLOT(slotReceived(KProcess*,char*,int)));
- connect(&m_proc, SIGNAL(receivedStderr(KProcess*,char*,int)), SLOT(slotReceived(KProcess*,char*,int)));
- connect(&m_proc, SIGNAL(processExited(KProcess*)), SLOT(slotProcessExited(KProcess*)));
+ connect(&m_proc, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)), TQT_SLOT(slotReceived(KProcess*,char*,int)));
+ connect(&m_proc, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)), TQT_SLOT(slotReceived(KProcess*,char*,int)));
+ connect(&m_proc, TQT_SIGNAL(processExited(KProcess*)), TQT_SLOT(slotProcessExited(KProcess*)));
m_side = new SidePixmap(this);
- m_doit = new QPushButton(i18n("&Export"), this);
+ m_doit = new TQPushButton(i18n("&Export"), this);
m_cancel = new KPushButton(KStdGuiItem::cancel(), this);
- connect(m_cancel, SIGNAL(clicked()), SLOT(reject()));
- connect(m_doit, SIGNAL(clicked()), SLOT(slotActionClicked()));
- m_bar = new QProgressBar(this);
+ connect(m_cancel, TQT_SIGNAL(clicked()), TQT_SLOT(reject()));
+ connect(m_doit, TQT_SIGNAL(clicked()), TQT_SLOT(slotActionClicked()));
+ m_bar = new TQProgressBar(this);
m_text = new KActiveLabel(this);
- QLabel *m_title = new QLabel(i18n("Export Printer Driver to Windows Clients"), this);
+ QLabel *m_title = new TQLabel(i18n("Export Printer Driver to Windows Clients"), this);
setCaption(m_title->text());
QFont f(m_title->font());
f.setBold(true);
m_title->setFont(f);
KSeparator *m_sep = new KSeparator(Qt::Horizontal, this);
- m_textinfo = new QLabel( this );
- m_logined = new QLineEdit( this );
- m_passwded = new QLineEdit( this );
- m_passwded->setEchoMode( QLineEdit::Password );
- m_servered = new QLineEdit( this );
- QLabel *m_loginlab = new QLabel( i18n( "&Username:" ), this );
- QLabel *m_serverlab = new QLabel( i18n( "&Samba server:" ), this );
- QLabel *m_passwdlab = new QLabel( i18n( "&Password:" ), this );
+ m_textinfo = new TQLabel( this );
+ m_logined = new TQLineEdit( this );
+ m_passwded = new TQLineEdit( this );
+ m_passwded->setEchoMode( TQLineEdit::Password );
+ m_servered = new TQLineEdit( this );
+ TQLabel *m_loginlab = new TQLabel( i18n( "&Username:" ), this );
+ TQLabel *m_serverlab = new TQLabel( i18n( "&Samba server:" ), this );
+ TQLabel *m_passwdlab = new TQLabel( i18n( "&Password:" ), this );
m_loginlab->setBuddy( m_logined );
m_serverlab->setBuddy( m_servered );
m_passwdlab->setBuddy( m_passwded );
- QString txt = i18n( "<p><b>Samba server</b></p>"
+ TQString txt = i18n( "<p><b>Samba server</b></p>"
"Adobe Windows PostScript driver files plus the CUPS printer PPD will be "
"exported to the <tt>[print$]</tt> special share of the Samba server (to change "
"the source CUPS server, use the <nobr><i>Configure Manager -> CUPS server</i></nobr> first). "
"The <tt>[print$]</tt> share must exist on the Samba side prior to clicking the "
"<b>Export</b> button below." );
- QWhatsThis::add( m_serverlab, txt );
- QWhatsThis::add( m_servered, txt );
+ TQWhatsThis::add( m_serverlab, txt );
+ TQWhatsThis::add( m_servered, txt );
txt = i18n( "<p><b>Samba username</b></p>"
"User needs to have write access to the <tt>[print$]</tt> share on the Samba server. "
"<tt>[print$]</tt> holds printer drivers prepared for download to Windows clients. "
"This dialog does not work for Samba servers configured with <tt>security = share</tt> "
"(but works fine with <tt>security = user</tt>)." );
- QWhatsThis::add( m_loginlab, txt );
- QWhatsThis::add( m_logined, txt );
+ TQWhatsThis::add( m_loginlab, txt );
+ TQWhatsThis::add( m_logined, txt );
txt = i18n( "<p><b>Samba password</b></p>"
"The Samba setting <tt>encrypt passwords = yes</tt> "
"(default) requires prior use of <tt>smbpasswd -a [username]</tt> command, "
"to create an encrypted Samba password and have Samba recognize it." );
- QWhatsThis::add( m_passwdlab, txt );
- QWhatsThis::add( m_passwded, txt );
+ TQWhatsThis::add( m_passwdlab, txt );
+ TQWhatsThis::add( m_passwded, txt );
- QHBoxLayout *l0 = new QHBoxLayout(this, 10, 10);
- QVBoxLayout *l1 = new QVBoxLayout(0, 0, 10);
+ QHBoxLayout *l0 = new TQHBoxLayout(this, 10, 10);
+ QVBoxLayout *l1 = new TQVBoxLayout(0, 0, 10);
l0->addWidget(m_side);
l0->addLayout(l1);
l1->addWidget(m_title);
l1->addWidget(m_sep);
l1->addWidget(m_text);
- QGridLayout *l3 = new QGridLayout( 0, 3, 2, 0, 10 );
+ TQGridLayout *l3 = new TQGridLayout( 0, 3, 2, 0, 10 );
l1->addLayout( l3 );
l3->addWidget( m_loginlab, 1, 0 );
l3->addWidget( m_passwdlab, 2, 0 );
@@ -120,7 +120,7 @@ CupsAddSmb::CupsAddSmb(QWidget *parent, const char *name)
l1->addWidget(m_bar);
l1->addWidget( m_textinfo );
l1->addSpacing(30);
- QHBoxLayout *l2 = new QHBoxLayout(0, 0, 10);
+ QHBoxLayout *l2 = new TQHBoxLayout(0, 0, 10);
l1->addLayout(l2);
l2->addStretch(1);
l2->addWidget(m_doit);
@@ -156,7 +156,7 @@ void CupsAddSmb::slotReceived(KProcess*, char *buf, int buflen)
while (1)
{
// read a line
- line = QString::fromLatin1("");
+ line = TQString::fromLatin1("");
partial = true;
while (index < buflen)
{
@@ -244,7 +244,7 @@ void CupsAddSmb::checkActionStatus()
void CupsAddSmb::nextAction()
{
if (m_actionindex < (int)(m_actions.count()))
- QTimer::singleShot(1, this, SLOT(doNextAction()));
+ TQTimer::singleShot(1, this, TQT_SLOT(doNextAction()));
}
void CupsAddSmb::doNextAction()
@@ -273,7 +273,7 @@ void CupsAddSmb::doNextAction()
m_state = Copy;
//m_text->setText(i18n("Uploading %1").arg(m_actions[m_actionindex+1]));
m_textinfo->setText(i18n("Uploading %1").arg(m_actions[m_actionindex+1]));
- s.append(" ").append(QFile::encodeName(m_actions[m_actionindex]).data()).append(" ").append(m_actions[m_actionindex+1].latin1());
+ s.append(" ").append(TQFile::encodeName(m_actions[m_actionindex]).data()).append(" ").append(m_actions[m_actionindex+1].latin1());
m_actionindex += 2;
}
else if (s == "adddriver")
@@ -332,7 +332,7 @@ void CupsAddSmb::slotProcessExited(KProcess*)
m_passwded->setEnabled( true );
m_text->setText(i18n("Driver successfully exported."));
m_bar->reset();
- m_textinfo->setText( QString::null );
+ m_textinfo->setText( TQString::null );
return;
}
}
@@ -353,7 +353,7 @@ void CupsAddSmb::slotProcessExited(KProcess*)
}
}
-void CupsAddSmb::showError(const QString& msg)
+void CupsAddSmb::showError(const TQString& msg)
{
m_text->setText(i18n("<h3>Operation failed.</h3><p>%1</p>").arg(msg));
m_cancel->setEnabled(true);
@@ -364,7 +364,7 @@ void CupsAddSmb::showError(const QString& msg)
m_state = None;
}
-bool CupsAddSmb::exportDest(const QString &dest, const QString& datadir)
+bool CupsAddSmb::exportDest(const TQString &dest, const TQString& datadir)
{
CupsAddSmb dlg;
dlg.m_dest = dest;
@@ -386,8 +386,8 @@ bool CupsAddSmb::doExport()
m_status = false;
m_state = None;
- if (!QFile::exists(m_datadir+"/drivers/ADOBEPS5.DLL") ||
- !QFile::exists(m_datadir+"/drivers/ADOBEPS4.DRV"))
+ if (!TQFile::exists(m_datadir+"/drivers/ADOBEPS5.DLL") ||
+ !TQFile::exists(m_datadir+"/drivers/ADOBEPS4.DRV"))
{
showError(
i18n("Some driver files are missing. You can get them on "
@@ -433,7 +433,7 @@ bool CupsAddSmb::doExport()
m_actions << "quit";
m_proc.clearArguments();
- m_proc << "smbclient" << QString::fromLatin1("//")+m_servered->text()+"/print$";
+ m_proc << "smbclient" << TQString::fromLatin1("//")+m_servered->text()+"/print$";
return startProcess();
}
diff --git a/kdeprint/cups/cupsaddsmb2.h b/kdeprint/cups/cupsaddsmb2.h
index 1f364fc26..43cd61e8c 100644
--- a/kdeprint/cups/cupsaddsmb2.h
+++ b/kdeprint/cups/cupsaddsmb2.h
@@ -20,8 +20,8 @@
#ifndef CUPSADDSMB_H
#define CUPSADDSMB_H
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
#include <kprocess.h>
#include <kdialog.h>
@@ -38,10 +38,10 @@ class CupsAddSmb : public KDialog
public:
enum State { None, Start, MkDir, Copy, AddDriver, AddPrinter };
- CupsAddSmb(QWidget *parent = 0, const char *name = 0);
+ CupsAddSmb(TQWidget *parent = 0, const char *name = 0);
~CupsAddSmb();
- static bool exportDest(const QString& dest, const QString& datadir);
+ static bool exportDest(const TQString& dest, const TQString& datadir);
protected slots:
void slotReceived(KProcess*, char*, int);
@@ -55,7 +55,7 @@ protected:
bool startProcess();
bool doExport();
bool doInstall();
- void showError(const QString& msg);
+ void showError(const TQString& msg);
private:
KProcess m_proc;
@@ -69,8 +69,8 @@ private:
SidePixmap *m_side;
QPushButton *m_doit, *m_cancel;
KActiveLabel *m_text;
- QLabel *m_textinfo;
- QLineEdit *m_logined, *m_passwded, *m_servered;
+ TQLabel *m_textinfo;
+ TQLineEdit *m_logined, *m_passwded, *m_servered;
QString m_datadir;
};
diff --git a/kdeprint/cups/cupsdconf2/addressdialog.cpp b/kdeprint/cups/cupsdconf2/addressdialog.cpp
index b7472c5a4..1811abf68 100644
--- a/kdeprint/cups/cupsdconf2/addressdialog.cpp
+++ b/kdeprint/cups/cupsdconf2/addressdialog.cpp
@@ -19,27 +19,27 @@
#include "addressdialog.h"
-#include <qcombobox.h>
-#include <qlineedit.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqcombobox.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <klocale.h>
-AddressDialog::AddressDialog(QWidget *parent, const char *name)
+AddressDialog::AddressDialog(TQWidget *parent, const char *name)
: KDialogBase(Swallow, i18n("ACL Address"), Ok|Cancel, Ok, parent, name, true, true)
{
- QWidget *w = new QWidget(this);
- type_ = new QComboBox(w);
- address_ = new QLineEdit(w);
+ TQWidget *w = new TQWidget(this);
+ type_ = new TQComboBox(w);
+ address_ = new TQLineEdit(w);
type_->insertItem(i18n("Allow"));
type_->insertItem(i18n("Deny"));
- QLabel *l1 = new QLabel(i18n("Type:"), w);
- QLabel *l2 = new QLabel(i18n("Address:"), w);
+ QLabel *l1 = new TQLabel(i18n("Type:"), w);
+ QLabel *l2 = new TQLabel(i18n("Address:"), w);
- QGridLayout *m1 = new QGridLayout(w, 2, 2, 0, 5);
+ QGridLayout *m1 = new TQGridLayout(w, 2, 2, 0, 5);
m1->setColStretch(1, 1);
m1->addWidget(l1, 0, 0, Qt::AlignRight);
m1->addWidget(l2, 1, 0, Qt::AlignRight);
@@ -50,9 +50,9 @@ AddressDialog::AddressDialog(QWidget *parent, const char *name)
resize(300, 100);
}
-QString AddressDialog::addressString()
+TQString AddressDialog::addressString()
{
- QString s;
+ TQString s;
if (type_->currentItem() == 0)
s.append("Allow ");
else
@@ -64,16 +64,16 @@ QString AddressDialog::addressString()
return s;
}
-QString AddressDialog::newAddress(QWidget *parent)
+TQString AddressDialog::newAddress(TQWidget *parent)
{
AddressDialog dlg(parent);
if (dlg.exec())
return dlg.addressString();
else
- return QString::null;
+ return TQString::null;
}
-QString AddressDialog::editAddress(const QString& addr, QWidget *parent)
+TQString AddressDialog::editAddress(const TQString& addr, TQWidget *parent)
{
AddressDialog dlg(parent);
int p = addr.find(' ');
@@ -85,5 +85,5 @@ QString AddressDialog::editAddress(const QString& addr, QWidget *parent)
if (dlg.exec())
return dlg.addressString();
else
- return QString::null;
+ return TQString::null;
}
diff --git a/kdeprint/cups/cupsdconf2/addressdialog.h b/kdeprint/cups/cupsdconf2/addressdialog.h
index 4560dd72b..0372f8cc6 100644
--- a/kdeprint/cups/cupsdconf2/addressdialog.h
+++ b/kdeprint/cups/cupsdconf2/addressdialog.h
@@ -28,11 +28,11 @@ class QLineEdit;
class AddressDialog : public KDialogBase
{
public:
- AddressDialog(QWidget *parent = 0, const char *name = 0);
+ AddressDialog(TQWidget *parent = 0, const char *name = 0);
- QString addressString();
- static QString newAddress(QWidget *parent = 0);
- static QString editAddress(const QString& s, QWidget *parent = 0);
+ TQString addressString();
+ static TQString newAddress(TQWidget *parent = 0);
+ static TQString editAddress(const TQString& s, TQWidget *parent = 0);
private:
QComboBox *type_;
diff --git a/kdeprint/cups/cupsdconf2/browsedialog.cpp b/kdeprint/cups/cupsdconf2/browsedialog.cpp
index 846ea41a5..0856df11a 100644
--- a/kdeprint/cups/cupsdconf2/browsedialog.cpp
+++ b/kdeprint/cups/cupsdconf2/browsedialog.cpp
@@ -20,35 +20,35 @@
#include "browsedialog.h"
#include "cupsdconf.h"
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
-#include <qregexp.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
+#include <tqregexp.h>
#include <klocale.h>
-BrowseDialog::BrowseDialog(QWidget *parent, const char *name)
- : KDialogBase(parent, name, true, QString::null, Ok|Cancel, Ok, true)
+BrowseDialog::BrowseDialog(TQWidget *parent, const char *name)
+ : KDialogBase(parent, name, true, TQString::null, Ok|Cancel, Ok, true)
{
- QWidget *dummy = new QWidget(this);
+ QWidget *dummy = new TQWidget(this);
setMainWidget(dummy);
- type_ = new QComboBox(dummy);
- from_ = new QLineEdit(dummy);
- to_ = new QLineEdit(dummy);
+ type_ = new TQComboBox(dummy);
+ from_ = new TQLineEdit(dummy);
+ to_ = new TQLineEdit(dummy);
type_->insertItem(i18n("Send"));
type_->insertItem(i18n("Allow"));
type_->insertItem(i18n("Deny"));
type_->insertItem(i18n("Relay"));
type_->insertItem(i18n("Poll"));
- QLabel *l1 = new QLabel(i18n("Type:"), dummy);
- QLabel *l2 = new QLabel(i18n("From:"), dummy);
- QLabel *l3 = new QLabel(i18n("To:"), dummy);
+ QLabel *l1 = new TQLabel(i18n("Type:"), dummy);
+ QLabel *l2 = new TQLabel(i18n("From:"), dummy);
+ QLabel *l3 = new TQLabel(i18n("To:"), dummy);
- QGridLayout *m1 = new QGridLayout(dummy, 3, 2, 0, 5);
+ QGridLayout *m1 = new TQGridLayout(dummy, 3, 2, 0, 5);
m1->addWidget(l1, 0, 0, Qt::AlignRight);
m1->addWidget(l2, 1, 0, Qt::AlignRight);
m1->addWidget(l3, 2, 0, Qt::AlignRight);
@@ -56,16 +56,16 @@ BrowseDialog::BrowseDialog(QWidget *parent, const char *name)
m1->addWidget(from_, 1, 1);
m1->addWidget(to_, 2, 1);
- connect(type_, SIGNAL(activated(int)), SLOT(slotTypeChanged(int)));
+ connect(type_, TQT_SIGNAL(activated(int)), TQT_SLOT(slotTypeChanged(int)));
slotTypeChanged(type_->currentItem());
setCaption(i18n("Browse Address"));
resize(250, 100);
}
-QString BrowseDialog::addressString()
+TQString BrowseDialog::addressString()
{
- QString s;
+ TQString s;
switch (type_->currentItem())
{
case 0:
@@ -93,10 +93,10 @@ QString BrowseDialog::addressString()
void BrowseDialog::setInfos(CupsdConf *conf)
{
- QWhatsThis::add(type_, conf->comments_.toolTip("browsetype"));
+ TQWhatsThis::add(type_, conf->comments_.toolTip("browsetype"));
}
-QString BrowseDialog::newAddress(QWidget *parent, CupsdConf *conf)
+TQString BrowseDialog::newAddress(TQWidget *parent, CupsdConf *conf)
{
BrowseDialog dlg(parent);
dlg.setInfos(conf);
@@ -104,14 +104,14 @@ QString BrowseDialog::newAddress(QWidget *parent, CupsdConf *conf)
{
return dlg.addressString();
}
- return QString::null;
+ return TQString::null;
}
-QString BrowseDialog::editAddress(const QString& s, QWidget *parent, CupsdConf *conf)
+TQString BrowseDialog::editAddress(const TQString& s, TQWidget *parent, CupsdConf *conf)
{
BrowseDialog dlg(parent);
dlg.setInfos(conf);
- QStringList l = QStringList::split(QRegExp("\\s"), s, false);
+ QStringList l = TQStringList::split(TQRegExp("\\s"), s, false);
if (l.count() > 1)
{
if (l[0] == "Send") dlg.type_->setCurrentItem(0);
@@ -130,7 +130,7 @@ QString BrowseDialog::editAddress(const QString& s, QWidget *parent, CupsdConf *
{
return dlg.addressString();
}
- return QString::null;
+ return TQString::null;
}
void BrowseDialog::slotTypeChanged(int index)
diff --git a/kdeprint/cups/cupsdconf2/browsedialog.h b/kdeprint/cups/cupsdconf2/browsedialog.h
index ac5be55b7..d579c3dbf 100644
--- a/kdeprint/cups/cupsdconf2/browsedialog.h
+++ b/kdeprint/cups/cupsdconf2/browsedialog.h
@@ -31,12 +31,12 @@ class BrowseDialog : public KDialogBase
Q_OBJECT
public:
- BrowseDialog(QWidget *parent = 0, const char *name = 0);
+ BrowseDialog(TQWidget *parent = 0, const char *name = 0);
- QString addressString();
+ TQString addressString();
void setInfos(CupsdConf*);
- static QString newAddress(QWidget *parent = 0, CupsdConf *conf = 0);
- static QString editAddress(const QString& s, QWidget *parent = 0, CupsdConf *conf = 0);
+ static TQString newAddress(TQWidget *parent = 0, CupsdConf *conf = 0);
+ static TQString editAddress(const TQString& s, TQWidget *parent = 0, CupsdConf *conf = 0);
protected slots:
void slotTypeChanged(int);
diff --git a/kdeprint/cups/cupsdconf2/cupsdbrowsingpage.cpp b/kdeprint/cups/cupsdconf2/cupsdbrowsingpage.cpp
index a61742458..7c2b6276a 100644
--- a/kdeprint/cups/cupsdconf2/cupsdbrowsingpage.cpp
+++ b/kdeprint/cups/cupsdconf2/cupsdbrowsingpage.cpp
@@ -22,16 +22,16 @@
#include "editlist.h"
#include "browsedialog.h"
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qwhatsthis.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
#include <knuminput.h>
-CupsdBrowsingPage::CupsdBrowsingPage(QWidget *parent, const char *name)
+CupsdBrowsingPage::CupsdBrowsingPage(TQWidget *parent, const char *name)
: CupsdPage(parent, name)
{
setPageLabel(i18n("Browsing"));
@@ -41,15 +41,15 @@ CupsdBrowsingPage::CupsdBrowsingPage(QWidget *parent, const char *name)
browseinterval_ = new KIntNumInput(this);
browseport_ = new KIntNumInput(this);
browsetimeout_ = new KIntNumInput(this);
- browsing_ = new QCheckBox(i18n("Use browsing"), this);
- cups_ = new QCheckBox("CUPS", this);
- slp_ = new QCheckBox("SLP", this);
+ browsing_ = new TQCheckBox(i18n("Use browsing"), this);
+ cups_ = new TQCheckBox("CUPS", this);
+ slp_ = new TQCheckBox("SLP", this);
browseaddresses_ = new EditList(this);
- browseorder_ = new QComboBox(this);
- useimplicitclasses_ = new QCheckBox(i18n("Implicit classes"), this);
- hideimplicitmembers_ = new QCheckBox(i18n("Hide implicit members"), this);
- useshortnames_ = new QCheckBox(i18n("Use short names"), this);
- useanyclasses_ = new QCheckBox(i18n("Use \"any\" classes"), this);
+ browseorder_ = new TQComboBox(this);
+ useimplicitclasses_ = new TQCheckBox(i18n("Implicit classes"), this);
+ hideimplicitmembers_ = new TQCheckBox(i18n("Hide implicit members"), this);
+ useshortnames_ = new TQCheckBox(i18n("Use short names"), this);
+ useanyclasses_ = new TQCheckBox(i18n("Use \"any\" classes"), this);
browseorder_->insertItem(i18n("Allow, Deny"));
browseorder_->insertItem(i18n("Deny, Allow"));
@@ -63,17 +63,17 @@ CupsdBrowsingPage::CupsdBrowsingPage(QWidget *parent, const char *name)
browsetimeout_->setSteps(1, 10);
browsetimeout_->setSuffix(i18n(" sec"));
- QLabel *l1 = new QLabel(i18n("Browse port:"), this);
- QLabel *l2 = new QLabel(i18n("Browse interval:"), this);
- QLabel *l3 = new QLabel(i18n("Browse timeout:"), this);
- QLabel *l4 = new QLabel(i18n("Browse addresses:"), this);
- QLabel *l5 = new QLabel(i18n("Browse order:"), this);
- QLabel *l6 = new QLabel(i18n("Browse options:"), this);
+ TQLabel *l1 = new TQLabel(i18n("Browse port:"), this);
+ TQLabel *l2 = new TQLabel(i18n("Browse interval:"), this);
+ TQLabel *l3 = new TQLabel(i18n("Browse timeout:"), this);
+ TQLabel *l4 = new TQLabel(i18n("Browse addresses:"), this);
+ TQLabel *l5 = new TQLabel(i18n("Browse order:"), this);
+ TQLabel *l6 = new TQLabel(i18n("Browse options:"), this);
- QGridLayout *m1 = new QGridLayout(this, 8, 2, 10, 7);
+ QGridLayout *m1 = new TQGridLayout(this, 8, 2, 10, 7);
m1->setRowStretch(7, 1);
m1->setColStretch(1, 1);
- QHBoxLayout *m2 = new QHBoxLayout(0, 0, 10);
+ QHBoxLayout *m2 = new TQHBoxLayout(0, 0, 10);
m1->addMultiCellLayout(m2, 0, 0, 0, 1);
m2->addWidget(browsing_);
m2->addWidget(cups_);
@@ -90,40 +90,40 @@ CupsdBrowsingPage::CupsdBrowsingPage(QWidget *parent, const char *name)
m1->addWidget(browsetimeout_, 3, 1);
m1->addWidget(browseaddresses_, 4, 1);
m1->addWidget(browseorder_, 5, 1);
- QGridLayout *m3 = new QGridLayout(0, 2, 2, 0, 5);
+ QGridLayout *m3 = new TQGridLayout(0, 2, 2, 0, 5);
m1->addLayout(m3, 6, 1);
m3->addWidget(useimplicitclasses_, 0, 0);
m3->addWidget(useanyclasses_, 0, 1);
m3->addWidget(hideimplicitmembers_, 1, 0);
m3->addWidget(useshortnames_, 1, 1);
- connect(browsing_, SIGNAL(toggled(bool)), cups_, SLOT(setEnabled(bool)));
- connect(browsing_, SIGNAL(toggled(bool)), slp_, SLOT(setEnabled(bool)));
- connect(browsing_, SIGNAL(toggled(bool)), browseport_, SLOT(setEnabled(bool)));
- connect(browsing_, SIGNAL(toggled(bool)), browseinterval_, SLOT(setEnabled(bool)));
- connect(browsing_, SIGNAL(toggled(bool)), browsetimeout_, SLOT(setEnabled(bool)));
- connect(browsing_, SIGNAL(toggled(bool)), browseaddresses_, SLOT(setEnabled(bool)));
- connect(browsing_, SIGNAL(toggled(bool)), browseorder_, SLOT(setEnabled(bool)));
- connect(browsing_, SIGNAL(toggled(bool)), useimplicitclasses_, SLOT(setEnabled(bool)));
- connect(browsing_, SIGNAL(toggled(bool)), useanyclasses_, SLOT(setEnabled(bool)));
- connect(browsing_, SIGNAL(toggled(bool)), hideimplicitmembers_, SLOT(setEnabled(bool)));
- connect(browsing_, SIGNAL(toggled(bool)), useshortnames_, SLOT(setEnabled(bool)));
-
- connect(browsing_, SIGNAL(toggled(bool)), l1, SLOT(setEnabled(bool)));
- connect(browsing_, SIGNAL(toggled(bool)), l2, SLOT(setEnabled(bool)));
- connect(browsing_, SIGNAL(toggled(bool)), l3, SLOT(setEnabled(bool)));
- connect(browsing_, SIGNAL(toggled(bool)), l4, SLOT(setEnabled(bool)));
- connect(browsing_, SIGNAL(toggled(bool)), l5, SLOT(setEnabled(bool)));
- connect(browsing_, SIGNAL(toggled(bool)), l6, SLOT(setEnabled(bool)));
-
- connect(browseaddresses_, SIGNAL(add()), SLOT(slotAdd()));
- connect(browseaddresses_, SIGNAL(edit(int)), SLOT(slotEdit(int)));
- connect(browseaddresses_, SIGNAL(defaultList()), SLOT(slotDefaultList()));
- connect(browseinterval_, SIGNAL(valueChanged(int)), SLOT(intervalChanged(int)));
+ connect(browsing_, TQT_SIGNAL(toggled(bool)), cups_, TQT_SLOT(setEnabled(bool)));
+ connect(browsing_, TQT_SIGNAL(toggled(bool)), slp_, TQT_SLOT(setEnabled(bool)));
+ connect(browsing_, TQT_SIGNAL(toggled(bool)), browseport_, TQT_SLOT(setEnabled(bool)));
+ connect(browsing_, TQT_SIGNAL(toggled(bool)), browseinterval_, TQT_SLOT(setEnabled(bool)));
+ connect(browsing_, TQT_SIGNAL(toggled(bool)), browsetimeout_, TQT_SLOT(setEnabled(bool)));
+ connect(browsing_, TQT_SIGNAL(toggled(bool)), browseaddresses_, TQT_SLOT(setEnabled(bool)));
+ connect(browsing_, TQT_SIGNAL(toggled(bool)), browseorder_, TQT_SLOT(setEnabled(bool)));
+ connect(browsing_, TQT_SIGNAL(toggled(bool)), useimplicitclasses_, TQT_SLOT(setEnabled(bool)));
+ connect(browsing_, TQT_SIGNAL(toggled(bool)), useanyclasses_, TQT_SLOT(setEnabled(bool)));
+ connect(browsing_, TQT_SIGNAL(toggled(bool)), hideimplicitmembers_, TQT_SLOT(setEnabled(bool)));
+ connect(browsing_, TQT_SIGNAL(toggled(bool)), useshortnames_, TQT_SLOT(setEnabled(bool)));
+
+ connect(browsing_, TQT_SIGNAL(toggled(bool)), l1, TQT_SLOT(setEnabled(bool)));
+ connect(browsing_, TQT_SIGNAL(toggled(bool)), l2, TQT_SLOT(setEnabled(bool)));
+ connect(browsing_, TQT_SIGNAL(toggled(bool)), l3, TQT_SLOT(setEnabled(bool)));
+ connect(browsing_, TQT_SIGNAL(toggled(bool)), l4, TQT_SLOT(setEnabled(bool)));
+ connect(browsing_, TQT_SIGNAL(toggled(bool)), l5, TQT_SLOT(setEnabled(bool)));
+ connect(browsing_, TQT_SIGNAL(toggled(bool)), l6, TQT_SLOT(setEnabled(bool)));
+
+ connect(browseaddresses_, TQT_SIGNAL(add()), TQT_SLOT(slotAdd()));
+ connect(browseaddresses_, TQT_SIGNAL(edit(int)), TQT_SLOT(slotEdit(int)));
+ connect(browseaddresses_, TQT_SIGNAL(defaultList()), TQT_SLOT(slotDefaultList()));
+ connect(browseinterval_, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(intervalChanged(int)));
browsing_->setChecked(true);
}
-bool CupsdBrowsingPage::loadConfig(CupsdConf *conf, QString&)
+bool CupsdBrowsingPage::loadConfig(CupsdConf *conf, TQString&)
{
conf_ = conf;
browsing_->setChecked(conf_->browsing_);
@@ -142,7 +142,7 @@ bool CupsdBrowsingPage::loadConfig(CupsdConf *conf, QString&)
return true;
}
-bool CupsdBrowsingPage::saveConfig(CupsdConf *conf, QString&)
+bool CupsdBrowsingPage::saveConfig(CupsdConf *conf, TQString&)
{
conf->browsing_ = browsing_->isChecked();
QStringList l;
@@ -164,30 +164,30 @@ bool CupsdBrowsingPage::saveConfig(CupsdConf *conf, QString&)
void CupsdBrowsingPage::setInfos(CupsdConf *conf)
{
- QWhatsThis::add(browsing_, conf->comments_.toolTip("browsing"));
- QWhatsThis::add(cups_, conf->comments_.toolTip("browseprotocols"));
- QWhatsThis::add(slp_, conf->comments_.toolTip("browseprotocols"));
- QWhatsThis::add(browseinterval_, conf->comments_.toolTip("browseinterval"));
- QWhatsThis::add(browseport_, conf->comments_.toolTip("browseport"));
- QWhatsThis::add(browsetimeout_, conf->comments_.toolTip("browsetimeout"));
- QWhatsThis::add(browseaddresses_, conf->comments_.toolTip("browseaddresses"));
- QWhatsThis::add(browseorder_, conf->comments_.toolTip("browseorder"));
- QWhatsThis::add(useimplicitclasses_, conf->comments_.toolTip("implicitclasses"));
- QWhatsThis::add(useanyclasses_, conf->comments_.toolTip("implicitanyclasses"));
- QWhatsThis::add(hideimplicitmembers_, conf->comments_.toolTip("hideimplicitmembers"));
- QWhatsThis::add(useshortnames_, conf->comments_.toolTip("browseshortnames"));
+ TQWhatsThis::add(browsing_, conf->comments_.toolTip("browsing"));
+ TQWhatsThis::add(cups_, conf->comments_.toolTip("browseprotocols"));
+ TQWhatsThis::add(slp_, conf->comments_.toolTip("browseprotocols"));
+ TQWhatsThis::add(browseinterval_, conf->comments_.toolTip("browseinterval"));
+ TQWhatsThis::add(browseport_, conf->comments_.toolTip("browseport"));
+ TQWhatsThis::add(browsetimeout_, conf->comments_.toolTip("browsetimeout"));
+ TQWhatsThis::add(browseaddresses_, conf->comments_.toolTip("browseaddresses"));
+ TQWhatsThis::add(browseorder_, conf->comments_.toolTip("browseorder"));
+ TQWhatsThis::add(useimplicitclasses_, conf->comments_.toolTip("implicitclasses"));
+ TQWhatsThis::add(useanyclasses_, conf->comments_.toolTip("implicitanyclasses"));
+ TQWhatsThis::add(hideimplicitmembers_, conf->comments_.toolTip("hideimplicitmembers"));
+ TQWhatsThis::add(useshortnames_, conf->comments_.toolTip("browseshortnames"));
}
void CupsdBrowsingPage::slotAdd()
{
- QString s = BrowseDialog::newAddress(this, conf_);
+ TQString s = BrowseDialog::newAddress(this, conf_);
if (!s.isEmpty())
browseaddresses_->insertItem(s);
}
void CupsdBrowsingPage::slotEdit(int index)
{
- QString s = browseaddresses_->text(index);
+ TQString s = browseaddresses_->text(index);
s = BrowseDialog::editAddress(s, this, conf_);
if (!s.isEmpty())
browseaddresses_->setText(index, s);
diff --git a/kdeprint/cups/cupsdconf2/cupsdbrowsingpage.h b/kdeprint/cups/cupsdconf2/cupsdbrowsingpage.h
index 655998a5e..b2060c4d0 100644
--- a/kdeprint/cups/cupsdconf2/cupsdbrowsingpage.h
+++ b/kdeprint/cups/cupsdconf2/cupsdbrowsingpage.h
@@ -32,10 +32,10 @@ class CupsdBrowsingPage : public CupsdPage
Q_OBJECT
public:
- CupsdBrowsingPage(QWidget *parent = 0, const char *name = 0);
+ CupsdBrowsingPage(TQWidget *parent = 0, const char *name = 0);
- bool loadConfig(CupsdConf*, QString&);
- bool saveConfig(CupsdConf*, QString&);
+ bool loadConfig(CupsdConf*, TQString&);
+ bool saveConfig(CupsdConf*, TQString&);
void setInfos(CupsdConf*);
protected slots:
diff --git a/kdeprint/cups/cupsdconf2/cupsdcomment.cpp b/kdeprint/cups/cupsdconf2/cupsdcomment.cpp
index d49a104a3..43847299b 100644
--- a/kdeprint/cups/cupsdconf2/cupsdcomment.cpp
+++ b/kdeprint/cups/cupsdconf2/cupsdcomment.cpp
@@ -19,37 +19,37 @@
#include "cupsdcomment.h"
-#include <qfile.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqregexp.h>
#include <klocale.h>
#include <kstandarddirs.h>
-QString Comment::comment()
+TQString Comment::comment()
{
- QString str = comment_;
- str.replace(QRegExp("<[^>]*>"), "");
+ TQString str = comment_;
+ str.replace(TQRegExp("<[^>]*>"), "");
str += ("#\n" + example_);
return str;
}
-QString Comment::toolTip()
+TQString Comment::toolTip()
{
- QString str = comment_;
- str.replace(QRegExp("^#[\\s]*"), "").replace(QRegExp("\n#[\\s]*"), "\n");
+ TQString str = comment_;
+ str.replace(TQRegExp("^#[\\s]*"), "").replace(TQRegExp("\n#[\\s]*"), "\n");
return i18n("Do not translate the keyword between brackets (e.g. ServerName, ServerAdmin, etc.)", str.utf8());
}
-QString Comment::key()
+TQString Comment::key()
{
return key_;
}
-bool Comment::load(QFile *f)
+bool Comment::load(TQFile *f)
{
comment_ = "";
example_ = "";
key_ = "";
- QString line, *current = &comment_;
+ TQString line, *current = &comment_;
while (!f->atEnd())
{
f->readLine(line, 1024);
@@ -83,12 +83,12 @@ bool Comment::load(QFile *f)
//------------------------------------------------------------------------------------------------------------
-QString CupsdComment::operator[] (const QString& key)
+TQString CupsdComment::operator[] (const TQString& key)
{
return comment(key);
}
-QString CupsdComment::comment(const QString& key)
+TQString CupsdComment::comment(const TQString& key)
{
if (comments_.count() != 0 || loadComments())
{
@@ -96,10 +96,10 @@ QString CupsdComment::comment(const QString& key)
if (comm)
return comm->comment();
}
- return QString::null;
+ return TQString::null;
}
-QString CupsdComment::toolTip(const QString& key)
+TQString CupsdComment::toolTip(const TQString& key)
{
if (comments_.count() != 0 || loadComments())
{
@@ -107,7 +107,7 @@ QString CupsdComment::toolTip(const QString& key)
if (comm)
return comm->toolTip();
}
- return QString::null;
+ return TQString::null;
}
bool CupsdComment::loadComments()
diff --git a/kdeprint/cups/cupsdconf2/cupsdcomment.h b/kdeprint/cups/cupsdconf2/cupsdcomment.h
index efe242765..8b1922f5b 100644
--- a/kdeprint/cups/cupsdconf2/cupsdcomment.h
+++ b/kdeprint/cups/cupsdconf2/cupsdcomment.h
@@ -20,36 +20,36 @@
#ifndef CUPSDCOMMENT_H
#define CUPSDCOMMENT_H
-#include <qstringlist.h>
-#include <qdict.h>
+#include <tqstringlist.h>
+#include <tqdict.h>
class QFile;
class Comment
{
public:
- bool load(QFile* f);
- QString toolTip();
- QString comment();
- QString key();
+ bool load(TQFile* f);
+ TQString toolTip();
+ TQString comment();
+ TQString key();
private:
- QString comment_;
- QString example_;
- QString key_;
+ TQString comment_;
+ TQString example_;
+ TQString key_;
};
class CupsdComment
{
public:
- QString operator[] (const QString& key);
- QString comment(const QString& key);
- QString toolTip(const QString& key);
+ TQString operator[] (const TQString& key);
+ TQString comment(const TQString& key);
+ TQString toolTip(const TQString& key);
private:
bool loadComments();
private:
- QDict<Comment> comments_;
+ TQDict<Comment> comments_;
};
#endif
diff --git a/kdeprint/cups/cupsdconf2/cupsdconf.cpp b/kdeprint/cups/cupsdconf2/cupsdconf.cpp
index 1794d693d..f500d219c 100644
--- a/kdeprint/cups/cupsdconf2/cupsdconf.cpp
+++ b/kdeprint/cups/cupsdconf2/cupsdconf.cpp
@@ -20,8 +20,8 @@
#include <config.h>
#include "cupsdconf.h"
-#include <qfile.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqregexp.h>
#include <klocale.h>
#include <kdebug.h>
#include <kconfig.h>
@@ -31,18 +31,18 @@
#include <cups/ipp.h>
#include <cups/language.h>
-QString findDir(const QStringList& list)
+TQString findDir(const TQStringList& list)
{
- for (QStringList::ConstIterator it=list.begin(); it!=list.end(); ++it)
- if (QFile::exists(*it))
+ for (TQStringList::ConstIterator it=list.begin(); it!=list.end(); ++it)
+ if (TQFile::exists(*it))
return *it;
// if nothing found, just use the first as default value
return list[0];
}
-void splitSizeSpec(const QString& s, int& sz, int& suff)
+void splitSizeSpec(const TQString& s, int& sz, int& suff)
{
- int p = s.find(QRegExp("\\D"));
+ int p = s.find(TQRegExp("\\D"));
sz = s.mid(0, p).toInt();
if (p != -1)
{
@@ -62,28 +62,28 @@ void splitSizeSpec(const QString& s, int& sz, int& suff)
CupsdConf::CupsdConf()
{
// start by trying to find CUPS directories (useful later)
- datadir_ = findDir(QStringList("/usr/share/cups")
+ datadir_ = findDir(TQStringList("/usr/share/cups")
<< "/usr/local/share/cups"
<< "/opt/share/cups"
<< "/opt/local/share/cups");
- documentdir_ = findDir(QStringList(datadir_+"/doc-root")
+ documentdir_ = findDir(TQStringList(datadir_+"/doc-root")
<< datadir_.left(datadir_.length()-5)+"/doc/cups");
//fontpath_ << (datadir_+"/fonts");
- requestdir_ = findDir(QStringList("/var/spool/cups")
+ requestdir_ = findDir(TQStringList("/var/spool/cups")
<< "/var/cups");
- serverbin_ = findDir(QStringList("/usr/lib" KDELIBSUFF "/cups")
+ serverbin_ = findDir(TQStringList("/usr/lib" KDELIBSUFF "/cups")
<< "/usr/local/lib" KDELIBSUFF "/cups"
<< "/opt/lib" KDELIBSUFF "/cups"
<< "/opt/local/lib" KDELIBSUFF "/cups");
- serverfiles_ = findDir(QStringList("/etc/cups")
+ serverfiles_ = findDir(TQStringList("/etc/cups")
<< "/usr/local/etc/cups");
tmpfiles_ = requestdir_+"/tmp";
// other options
- servername_ = QString::null;
- serveradmin_ = QString::null;
+ servername_ = TQString::null;
+ serveradmin_ = TQString::null;
classification_ = CLASS_NONE;
- otherclassname_ = QString::null;
+ otherclassname_ = TQString::null;
classoverride_ = false;
charset_ = "utf-8";
language_ = "en";
@@ -100,7 +100,7 @@ CupsdConf::CupsdConf()
maxrequestsize_ = "0";
clienttimeout_ = 300;
// listenaddresses_
- QString logdir = findDir(QStringList("/var/log/cups")
+ QString logdir = findDir(TQStringList("/var/log/cups")
<< "/var/spool/cups/log"
<< "/var/cups/log");
accesslog_ = logdir+"/access_log";
@@ -137,7 +137,7 @@ CupsdConf::~CupsdConf()
{
}
-bool CupsdConf::loadFromFile(const QString& filename)
+bool CupsdConf::loadFromFile(const TQString& filename)
{
QFile f(filename);
if (!f.exists() || !f.open(IO_ReadOnly)) return false;
@@ -173,7 +173,7 @@ bool CupsdConf::loadFromFile(const QString& filename)
}
}
-bool CupsdConf::saveToFile(const QString& filename)
+bool CupsdConf::saveToFile(const TQString& filename)
{
QFile f(filename);
if (!f.open(IO_WriteOnly))
@@ -283,7 +283,7 @@ bool CupsdConf::saveToFile(const QString& filename)
t << endl;
t << "Satisfy " << (loc->satisfy_ == SATISFY_ALL ? "All" : "Any") << endl;
t << "Order " << (loc->order_ == ORDER_ALLOW_DENY ? "allow,deny" : "deny,allow") << endl;
- for (QStringList::ConstIterator it=loc->addresses_.begin(); it!=loc->addresses_.end(); ++it)
+ for (TQStringList::ConstIterator it=loc->addresses_.begin(); it!=loc->addresses_.end(); ++it)
t << *it << endl;
t << "</Location>" << endl;
}
@@ -316,7 +316,7 @@ bool CupsdConf::saveToFile(const QString& filename)
t << "Timeout " << clienttimeout_ << endl;
t << endl << comments_["listen"] << endl;
- for (QStringList::ConstIterator it=listenaddresses_.begin(); it!=listenaddresses_.end(); ++it)
+ for (TQStringList::ConstIterator it=listenaddresses_.begin(); it!=listenaddresses_.end(); ++it)
t << *it << endl;
t << endl << "# Log" << endl;
@@ -387,7 +387,7 @@ bool CupsdConf::saveToFile(const QString& filename)
t << "DocumentRoot " << documentdir_ << endl;
t << endl << comments_["fontpath"] << endl;
- for (QStringList::ConstIterator it=fontpath_.begin(); it!=fontpath_.end(); ++it)
+ for (TQStringList::ConstIterator it=fontpath_.begin(); it!=fontpath_.end(); ++it)
t << "FontPath " << *it << endl;
t << endl << comments_["requestroot"] << endl;
@@ -410,7 +410,7 @@ bool CupsdConf::saveToFile(const QString& filename)
if (browsing_)
{
t << "BrowseProtocols ";
- for (QStringList::ConstIterator it=browseprotocols_.begin(); it!=browseprotocols_.end(); ++it)
+ for (TQStringList::ConstIterator it=browseprotocols_.begin(); it!=browseprotocols_.end(); ++it)
t << (*it).upper() << " ";
t << endl;
}
@@ -426,7 +426,7 @@ bool CupsdConf::saveToFile(const QString& filename)
t << endl << comments_["browseaddress"] << endl;
if (browsing_)
- for (QStringList::ConstIterator it=browseaddresses_.begin(); it!=browseaddresses_.end(); ++it)
+ for (TQStringList::ConstIterator it=browseaddresses_.begin(); it!=browseaddresses_.end(); ++it)
if ((*it).startsWith("Send"))
t << "BrowseAddress " << (*it).mid(5) << endl;
else
@@ -448,14 +448,14 @@ bool CupsdConf::saveToFile(const QString& filename)
if (browsing_) t << "BrowseShortNames " << (useshortnames_ ? "Yes" : "No") << endl;
t << endl << "# Unknown" << endl;
- for (QValueList< QPair<QString,QString> >::ConstIterator it=unknown_.begin(); it!=unknown_.end(); ++it)
+ for (TQValueList< QPair<TQString,TQString> >::ConstIterator it=unknown_.begin(); it!=unknown_.end(); ++it)
t << (*it).first << " " << (*it).second << endl;
return true;
}
}
-bool CupsdConf::parseLocation(CupsLocation *location, QTextStream& file)
+bool CupsdConf::parseLocation(CupsLocation *location, TQTextStream& file)
{
QString line;
bool done(false);
@@ -479,10 +479,10 @@ bool CupsdConf::parseLocation(CupsLocation *location, QTextStream& file)
return value;
}
-bool CupsdConf::parseOption(const QString& line)
+bool CupsdConf::parseOption(const TQString& line)
{
int p(-1);
- QString keyword, value, l(line.simplifyWhiteSpace());
+ TQString keyword, value, l(line.simplifyWhiteSpace());
if ((p=l.find(' ')) != -1)
{
@@ -507,11 +507,11 @@ bool CupsdConf::parseOption(const QString& line)
else if (keyword == "browseprotocols")
{
browseprotocols_.clear();
- QStringList prots = QStringList::split(QRegExp("\\s"), value, false);
+ TQStringList prots = TQStringList::split(TQRegExp("\\s"), value, false);
if (prots.find("all") != prots.end())
browseprotocols_ << "CUPS" << "SLP";
else
- for (QStringList::ConstIterator it=prots.begin(); it!=prots.end(); ++it)
+ for (TQStringList::ConstIterator it=prots.begin(); it!=prots.end(); ++it)
browseprotocols_ << (*it).upper();
}
else if (keyword == "browserelay") browseaddresses_.append("Relay "+value);
@@ -540,12 +540,12 @@ bool CupsdConf::parseOption(const QString& line)
else if (keyword == "documentroot") documentdir_ = value;
else if (keyword == "errorlog") errorlog_ = value;
else if (keyword == "filterlimit") filterlimit_ = value.toInt();
- else if (keyword == "fontpath") fontpath_ += QStringList::split(':', value, false);
+ else if (keyword == "fontpath") fontpath_ += TQStringList::split(':', value, false);
else if (keyword == "group") group_ = value;
else if (keyword == "hideimplicitmembers") hideimplicitmembers_ = (value.lower() != "no");
else if (keyword == "hostnamelookups")
{
- QString h = value.lower();
+ TQString h = value.lower();
if (h == "on") hostnamelookup_ = HOSTNAME_ON;
else if (h == "double") hostnamelookup_ = HOSTNAME_DOUBLE;
else hostnamelookup_ = HOSTNAME_OFF;
@@ -557,7 +557,7 @@ bool CupsdConf::parseOption(const QString& line)
else if (keyword == "listen") listenaddresses_.append("Listen "+value);
else if (keyword == "loglevel")
{
- QString ll = value.lower();
+ TQString ll = value.lower();
if (ll == "none") loglevel_ = LOGLEVEL_NONE;
else if (ll == "error") loglevel_ = LOGLEVEL_ERROR;
else if (ll == "warn") loglevel_ = LOGLEVEL_WARN;
@@ -600,7 +600,7 @@ bool CupsdConf::parseOption(const QString& line)
else
{
// unrecognized option
- unknown_ << QPair<QString,QString>(keyword, value);
+ unknown_ << QPair<TQString,TQString>(keyword, value);
}
return true;
}
@@ -695,7 +695,7 @@ CupsLocation::CupsLocation()
resourcename_ = "";
authtype_ = AUTHTYPE_NONE;
authclass_ = AUTHCLASS_ANONYMOUS;
- authname_ = QString::null;
+ authname_ = TQString::null;
encryption_ = ENCRYPT_IFREQUESTED;
satisfy_ = SATISFY_ALL;
order_ = ORDER_ALLOW_DENY;
@@ -715,7 +715,7 @@ CupsLocation::CupsLocation(const CupsLocation& loc)
{
}
-bool CupsLocation::parseResource(const QString& line)
+bool CupsLocation::parseResource(const TQString& line)
{
QString str = line.simplifyWhiteSpace();
int p1 = line.find(' '), p2 = line.find('>');
@@ -727,10 +727,10 @@ bool CupsLocation::parseResource(const QString& line)
else return false;
}
-bool CupsLocation::parseOption(const QString& line)
+bool CupsLocation::parseOption(const TQString& line)
{
int p(-1);
- QString keyword, value, l(line.simplifyWhiteSpace());
+ TQString keyword, value, l(line.simplifyWhiteSpace());
if ((p=l.find(' ')) != -1)
{
@@ -744,14 +744,14 @@ bool CupsLocation::parseOption(const QString& line)
if (keyword == "authtype")
{
- QString a = value.lower();
+ TQString a = value.lower();
if (a == "basic") authtype_ = AUTHTYPE_BASIC;
else if (a == "digest") authtype_ = AUTHTYPE_DIGEST;
else authtype_ = AUTHTYPE_NONE;
}
else if (keyword == "authclass")
{
- QString a = value.lower();
+ TQString a = value.lower();
if (a == "user") authclass_ = AUTHCLASS_USER;
else if (a == "system") authclass_ = AUTHCLASS_SYSTEM;
else if (a == "group") authclass_ = AUTHCLASS_GROUP;
@@ -764,7 +764,7 @@ bool CupsLocation::parseOption(const QString& line)
if (p != -1)
{
authname_ = value.mid(p+1);
- QString cl = value.left(p).lower();
+ TQString cl = value.left(p).lower();
if (cl == "user")
authclass_ = AUTHCLASS_USER;
else if (cl == "group")
@@ -776,7 +776,7 @@ bool CupsLocation::parseOption(const QString& line)
else if (keyword == "order") order_ = (value.lower() == "deny,allow" ? ORDER_DENY_ALLOW : ORDER_ALLOW_DENY);
else if (keyword == "encryption")
{
- QString e = value.lower();
+ TQString e = value.lower();
if (e == "always") encryption_ = ENCRYPT_ALWAYS;
else if (e == "never") encryption_ = ENCRYPT_NEVER;
else if (e == "required") encryption_ = ENCRYPT_REQUIRED;
@@ -794,19 +794,19 @@ CupsResource::CupsResource()
type_ = RESOURCE_GLOBAL;
}
-CupsResource::CupsResource(const QString& path)
+CupsResource::CupsResource(const TQString& path)
{
setPath(path);
}
-void CupsResource::setPath(const QString& path)
+void CupsResource::setPath(const TQString& path)
{
path_ = path;
type_ = typeFromPath(path_);
text_ = pathToText(path_);
}
-int CupsResource::typeFromText(const QString& text)
+int CupsResource::typeFromText(const TQString& text)
{
if (text == i18n("Base", "Root") || text == i18n("All printers") || text == i18n("All classes") || text == i18n("Print jobs")) return RESOURCE_GLOBAL;
else if (text == i18n("Administration")) return RESOURCE_ADMIN;
@@ -815,7 +815,7 @@ int CupsResource::typeFromText(const QString& text)
else return RESOURCE_PRINTER;
}
-int CupsResource::typeFromPath(const QString& path)
+int CupsResource::typeFromPath(const TQString& path)
{
if (path == "/admin") return RESOURCE_ADMIN;
else if (path == "/printers" || path == "/classes" || path == "/" || path == "/jobs") return RESOURCE_GLOBAL;
@@ -824,7 +824,7 @@ int CupsResource::typeFromPath(const QString& path)
else return RESOURCE_GLOBAL;
}
-QString CupsResource::textToPath(const QString& text)
+TQString CupsResource::textToPath(const TQString& text)
{
QString path("/");
if (text == i18n("Administration")) path = "/admin";
@@ -845,7 +845,7 @@ QString CupsResource::textToPath(const QString& text)
return path;
}
-QString CupsResource::pathToText(const QString& path)
+TQString CupsResource::pathToText(const TQString& path)
{
QString text(i18n("Base", "Root"));
if (path == "/admin") text = i18n("Administration");
@@ -868,17 +868,17 @@ QString CupsResource::pathToText(const QString& path)
return text;
}
-QString CupsResource::typeToIconName(int type)
+TQString CupsResource::typeToIconName(int type)
{
switch (type)
{
case RESOURCE_ADMIN:
case RESOURCE_GLOBAL:
- return QString("folder");
+ return TQString("folder");
case RESOURCE_PRINTER:
- return QString("kdeprint_printer");
+ return TQString("kdeprint_printer");
case RESOURCE_CLASS:
- return QString("kdeprint_printer_class");
+ return TQString("kdeprint_printer_class");
}
- return QString("folder");
+ return TQString("folder");
}
diff --git a/kdeprint/cups/cupsdconf2/cupsdconf.h b/kdeprint/cups/cupsdconf2/cupsdconf.h
index 3c53c5390..e58e52b31 100644
--- a/kdeprint/cups/cupsdconf2/cupsdconf.h
+++ b/kdeprint/cups/cupsdconf2/cupsdconf.h
@@ -20,11 +20,11 @@
#ifndef CUPSDCONF_H
#define CUPSDCONF_H
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qptrlist.h>
-#include <qtextstream.h>
-#include <qpair.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqptrlist.h>
+#include <tqtextstream.h>
+#include <tqpair.h>
#include "cupsdcomment.h"
@@ -50,10 +50,10 @@ struct CupsdConf
CupsdConf();
~CupsdConf();
- bool loadFromFile(const QString& filename);
- bool saveToFile(const QString& filename);
- bool parseOption(const QString& line);
- bool parseLocation(CupsLocation *location, QTextStream& file);
+ bool loadFromFile(const TQString& filename);
+ bool saveToFile(const TQString& filename);
+ bool parseOption(const TQString& line);
+ bool parseLocation(CupsLocation *location, TQTextStream& file);
bool loadAvailableResources();
@@ -67,35 +67,35 @@ struct CupsdConf
QString servername_;
QString serveradmin_;
int classification_;
- QString otherclassname_;
+ TQString otherclassname_;
bool classoverride_;
- QString charset_;
- QString language_;
- QString printcap_;
+ TQString charset_;
+ TQString language_;
+ TQString printcap_;
int printcapformat_;
// Security
- QString remoteroot_;
- QString systemgroup_;
- QString encryptcert_;
- QString encryptkey_;
- QPtrList<CupsLocation> locations_;
- QPtrList<CupsResource> resources_;
+ TQString remoteroot_;
+ TQString systemgroup_;
+ TQString encryptcert_;
+ TQString encryptkey_;
+ TQPtrList<CupsLocation> locations_;
+ TQPtrList<CupsResource> resources_;
// Network
int hostnamelookup_;
bool keepalive_;
int keepalivetimeout_;
int maxclients_;
- QString maxrequestsize_;
+ TQString maxrequestsize_;
int clienttimeout_;
- QStringList listenaddresses_;
+ TQStringList listenaddresses_;
// Log
- QString accesslog_;
- QString errorlog_;
- QString pagelog_;
- QString maxlogsize_;
+ TQString accesslog_;
+ TQString errorlog_;
+ TQString pagelog_;
+ TQString maxlogsize_;
int loglevel_;
// Jobs
@@ -107,27 +107,27 @@ struct CupsdConf
int maxjobsperuser_;
// Filter
- QString user_;
- QString group_;
- QString ripcache_;
+ TQString user_;
+ TQString group_;
+ TQString ripcache_;
int filterlimit_;
// Directories
- QString datadir_;
- QString documentdir_;
- QStringList fontpath_;
- QString requestdir_;
- QString serverbin_;
- QString serverfiles_;
- QString tmpfiles_;
+ TQString datadir_;
+ TQString documentdir_;
+ TQStringList fontpath_;
+ TQString requestdir_;
+ TQString serverbin_;
+ TQString serverfiles_;
+ TQString tmpfiles_;
// Browsing
bool browsing_;
- QStringList browseprotocols_;
+ TQStringList browseprotocols_;
int browseport_;
int browseinterval_;
int browsetimeout_;
- QStringList browseaddresses_;
+ TQStringList browseaddresses_;
int browseorder_;
bool useimplicitclasses_;
bool hideimplicitmembers_;
@@ -138,7 +138,7 @@ struct CupsdConf
CupsdComment comments_;
// unrecognized options
- QValueList< QPair<QString,QString> > unknown_;
+ TQValueList< QPair<TQString,TQString> > unknown_;
};
struct CupsLocation
@@ -146,8 +146,8 @@ struct CupsLocation
CupsLocation();
CupsLocation(const CupsLocation& loc);
- bool parseOption(const QString& line);
- bool parseResource(const QString& line);
+ bool parseOption(const TQString& line);
+ bool parseResource(const TQString& line);
CupsResource *resource_;
QString resourcename_;
@@ -163,19 +163,19 @@ struct CupsLocation
struct CupsResource
{
CupsResource();
- CupsResource(const QString& path);
+ CupsResource(const TQString& path);
- void setPath(const QString& path);
+ void setPath(const TQString& path);
int type_;
QString path_;
QString text_;
- static QString textToPath(const QString& text);
- static QString pathToText(const QString& path);
- static int typeFromPath(const QString& path);
- static int typeFromText(const QString& text);
- static QString typeToIconName(int type);
+ static TQString textToPath(const TQString& text);
+ static TQString pathToText(const TQString& path);
+ static int typeFromPath(const TQString& path);
+ static int typeFromText(const TQString& text);
+ static TQString typeToIconName(int type);
};
#endif
diff --git a/kdeprint/cups/cupsdconf2/cupsddialog.cpp b/kdeprint/cups/cupsdconf2/cupsddialog.cpp
index 92f8eef51..77f35e1e3 100644
--- a/kdeprint/cups/cupsdconf2/cupsddialog.cpp
+++ b/kdeprint/cups/cupsdconf2/cupsddialog.cpp
@@ -31,16 +31,16 @@
#include "cupsdbrowsingpage.h"
#include "cupsdsecuritypage.h"
-#include <qdir.h>
-#include <qvbox.h>
+#include <tqdir.h>
+#include <tqvbox.h>
#include <kmessagebox.h>
#include <klocale.h>
-#include <qfile.h>
-#include <qfileinfo.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
#include <kglobal.h>
#include <kiconloader.h>
-#include <qstringlist.h>
-#include <qwhatsthis.h>
+#include <tqstringlist.h>
+#include <tqwhatsthis.h>
#include <kio/passdlg.h>
#include <kguiitem.h>
#include <kprocess.h>
@@ -54,14 +54,14 @@ static QString pass_string;
extern "C"
{
#include "cups-util.h"
- KDEPRINT_EXPORT bool restartServer(QString& msg)
+ KDEPRINT_EXPORT bool restartServer(TQString& msg)
{
return CupsdDialog::restartServer(msg);
}
- KDEPRINT_EXPORT bool configureServer(QWidget *parent, QString& msg)
+ KDEPRINT_EXPORT bool configureServer(TQWidget *parent, TQString& msg)
{
dynamically_loaded = true;
- bool result = CupsdDialog::configure(QString::null, parent, &msg);
+ bool result = CupsdDialog::configure(TQString::null, parent, &msg);
dynamically_loaded = false;
return result;
}
@@ -69,7 +69,7 @@ extern "C"
int getServerPid()
{
- QDir dir("/proc",QString::null,QDir::Name,QDir::Dirs);
+ QDir dir("/proc",TQString::null,TQDir::Name,TQDir::Dirs);
for (uint i=0;i<dir.count();i++)
{
if (dir[i] == "." || dir[i] == ".." || dir[i] == "self") continue;
@@ -94,7 +94,7 @@ const char* getPassword(const char*)
QString user(cupsUser());
QString pass;
- if (KIO::PasswordDialog::getNameAndPassword(user, pass, NULL) == QDialog::Accepted)
+ if (KIO::PasswordDialog::getNameAndPassword(user, pass, NULL) == TQDialog::Accepted)
{
cupsSetUser(user.latin1());
pass_string = pass;
@@ -109,7 +109,7 @@ const char* getPassword(const char*)
//---------------------------------------------------
-CupsdDialog::CupsdDialog(QWidget *parent, const char *name)
+CupsdDialog::CupsdDialog(TQWidget *parent, const char *name)
: KDialogBase(IconList, "", Ok|Cancel|User1, Ok, parent, name, true, true, KGuiItem(i18n("Short Help"), "help"))
{
KGlobal::iconLoader()->addAppDir("kdeprint");
@@ -135,14 +135,14 @@ CupsdDialog::~CupsdDialog()
void CupsdDialog::addConfPage(CupsdPage *page)
{
- QPixmap icon = KGlobal::instance()->iconLoader()->loadIcon(
+ TQPixmap icon = KGlobal::instance()->iconLoader()->loadIcon(
page->pixmap(),
KIcon::NoGroup,
KIcon::SizeMedium
);
QVBox *box = addVBoxPage(page->pageLabel(), page->header(), icon);
- page->reparent(box, QPoint(0,0));
+ page->reparent(box, TQPoint(0,0));
pagelist_.append(page);
}
@@ -165,7 +165,7 @@ void CupsdDialog::constructDialog()
}
}
-bool CupsdDialog::setConfigFile(const QString& filename)
+bool CupsdDialog::setConfigFile(const TQString& filename)
{
filename_ = filename;
if (!conf_->loadFromFile(filename_))
@@ -177,7 +177,7 @@ bool CupsdDialog::setConfigFile(const QString& filename)
{
// there were some unknown options, warn the user
QString msg;
- for (QValueList< QPair<QString,QString> >::ConstIterator it=conf_->unknown_.begin(); it!=conf_->unknown_.end(); ++it)
+ for (TQValueList< QPair<TQString,TQString> >::ConstIterator it=conf_->unknown_.begin(); it!=conf_->unknown_.end(); ++it)
msg += ((*it).first + " = " + (*it).second + "<br>");
msg.prepend("<p>" + i18n("Some options were not recognized by this configuration tool. "
"They will be left untouched and you won't be able to change them.") + "</p>");
@@ -195,7 +195,7 @@ bool CupsdDialog::setConfigFile(const QString& filename)
return true;
}
-bool CupsdDialog::restartServer(QString& msg)
+bool CupsdDialog::restartServer(TQString& msg)
{
int serverPid = getServerPid();
msg.truncate(0);
@@ -215,10 +215,10 @@ bool CupsdDialog::restartServer(QString& msg)
return (msg.isEmpty());
}
-bool CupsdDialog::configure(const QString& filename, QWidget *parent, QString *msg)
+bool CupsdDialog::configure(const TQString& filename, TQWidget *parent, TQString *msg)
{
bool needUpload(false);
- QString errormsg;
+ TQString errormsg;
bool result = true;
// init password dialog if needed
@@ -259,7 +259,7 @@ bool CupsdDialog::configure(const QString& filename, QWidget *parent, QString *m
CupsdDialog dlg(parent);
if (dlg.setConfigFile(fn) && dlg.exec())
{
- QCString encodedFn = QFile::encodeName(fn);
+ QCString encodedFn = TQFile::encodeName(fn);
if (!needUpload)
KMessageBox::information(parent,
i18n("The config file has not been uploaded to the "
@@ -276,7 +276,7 @@ bool CupsdDialog::configure(const QString& filename, QWidget *parent, QString *m
}
if (needUpload)
- QFile::remove(fn);
+ TQFile::remove(fn);
if ( msg )
*msg = errormsg;
@@ -314,7 +314,7 @@ void CupsdDialog::slotOk()
void CupsdDialog::slotUser1()
{
- QWhatsThis::enterWhatsThisMode();
+ TQWhatsThis::enterWhatsThisMode();
}
int CupsdDialog::serverPid()
@@ -338,7 +338,7 @@ int CupsdDialog::serverOwner()
str = t.readLine();
if (str.find("Uid:",0,false) == 0)
{
- QStringList list = QStringList::split('\t', str, false);
+ QStringList list = TQStringList::split('\t', str, false);
if (list.count() >= 2)
{
bool ok;
diff --git a/kdeprint/cups/cupsdconf2/cupsddialog.h b/kdeprint/cups/cupsdconf2/cupsddialog.h
index 4de5cd3dc..ed8a33613 100644
--- a/kdeprint/cups/cupsdconf2/cupsddialog.h
+++ b/kdeprint/cups/cupsdconf2/cupsddialog.h
@@ -21,7 +21,7 @@
#define CUPSDDIALOG_H
#include <kdialogbase.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
class CupsdPage;
struct CupsdConf;
@@ -30,13 +30,13 @@ class CupsdDialog : public KDialogBase
{
Q_OBJECT
public:
- CupsdDialog(QWidget *parent = 0, const char *name = 0);
+ CupsdDialog(TQWidget *parent = 0, const char *name = 0);
~CupsdDialog();
- bool setConfigFile(const QString& filename);
+ bool setConfigFile(const TQString& filename);
- static bool configure(const QString& filename = QString::null, QWidget *parent = 0, QString *errormsg = 0);
- static bool restartServer(QString& msg);
+ static bool configure(const TQString& filename = TQString::null, TQWidget *parent = 0, TQString *errormsg = 0);
+ static bool restartServer(TQString& msg);
static int serverPid();
static int serverOwner();
@@ -50,7 +50,7 @@ protected:
void restartServer();
private:
- QPtrList<CupsdPage> pagelist_;
+ TQPtrList<CupsdPage> pagelist_;
CupsdConf *conf_;
QString filename_;
};
diff --git a/kdeprint/cups/cupsdconf2/cupsddirpage.cpp b/kdeprint/cups/cupsdconf2/cupsddirpage.cpp
index 04a94c30a..75b979d3d 100644
--- a/kdeprint/cups/cupsdconf2/cupsddirpage.cpp
+++ b/kdeprint/cups/cupsdconf2/cupsddirpage.cpp
@@ -22,13 +22,13 @@
#include "qdirlineedit.h"
#include "qdirmultilineedit.h"
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
-CupsdDirPage::CupsdDirPage(QWidget *parent, const char *name)
+CupsdDirPage::CupsdDirPage(TQWidget *parent, const char *name)
: CupsdPage(parent, name)
{
setPageLabel(i18n("Folders"));
@@ -43,15 +43,15 @@ CupsdDirPage::CupsdDirPage(QWidget *parent, const char *name)
serverfiles_ = new QDirLineEdit(false, this);
tmpfiles_ = new QDirLineEdit(false, this);
- QLabel *l1 = new QLabel(i18n("Data folder:"), this);
- QLabel *l2 = new QLabel(i18n("Document folder:"), this);
- QLabel *l3 = new QLabel(i18n("Font path:"), this);
- QLabel *l4 = new QLabel(i18n("Request folder:"), this);
- QLabel *l5 = new QLabel(i18n("Server binaries:"), this);
- QLabel *l6 = new QLabel(i18n("Server files:"), this);
- QLabel *l7 = new QLabel(i18n("Temporary files:"), this);
+ TQLabel *l1 = new TQLabel(i18n("Data folder:"), this);
+ TQLabel *l2 = new TQLabel(i18n("Document folder:"), this);
+ TQLabel *l3 = new TQLabel(i18n("Font path:"), this);
+ TQLabel *l4 = new TQLabel(i18n("Request folder:"), this);
+ TQLabel *l5 = new TQLabel(i18n("Server binaries:"), this);
+ TQLabel *l6 = new TQLabel(i18n("Server files:"), this);
+ TQLabel *l7 = new TQLabel(i18n("Temporary files:"), this);
- QGridLayout *m1 = new QGridLayout(this, 8, 2, 10, 7);
+ QGridLayout *m1 = new TQGridLayout(this, 8, 2, 10, 7);
m1->setRowStretch(7, 1);
m1->setColStretch(1, 1);
m1->addWidget(l1, 0, 0, Qt::AlignRight);
@@ -70,7 +70,7 @@ CupsdDirPage::CupsdDirPage(QWidget *parent, const char *name)
m1->addWidget(tmpfiles_, 6, 1);
}
-bool CupsdDirPage::loadConfig(CupsdConf *conf, QString&)
+bool CupsdDirPage::loadConfig(CupsdConf *conf, TQString&)
{
conf_ = conf;
datadir_->setURL(conf_->datadir_);
@@ -84,7 +84,7 @@ bool CupsdDirPage::loadConfig(CupsdConf *conf, QString&)
return true;
}
-bool CupsdDirPage::saveConfig(CupsdConf *conf, QString&)
+bool CupsdDirPage::saveConfig(CupsdConf *conf, TQString&)
{
conf->datadir_ = datadir_->url();
conf->documentdir_ = documentdir_->url();
@@ -99,11 +99,11 @@ bool CupsdDirPage::saveConfig(CupsdConf *conf, QString&)
void CupsdDirPage::setInfos(CupsdConf *conf)
{
- QWhatsThis::add(datadir_, conf->comments_.toolTip("datadir"));
- QWhatsThis::add(documentdir_, conf->comments_.toolTip("documentroot"));
- QWhatsThis::add(fontpath_, conf->comments_.toolTip("fontpath"));
- QWhatsThis::add(requestdir_, conf->comments_.toolTip("requestroot"));
- QWhatsThis::add(serverbin_, conf->comments_.toolTip("serverbin"));
- QWhatsThis::add(serverfiles_, conf->comments_.toolTip("serverroot"));
- QWhatsThis::add(tmpfiles_, conf->comments_.toolTip("tempdir"));
+ TQWhatsThis::add(datadir_, conf->comments_.toolTip("datadir"));
+ TQWhatsThis::add(documentdir_, conf->comments_.toolTip("documentroot"));
+ TQWhatsThis::add(fontpath_, conf->comments_.toolTip("fontpath"));
+ TQWhatsThis::add(requestdir_, conf->comments_.toolTip("requestroot"));
+ TQWhatsThis::add(serverbin_, conf->comments_.toolTip("serverbin"));
+ TQWhatsThis::add(serverfiles_, conf->comments_.toolTip("serverroot"));
+ TQWhatsThis::add(tmpfiles_, conf->comments_.toolTip("tempdir"));
}
diff --git a/kdeprint/cups/cupsdconf2/cupsddirpage.h b/kdeprint/cups/cupsdconf2/cupsddirpage.h
index ffce797e8..6056f79c4 100644
--- a/kdeprint/cups/cupsdconf2/cupsddirpage.h
+++ b/kdeprint/cups/cupsdconf2/cupsddirpage.h
@@ -28,10 +28,10 @@ class QDirMultiLineEdit;
class CupsdDirPage : public CupsdPage
{
public:
- CupsdDirPage(QWidget *parent = 0, const char *name = 0);
+ CupsdDirPage(TQWidget *parent = 0, const char *name = 0);
- bool loadConfig(CupsdConf*, QString&);
- bool saveConfig(CupsdConf*, QString&);
+ bool loadConfig(CupsdConf*, TQString&);
+ bool saveConfig(CupsdConf*, TQString&);
void setInfos(CupsdConf*);
private:
diff --git a/kdeprint/cups/cupsdconf2/cupsdfilterpage.cpp b/kdeprint/cups/cupsdconf2/cupsdfilterpage.cpp
index 12270bc26..b8458c10c 100644
--- a/kdeprint/cups/cupsdconf2/cupsdfilterpage.cpp
+++ b/kdeprint/cups/cupsdconf2/cupsdfilterpage.cpp
@@ -21,24 +21,24 @@
#include "cupsdconf.h"
#include "sizewidget.h"
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
-#include <qcombobox.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
+#include <tqcombobox.h>
#include <klocale.h>
#include <knuminput.h>
-CupsdFilterPage::CupsdFilterPage(QWidget *parent, const char *name)
+CupsdFilterPage::CupsdFilterPage(TQWidget *parent, const char *name)
: CupsdPage(parent, name)
{
setPageLabel(i18n("Filter"));
setHeader(i18n("Filter Settings"));
setPixmap("filter");
- user_ = new QLineEdit(this);
- group_ = new QLineEdit(this);
+ user_ = new TQLineEdit(this);
+ group_ = new TQLineEdit(this);
ripcache_ = new SizeWidget(this);
filterlimit_ = new KIntNumInput(this);
@@ -46,12 +46,12 @@ CupsdFilterPage::CupsdFilterPage(QWidget *parent, const char *name)
filterlimit_->setSpecialValueText(i18n("Unlimited"));
filterlimit_->setSteps(1, 10);
- QLabel *l1 = new QLabel(i18n("User:"), this);
- QLabel *l2 = new QLabel(i18n("Group:"), this);
- QLabel *l3 = new QLabel(i18n("RIP cache:"), this);
- QLabel *l4 = new QLabel(i18n("Filter limit:"), this);
+ TQLabel *l1 = new TQLabel(i18n("User:"), this);
+ TQLabel *l2 = new TQLabel(i18n("Group:"), this);
+ TQLabel *l3 = new TQLabel(i18n("RIP cache:"), this);
+ TQLabel *l4 = new TQLabel(i18n("Filter limit:"), this);
- QGridLayout *m1 = new QGridLayout(this, 5, 2, 10, 7);
+ QGridLayout *m1 = new TQGridLayout(this, 5, 2, 10, 7);
m1->setRowStretch(4, 1);
m1->setColStretch(1, 1);
m1->addWidget(l1, 0, 0, Qt::AlignRight);
@@ -64,7 +64,7 @@ CupsdFilterPage::CupsdFilterPage(QWidget *parent, const char *name)
m1->addWidget(filterlimit_, 3, 1);
}
-bool CupsdFilterPage::loadConfig(CupsdConf *conf, QString&)
+bool CupsdFilterPage::loadConfig(CupsdConf *conf, TQString&)
{
conf_ = conf;
user_->setText(conf_->user_);
@@ -75,7 +75,7 @@ bool CupsdFilterPage::loadConfig(CupsdConf *conf, QString&)
return true;
}
-bool CupsdFilterPage::saveConfig(CupsdConf *conf, QString&)
+bool CupsdFilterPage::saveConfig(CupsdConf *conf, TQString&)
{
conf->user_ = user_->text();
conf->group_ = group_->text();
@@ -87,8 +87,8 @@ bool CupsdFilterPage::saveConfig(CupsdConf *conf, QString&)
void CupsdFilterPage::setInfos(CupsdConf *conf)
{
- QWhatsThis::add(user_, conf->comments_.toolTip("user"));
- QWhatsThis::add(group_, conf->comments_.toolTip("group"));
- QWhatsThis::add(ripcache_, conf->comments_.toolTip("ripcache"));
- QWhatsThis::add(filterlimit_, conf->comments_.toolTip("filterlimit"));
+ TQWhatsThis::add(user_, conf->comments_.toolTip("user"));
+ TQWhatsThis::add(group_, conf->comments_.toolTip("group"));
+ TQWhatsThis::add(ripcache_, conf->comments_.toolTip("ripcache"));
+ TQWhatsThis::add(filterlimit_, conf->comments_.toolTip("filterlimit"));
}
diff --git a/kdeprint/cups/cupsdconf2/cupsdfilterpage.h b/kdeprint/cups/cupsdconf2/cupsdfilterpage.h
index 894777520..858b5e011 100644
--- a/kdeprint/cups/cupsdconf2/cupsdfilterpage.h
+++ b/kdeprint/cups/cupsdconf2/cupsdfilterpage.h
@@ -30,10 +30,10 @@ class KIntNumInput;
class CupsdFilterPage : public CupsdPage
{
public:
- CupsdFilterPage(QWidget *parent = 0, const char *name = 0);
+ CupsdFilterPage(TQWidget *parent = 0, const char *name = 0);
- bool loadConfig(CupsdConf*, QString&);
- bool saveConfig(CupsdConf*, QString&);
+ bool loadConfig(CupsdConf*, TQString&);
+ bool saveConfig(CupsdConf*, TQString&);
void setInfos(CupsdConf*);
private:
diff --git a/kdeprint/cups/cupsdconf2/cupsdjobspage.cpp b/kdeprint/cups/cupsdconf2/cupsdjobspage.cpp
index bfb2832eb..52d9eaf15 100644
--- a/kdeprint/cups/cupsdconf2/cupsdjobspage.cpp
+++ b/kdeprint/cups/cupsdconf2/cupsdjobspage.cpp
@@ -20,24 +20,24 @@
#include "cupsdjobspage.h"
#include "cupsdconf.h"
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
#include <knuminput.h>
-CupsdJobsPage::CupsdJobsPage(QWidget *parent, const char *name)
+CupsdJobsPage::CupsdJobsPage(TQWidget *parent, const char *name)
: CupsdPage(parent, name)
{
setPageLabel(i18n("Jobs"));
setHeader(i18n("Print Jobs Settings"));
setPixmap("fileprint");
- keepjobhistory_ = new QCheckBox(i18n("Preserve job history"), this);
- keepjobfiles_ = new QCheckBox(i18n("Preserve job files"), this);
- autopurgejobs_ = new QCheckBox(i18n("Auto purge jobs"), this);
+ keepjobhistory_ = new TQCheckBox(i18n("Preserve job history"), this);
+ keepjobfiles_ = new TQCheckBox(i18n("Preserve job files"), this);
+ autopurgejobs_ = new TQCheckBox(i18n("Auto purge jobs"), this);
maxjobs_ = new KIntNumInput(this);
maxjobsperprinter_ = new KIntNumInput(this);
maxjobsperuser_ = new KIntNumInput(this);
@@ -52,11 +52,11 @@ CupsdJobsPage::CupsdJobsPage(QWidget *parent, const char *name)
maxjobsperuser_->setSpecialValueText(i18n("Unlimited"));
maxjobsperuser_->setSteps(1, 10);
- QLabel *l1 = new QLabel(i18n("Max jobs:"), this);
- QLabel *l2 = new QLabel(i18n("Max jobs per printer:"), this);
- QLabel *l3 = new QLabel(i18n("Max jobs per user:"), this);
+ TQLabel *l1 = new TQLabel(i18n("Max jobs:"), this);
+ TQLabel *l2 = new TQLabel(i18n("Max jobs per printer:"), this);
+ TQLabel *l3 = new TQLabel(i18n("Max jobs per user:"), this);
- QGridLayout *m1 = new QGridLayout(this, 7, 2, 10, 7);
+ QGridLayout *m1 = new TQGridLayout(this, 7, 2, 10, 7);
m1->setRowStretch(6, 1);
m1->setColStretch(1, 1);
m1->addWidget(keepjobhistory_, 0, 1);
@@ -69,11 +69,11 @@ CupsdJobsPage::CupsdJobsPage(QWidget *parent, const char *name)
m1->addWidget(maxjobsperprinter_, 4, 1);
m1->addWidget(maxjobsperuser_, 5, 1);
- connect(keepjobhistory_, SIGNAL(toggled(bool)), SLOT(historyChanged(bool)));
+ connect(keepjobhistory_, TQT_SIGNAL(toggled(bool)), TQT_SLOT(historyChanged(bool)));
keepjobhistory_->setChecked(true);
}
-bool CupsdJobsPage::loadConfig(CupsdConf *conf, QString&)
+bool CupsdJobsPage::loadConfig(CupsdConf *conf, TQString&)
{
conf_ = conf;
keepjobhistory_->setChecked(conf_->keepjobhistory_);
@@ -89,7 +89,7 @@ bool CupsdJobsPage::loadConfig(CupsdConf *conf, QString&)
return true;
}
-bool CupsdJobsPage::saveConfig(CupsdConf *conf, QString&)
+bool CupsdJobsPage::saveConfig(CupsdConf *conf, TQString&)
{
conf->keepjobhistory_ = keepjobhistory_->isChecked();
if (conf->keepjobhistory_)
@@ -106,12 +106,12 @@ bool CupsdJobsPage::saveConfig(CupsdConf *conf, QString&)
void CupsdJobsPage::setInfos(CupsdConf *conf)
{
- QWhatsThis::add(keepjobhistory_, conf->comments_.toolTip("preservejobhistory"));
- QWhatsThis::add(keepjobfiles_, conf->comments_.toolTip("preservejobfiles"));
- QWhatsThis::add(autopurgejobs_, conf->comments_.toolTip("autopurgejobs"));
- QWhatsThis::add(maxjobs_, conf->comments_.toolTip("maxjobs"));
- QWhatsThis::add(maxjobsperprinter_, conf->comments_.toolTip("maxjobsperprinter"));
- QWhatsThis::add(maxjobsperuser_, conf->comments_.toolTip("maxjobsperuser"));
+ TQWhatsThis::add(keepjobhistory_, conf->comments_.toolTip("preservejobhistory"));
+ TQWhatsThis::add(keepjobfiles_, conf->comments_.toolTip("preservejobfiles"));
+ TQWhatsThis::add(autopurgejobs_, conf->comments_.toolTip("autopurgejobs"));
+ TQWhatsThis::add(maxjobs_, conf->comments_.toolTip("maxjobs"));
+ TQWhatsThis::add(maxjobsperprinter_, conf->comments_.toolTip("maxjobsperprinter"));
+ TQWhatsThis::add(maxjobsperuser_, conf->comments_.toolTip("maxjobsperuser"));
}
void CupsdJobsPage::historyChanged(bool on)
diff --git a/kdeprint/cups/cupsdconf2/cupsdjobspage.h b/kdeprint/cups/cupsdconf2/cupsdjobspage.h
index 19e76a2aa..f29721516 100644
--- a/kdeprint/cups/cupsdconf2/cupsdjobspage.h
+++ b/kdeprint/cups/cupsdconf2/cupsdjobspage.h
@@ -30,10 +30,10 @@ class CupsdJobsPage : public CupsdPage
Q_OBJECT
public:
- CupsdJobsPage(QWidget *parent = 0, const char *name = 0);
+ CupsdJobsPage(TQWidget *parent = 0, const char *name = 0);
- bool loadConfig(CupsdConf*, QString&);
- bool saveConfig(CupsdConf*, QString&);
+ bool loadConfig(CupsdConf*, TQString&);
+ bool saveConfig(CupsdConf*, TQString&);
void setInfos(CupsdConf*);
protected slots:
diff --git a/kdeprint/cups/cupsdconf2/cupsdlogpage.cpp b/kdeprint/cups/cupsdconf2/cupsdlogpage.cpp
index 49840050e..032af5526 100644
--- a/kdeprint/cups/cupsdconf2/cupsdlogpage.cpp
+++ b/kdeprint/cups/cupsdconf2/cupsdlogpage.cpp
@@ -22,15 +22,15 @@
#include "qdirlineedit.h"
#include "sizewidget.h"
-#include <qlabel.h>
-#include <qcombobox.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
#include <kfiledialog.h>
-CupsdLogPage::CupsdLogPage(QWidget *parent, const char *name)
+CupsdLogPage::CupsdLogPage(TQWidget *parent, const char *name)
: CupsdPage(parent, name)
{
setPageLabel(i18n("Log"));
@@ -41,7 +41,7 @@ CupsdLogPage::CupsdLogPage(QWidget *parent, const char *name)
errorlog_ = new QDirLineEdit(true, this);
pagelog_ = new QDirLineEdit(true, this);
maxlogsize_ = new SizeWidget(this);
- loglevel_ = new QComboBox(this);
+ loglevel_ = new TQComboBox(this);
loglevel_->insertItem(i18n("Detailed Debugging"));
loglevel_->insertItem(i18n("Debug Information"));
@@ -55,15 +55,15 @@ CupsdLogPage::CupsdLogPage(QWidget *parent, const char *name)
maxlogsize_->setSpecialValueText(i18n("Unlimited"));
maxlogsize_->setSuffix(i18n("MB"));*/
- QLabel *l1 = new QLabel(i18n("Access log:"), this);
- QLabel *l2 = new QLabel(i18n("Error log:"), this);
- QLabel *l3 = new QLabel(i18n("Page log:"), this);
- QLabel *l4 = new QLabel(i18n("Max log size:"), this);
- QLabel *l5 = new QLabel(i18n("Log level:"), this);
+ TQLabel *l1 = new TQLabel(i18n("Access log:"), this);
+ TQLabel *l2 = new TQLabel(i18n("Error log:"), this);
+ TQLabel *l3 = new TQLabel(i18n("Page log:"), this);
+ TQLabel *l4 = new TQLabel(i18n("Max log size:"), this);
+ TQLabel *l5 = new TQLabel(i18n("Log level:"), this);
loglevel_->setCurrentItem(2);
- QGridLayout *m1 = new QGridLayout(this, 6, 2, 10, 7);
+ QGridLayout *m1 = new TQGridLayout(this, 6, 2, 10, 7);
m1->setRowStretch(5, 1);
m1->setColStretch(1, 1);
m1->addWidget(l1, 0, 0, Qt::AlignRight);
@@ -78,7 +78,7 @@ CupsdLogPage::CupsdLogPage(QWidget *parent, const char *name)
m1->addWidget(loglevel_, 4, 1);
}
-bool CupsdLogPage::loadConfig(CupsdConf *conf, QString&)
+bool CupsdLogPage::loadConfig(CupsdConf *conf, TQString&)
{
conf_ = conf;
accesslog_->setURL(conf_->accesslog_);
@@ -90,7 +90,7 @@ bool CupsdLogPage::loadConfig(CupsdConf *conf, QString&)
return true;
}
-bool CupsdLogPage::saveConfig(CupsdConf *conf, QString&)
+bool CupsdLogPage::saveConfig(CupsdConf *conf, TQString&)
{
conf->accesslog_ = accesslog_->url();
conf->errorlog_ = errorlog_->url();
@@ -103,9 +103,9 @@ bool CupsdLogPage::saveConfig(CupsdConf *conf, QString&)
void CupsdLogPage::setInfos(CupsdConf *conf)
{
- QWhatsThis::add(accesslog_, conf->comments_.toolTip("accesslog"));
- QWhatsThis::add(errorlog_, conf->comments_.toolTip("errorlog"));
- QWhatsThis::add(pagelog_, conf->comments_.toolTip("pagelog"));
- QWhatsThis::add(maxlogsize_, conf->comments_.toolTip("maxlogsize"));
- QWhatsThis::add(loglevel_, conf->comments_.toolTip("loglevel"));
+ TQWhatsThis::add(accesslog_, conf->comments_.toolTip("accesslog"));
+ TQWhatsThis::add(errorlog_, conf->comments_.toolTip("errorlog"));
+ TQWhatsThis::add(pagelog_, conf->comments_.toolTip("pagelog"));
+ TQWhatsThis::add(maxlogsize_, conf->comments_.toolTip("maxlogsize"));
+ TQWhatsThis::add(loglevel_, conf->comments_.toolTip("loglevel"));
}
diff --git a/kdeprint/cups/cupsdconf2/cupsdlogpage.h b/kdeprint/cups/cupsdconf2/cupsdlogpage.h
index 68e15ff45..de7826827 100644
--- a/kdeprint/cups/cupsdconf2/cupsdlogpage.h
+++ b/kdeprint/cups/cupsdconf2/cupsdlogpage.h
@@ -29,10 +29,10 @@ class QComboBox;
class CupsdLogPage : public CupsdPage
{
public:
- CupsdLogPage(QWidget *parent = 0, const char *name = 0);
+ CupsdLogPage(TQWidget *parent = 0, const char *name = 0);
- bool loadConfig(CupsdConf*, QString&);
- bool saveConfig(CupsdConf*, QString&);
+ bool loadConfig(CupsdConf*, TQString&);
+ bool saveConfig(CupsdConf*, TQString&);
void setInfos(CupsdConf*);
private:
diff --git a/kdeprint/cups/cupsdconf2/cupsdnetworkpage.cpp b/kdeprint/cups/cupsdconf2/cupsdnetworkpage.cpp
index 6b0f196b5..3cc360150 100644
--- a/kdeprint/cups/cupsdconf2/cupsdnetworkpage.cpp
+++ b/kdeprint/cups/cupsdconf2/cupsdnetworkpage.cpp
@@ -23,28 +23,28 @@
#include "portdialog.h"
#include "sizewidget.h"
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
#include <knuminput.h>
-CupsdNetworkPage::CupsdNetworkPage(QWidget *parent, const char *name)
+CupsdNetworkPage::CupsdNetworkPage(TQWidget *parent, const char *name)
: CupsdPage(parent, name)
{
setPageLabel(i18n("Network"));
setHeader(i18n("Network Settings"));
setPixmap("network");
- keepalive_ = new QCheckBox(i18n("Keep alive"), this);
+ keepalive_ = new TQCheckBox(i18n("Keep alive"), this);
keepalivetimeout_ = new KIntNumInput(this);
maxclients_ = new KIntNumInput(this);
maxrequestsize_ = new SizeWidget(this);
clienttimeout_ = new KIntNumInput(this);
- hostnamelookup_ = new QComboBox(this);
+ hostnamelookup_ = new TQComboBox(this);
listen_ = new EditList(this);
keepalivetimeout_->setRange(0, 10000, 1, true);
@@ -64,14 +64,14 @@ CupsdNetworkPage::CupsdNetworkPage(QWidget *parent, const char *name)
hostnamelookup_->insertItem(i18n("On"));
hostnamelookup_->insertItem(i18n("Double"));
- QLabel *l1 = new QLabel(i18n("Hostname lookups:"), this);
- QLabel *l2 = new QLabel(i18n("Keep-alive timeout:"), this);
- QLabel *l3 = new QLabel(i18n("Max clients:"), this);
- QLabel *l4 = new QLabel(i18n("Max request size:"), this);
- QLabel *l5 = new QLabel(i18n("Client timeout:"), this);
- QLabel *l6 = new QLabel(i18n("Listen to:"), this);
+ TQLabel *l1 = new TQLabel(i18n("Hostname lookups:"), this);
+ TQLabel *l2 = new TQLabel(i18n("Keep-alive timeout:"), this);
+ TQLabel *l3 = new TQLabel(i18n("Max clients:"), this);
+ TQLabel *l4 = new TQLabel(i18n("Max request size:"), this);
+ TQLabel *l5 = new TQLabel(i18n("Client timeout:"), this);
+ TQLabel *l6 = new TQLabel(i18n("Listen to:"), this);
- QGridLayout *m1 = new QGridLayout(this, 8, 2, 10, 7);
+ QGridLayout *m1 = new TQGridLayout(this, 8, 2, 10, 7);
m1->setRowStretch(7, 1);
m1->setColStretch(1, 1);
m1->addWidget(l1, 0, 0, Qt::AlignRight);
@@ -88,14 +88,14 @@ CupsdNetworkPage::CupsdNetworkPage(QWidget *parent, const char *name)
m1->addWidget(clienttimeout_, 5, 1);
m1->addWidget(listen_, 6, 1);
- connect(listen_, SIGNAL(add()), SLOT(slotAdd()));
- connect(listen_, SIGNAL(edit(int)), SLOT(slotEdit(int)));
- connect(listen_, SIGNAL(defaultList()), SLOT(slotDefaultList()));
- connect(keepalive_, SIGNAL(toggled(bool)), keepalivetimeout_, SLOT(setEnabled(bool)));
+ connect(listen_, TQT_SIGNAL(add()), TQT_SLOT(slotAdd()));
+ connect(listen_, TQT_SIGNAL(edit(int)), TQT_SLOT(slotEdit(int)));
+ connect(listen_, TQT_SIGNAL(defaultList()), TQT_SLOT(slotDefaultList()));
+ connect(keepalive_, TQT_SIGNAL(toggled(bool)), keepalivetimeout_, TQT_SLOT(setEnabled(bool)));
keepalive_->setChecked(true);
}
-bool CupsdNetworkPage::loadConfig(CupsdConf *conf, QString&)
+bool CupsdNetworkPage::loadConfig(CupsdConf *conf, TQString&)
{
conf_ = conf;
hostnamelookup_->setCurrentItem(conf_->hostnamelookup_);
@@ -109,7 +109,7 @@ bool CupsdNetworkPage::loadConfig(CupsdConf *conf, QString&)
return true;
}
-bool CupsdNetworkPage::saveConfig(CupsdConf *conf, QString&)
+bool CupsdNetworkPage::saveConfig(CupsdConf *conf, TQString&)
{
conf->hostnamelookup_ = hostnamelookup_->currentItem();
conf->keepalive_ = keepalive_->isChecked();
@@ -124,13 +124,13 @@ bool CupsdNetworkPage::saveConfig(CupsdConf *conf, QString&)
void CupsdNetworkPage::setInfos(CupsdConf *conf)
{
- QWhatsThis::add(hostnamelookup_, conf->comments_.toolTip("hostnamelookups"));
- QWhatsThis::add(keepalive_, conf->comments_.toolTip("keepalive"));
- QWhatsThis::add(keepalivetimeout_, conf->comments_.toolTip("keepalivetimeout"));
- QWhatsThis::add(maxclients_, conf->comments_.toolTip("maxclients"));
- QWhatsThis::add(maxrequestsize_, conf->comments_.toolTip("maxrequestsize"));
- QWhatsThis::add(clienttimeout_, conf->comments_.toolTip("timeout"));
- QWhatsThis::add(listen_, conf->comments_.toolTip("listen"));
+ TQWhatsThis::add(hostnamelookup_, conf->comments_.toolTip("hostnamelookups"));
+ TQWhatsThis::add(keepalive_, conf->comments_.toolTip("keepalive"));
+ TQWhatsThis::add(keepalivetimeout_, conf->comments_.toolTip("keepalivetimeout"));
+ TQWhatsThis::add(maxclients_, conf->comments_.toolTip("maxclients"));
+ TQWhatsThis::add(maxrequestsize_, conf->comments_.toolTip("maxrequestsize"));
+ TQWhatsThis::add(clienttimeout_, conf->comments_.toolTip("timeout"));
+ TQWhatsThis::add(listen_, conf->comments_.toolTip("listen"));
}
void CupsdNetworkPage::slotAdd()
@@ -142,7 +142,7 @@ void CupsdNetworkPage::slotAdd()
void CupsdNetworkPage::slotEdit(int index)
{
- QString s = listen_->text(index);
+ TQString s = listen_->text(index);
s = PortDialog::editListen(s, this, conf_);
if (!s.isEmpty())
listen_->setText(index, s);
diff --git a/kdeprint/cups/cupsdconf2/cupsdnetworkpage.h b/kdeprint/cups/cupsdconf2/cupsdnetworkpage.h
index c4c8bd450..82b728982 100644
--- a/kdeprint/cups/cupsdconf2/cupsdnetworkpage.h
+++ b/kdeprint/cups/cupsdconf2/cupsdnetworkpage.h
@@ -33,10 +33,10 @@ class CupsdNetworkPage : public CupsdPage
Q_OBJECT
public:
- CupsdNetworkPage(QWidget *parent = 0, const char *name = 0);
+ CupsdNetworkPage(TQWidget *parent = 0, const char *name = 0);
- bool loadConfig(CupsdConf*, QString&);
- bool saveConfig(CupsdConf*, QString&);
+ bool loadConfig(CupsdConf*, TQString&);
+ bool saveConfig(CupsdConf*, TQString&);
void setInfos(CupsdConf*);
protected slots:
diff --git a/kdeprint/cups/cupsdconf2/cupsdpage.cpp b/kdeprint/cups/cupsdconf2/cupsdpage.cpp
index 00798552c..e4a47bf1f 100644
--- a/kdeprint/cups/cupsdconf2/cupsdpage.cpp
+++ b/kdeprint/cups/cupsdconf2/cupsdpage.cpp
@@ -19,8 +19,8 @@
#include "cupsdpage.h"
-CupsdPage::CupsdPage(QWidget *parent, const char *name)
- : QWidget(parent, name)
+CupsdPage::CupsdPage(TQWidget *parent, const char *name)
+ : TQWidget(parent, name)
{
conf_ = 0;
}
diff --git a/kdeprint/cups/cupsdconf2/cupsdpage.h b/kdeprint/cups/cupsdconf2/cupsdpage.h
index dedd53ade..e503319ca 100644
--- a/kdeprint/cups/cupsdconf2/cupsdpage.h
+++ b/kdeprint/cups/cupsdconf2/cupsdpage.h
@@ -20,7 +20,7 @@
#ifndef CUPSDPAGE_H
#define CUPSDPAGE_H
-#include <qwidget.h>
+#include <tqwidget.h>
struct CupsdConf;
@@ -28,21 +28,21 @@ class CupsdPage : public QWidget
{
Q_OBJECT
public:
- CupsdPage(QWidget *parent = 0, const char *name = 0);
+ CupsdPage(TQWidget *parent = 0, const char *name = 0);
virtual ~CupsdPage();
- virtual bool loadConfig(CupsdConf *conf, QString& msg) = 0;
- virtual bool saveConfig(CupsdConf *conf, QString& msg) = 0;
+ virtual bool loadConfig(CupsdConf *conf, TQString& msg) = 0;
+ virtual bool saveConfig(CupsdConf *conf, TQString& msg) = 0;
virtual void setInfos(CupsdConf*) {}
- QString pageLabel() const { return label_; }
- QString header() const { return header_; }
- QString pixmap() const { return pixmap_; }
+ TQString pageLabel() const { return label_; }
+ TQString header() const { return header_; }
+ TQString pixmap() const { return pixmap_; }
protected:
- void setPageLabel(const QString& s) { label_ = s; }
- void setHeader(const QString& s) { header_ = s; }
- void setPixmap(const QString& s) { pixmap_ = s; }
+ void setPageLabel(const TQString& s) { label_ = s; }
+ void setHeader(const TQString& s) { header_ = s; }
+ void setPixmap(const TQString& s) { pixmap_ = s; }
protected:
CupsdConf *conf_;
diff --git a/kdeprint/cups/cupsdconf2/cupsdsecuritypage.cpp b/kdeprint/cups/cupsdconf2/cupsdsecuritypage.cpp
index a77f21708..0bf290fb9 100644
--- a/kdeprint/cups/cupsdconf2/cupsdsecuritypage.cpp
+++ b/kdeprint/cups/cupsdconf2/cupsdsecuritypage.cpp
@@ -23,16 +23,16 @@
#include "editlist.h"
#include "locationdialog.h"
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
#include <kiconloader.h>
#include <kmessagebox.h>
-CupsdSecurityPage::CupsdSecurityPage(QWidget *parent, const char *name)
+CupsdSecurityPage::CupsdSecurityPage(TQWidget *parent, const char *name)
: CupsdPage(parent, name)
{
setPageLabel(i18n("Security"));
@@ -40,19 +40,19 @@ CupsdSecurityPage::CupsdSecurityPage(QWidget *parent, const char *name)
setPixmap("password");
locs_.setAutoDelete(true);
- remoteroot_ = new QLineEdit(this);
- systemgroup_ = new QLineEdit(this);
+ remoteroot_ = new TQLineEdit(this);
+ systemgroup_ = new TQLineEdit(this);
encryptcert_ = new QDirLineEdit(true, this);
encryptkey_ = new QDirLineEdit(true, this);
locations_ = new EditList(this);
- QLabel *l1 = new QLabel(i18n("Remote root user:"), this);
- QLabel *l2 = new QLabel(i18n("System group:"), this);
- QLabel *l3 = new QLabel(i18n("Encryption certificate:"), this);
- QLabel *l4 = new QLabel(i18n("Encryption key:"), this);
- QLabel *l5 = new QLabel(i18n("Locations:"), this);
+ TQLabel *l1 = new TQLabel(i18n("Remote root user:"), this);
+ TQLabel *l2 = new TQLabel(i18n("System group:"), this);
+ TQLabel *l3 = new TQLabel(i18n("Encryption certificate:"), this);
+ TQLabel *l4 = new TQLabel(i18n("Encryption key:"), this);
+ TQLabel *l5 = new TQLabel(i18n("Locations:"), this);
- QGridLayout *m1 = new QGridLayout(this, 6, 2, 10, 7);
+ QGridLayout *m1 = new TQGridLayout(this, 6, 2, 10, 7);
m1->setRowStretch(5, 1);
m1->setColStretch(1, 1);
m1->addWidget(l1, 0, 0, Qt::AlignRight);
@@ -66,13 +66,13 @@ CupsdSecurityPage::CupsdSecurityPage(QWidget *parent, const char *name)
m1->addWidget(encryptkey_, 3, 1);
m1->addWidget(locations_, 4, 1);
- connect(locations_, SIGNAL(add()), SLOT(slotAdd()));
- connect(locations_, SIGNAL(edit(int)), SLOT(slotEdit(int)));
- connect(locations_, SIGNAL(defaultList()), SLOT(slotDefaultList()));
- connect(locations_, SIGNAL(deleted(int)), SLOT(slotDeleted(int)));
+ connect(locations_, TQT_SIGNAL(add()), TQT_SLOT(slotAdd()));
+ connect(locations_, TQT_SIGNAL(edit(int)), TQT_SLOT(slotEdit(int)));
+ connect(locations_, TQT_SIGNAL(defaultList()), TQT_SLOT(slotDefaultList()));
+ connect(locations_, TQT_SIGNAL(deleted(int)), TQT_SLOT(slotDeleted(int)));
}
-bool CupsdSecurityPage::loadConfig(CupsdConf *conf, QString&)
+bool CupsdSecurityPage::loadConfig(CupsdConf *conf, TQString&)
{
conf_ = conf;
remoteroot_->setText(conf_->remoteroot_);
@@ -80,7 +80,7 @@ bool CupsdSecurityPage::loadConfig(CupsdConf *conf, QString&)
encryptcert_->setURL(conf_->encryptcert_);
encryptkey_->setURL(conf_->encryptkey_);
locs_.clear();
- QPtrListIterator<CupsLocation> it(conf_->locations_);
+ TQPtrListIterator<CupsLocation> it(conf_->locations_);
for (;it.current();++it)
{
locs_.append(new CupsLocation(*(it.current())));
@@ -93,14 +93,14 @@ bool CupsdSecurityPage::loadConfig(CupsdConf *conf, QString&)
return true;
}
-bool CupsdSecurityPage::saveConfig(CupsdConf *conf, QString&)
+bool CupsdSecurityPage::saveConfig(CupsdConf *conf, TQString&)
{
conf->remoteroot_ = remoteroot_->text();
conf->systemgroup_ = systemgroup_->text();
conf->encryptcert_ = encryptcert_->url();
conf->encryptkey_ = encryptkey_->url();
conf->locations_.clear();
- QPtrListIterator<CupsLocation> it(locs_);
+ TQPtrListIterator<CupsLocation> it(locs_);
for (;it.current();++it)
conf->locations_.append(new CupsLocation(*(it.current())));
@@ -109,11 +109,11 @@ bool CupsdSecurityPage::saveConfig(CupsdConf *conf, QString&)
void CupsdSecurityPage::setInfos(CupsdConf *conf)
{
- QWhatsThis::add(remoteroot_, conf->comments_.toolTip("remoteroot"));
- QWhatsThis::add(systemgroup_, conf->comments_.toolTip("systemgroup"));
- QWhatsThis::add(encryptcert_, conf->comments_.toolTip("servercertificate"));
- QWhatsThis::add(encryptkey_, conf->comments_.toolTip("serverkey"));
- QWhatsThis::add(locations_, conf->comments_.toolTip("locationsshort"));
+ TQWhatsThis::add(remoteroot_, conf->comments_.toolTip("remoteroot"));
+ TQWhatsThis::add(systemgroup_, conf->comments_.toolTip("systemgroup"));
+ TQWhatsThis::add(encryptcert_, conf->comments_.toolTip("servercertificate"));
+ TQWhatsThis::add(encryptkey_, conf->comments_.toolTip("serverkey"));
+ TQWhatsThis::add(locations_, conf->comments_.toolTip("locationsshort"));
}
void CupsdSecurityPage::slotAdd()
@@ -125,7 +125,7 @@ void CupsdSecurityPage::slotAdd()
for (locs_.first(); locs_.current(); locs_.next())
if (locs_.current()->resource_ == loc->resource_)
{
- if (KMessageBox::warningContinueCancel(this, i18n("This location is already defined. Do you want to replace the existing one?"),QString::null,i18n("Replace")) == KMessageBox::Continue)
+ if (KMessageBox::warningContinueCancel(this, i18n("This location is already defined. Do you want to replace the existing one?"),TQString::null,i18n("Replace")) == KMessageBox::Continue)
{
index = locs_.at();
locs_.remove();
diff --git a/kdeprint/cups/cupsdconf2/cupsdsecuritypage.h b/kdeprint/cups/cupsdconf2/cupsdsecuritypage.h
index 56a9e2e45..e0bcfc6da 100644
--- a/kdeprint/cups/cupsdconf2/cupsdsecuritypage.h
+++ b/kdeprint/cups/cupsdconf2/cupsdsecuritypage.h
@@ -21,7 +21,7 @@
#define CUPSDSECURITYPAGE_H
#include "cupsdpage.h"
-#include <qptrlist.h>
+#include <tqptrlist.h>
class QLineEdit;
class EditList;
@@ -33,10 +33,10 @@ class CupsdSecurityPage : public CupsdPage
Q_OBJECT
public:
- CupsdSecurityPage(QWidget *parent = 0, const char *name = 0);
+ CupsdSecurityPage(TQWidget *parent = 0, const char *name = 0);
- bool loadConfig(CupsdConf*, QString&);
- bool saveConfig(CupsdConf*, QString&);
+ bool loadConfig(CupsdConf*, TQString&);
+ bool saveConfig(CupsdConf*, TQString&);
void setInfos(CupsdConf*);
protected slots:
@@ -50,7 +50,7 @@ private:
QDirLineEdit *encryptcert_, *encryptkey_;
EditList *locations_;
- QPtrList<CupsLocation> locs_;
+ TQPtrList<CupsLocation> locs_;
};
#endif
diff --git a/kdeprint/cups/cupsdconf2/cupsdserverpage.cpp b/kdeprint/cups/cupsdconf2/cupsdserverpage.cpp
index 861dad9de..cc0804f5b 100644
--- a/kdeprint/cups/cupsdconf2/cupsdserverpage.cpp
+++ b/kdeprint/cups/cupsdconf2/cupsdserverpage.cpp
@@ -20,16 +20,16 @@
#include "cupsdserverpage.h"
#include "cupsdconf.h"
-#include <qlineedit.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
-int findComboItem(QComboBox *cb, const QString& str)
+int findComboItem(TQComboBox *cb, const TQString& str)
{
for (int i=0; i<cb->count(); i++)
if (cb->text(i) == str)
@@ -37,22 +37,22 @@ int findComboItem(QComboBox *cb, const QString& str)
return (-1);
}
-CupsdServerPage::CupsdServerPage(QWidget *parent, const char *name)
+CupsdServerPage::CupsdServerPage(TQWidget *parent, const char *name)
: CupsdPage(parent, name)
{
setPageLabel(i18n("Server"));
setHeader(i18n("Server Settings"));
setPixmap("gear");
- servername_ = new QLineEdit(this);
- serveradmin_ = new QLineEdit(this);
- otherclassname_ = new QLineEdit(this);
- language_ = new QLineEdit(this);
- printcap_ = new QLineEdit(this);
- classification_ = new QComboBox(this);
- charset_ = new QComboBox(this);
- printcapformat_ = new QComboBox(this);
- classoverride_ = new QCheckBox(i18n("Allow overrides"), this);
+ servername_ = new TQLineEdit(this);
+ serveradmin_ = new TQLineEdit(this);
+ otherclassname_ = new TQLineEdit(this);
+ language_ = new TQLineEdit(this);
+ printcap_ = new TQLineEdit(this);
+ classification_ = new TQComboBox(this);
+ charset_ = new TQComboBox(this);
+ printcapformat_ = new TQComboBox(this);
+ classoverride_ = new TQCheckBox(i18n("Allow overrides"), this);
classification_->insertItem(i18n("None"));
classification_->insertItem(i18n("Classified"));
@@ -80,21 +80,21 @@ CupsdServerPage::CupsdServerPage(QWidget *parent, const char *name)
printcapformat_->insertItem("BSD");
printcapformat_->insertItem("SOLARIS");
- QLabel *l1 = new QLabel(i18n("Server name:"), this);
- QLabel *l2 = new QLabel(i18n("Server administrator:"), this);
- QLabel *l3 = new QLabel(i18n("Classification:"), this);
- QLabel *l4 = new QLabel(i18n("Default character set:"), this);
- QLabel *l5 = new QLabel(i18n("Default language:"), this);
- QLabel *l6 = new QLabel(i18n("Printcap file:"), this);
- QLabel *l7 = new QLabel(i18n("Printcap format:"), this);
+ TQLabel *l1 = new TQLabel(i18n("Server name:"), this);
+ TQLabel *l2 = new TQLabel(i18n("Server administrator:"), this);
+ TQLabel *l3 = new TQLabel(i18n("Classification:"), this);
+ TQLabel *l4 = new TQLabel(i18n("Default character set:"), this);
+ TQLabel *l5 = new TQLabel(i18n("Default language:"), this);
+ TQLabel *l6 = new TQLabel(i18n("Printcap file:"), this);
+ TQLabel *l7 = new TQLabel(i18n("Printcap format:"), this);
- connect(classification_, SIGNAL(activated(int)), SLOT(classChanged(int)));
+ connect(classification_, TQT_SIGNAL(activated(int)), TQT_SLOT(classChanged(int)));
classification_->setCurrentItem(0);
charset_->setCurrentItem(0);
printcapformat_->setCurrentItem(0);
classChanged(0);
- QGridLayout *m1 = new QGridLayout(this, 9, 2, 10, 7);
+ QGridLayout *m1 = new TQGridLayout(this, 9, 2, 10, 7);
m1->setRowStretch(8, 1);
m1->setColStretch(1, 1);
m1->addWidget(l1, 0, 0, Qt::AlignRight);
@@ -110,19 +110,19 @@ CupsdServerPage::CupsdServerPage(QWidget *parent, const char *name)
m1->addWidget(language_, 5, 1);
m1->addWidget(printcap_, 6, 1);
m1->addWidget(printcapformat_, 7, 1);
- QHBoxLayout *m2 = new QHBoxLayout(0, 0, 5);
+ QHBoxLayout *m2 = new TQHBoxLayout(0, 0, 5);
m1->addLayout(m2, 2, 1);
m2->addWidget(classification_);
m2->addWidget(otherclassname_);
- QWidget *w = new QWidget(this);
+ QWidget *w = new TQWidget(this);
w->setFixedWidth(20);
- QHBoxLayout *m3 = new QHBoxLayout(0, 0, 0);
+ QHBoxLayout *m3 = new TQHBoxLayout(0, 0, 0);
m1->addLayout(m3, 3, 1);
m3->addWidget(w);
m3->addWidget(classoverride_);
}
-bool CupsdServerPage::loadConfig(CupsdConf *conf, QString&)
+bool CupsdServerPage::loadConfig(CupsdConf *conf, TQString&)
{
conf_ = conf;
servername_->setText(conf_->servername_);
@@ -143,7 +143,7 @@ bool CupsdServerPage::loadConfig(CupsdConf *conf, QString&)
return true;
}
-bool CupsdServerPage::saveConfig(CupsdConf *conf, QString&)
+bool CupsdServerPage::saveConfig(CupsdConf *conf, TQString&)
{
conf->servername_ = servername_->text();
conf->serveradmin_ = serveradmin_->text();
@@ -162,14 +162,14 @@ bool CupsdServerPage::saveConfig(CupsdConf *conf, QString&)
void CupsdServerPage::setInfos(CupsdConf *conf)
{
- QWhatsThis::add(servername_, conf->comments_.toolTip("servername"));
- QWhatsThis::add(serveradmin_, conf->comments_.toolTip("serveradmin"));
- QWhatsThis::add(classification_, conf->comments_.toolTip("classification"));
- QWhatsThis::add(classoverride_, conf->comments_.toolTip("classifyoverride"));
- QWhatsThis::add(charset_, conf->comments_.toolTip("defaultcharset"));
- QWhatsThis::add(language_, conf->comments_.toolTip("defaultlanguage"));
- QWhatsThis::add(printcap_, conf->comments_.toolTip("printcap"));
- QWhatsThis::add(printcapformat_, conf->comments_.toolTip("printcapformat"));
+ TQWhatsThis::add(servername_, conf->comments_.toolTip("servername"));
+ TQWhatsThis::add(serveradmin_, conf->comments_.toolTip("serveradmin"));
+ TQWhatsThis::add(classification_, conf->comments_.toolTip("classification"));
+ TQWhatsThis::add(classoverride_, conf->comments_.toolTip("classifyoverride"));
+ TQWhatsThis::add(charset_, conf->comments_.toolTip("defaultcharset"));
+ TQWhatsThis::add(language_, conf->comments_.toolTip("defaultlanguage"));
+ TQWhatsThis::add(printcap_, conf->comments_.toolTip("printcap"));
+ TQWhatsThis::add(printcapformat_, conf->comments_.toolTip("printcapformat"));
}
void CupsdServerPage::classChanged(int index)
diff --git a/kdeprint/cups/cupsdconf2/cupsdserverpage.h b/kdeprint/cups/cupsdconf2/cupsdserverpage.h
index d82367c30..e7aeee196 100644
--- a/kdeprint/cups/cupsdconf2/cupsdserverpage.h
+++ b/kdeprint/cups/cupsdconf2/cupsdserverpage.h
@@ -31,10 +31,10 @@ class CupsdServerPage : public CupsdPage
Q_OBJECT
public:
- CupsdServerPage(QWidget *parent = 0, const char *name = 0);
+ CupsdServerPage(TQWidget *parent = 0, const char *name = 0);
- bool loadConfig(CupsdConf*, QString&);
- bool saveConfig(CupsdConf*, QString&);
+ bool loadConfig(CupsdConf*, TQString&);
+ bool saveConfig(CupsdConf*, TQString&);
void setInfos(CupsdConf*);
protected slots:
diff --git a/kdeprint/cups/cupsdconf2/cupsdsplash.cpp b/kdeprint/cups/cupsdconf2/cupsdsplash.cpp
index 7a623e972..9dd7581a8 100644
--- a/kdeprint/cups/cupsdconf2/cupsdsplash.cpp
+++ b/kdeprint/cups/cupsdconf2/cupsdsplash.cpp
@@ -19,33 +19,33 @@
#include "cupsdsplash.h"
-#include <qlabel.h>
-#include <qpixmap.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqpixmap.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kstandarddirs.h>
-CupsdSplash::CupsdSplash(QWidget *parent, const char *name)
+CupsdSplash::CupsdSplash(TQWidget *parent, const char *name)
: CupsdPage(parent, name)
{
setHeader(i18n("Welcome to the CUPS Server Configuration Tool"));
setPageLabel(i18n("Welcome"));
setPixmap("go");
- QVBoxLayout *main_ = new QVBoxLayout(this, 10, 10);
- QHBoxLayout *sub_ = new QHBoxLayout(0, 0, 10);
+ QVBoxLayout *main_ = new TQVBoxLayout(this, 10, 10);
+ QHBoxLayout *sub_ = new TQHBoxLayout(0, 0, 10);
main_->addLayout(sub_);
- QLabel *cupslogo_ = new QLabel(this);
- QString logopath = locate("data", QString("kdeprint/cups_logo.png"));
- cupslogo_->setPixmap(logopath.isEmpty() ? QPixmap() : QPixmap(logopath));
+ QLabel *cupslogo_ = new TQLabel(this);
+ QString logopath = locate("data", TQString("kdeprint/cups_logo.png"));
+ cupslogo_->setPixmap(logopath.isEmpty() ? TQPixmap() : TQPixmap(logopath));
cupslogo_->setAlignment(Qt::AlignCenter);
- QLabel *kupslogo_ = new QLabel(this);
- logopath = locate("data", QString("kdeprint/kde_logo.png"));
- kupslogo_->setPixmap(logopath.isEmpty() ? QPixmap() : QPixmap(logopath));
+ QLabel *kupslogo_ = new TQLabel(this);
+ logopath = locate("data", TQString("kdeprint/kde_logo.png"));
+ kupslogo_->setPixmap(logopath.isEmpty() ? TQPixmap() : TQPixmap(logopath));
kupslogo_->setAlignment(Qt::AlignCenter);
- QLabel *helptxt_ = new QLabel(this);
+ QLabel *helptxt_ = new TQLabel(this);
helptxt_->setText(i18n( "<p>This tool will help you to configure graphically the server of the CUPS printing system. "
"The available options are grouped into sets of related topics and can be accessed "
"quickly through the icon view located on the left. Each option has a default value that is "
@@ -62,12 +62,12 @@ CupsdSplash::~CupsdSplash()
{
}
-bool CupsdSplash::loadConfig(CupsdConf*, QString&)
+bool CupsdSplash::loadConfig(CupsdConf*, TQString&)
{
return true;
}
-bool CupsdSplash::saveConfig(CupsdConf*, QString&)
+bool CupsdSplash::saveConfig(CupsdConf*, TQString&)
{
return true;
}
diff --git a/kdeprint/cups/cupsdconf2/cupsdsplash.h b/kdeprint/cups/cupsdconf2/cupsdsplash.h
index ed548948d..9acf27395 100644
--- a/kdeprint/cups/cupsdconf2/cupsdsplash.h
+++ b/kdeprint/cups/cupsdconf2/cupsdsplash.h
@@ -25,11 +25,11 @@
class CupsdSplash : public CupsdPage
{
public:
- CupsdSplash(QWidget *parent = 0, const char *name = 0);
+ CupsdSplash(TQWidget *parent = 0, const char *name = 0);
~CupsdSplash();
- bool loadConfig(CupsdConf *conf, QString& msg);
- bool saveConfig(CupsdConf *conf, QString& msg);
+ bool loadConfig(CupsdConf *conf, TQString& msg);
+ bool saveConfig(CupsdConf *conf, TQString& msg);
};
#endif
diff --git a/kdeprint/cups/cupsdconf2/editlist.cpp b/kdeprint/cups/cupsdconf2/editlist.cpp
index 4c924dbb4..a91fdc3d3 100644
--- a/kdeprint/cups/cupsdconf2/editlist.cpp
+++ b/kdeprint/cups/cupsdconf2/editlist.cpp
@@ -21,13 +21,13 @@
#include <klistbox.h>
#include <kpushbutton.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kiconloader.h>
#include <kguiitem.h>
-EditList::EditList(QWidget *parent, const char *name)
- : QWidget(parent, name)
+EditList::EditList(TQWidget *parent, const char *name)
+ : TQWidget(parent, name)
{
list_ = new KListBox(this);
addbtn_ = new KPushButton(KGuiItem(i18n("Add..."), "filenew"), this);
@@ -35,7 +35,7 @@ EditList::EditList(QWidget *parent, const char *name)
delbtn_ = new KPushButton(KGuiItem(i18n("Delete"), "editdelete"), this);
defbtn_ = new KPushButton(KGuiItem(i18n("Default List"), "history"), this);
- QGridLayout *m1 = new QGridLayout(this, 4, 2, 0, 0);
+ TQGridLayout *m1 = new TQGridLayout(this, 4, 2, 0, 0);
m1->setColStretch(0, 1);
m1->addMultiCellWidget(list_, 0, 3, 0, 1);
m1->addWidget(addbtn_, 0, 1);
@@ -43,11 +43,11 @@ EditList::EditList(QWidget *parent, const char *name)
m1->addWidget(delbtn_, 2, 1);
m1->addWidget(defbtn_, 3, 1);
- connect(addbtn_, SIGNAL(clicked()), SIGNAL(add()));
- connect(editbtn_, SIGNAL(clicked()), SLOT(slotEdit()));
- connect(delbtn_, SIGNAL(clicked()), SLOT(slotDelete()));
- connect(defbtn_, SIGNAL(clicked()), SIGNAL(defaultList()));
- connect(list_, SIGNAL(highlighted(int)), SLOT(slotSelected(int)));
+ connect(addbtn_, TQT_SIGNAL(clicked()), TQT_SIGNAL(add()));
+ connect(editbtn_, TQT_SIGNAL(clicked()), TQT_SLOT(slotEdit()));
+ connect(delbtn_, TQT_SIGNAL(clicked()), TQT_SLOT(slotDelete()));
+ connect(defbtn_, TQT_SIGNAL(clicked()), TQT_SIGNAL(defaultList()));
+ connect(list_, TQT_SIGNAL(highlighted(int)), TQT_SLOT(slotSelected(int)));
slotSelected(-1);
}
@@ -72,12 +72,12 @@ void EditList::slotSelected(int index)
delbtn_->setEnabled(index >= 0);
}
-QString EditList::text(int index)
+TQString EditList::text(int index)
{
return list_->text(index);
}
-void EditList::setText(int index, const QString& s)
+void EditList::setText(int index, const TQString& s)
{
if (list_->text(index) != s)
{
@@ -95,27 +95,27 @@ void EditList::clear()
slotSelected(-1);
}
-void EditList::insertItem(const QString& s)
+void EditList::insertItem(const TQString& s)
{
if (!list_->findItem(s, Qt::ExactMatch))
list_->insertItem(s);
}
-void EditList::insertItem(const QPixmap& icon, const QString& s)
+void EditList::insertItem(const TQPixmap& icon, const TQString& s)
{
if (!list_->findItem(s, Qt::ExactMatch))
list_->insertItem(icon, s);
}
-void EditList::insertItems(const QStringList& l)
+void EditList::insertItems(const TQStringList& l)
{
- for (QStringList::ConstIterator it=l.begin(); it!=l.end(); ++it)
+ for (TQStringList::ConstIterator it=l.begin(); it!=l.end(); ++it)
insertItem(*it);
}
-QStringList EditList::items()
+TQStringList EditList::items()
{
- QStringList l;
+ TQStringList l;
for (uint i=0; i<list_->count(); i++)
l << list_->text(i);
return l;
diff --git a/kdeprint/cups/cupsdconf2/editlist.h b/kdeprint/cups/cupsdconf2/editlist.h
index 773667304..30c31d731 100644
--- a/kdeprint/cups/cupsdconf2/editlist.h
+++ b/kdeprint/cups/cupsdconf2/editlist.h
@@ -20,8 +20,8 @@
#ifndef EDITLIST_H
#define EDITLIST_H
-#include <qwidget.h>
-#include <qpixmap.h>
+#include <tqwidget.h>
+#include <tqpixmap.h>
class KListBox;
class QPushButton;
@@ -31,14 +31,14 @@ class EditList : public QWidget
Q_OBJECT
public:
- EditList(QWidget *parent = 0, const char *name = 0);
-
- QString text(int);
- void setText(int, const QString&);
- void insertItem(const QString&);
- void insertItem(const QPixmap&, const QString&);
- void insertItems(const QStringList&);
- QStringList items();
+ EditList(TQWidget *parent = 0, const char *name = 0);
+
+ TQString text(int);
+ void setText(int, const TQString&);
+ void insertItem(const TQString&);
+ void insertItem(const TQPixmap&, const TQString&);
+ void insertItems(const TQStringList&);
+ TQStringList items();
void clear();
signals:
diff --git a/kdeprint/cups/cupsdconf2/locationdialog.cpp b/kdeprint/cups/cupsdconf2/locationdialog.cpp
index fc5c55076..d360d62e2 100644
--- a/kdeprint/cups/cupsdconf2/locationdialog.cpp
+++ b/kdeprint/cups/cupsdconf2/locationdialog.cpp
@@ -22,28 +22,28 @@
#include "editlist.h"
#include "addressdialog.h"
-#include <qlineedit.h>
-#include <qcombobox.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qwhatsthis.h>
+#include <tqlineedit.h>
+#include <tqcombobox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
#include <kiconloader.h>
-LocationDialog::LocationDialog(QWidget *parent, const char *name)
- : KDialogBase(parent, name, true, QString::null, Ok|Cancel, Ok, true)
+LocationDialog::LocationDialog(TQWidget *parent, const char *name)
+ : KDialogBase(parent, name, true, TQString::null, Ok|Cancel, Ok, true)
{
- QWidget *dummy = new QWidget(this);
+ QWidget *dummy = new TQWidget(this);
setMainWidget(dummy);
- resource_ = new QComboBox(dummy);
- authtype_ = new QComboBox(dummy);
- authclass_ = new QComboBox(dummy);
- authname_ = new QLineEdit(dummy);
- encryption_ = new QComboBox(dummy);
- satisfy_ = new QComboBox(dummy);
- order_ = new QComboBox(dummy);
+ resource_ = new TQComboBox(dummy);
+ authtype_ = new TQComboBox(dummy);
+ authclass_ = new TQComboBox(dummy);
+ authname_ = new TQLineEdit(dummy);
+ encryption_ = new TQComboBox(dummy);
+ satisfy_ = new TQComboBox(dummy);
+ order_ = new TQComboBox(dummy);
addresses_ = new EditList(dummy);
authtype_->insertItem(i18n("None"));
@@ -66,19 +66,19 @@ LocationDialog::LocationDialog(QWidget *parent, const char *name)
order_->insertItem(i18n("Allow, Deny"));
order_->insertItem(i18n("Deny, Allow"));
- connect(authclass_, SIGNAL(activated(int)), SLOT(slotClassChanged(int)));
- connect(authtype_, SIGNAL(activated(int)), SLOT(slotTypeChanged(int)));
+ connect(authclass_, TQT_SIGNAL(activated(int)), TQT_SLOT(slotClassChanged(int)));
+ connect(authtype_, TQT_SIGNAL(activated(int)), TQT_SLOT(slotTypeChanged(int)));
- QLabel *l1 = new QLabel(i18n("Resource:"), dummy);
- QLabel *l2 = new QLabel(i18n("Authentication:"), dummy);
- QLabel *l3 = new QLabel(i18n("Class:"), dummy);
- QLabel *l4 = new QLabel(i18n("Names:"), dummy);
- QLabel *l5 = new QLabel(i18n("Encryption:"), dummy);
- QLabel *l6 = new QLabel(i18n("Satisfy:"), dummy);
- QLabel *l7 = new QLabel(i18n("ACL order:"), dummy);
- QLabel *l8 = new QLabel(i18n("ACL addresses:"),dummy);
+ QLabel *l1 = new TQLabel(i18n("Resource:"), dummy);
+ QLabel *l2 = new TQLabel(i18n("Authentication:"), dummy);
+ QLabel *l3 = new TQLabel(i18n("Class:"), dummy);
+ QLabel *l4 = new TQLabel(i18n("Names:"), dummy);
+ QLabel *l5 = new TQLabel(i18n("Encryption:"), dummy);
+ QLabel *l6 = new TQLabel(i18n("Satisfy:"), dummy);
+ QLabel *l7 = new TQLabel(i18n("ACL order:"), dummy);
+ QLabel *l8 = new TQLabel(i18n("ACL addresses:"),dummy);
- QGridLayout *m1 = new QGridLayout(dummy, 8, 2, 0, 5);
+ QGridLayout *m1 = new TQGridLayout(dummy, 8, 2, 0, 5);
m1->setColStretch(1, 1);
m1->addWidget(l1, 0, 0, Qt::AlignRight);
m1->addWidget(l2, 1, 0, Qt::AlignRight);
@@ -104,26 +104,26 @@ LocationDialog::LocationDialog(QWidget *parent, const char *name)
slotClassChanged(AUTHCLASS_ANONYMOUS);
encryption_->setCurrentItem(ENCRYPT_IFREQUESTED);
- connect(addresses_, SIGNAL(add()), SLOT(slotAdd()));
- connect(addresses_, SIGNAL(edit(int)), SLOT(slotEdit(int)));
- connect(addresses_, SIGNAL(defaultList()), SLOT(slotDefaultList()));
+ connect(addresses_, TQT_SIGNAL(add()), TQT_SLOT(slotAdd()));
+ connect(addresses_, TQT_SIGNAL(edit(int)), TQT_SLOT(slotEdit(int)));
+ connect(addresses_, TQT_SIGNAL(defaultList()), TQT_SLOT(slotDefaultList()));
}
void LocationDialog::setInfos(CupsdConf *conf)
{
conf_ = conf;
- QPtrListIterator<CupsResource> it(conf->resources_);
+ TQPtrListIterator<CupsResource> it(conf->resources_);
for (; it.current(); ++it)
resource_->insertItem(SmallIcon(it.current()->typeToIconName(it.current()->type_)), it.current()->text_);
- QWhatsThis::add(encryption_, conf_->comments_.toolTip("encryption"));
- QWhatsThis::add(order_, conf_->comments_.toolTip("order"));
- QWhatsThis::add(authclass_, conf_->comments_.toolTip("authclass"));
- QWhatsThis::add(authtype_, conf_->comments_.toolTip("authtype"));
- QWhatsThis::add(authname_, conf_->comments_.toolTip("authname"));
- QWhatsThis::add(satisfy_, conf_->comments_.toolTip("satisfy"));
- QWhatsThis::add(addresses_, conf_->comments_.toolTip("allowdeny"));
+ TQWhatsThis::add(encryption_, conf_->comments_.toolTip("encryption"));
+ TQWhatsThis::add(order_, conf_->comments_.toolTip("order"));
+ TQWhatsThis::add(authclass_, conf_->comments_.toolTip("authclass"));
+ TQWhatsThis::add(authtype_, conf_->comments_.toolTip("authtype"));
+ TQWhatsThis::add(authname_, conf_->comments_.toolTip("authname"));
+ TQWhatsThis::add(satisfy_, conf_->comments_.toolTip("satisfy"));
+ TQWhatsThis::add(addresses_, conf_->comments_.toolTip("allowdeny"));
}
void LocationDialog::fillLocation(CupsLocation *loc)
@@ -132,7 +132,7 @@ void LocationDialog::fillLocation(CupsLocation *loc)
loc->resourcename_ = loc->resource_->path_;
loc->authtype_ = authtype_->currentItem();
loc->authclass_ = (loc->authtype_ == AUTHTYPE_NONE ? AUTHCLASS_ANONYMOUS : authclass_->currentItem());
- loc->authname_ = (loc->authclass_ == AUTHCLASS_USER || loc->authclass_ == AUTHCLASS_GROUP ? authname_->text() : QString::null);
+ loc->authname_ = (loc->authclass_ == AUTHCLASS_USER || loc->authclass_ == AUTHCLASS_GROUP ? authname_->text() : TQString::null);
loc->encryption_ = encryption_->currentItem();
loc->satisfy_ = satisfy_->currentItem();
loc->order_ = order_->currentItem();
@@ -169,7 +169,7 @@ void LocationDialog::slotClassChanged(int index)
authname_->setEnabled((index == AUTHCLASS_USER || index == AUTHCLASS_GROUP));
}
-bool LocationDialog::newLocation(CupsLocation *loc, QWidget *parent, CupsdConf *conf)
+bool LocationDialog::newLocation(CupsLocation *loc, TQWidget *parent, CupsdConf *conf)
{
LocationDialog dlg(parent);
if (conf)
@@ -183,7 +183,7 @@ bool LocationDialog::newLocation(CupsLocation *loc, QWidget *parent, CupsdConf *
return false;
}
-bool LocationDialog::editLocation(CupsLocation *loc, QWidget *parent, CupsdConf *conf)
+bool LocationDialog::editLocation(CupsLocation *loc, TQWidget *parent, CupsdConf *conf)
{
LocationDialog dlg(parent);
if (conf)
@@ -201,14 +201,14 @@ bool LocationDialog::editLocation(CupsLocation *loc, QWidget *parent, CupsdConf
void LocationDialog::slotAdd()
{
- QString addr = AddressDialog::newAddress(this);
+ TQString addr = AddressDialog::newAddress(this);
if (!addr.isEmpty())
addresses_->insertItem(addr);
}
void LocationDialog::slotEdit(int index)
{
- QString addr = addresses_->text(index);
+ TQString addr = addresses_->text(index);
addr = AddressDialog::editAddress(addr, this);
if (!addr.isEmpty())
addresses_->insertItem(addr);
diff --git a/kdeprint/cups/cupsdconf2/locationdialog.h b/kdeprint/cups/cupsdconf2/locationdialog.h
index 5ca8c4d53..fef270405 100644
--- a/kdeprint/cups/cupsdconf2/locationdialog.h
+++ b/kdeprint/cups/cupsdconf2/locationdialog.h
@@ -32,14 +32,14 @@ class LocationDialog : public KDialogBase
{
Q_OBJECT
public:
- LocationDialog(QWidget *parent = 0, const char *name = 0);
+ LocationDialog(TQWidget *parent = 0, const char *name = 0);
void setInfos(CupsdConf*);
void fillLocation(CupsLocation*);
void setLocation(CupsLocation*);
- static bool newLocation(CupsLocation*, QWidget *parent = 0, CupsdConf *conf = 0);
- static bool editLocation(CupsLocation*, QWidget *parent = 0, CupsdConf *conf = 0);
+ static bool newLocation(CupsLocation*, TQWidget *parent = 0, CupsdConf *conf = 0);
+ static bool editLocation(CupsLocation*, TQWidget *parent = 0, CupsdConf *conf = 0);
protected slots:
void slotTypeChanged(int);
diff --git a/kdeprint/cups/cupsdconf2/main.cpp b/kdeprint/cups/cupsdconf2/main.cpp
index e8fd3df6a..cc0918f41 100644
--- a/kdeprint/cups/cupsdconf2/main.cpp
+++ b/kdeprint/cups/cupsdconf2/main.cpp
@@ -19,7 +19,7 @@
#include "cupsddialog.h"
-#include <qfile.h>
+#include <tqfile.h>
#include <klocale.h>
#include <kcmdlineargs.h>
#include <kapplication.h>
diff --git a/kdeprint/cups/cupsdconf2/portdialog.cpp b/kdeprint/cups/cupsdconf2/portdialog.cpp
index f866450b8..e17e2b081 100644
--- a/kdeprint/cups/cupsdconf2/portdialog.cpp
+++ b/kdeprint/cups/cupsdconf2/portdialog.cpp
@@ -20,31 +20,31 @@
#include "portdialog.h"
#include "cupsdconf.h"
-#include <qlineedit.h>
-#include <qspinbox.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
+#include <tqlineedit.h>
+#include <tqspinbox.h>
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
-PortDialog::PortDialog(QWidget *parent, const char *name)
- : KDialogBase(parent, name, true, QString::null, Ok|Cancel, Ok, true)
+PortDialog::PortDialog(TQWidget *parent, const char *name)
+ : KDialogBase(parent, name, true, TQString::null, Ok|Cancel, Ok, true)
{
- QWidget *dummy = new QWidget(this);
+ QWidget *dummy = new TQWidget(this);
setMainWidget(dummy);
- address_ = new QLineEdit(dummy);
- port_ = new QSpinBox(0, 9999, 1, dummy);
+ address_ = new TQLineEdit(dummy);
+ port_ = new TQSpinBox(0, 9999, 1, dummy);
port_->setValue(631);
- usessl_ = new QCheckBox(i18n("Use SSL encryption"), dummy);
+ usessl_ = new TQCheckBox(i18n("Use SSL encryption"), dummy);
- QLabel *l1 = new QLabel(i18n("Address:"), dummy);
- QLabel *l2 = new QLabel(i18n("Port:"), dummy);
+ QLabel *l1 = new TQLabel(i18n("Address:"), dummy);
+ QLabel *l2 = new TQLabel(i18n("Port:"), dummy);
- QVBoxLayout *m1 = new QVBoxLayout(dummy, 0, 10);
- QGridLayout *m2 = new QGridLayout(0, 3, 2, 0, 5);
+ QVBoxLayout *m1 = new TQVBoxLayout(dummy, 0, 10);
+ QGridLayout *m2 = new TQGridLayout(0, 3, 2, 0, 5);
m1->addLayout(m2);
m2->addWidget(l1, 0, 0, Qt::AlignRight);
m2->addWidget(l2, 1, 0, Qt::AlignRight);
@@ -56,9 +56,9 @@ PortDialog::PortDialog(QWidget *parent, const char *name)
resize(250, 100);
}
-QString PortDialog::listenString()
+TQString PortDialog::listenString()
{
- QString s;
+ TQString s;
if (usessl_->isChecked())
s.append("SSLListen ");
else
@@ -73,12 +73,12 @@ QString PortDialog::listenString()
void PortDialog::setInfos(CupsdConf *conf)
{
- QWhatsThis::add(address_, conf->comments_.toolTip("address"));
- QWhatsThis::add(port_, conf->comments_.toolTip("port"));
- QWhatsThis::add(usessl_, conf->comments_.toolTip("usessl"));
+ TQWhatsThis::add(address_, conf->comments_.toolTip("address"));
+ TQWhatsThis::add(port_, conf->comments_.toolTip("port"));
+ TQWhatsThis::add(usessl_, conf->comments_.toolTip("usessl"));
}
-QString PortDialog::newListen(QWidget *parent, CupsdConf *conf)
+TQString PortDialog::newListen(TQWidget *parent, CupsdConf *conf)
{
PortDialog dlg(parent);
dlg.setInfos(conf);
@@ -86,10 +86,10 @@ QString PortDialog::newListen(QWidget *parent, CupsdConf *conf)
{
return dlg.listenString();
}
- return QString::null;
+ return TQString::null;
}
-QString PortDialog::editListen(const QString& s, QWidget *parent, CupsdConf *conf)
+TQString PortDialog::editListen(const TQString& s, TQWidget *parent, CupsdConf *conf)
{
PortDialog dlg(parent);
dlg.setInfos(conf);
@@ -114,5 +114,5 @@ QString PortDialog::editListen(const QString& s, QWidget *parent, CupsdConf *con
{
return dlg.listenString();
}
- return QString::null;
+ return TQString::null;
}
diff --git a/kdeprint/cups/cupsdconf2/portdialog.h b/kdeprint/cups/cupsdconf2/portdialog.h
index 8f0b9f3e9..44ab5bb72 100644
--- a/kdeprint/cups/cupsdconf2/portdialog.h
+++ b/kdeprint/cups/cupsdconf2/portdialog.h
@@ -30,12 +30,12 @@ struct CupsdConf;
class PortDialog : public KDialogBase
{
public:
- PortDialog(QWidget *parent = 0, const char *name = 0);
+ PortDialog(TQWidget *parent = 0, const char *name = 0);
- QString listenString();
+ TQString listenString();
void setInfos(CupsdConf*);
- static QString newListen(QWidget *parent = 0, CupsdConf *conf = 0);
- static QString editListen(const QString& s, QWidget *parent = 0, CupsdConf *conf = 0);
+ static TQString newListen(TQWidget *parent = 0, CupsdConf *conf = 0);
+ static TQString editListen(const TQString& s, TQWidget *parent = 0, CupsdConf *conf = 0);
private:
QLineEdit *address_;
diff --git a/kdeprint/cups/cupsdconf2/qdirlineedit.cpp b/kdeprint/cups/cupsdconf2/qdirlineedit.cpp
index 931d6ac4a..66df30652 100644
--- a/kdeprint/cups/cupsdconf2/qdirlineedit.cpp
+++ b/kdeprint/cups/cupsdconf2/qdirlineedit.cpp
@@ -19,21 +19,21 @@
#include "qdirlineedit.h"
-#include <qlineedit.h>
-#include <qlayout.h>
+#include <tqlineedit.h>
+#include <tqlayout.h>
#include <kpushbutton.h>
#include <kfiledialog.h>
#include <kiconloader.h>
-QDirLineEdit::QDirLineEdit(bool file, QWidget *parent, const char *name)
- : QWidget(parent, name)
+QDirLineEdit::QDirLineEdit(bool file, TQWidget *parent, const char *name)
+ : TQWidget(parent, name)
{
- edit_ = new QLineEdit(this);
+ edit_ = new TQLineEdit(this);
button_ = new KPushButton(this);
button_->setPixmap(SmallIcon("fileopen"));
- connect(button_,SIGNAL(clicked()),SLOT(buttonClicked()));
+ connect(button_,TQT_SIGNAL(clicked()),TQT_SLOT(buttonClicked()));
- QHBoxLayout *main_ = new QHBoxLayout(this, 0, 3);
+ QHBoxLayout *main_ = new TQHBoxLayout(this, 0, 3);
main_->addWidget(edit_);
main_->addWidget(button_);
@@ -44,12 +44,12 @@ QDirLineEdit::~QDirLineEdit()
{
}
-void QDirLineEdit::setURL(const QString& txt)
+void QDirLineEdit::setURL(const TQString& txt)
{
edit_->setText(txt);
}
-QString QDirLineEdit::url()
+TQString QDirLineEdit::url()
{
return edit_->text();
}
@@ -60,7 +60,7 @@ void QDirLineEdit::buttonClicked()
if (!fileedit_)
dirname = KFileDialog::getExistingDirectory(edit_->text(), this);
else
- dirname = KFileDialog::getOpenFileName(edit_->text(), QString::null, this);
+ dirname = KFileDialog::getOpenFileName(edit_->text(), TQString::null, this);
if (!dirname.isEmpty())
edit_->setText(dirname);
}
diff --git a/kdeprint/cups/cupsdconf2/qdirlineedit.h b/kdeprint/cups/cupsdconf2/qdirlineedit.h
index b4b977b75..ff554d91c 100644
--- a/kdeprint/cups/cupsdconf2/qdirlineedit.h
+++ b/kdeprint/cups/cupsdconf2/qdirlineedit.h
@@ -20,8 +20,8 @@
#ifndef QDIRLINEEDIT_H
#define QDIRLINEEDIT_H
-#include <qwidget.h>
-#include <qstring.h>
+#include <tqwidget.h>
+#include <tqstring.h>
class QLineEdit;
class QPushButton;
@@ -30,11 +30,11 @@ class QDirLineEdit : public QWidget
{
Q_OBJECT
public:
- QDirLineEdit(bool file, QWidget *parent = 0, const char *name = 0);
+ QDirLineEdit(bool file, TQWidget *parent = 0, const char *name = 0);
~QDirLineEdit();
- void setURL(const QString& txt);
- QString url();
+ void setURL(const TQString& txt);
+ TQString url();
void setFileEdit(bool on = true);
private slots:
diff --git a/kdeprint/cups/cupsdconf2/qdirmultilineedit.cpp b/kdeprint/cups/cupsdconf2/qdirmultilineedit.cpp
index 31a544e91..1daca81cb 100644
--- a/kdeprint/cups/cupsdconf2/qdirmultilineedit.cpp
+++ b/kdeprint/cups/cupsdconf2/qdirmultilineedit.cpp
@@ -19,35 +19,35 @@
#include "qdirmultilineedit.h"
-#include <qlayout.h>
-#include <qheader.h>
-#include <qpushbutton.h>
+#include <tqlayout.h>
+#include <tqheader.h>
+#include <tqpushbutton.h>
#include <klistview.h>
#include <klocale.h>
#include <kfiledialog.h>
#include <kiconloader.h>
-QDirMultiLineEdit::QDirMultiLineEdit(QWidget *parent, const char *name)
-: QWidget(parent, name)
+QDirMultiLineEdit::QDirMultiLineEdit(TQWidget *parent, const char *name)
+: TQWidget(parent, name)
{
m_view = new KListView(this);
m_view->header()->hide();
m_view->addColumn("");
m_view->setFullWidth(true);
- connect(m_view, SIGNAL(selectionChanged(QListViewItem*)), SLOT(slotSelected(QListViewItem*)));
+ connect(m_view, TQT_SIGNAL(selectionChanged(TQListViewItem*)), TQT_SLOT(slotSelected(TQListViewItem*)));
- m_add = new QPushButton(this);
+ m_add = new TQPushButton(this);
m_add->setPixmap(SmallIcon("folder_new"));
- connect(m_add, SIGNAL(clicked()), SLOT(slotAddClicked()));
- m_remove = new QPushButton(this);
+ connect(m_add, TQT_SIGNAL(clicked()), TQT_SLOT(slotAddClicked()));
+ m_remove = new TQPushButton(this);
m_remove->setPixmap(SmallIcon("editdelete"));
- connect(m_remove, SIGNAL(clicked()), SLOT(slotRemoveClicked()));
+ connect(m_remove, TQT_SIGNAL(clicked()), TQT_SLOT(slotRemoveClicked()));
m_remove->setEnabled(false);
m_view->setFixedHeight(QMAX(m_view->fontMetrics().lineSpacing()*3+m_view->lineWidth()*2, m_add->sizeHint().height()*2));
- QHBoxLayout *l0 = new QHBoxLayout(this, 0, 3);
- QVBoxLayout *l1 = new QVBoxLayout(0, 0, 0);
+ QHBoxLayout *l0 = new TQHBoxLayout(this, 0, 3);
+ QVBoxLayout *l1 = new TQVBoxLayout(0, 0, 0);
l0->addWidget(m_view);
l0->addLayout(l1);
l1->addWidget(m_add);
@@ -59,14 +59,14 @@ QDirMultiLineEdit::~QDirMultiLineEdit()
{
}
-void QDirMultiLineEdit::setURLs(const QStringList& urls)
+void QDirMultiLineEdit::setURLs(const TQStringList& urls)
{
m_view->clear();
- for (QStringList::ConstIterator it=urls.begin(); it!=urls.end(); ++it)
+ for (TQStringList::ConstIterator it=urls.begin(); it!=urls.end(); ++it)
addURL(*it);
}
-QStringList QDirMultiLineEdit::urls()
+TQStringList QDirMultiLineEdit::urls()
{
QListViewItem *item = m_view->firstChild();
QStringList l;
@@ -78,15 +78,15 @@ QStringList QDirMultiLineEdit::urls()
return l;
}
-void QDirMultiLineEdit::addURL(const QString& url)
+void QDirMultiLineEdit::addURL(const TQString& url)
{
- QListViewItem *item = new QListViewItem(m_view, url);
+ QListViewItem *item = new TQListViewItem(m_view, url);
item->setRenameEnabled(0, true);
}
void QDirMultiLineEdit::slotAddClicked()
{
- QString dirname = KFileDialog::getExistingDirectory(QString::null, this);
+ QString dirname = KFileDialog::getExistingDirectory(TQString::null, this);
if (!dirname.isEmpty())
addURL(dirname);
}
@@ -101,7 +101,7 @@ void QDirMultiLineEdit::slotRemoveClicked()
}
}
-void QDirMultiLineEdit::slotSelected(QListViewItem *item)
+void QDirMultiLineEdit::slotSelected(TQListViewItem *item)
{
m_remove->setEnabled((item != NULL));
}
diff --git a/kdeprint/cups/cupsdconf2/qdirmultilineedit.h b/kdeprint/cups/cupsdconf2/qdirmultilineedit.h
index 963292985..95cdc8241 100644
--- a/kdeprint/cups/cupsdconf2/qdirmultilineedit.h
+++ b/kdeprint/cups/cupsdconf2/qdirmultilineedit.h
@@ -20,7 +20,7 @@
#ifndef QDIRMULTILINEEDIT_H
#define QDIRMULTILINEEDIT_H
-#include <qwidget.h>
+#include <tqwidget.h>
class KListView;
class QListViewItem;
@@ -31,19 +31,19 @@ class QDirMultiLineEdit : public QWidget
Q_OBJECT
public:
- QDirMultiLineEdit(QWidget *parent = 0, const char *name = 0);
+ QDirMultiLineEdit(TQWidget *parent = 0, const char *name = 0);
~QDirMultiLineEdit();
- void setURLs(const QStringList&);
- QStringList urls();
+ void setURLs(const TQStringList&);
+ TQStringList urls();
protected:
- void addURL(const QString&);
+ void addURL(const TQString&);
private slots:
void slotAddClicked();
void slotRemoveClicked();
- void slotSelected(QListViewItem*);
+ void slotSelected(TQListViewItem*);
private:
KListView *m_view;
diff --git a/kdeprint/cups/cupsdconf2/sizewidget.cpp b/kdeprint/cups/cupsdconf2/sizewidget.cpp
index c61996282..d77fe5aaa 100644
--- a/kdeprint/cups/cupsdconf2/sizewidget.cpp
+++ b/kdeprint/cups/cupsdconf2/sizewidget.cpp
@@ -19,17 +19,17 @@
#include "sizewidget.h"
-#include <qcombobox.h>
-#include <qspinbox.h>
-#include <qlayout.h>
-#include <qregexp.h>
+#include <tqcombobox.h>
+#include <tqspinbox.h>
+#include <tqlayout.h>
+#include <tqregexp.h>
#include <klocale.h>
-SizeWidget::SizeWidget( QWidget *parent, const char *name )
- : QWidget( parent, name )
+SizeWidget::SizeWidget( TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
- m_size = new QSpinBox( 0, 9999, 1, this );
- m_unit = new QComboBox( this );
+ m_size = new TQSpinBox( 0, 9999, 1, this );
+ m_unit = new TQComboBox( this );
m_unit->insertItem( i18n( "KB" ) );
m_unit->insertItem( i18n( "MB" ) );
@@ -38,14 +38,14 @@ SizeWidget::SizeWidget( QWidget *parent, const char *name )
m_unit->setCurrentItem( 1 );
m_size->setSpecialValueText( i18n( "Unlimited" ) );
- QHBoxLayout *l0 = new QHBoxLayout( this, 0, 5 );
+ TQHBoxLayout *l0 = new TQHBoxLayout( this, 0, 5 );
l0->addWidget( m_size, 1 );
l0->addWidget( m_unit, 0 );
}
-void SizeWidget::setSizeString( const QString& sz )
+void SizeWidget::setSizeString( const TQString& sz )
{
- int p = sz.find( QRegExp( "\\D" ) );
+ int p = sz.find( TQRegExp( "\\D" ) );
m_size->setValue( sz.left( p ).toInt() );
switch( sz[ p ].latin1() )
{
@@ -58,9 +58,9 @@ void SizeWidget::setSizeString( const QString& sz )
m_unit->setCurrentItem( p );
}
-QString SizeWidget::sizeString() const
+TQString SizeWidget::sizeString() const
{
- QString result = QString::number( m_size->value() );
+ TQString result = TQString::number( m_size->value() );
switch ( m_unit->currentItem() )
{
case 0: result.append( "k" ); break;
diff --git a/kdeprint/cups/cupsdconf2/sizewidget.h b/kdeprint/cups/cupsdconf2/sizewidget.h
index c7f6557df..7bee0283b 100644
--- a/kdeprint/cups/cupsdconf2/sizewidget.h
+++ b/kdeprint/cups/cupsdconf2/sizewidget.h
@@ -20,7 +20,7 @@
#ifndef SIZEWIDGET_H
#define SIZEWIDGET_H
-#include <qwidget.h>
+#include <tqwidget.h>
class QSpinBox;
class QComboBox;
@@ -28,16 +28,16 @@ class QComboBox;
class SizeWidget : public QWidget
{
public:
- SizeWidget( QWidget *parent = 0, const char *name = 0 );
+ SizeWidget( TQWidget *parent = 0, const char *name = 0 );
- void setSizeString( const QString& sizeString );
- QString sizeString() const;
+ void setSizeString( const TQString& sizeString );
+ TQString sizeString() const;
void setValue( int sz );
int value() const;
private:
- QSpinBox *m_size;
- QComboBox *m_unit;
+ TQSpinBox *m_size;
+ TQComboBox *m_unit;
};
#endif
diff --git a/kdeprint/cups/cupsinfos.cpp b/kdeprint/cups/cupsinfos.cpp
index f96451d76..839f83612 100644
--- a/kdeprint/cups/cupsinfos.cpp
+++ b/kdeprint/cups/cupsinfos.cpp
@@ -58,9 +58,9 @@ CupsInfos::CupsInfos()
load();
/* host_ = cupsServer();
login_ = cupsUser();
- if (login_.isEmpty()) login_ = QString::null;
+ if (login_.isEmpty()) login_ = TQString::null;
port_ = ippPort();
- password_ = QString::null;*/
+ password_ = TQString::null;*/
cupsSetPasswordCB(cupsGetPasswordCB);
}
@@ -69,14 +69,14 @@ CupsInfos::~CupsInfos()
{
}
-QString CupsInfos::hostaddr() const
+TQString CupsInfos::hostaddr() const
{
if (host_[0] != '/')
- return host_ + ":" + QString::number(port_);
+ return host_ + ":" + TQString::number(port_);
return "localhost";
}
-void CupsInfos::setHost(const QString& s)
+void CupsInfos::setHost(const TQString& s)
{
host_ = s;
cupsSetServer(s.latin1());
@@ -88,13 +88,13 @@ void CupsInfos::setPort(int p)
ippSetPort(p);
}
-void CupsInfos::setLogin(const QString& s)
+void CupsInfos::setLogin(const TQString& s)
{
login_ = s;
cupsSetUser(s.latin1());
}
-void CupsInfos::setPassword(const QString& s)
+void CupsInfos::setPassword(const TQString& s)
{
password_ = s;
}
@@ -106,7 +106,7 @@ void CupsInfos::setSavePassword( bool on )
const char* CupsInfos::getPasswordCB()
{
- QPair<QString,QString> pwd = KMFactory::self()->requestPassword( count_, login_, host_, port_ );
+ QPair<TQString,TQString> pwd = KMFactory::self()->requestPassword( count_, login_, host_, port_ );
if ( pwd.first.isEmpty() && pwd.second.isEmpty() )
return NULL;
@@ -119,9 +119,9 @@ void CupsInfos::load()
{
KConfig *conf_ = KMFactory::self()->printConfig();
conf_->setGroup("CUPS");
- host_ = conf_->readEntry("Host",QString::fromLatin1(cupsServer()));
+ host_ = conf_->readEntry("Host",TQString::fromLatin1(cupsServer()));
port_ = conf_->readNumEntry("Port",ippPort());
- login_ = conf_->readEntry("Login",QString::fromLatin1(cupsUser()));
+ login_ = conf_->readEntry("Login",TQString::fromLatin1(cupsUser()));
savepwd_ = conf_->readBoolEntry( "SavePassword", false );
if ( savepwd_ )
{
@@ -129,8 +129,8 @@ void CupsInfos::load()
KMFactory::self()->initPassword( login_, password_, host_, port_ );
}
else
- password_ = QString::null;
- if (login_.isEmpty()) login_ = QString::null;
+ password_ = TQString::null;
+ if (login_.isEmpty()) login_ = TQString::null;
reallogin_ = cupsUser();
// synchronize with CUPS
diff --git a/kdeprint/cups/cupsinfos.h b/kdeprint/cups/cupsinfos.h
index 429970b9d..b62329d4b 100644
--- a/kdeprint/cups/cupsinfos.h
+++ b/kdeprint/cups/cupsinfos.h
@@ -20,7 +20,7 @@
#ifndef CUPSINFOS_H
#define CUPSINFOS_H
-#include <qstring.h>
+#include <tqstring.h>
#include "kpreloadobject.h"
class CupsInfos : public KPReloadObject
@@ -31,18 +31,18 @@ public:
CupsInfos();
~CupsInfos();
- const QString& host() const;
- QString hostaddr() const;
+ const TQString& host() const;
+ TQString hostaddr() const;
int port() const;
- const QString& login() const;
- const QString& password() const;
- const QString& realLogin() const;
+ const TQString& login() const;
+ const TQString& password() const;
+ const TQString& realLogin() const;
bool savePassword() const;
- void setHost(const QString& s);
+ void setHost(const TQString& s);
void setPort(int p);
- void setLogin(const QString& s);
- void setPassword(const QString& s);
+ void setLogin(const TQString& s);
+ void setPassword(const TQString& s);
void setSavePassword( bool on );
const char* getPasswordCB();
@@ -67,19 +67,19 @@ private:
int count_;
};
-inline const QString& CupsInfos::host() const
+inline const TQString& CupsInfos::host() const
{ return host_; }
inline int CupsInfos::port() const
{ return port_; }
-inline const QString& CupsInfos::login() const
+inline const TQString& CupsInfos::login() const
{ return login_; }
-inline const QString& CupsInfos::password() const
+inline const TQString& CupsInfos::password() const
{ return password_; }
-inline const QString& CupsInfos::realLogin() const
+inline const TQString& CupsInfos::realLogin() const
{ return reallogin_; }
inline bool CupsInfos::savePassword() const
diff --git a/kdeprint/cups/image.cpp b/kdeprint/cups/image.cpp
index 7ec0ed7a6..4fe214bc1 100644
--- a/kdeprint/cups/image.cpp
+++ b/kdeprint/cups/image.cpp
@@ -17,7 +17,7 @@
* Boston, MA 02110-1301, USA.
**/
-#include <qimage.h>
+#include <tqimage.h>
#include <math.h>
void
@@ -245,7 +245,7 @@ bright(float mat[3][3],
//----------------------------------------------------------------------------------------------------
-QImage convertImage(const QImage& image, int hue, int saturation, int brightness, int gamma)
+TQImage convertImage(const TQImage& image, int hue, int saturation, int brightness, int gamma)
{
float mat[3][3] = {{1.0,0.0,0.0},{0.0,1.0,0.0},{0.0,0.0,1.0}};
int lut[3][3][256];
diff --git a/kdeprint/cups/imageposition.cpp b/kdeprint/cups/imageposition.cpp
index 0489b5079..bc2b207fd 100644
--- a/kdeprint/cups/imageposition.cpp
+++ b/kdeprint/cups/imageposition.cpp
@@ -19,10 +19,10 @@
#include "imageposition.h"
-#include <qpainter.h>
+#include <tqpainter.h>
#include <kstandarddirs.h>
-static void draw3DPage(QPainter *p, QRect r)
+static void draw3DPage(TQPainter *p, TQRect r)
{
// draw white page
p->fillRect(r,Qt::white);
@@ -40,12 +40,12 @@ static void draw3DPage(QPainter *p, QRect r)
p->lineTo(r.right()-1,r.top()+1);
}
-ImagePosition::ImagePosition(QWidget *parent, const char *name)
- : QWidget(parent,name)
+ImagePosition::ImagePosition(TQWidget *parent, const char *name)
+ : TQWidget(parent,name)
{
position_ = Center;
setMinimumSize(sizeHint());
- setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));
+ setSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding));
pix_.load(locate("data", "kdeprint/preview-mini.png"));
}
@@ -82,7 +82,7 @@ void ImagePosition::setPosition(int horiz, int vert)
setPosition((PositionType)type);
}
-QString ImagePosition::positionString() const
+TQString ImagePosition::positionString() const
{
switch (position_) {
case TopLeft: return "top-left";
@@ -98,7 +98,7 @@ QString ImagePosition::positionString() const
return "center";
}
-void ImagePosition::paintEvent(QPaintEvent*)
+void ImagePosition::paintEvent(TQPaintEvent*)
{
int horiz, vert, x, y;
int margin = 5;
@@ -131,7 +131,7 @@ void ImagePosition::paintEvent(QPaintEvent*)
case 1: y = (page.top()+page.bottom()-img.height())/2; break;
case 2: y = page.bottom()-margin-img.height(); break;
}
- img.moveTopLeft(QPoint(x,y));
+ img.moveTopLeft(TQPoint(x,y));
// draw page
QPainter p(this);
@@ -147,7 +147,7 @@ void ImagePosition::paintEvent(QPaintEvent*)
p.end();
}
-QSize ImagePosition::sizeHint() const
+TQSize ImagePosition::sizeHint() const
{
- return QSize(60, 80);
+ return TQSize(60, 80);
}
diff --git a/kdeprint/cups/imageposition.h b/kdeprint/cups/imageposition.h
index 64a105db7..caaa63ca2 100644
--- a/kdeprint/cups/imageposition.h
+++ b/kdeprint/cups/imageposition.h
@@ -20,9 +20,9 @@
#ifndef IMAGEPOSITION_H
#define IMAGEPOSITION_H
-#include <qwidget.h>
-#include <qstring.h>
-#include <qpixmap.h>
+#include <tqwidget.h>
+#include <tqstring.h>
+#include <tqpixmap.h>
class ImagePosition : public QWidget
{
@@ -37,18 +37,18 @@ public:
Bottom,
BottomRight};
- ImagePosition(QWidget *parent = 0, const char *name = 0);
+ ImagePosition(TQWidget *parent = 0, const char *name = 0);
~ImagePosition();
void setPosition(const char *type = "center");
void setPosition(PositionType type = Center);
void setPosition(int horiz = 1, int vert = 1);
PositionType position() const { return (PositionType)position_; }
- QString positionString() const;
- QSize sizeHint() const;
+ TQString positionString() const;
+ TQSize sizeHint() const;
protected:
- void paintEvent(QPaintEvent *);
+ void paintEvent(TQPaintEvent *);
private:
int position_;
diff --git a/kdeprint/cups/imagepreview.cpp b/kdeprint/cups/imagepreview.cpp
index a7badd09b..7ae5dabf0 100644
--- a/kdeprint/cups/imagepreview.cpp
+++ b/kdeprint/cups/imagepreview.cpp
@@ -19,14 +19,14 @@
#include "imagepreview.h"
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qpaintdevice.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqpaintdevice.h>
// forward definition
-QImage convertImage(const QImage& image, int hue, int saturation, int brightness, int gamma);
+TQImage convertImage(const TQImage& image, int hue, int saturation, int brightness, int gamma);
-ImagePreview::ImagePreview(QWidget *parent, const char *name ) : QWidget(parent,name) {
+ImagePreview::ImagePreview(TQWidget *parent, const char *name ) : TQWidget(parent,name) {
brightness_ = 100;
hue_ = 0;
saturation_ = 100;
@@ -39,7 +39,7 @@ ImagePreview::ImagePreview(QWidget *parent, const char *name ) : QWidget(parent,
ImagePreview::~ImagePreview(){
}
-void ImagePreview::setImage(const QImage& image){
+void ImagePreview::setImage(const TQImage& image){
image_ = image.convertDepth(32);
image_.detach();
resize(image_.size());
@@ -54,7 +54,7 @@ void ImagePreview::setParameters(int brightness, int hue, int saturation, int ga
repaint();
}
-void ImagePreview::paintEvent(QPaintEvent*){
+void ImagePreview::paintEvent(TQPaintEvent*){
QImage tmpImage = convertImage(image_,hue_,(bw_ ? 0 : saturation_),brightness_,gamma_);
int x = (width()-tmpImage.width())/2, y = (height()-tmpImage.height())/2;
@@ -64,7 +64,7 @@ void ImagePreview::paintEvent(QPaintEvent*){
p.drawImage(x,y,tmpImage);
p.end();
- bitBlt(this, QPoint(0, 0), &buffer, buffer.rect(), Qt::CopyROP);
+ bitBlt(this, TQPoint(0, 0), &buffer, buffer.rect(), Qt::CopyROP);
}
void ImagePreview::setBlackAndWhite(bool on){
@@ -72,7 +72,7 @@ void ImagePreview::setBlackAndWhite(bool on){
update();
}
-QSize ImagePreview::minimumSizeHint() const
+TQSize ImagePreview::minimumSizeHint() const
{
return image_.size();
}
diff --git a/kdeprint/cups/imagepreview.h b/kdeprint/cups/imagepreview.h
index e709490fb..1967efdc2 100644
--- a/kdeprint/cups/imagepreview.h
+++ b/kdeprint/cups/imagepreview.h
@@ -20,19 +20,19 @@
#ifndef IMAGEPREVIEW_H
#define IMAGEPREVIEW_H
-#include <qwidget.h>
-#include <qimage.h>
+#include <tqwidget.h>
+#include <tqimage.h>
class ImagePreview : public QWidget
{
public:
- ImagePreview(QWidget *parent=0, const char *name=0);
+ ImagePreview(TQWidget *parent=0, const char *name=0);
~ImagePreview();
void setParameters(int brightness, int hue, int saturation, int gamma);
- void setImage(const QImage& image);
+ void setImage(const TQImage& image);
void setBlackAndWhite(bool on);
- QSize minimumSizeHint() const;
+ TQSize minimumSizeHint() const;
private: // Private attributes
int brightness_;
@@ -40,10 +40,10 @@ private: // Private attributes
int saturation_;
int gamma_;
bool bw_;
- QImage image_;
+ TQImage image_;
protected: // Protected methods
- void paintEvent(QPaintEvent*);
+ void paintEvent(TQPaintEvent*);
};
#endif
diff --git a/kdeprint/cups/ippreportdlg.cpp b/kdeprint/cups/ippreportdlg.cpp
index 71256ce39..343cd4118 100644
--- a/kdeprint/cups/ippreportdlg.cpp
+++ b/kdeprint/cups/ippreportdlg.cpp
@@ -26,11 +26,11 @@
#include <kmessagebox.h>
#include <kdebug.h>
#include <ktextedit.h>
-#include <qsimplerichtext.h>
-#include <qpainter.h>
-#include <qpaintdevicemetrics.h>
+#include <tqsimplerichtext.h>
+#include <tqpainter.h>
+#include <tqpaintdevicemetrics.h>
-IppReportDlg::IppReportDlg(QWidget *parent, const char *name)
+IppReportDlg::IppReportDlg(TQWidget *parent, const char *name)
: KDialogBase(parent, name, true, i18n("IPP Report"), Close|User1, Close, false, KGuiItem(i18n("&Print"), "fileprint"))
{
m_edit = new KTextEdit(this);
@@ -60,7 +60,7 @@ void IppReportDlg::slotUser1()
while (1)
{
rich.draw(&painter, margin, margin, r, colorGroup());
- QString s = caption() + ": " + QString::number(page);
+ QString s = caption() + ": " + TQString::number(page);
QRect br = painter.fontMetrics().boundingRect(s);
painter.drawText(r.right()-br.width()-5, r.top()-br.height()-4, br.width()+5, br.height()+4, Qt::AlignRight|Qt::AlignTop, s);
r.moveBy(0, r.height()-10);
@@ -76,7 +76,7 @@ void IppReportDlg::slotUser1()
}
}
-void IppReportDlg::report(IppRequest *req, int group, const QString& caption)
+void IppReportDlg::report(IppRequest *req, int group, const TQString& caption)
{
QString str_report;
QTextStream t(&str_report, IO_WriteOnly);
diff --git a/kdeprint/cups/ippreportdlg.h b/kdeprint/cups/ippreportdlg.h
index fe3f36621..8e3eea8c5 100644
--- a/kdeprint/cups/ippreportdlg.h
+++ b/kdeprint/cups/ippreportdlg.h
@@ -29,8 +29,8 @@ class IppReportDlg : public KDialogBase
{
Q_OBJECT
public:
- IppReportDlg(QWidget *parent = 0, const char *name = 0);
- static void report(IppRequest *req, int group, const QString& caption = QString::null);
+ IppReportDlg(TQWidget *parent = 0, const char *name = 0);
+ static void report(IppRequest *req, int group, const TQString& caption = TQString::null);
protected slots:
void slotUser1();
diff --git a/kdeprint/cups/ipprequest.cpp b/kdeprint/cups/ipprequest.cpp
index b4812a171..0b32e45e7 100644
--- a/kdeprint/cups/ipprequest.cpp
+++ b/kdeprint/cups/ipprequest.cpp
@@ -25,8 +25,8 @@
#include <kdebug.h>
#include <kglobal.h>
#include <klocale.h>
-#include <qdatetime.h>
-#include <qregexp.h>
+#include <tqdatetime.h>
+#include <tqregexp.h>
#include <cups/cups.h>
#ifdef HAVE_CONFIG_H
@@ -34,11 +34,11 @@
#endif
#ifdef HAVE_CUPS_NO_PWD_CACHE
-#include <qcstring.h>
-static QCString cups_authstring = "";
+#include <tqcstring.h>
+static TQCString cups_authstring = "";
#endif
-void dumpRequest(ipp_t *req, bool answer = false, const QString& s = QString::null)
+void dumpRequest(ipp_t *req, bool answer = false, const TQString& s = TQString::null)
{
kdDebug(500) << "==========" << endl;
if (s.isEmpty())
@@ -51,29 +51,29 @@ void dumpRequest(ipp_t *req, bool answer = false, const QString& s = QString::nu
kdDebug(500) << "Null request" << endl;
return;
}
- kdDebug(500) << "State = 0x" << QString::number(req->state, 16) << endl;
- kdDebug(500) << "ID = 0x" << QString::number(req->request.status.request_id, 16) << endl;
+ kdDebug(500) << "State = 0x" << TQString::number(req->state, 16) << endl;
+ kdDebug(500) << "ID = 0x" << TQString::number(req->request.status.request_id, 16) << endl;
if (answer)
{
- kdDebug(500) << "Status = 0x" << QString::number(req->request.status.status_code, 16) << endl;
+ kdDebug(500) << "Status = 0x" << TQString::number(req->request.status.status_code, 16) << endl;
kdDebug(500) << "Status message = " << ippErrorString(req->request.status.status_code) << endl;
}
else
- kdDebug(500) << "Operation = 0x" << QString::number(req->request.op.operation_id, 16) << endl;
+ kdDebug(500) << "Operation = 0x" << TQString::number(req->request.op.operation_id, 16) << endl;
kdDebug(500) << "Version = " << (int)(req->request.status.version[0]) << "." << (int)(req->request.status.version[1]) << endl;
kdDebug(500) << endl;
ipp_attribute_t *attr = req->attrs;
while (attr)
{
- QString s = QString::fromLatin1("%1 (0x%2) = ").arg(attr->name).arg(attr->value_tag, 0, 16);
+ TQString s = TQString::fromLatin1("%1 (0x%2) = ").arg(attr->name).arg(attr->value_tag, 0, 16);
for (int i=0;i<attr->num_values;i++)
{
switch (attr->value_tag)
{
case IPP_TAG_INTEGER:
case IPP_TAG_ENUM:
- s += ("0x"+QString::number(attr->values[i].integer, 16));
+ s += ("0x"+TQString::number(attr->values[i].integer, 16));
break;
case IPP_TAG_BOOLEAN:
s += (attr->values[i].boolean ? "true" : "false");
@@ -101,7 +101,7 @@ void dumpRequest(ipp_t *req, bool answer = false, const QString& s = QString::nu
}
}
-QString errorString(int status)
+TQString errorString(int status)
{
QString str;
switch (status)
@@ -122,7 +122,7 @@ QString errorString(int status)
str = i18n("The target printer is not accepting print jobs.");
break;
default:
- str = QString::fromLocal8Bit(ippErrorString((ipp_status_t)status));
+ str = TQString::fromLocal8Bit(ippErrorString((ipp_status_t)status));
break;
}
return str;
@@ -134,7 +134,7 @@ IppRequest::IppRequest()
{
request_ = 0;
port_ = -1;
- host_ = QString::null;
+ host_ = TQString::null;
dump_ = 0;
init();
}
@@ -155,7 +155,7 @@ void IppRequest::init()
}
request_ = ippNew();
//kdDebug(500) << "kdeprint: IPP request, lang=" << KGlobal::locale()->language() << endl;
- QCString langstr = KGlobal::locale()->language().latin1();
+ TQCString langstr = KGlobal::locale()->language().latin1();
cups_lang_t* lang = cupsLangGet(langstr.data());
// default charset to UTF-8 (ugly hack)
lang->encoding = CUPS_UTF8;
@@ -164,51 +164,51 @@ void IppRequest::init()
cupsLangFree(lang);
}
-void IppRequest::addString_p(int group, int type, const QString& name, const QString& value)
+void IppRequest::addString_p(int group, int type, const TQString& name, const TQString& value)
{
if (!name.isEmpty())
ippAddString(request_,(ipp_tag_t)group,(ipp_tag_t)type,name.latin1(),NULL,(value.isEmpty() ? "" : value.local8Bit().data()));
}
-void IppRequest::addStringList_p(int group, int type, const QString& name, const QStringList& values)
+void IppRequest::addStringList_p(int group, int type, const TQString& name, const TQStringList& values)
{
if (!name.isEmpty())
{
ipp_attribute_t *attr = ippAddStrings(request_,(ipp_tag_t)group,(ipp_tag_t)type,name.latin1(),(int)(values.count()),NULL,NULL);
int i(0);
- for (QStringList::ConstIterator it=values.begin(); it != values.end(); ++it, i++)
+ for (TQStringList::ConstIterator it=values.begin(); it != values.end(); ++it, i++)
attr->values[i].string.text = strdup((*it).local8Bit());
}
}
-void IppRequest::addInteger_p(int group, int type, const QString& name, int value)
+void IppRequest::addInteger_p(int group, int type, const TQString& name, int value)
{
if (!name.isEmpty()) ippAddInteger(request_,(ipp_tag_t)group,(ipp_tag_t)type,name.latin1(),value);
}
-void IppRequest::addIntegerList_p(int group, int type, const QString& name, const QValueList<int>& values)
+void IppRequest::addIntegerList_p(int group, int type, const TQString& name, const TQValueList<int>& values)
{
if (!name.isEmpty())
{
ipp_attribute_t *attr = ippAddIntegers(request_,(ipp_tag_t)group,(ipp_tag_t)type,name.latin1(),(int)(values.count()),NULL);
int i(0);
- for (QValueList<int>::ConstIterator it=values.begin(); it != values.end(); ++it, i++)
+ for (TQValueList<int>::ConstIterator it=values.begin(); it != values.end(); ++it, i++)
attr->values[i].integer = *it;
}
}
-void IppRequest::addBoolean(int group, const QString& name, bool value)
+void IppRequest::addBoolean(int group, const TQString& name, bool value)
{
if (!name.isEmpty()) ippAddBoolean(request_,(ipp_tag_t)group,name.latin1(),(char)value);
}
-void IppRequest::addBoolean(int group, const QString& name, const QValueList<bool>& values)
+void IppRequest::addBoolean(int group, const TQString& name, const TQValueList<bool>& values)
{
if (!name.isEmpty())
{
ipp_attribute_t *attr = ippAddBooleans(request_,(ipp_tag_t)group,name.latin1(),(int)(values.count()),NULL);
int i(0);
- for (QValueList<bool>::ConstIterator it=values.begin(); it != values.end(); ++it, i++)
+ for (TQValueList<bool>::ConstIterator it=values.begin(); it != values.end(); ++it, i++)
attr->values[i].boolean = (char)(*it);
}
}
@@ -224,7 +224,7 @@ int IppRequest::status()
return (request_ ? request_->request.status.status_code : (connect_ ? cupsLastError() : -2));
}
-QString IppRequest::statusMessage()
+TQString IppRequest::statusMessage()
{
QString msg;
switch (status())
@@ -242,7 +242,7 @@ QString IppRequest::statusMessage()
return msg;
}
-bool IppRequest::integerValue_p(const QString& name, int& value, int type)
+bool IppRequest::integerValue_p(const TQString& name, int& value, int type)
{
if (!request_ || name.isEmpty()) return false;
ipp_attribute_t *attr = ippFindAttribute(request_, name.latin1(), (ipp_tag_t)type);
@@ -254,19 +254,19 @@ bool IppRequest::integerValue_p(const QString& name, int& value, int type)
else return false;
}
-bool IppRequest::stringValue_p(const QString& name, QString& value, int type)
+bool IppRequest::stringValue_p(const TQString& name, TQString& value, int type)
{
if (!request_ || name.isEmpty()) return false;
ipp_attribute_t *attr = ippFindAttribute(request_, name.latin1(), (ipp_tag_t)type);
if (attr)
{
- value = QString::fromLocal8Bit(attr->values[0].string.text);
+ value = TQString::fromLocal8Bit(attr->values[0].string.text);
return true;
}
else return false;
}
-bool IppRequest::stringListValue_p(const QString& name, QStringList& values, int type)
+bool IppRequest::stringListValue_p(const TQString& name, TQStringList& values, int type)
{
if (!request_ || name.isEmpty()) return false;
ipp_attribute_t *attr = ippFindAttribute(request_, name.latin1(), (ipp_tag_t)type);
@@ -274,13 +274,13 @@ bool IppRequest::stringListValue_p(const QString& name, QStringList& values, int
if (attr)
{
for (int i=0;i<attr->num_values;i++)
- values.append(QString::fromLocal8Bit(attr->values[i].string.text));
+ values.append(TQString::fromLocal8Bit(attr->values[i].string.text));
return true;
}
else return false;
}
-bool IppRequest::boolean(const QString& name, bool& value)
+bool IppRequest::boolean(const TQString& name, bool& value)
{
if (!request_ || name.isEmpty()) return false;
ipp_attribute_t *attr = ippFindAttribute(request_, name.latin1(), IPP_TAG_BOOLEAN);
@@ -292,7 +292,7 @@ bool IppRequest::boolean(const QString& name, bool& value)
else return false;
}
-bool IppRequest::doFileRequest(const QString& res, const QString& filename)
+bool IppRequest::doFileRequest(const TQString& res, const TQString& filename)
{
QString myHost = host_;
int myPort = port_;
@@ -319,7 +319,7 @@ bool IppRequest::doFileRequest(const QString& res, const QString& filename)
if (dump_ > 0)
{
- dumpRequest(request_, false, "Request to "+myHost+":"+QString::number(myPort));
+ dumpRequest(request_, false, "Request to "+myHost+":"+TQString::number(myPort));
}
request_ = cupsDoFileRequest(HTTP, request_, (res.isEmpty() ? "/" : res.latin1()), (filename.isEmpty() ? NULL : filename.latin1()));
@@ -348,7 +348,7 @@ bool IppRequest::doFileRequest(const QString& res, const QString& filename)
return true;
}
-bool IppRequest::htmlReport(int group, QTextStream& output)
+bool IppRequest::htmlReport(int group, TQTextStream& output)
{
if (!request_) return false;
// start table
@@ -430,9 +430,9 @@ bool IppRequest::htmlReport(int group, QTextStream& output)
return true;
}
-QMap<QString,QString> IppRequest::toMap(int group)
+TQMap<TQString,TQString> IppRequest::toMap(int group)
{
- QMap<QString,QString> opts;
+ TQMap<TQString,TQString> opts;
if (request_)
{
ipp_attribute_t *attr = first();
@@ -450,19 +450,19 @@ QMap<QString,QString> IppRequest::toMap(int group)
{
case IPP_TAG_INTEGER:
case IPP_TAG_ENUM:
- value.append(QString::number(attr->values[i].integer)).append(",");
+ value.append(TQString::number(attr->values[i].integer)).append(",");
break;
case IPP_TAG_BOOLEAN:
value.append((attr->values[i].boolean ? "true" : "false")).append(",");
break;
case IPP_TAG_RANGE:
if (attr->values[i].range.lower > 0)
- value.append(QString::number(attr->values[i].range.lower));
+ value.append(TQString::number(attr->values[i].range.lower));
if (attr->values[i].range.lower != attr->values[i].range.upper)
{
value.append("-");
if (attr->values[i].range.upper > 0)
- value.append(QString::number(attr->values[i].range.upper));
+ value.append(TQString::number(attr->values[i].range.upper));
}
value.append(",");
break;
@@ -476,7 +476,7 @@ QMap<QString,QString> IppRequest::toMap(int group)
case IPP_TAG_TEXTLANG:
case IPP_TAG_CHARSET:
case IPP_TAG_LANGUAGE:
- value.append(QString::fromLocal8Bit(attr->values[i].string.text)).append(",");
+ value.append(TQString::fromLocal8Bit(attr->values[i].string.text)).append(",");
break;
default:
break;
@@ -484,14 +484,14 @@ QMap<QString,QString> IppRequest::toMap(int group)
}
if (!value.isEmpty())
value.truncate(value.length()-1);
- opts[QString::fromLocal8Bit(attr->name)] = value;
+ opts[TQString::fromLocal8Bit(attr->name)] = value;
attr = attr->next;
}
}
return opts;
}
-void IppRequest::setMap(const QMap<QString,QString>& opts)
+void IppRequest::setMap(const TQMap<TQString,TQString>& opts)
{
if (!request_)
return;
@@ -499,7 +499,7 @@ void IppRequest::setMap(const QMap<QString,QString>& opts)
QRegExp re("^\"|\"$");
cups_option_t *options = NULL;
int n = 0;
- for (QMap<QString,QString>::ConstIterator it=opts.begin(); it!=opts.end(); ++it)
+ for (TQMap<TQString,TQString>::ConstIterator it=opts.begin(); it!=opts.end(); ++it)
{
if (it.key().startsWith("kde-") || it.key().startsWith("app-"))
continue;
diff --git a/kdeprint/cups/ipprequest.h b/kdeprint/cups/ipprequest.h
index 68fe3ec0b..1265ee966 100644
--- a/kdeprint/cups/ipprequest.h
+++ b/kdeprint/cups/ipprequest.h
@@ -20,10 +20,10 @@
#ifndef IPPREQUEST_H
#define IPPREQUEST_H
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qtextstream.h>
-#include <qmap.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqtextstream.h>
+#include <tqmap.h>
#include <cups/ipp.h>
@@ -36,64 +36,64 @@ public:
void init(); // re-initializes the request
// request building functions
- void addMime(int group, const QString& name, const QString& mime);
- void addKeyword(int group, const QString& name, const QString& key);
- void addKeyword(int group, const QString& name, const QStringList& keys);
- void addURI(int group, const QString& name, const QString& uri);
- void addURI(int group, const QString& name, const QStringList& uris);
- void addText(int group, const QString& name, const QString& txt);
- void addText(int group, const QString& name, const QStringList& txts);
- void addName(int group, const QString& name, const QString& nm);
- void addName(int group, const QString& name, const QStringList& nms);
- void addInteger(int group, const QString& name, int value);
- void addInteger(int group, const QString& name, const QValueList<int>& values);
- void addEnum(int group, const QString& name, int value);
- void addEnum(int group, const QString& name, const QValueList<int>& values);
- void addBoolean(int group, const QString& name, bool value);
- void addBoolean(int group, const QString& name, const QValueList<bool>& values);
+ void addMime(int group, const TQString& name, const TQString& mime);
+ void addKeyword(int group, const TQString& name, const TQString& key);
+ void addKeyword(int group, const TQString& name, const TQStringList& keys);
+ void addURI(int group, const TQString& name, const TQString& uri);
+ void addURI(int group, const TQString& name, const TQStringList& uris);
+ void addText(int group, const TQString& name, const TQString& txt);
+ void addText(int group, const TQString& name, const TQStringList& txts);
+ void addName(int group, const TQString& name, const TQString& nm);
+ void addName(int group, const TQString& name, const TQStringList& nms);
+ void addInteger(int group, const TQString& name, int value);
+ void addInteger(int group, const TQString& name, const TQValueList<int>& values);
+ void addEnum(int group, const TQString& name, int value);
+ void addEnum(int group, const TQString& name, const TQValueList<int>& values);
+ void addBoolean(int group, const TQString& name, bool value);
+ void addBoolean(int group, const TQString& name, const TQValueList<bool>& values);
void setOperation(int op);
- void setHost(const QString& host);
+ void setHost(const TQString& host);
void setPort(int p);
// request answer functions
int status();
- QString statusMessage();
- bool integer(const QString& name, int& value);
- bool boolean(const QString& name, bool& value);
- bool enumvalue(const QString& name, int& value);
- bool name(const QString& name, QString& value);
- bool name(const QString& name, QStringList& value);
- bool text(const QString& name, QString& value);
- bool text(const QString& name, QStringList& value);
- bool uri(const QString& name, QString& value);
- bool uri(const QString& name, QStringList& value);
- bool keyword(const QString& name, QString& value);
- bool keyword(const QString& name, QStringList& value);
- bool mime(const QString& name, QString& value);
+ TQString statusMessage();
+ bool integer(const TQString& name, int& value);
+ bool boolean(const TQString& name, bool& value);
+ bool enumvalue(const TQString& name, int& value);
+ bool name(const TQString& name, TQString& value);
+ bool name(const TQString& name, TQStringList& value);
+ bool text(const TQString& name, TQString& value);
+ bool text(const TQString& name, TQStringList& value);
+ bool uri(const TQString& name, TQString& value);
+ bool uri(const TQString& name, TQStringList& value);
+ bool keyword(const TQString& name, TQString& value);
+ bool keyword(const TQString& name, TQStringList& value);
+ bool mime(const TQString& name, TQString& value);
ipp_attribute_t* first();
ipp_attribute_t* last();
- QMap<QString,QString> toMap(int group = -1);
- void setMap(const QMap<QString,QString>& opts);
+ TQMap<TQString,TQString> toMap(int group = -1);
+ void setMap(const TQMap<TQString,TQString>& opts);
// processing functions
- bool doRequest(const QString& res);
- bool doFileRequest(const QString& res, const QString& filename = QString::null);
+ bool doRequest(const TQString& res);
+ bool doFileRequest(const TQString& res, const TQString& filename = TQString::null);
// report functions
- bool htmlReport(int group, QTextStream& output);
+ bool htmlReport(int group, TQTextStream& output);
// debug function
void dump(int state);
protected:
- void addString_p(int group, int type, const QString& name, const QString& value);
- void addStringList_p(int group, int type, const QString& name, const QStringList& values);
- void addInteger_p(int group, int type, const QString& name, int value);
- void addIntegerList_p(int group, int type, const QString& name, const QValueList<int>& values);
- bool stringValue_p(const QString& name, QString& value, int type);
- bool stringListValue_p(const QString& name, QStringList& values, int type);
- bool integerValue_p(const QString& name, int& value, int type);
+ void addString_p(int group, int type, const TQString& name, const TQString& value);
+ void addStringList_p(int group, int type, const TQString& name, const TQStringList& values);
+ void addInteger_p(int group, int type, const TQString& name, int value);
+ void addIntegerList_p(int group, int type, const TQString& name, const TQValueList<int>& values);
+ bool stringValue_p(const TQString& name, TQString& value, int type);
+ bool stringListValue_p(const TQString& name, TQStringList& values, int type);
+ bool integerValue_p(const TQString& name, int& value, int type);
private:
ipp_t *request_;
@@ -103,79 +103,79 @@ private:
int dump_;
};
-inline void IppRequest::addMime(int group, const QString& name, const QString& mime)
+inline void IppRequest::addMime(int group, const TQString& name, const TQString& mime)
{ addString_p(group, IPP_TAG_MIMETYPE, name, mime); }
-inline void IppRequest::addKeyword(int group, const QString& name, const QString& key)
+inline void IppRequest::addKeyword(int group, const TQString& name, const TQString& key)
{ addString_p(group, IPP_TAG_KEYWORD, name, key); }
-inline void IppRequest::addKeyword(int group, const QString& name, const QStringList& keys)
+inline void IppRequest::addKeyword(int group, const TQString& name, const TQStringList& keys)
{ addStringList_p(group, IPP_TAG_KEYWORD, name, keys); }
-inline void IppRequest::addURI(int group, const QString& name, const QString& uri)
+inline void IppRequest::addURI(int group, const TQString& name, const TQString& uri)
{ addString_p(group, IPP_TAG_URI, name, uri); }
-inline void IppRequest::addURI(int group, const QString& name, const QStringList& uris)
+inline void IppRequest::addURI(int group, const TQString& name, const TQStringList& uris)
{ addStringList_p(group, IPP_TAG_URI, name, uris); }
-inline void IppRequest::addText(int group, const QString& name, const QString& txt)
+inline void IppRequest::addText(int group, const TQString& name, const TQString& txt)
{ addString_p(group, IPP_TAG_TEXT, name, txt); }
-inline void IppRequest::addText(int group, const QString& name, const QStringList& txts)
+inline void IppRequest::addText(int group, const TQString& name, const TQStringList& txts)
{ addStringList_p(group, IPP_TAG_TEXT, name, txts); }
-inline void IppRequest::addName(int group, const QString& name, const QString& nm)
+inline void IppRequest::addName(int group, const TQString& name, const TQString& nm)
{ addString_p(group, IPP_TAG_NAME, name, nm); }
-inline void IppRequest::addName(int group, const QString& name, const QStringList& nms)
+inline void IppRequest::addName(int group, const TQString& name, const TQStringList& nms)
{ addStringList_p(group, IPP_TAG_NAME, name, nms); }
-inline void IppRequest::addInteger(int group, const QString& name, int value)
+inline void IppRequest::addInteger(int group, const TQString& name, int value)
{ addInteger_p(group, IPP_TAG_INTEGER, name, value); }
-inline void IppRequest::addInteger(int group, const QString& name, const QValueList<int>& values)
+inline void IppRequest::addInteger(int group, const TQString& name, const TQValueList<int>& values)
{ addIntegerList_p(group, IPP_TAG_INTEGER, name, values); }
-inline void IppRequest::addEnum(int group, const QString& name, int value)
+inline void IppRequest::addEnum(int group, const TQString& name, int value)
{ addInteger_p(group, IPP_TAG_ENUM, name, value); }
-inline void IppRequest::addEnum(int group, const QString& name, const QValueList<int>& values)
+inline void IppRequest::addEnum(int group, const TQString& name, const TQValueList<int>& values)
{ addIntegerList_p(group, IPP_TAG_ENUM, name, values); }
-inline bool IppRequest::integer(const QString& name, int& value)
+inline bool IppRequest::integer(const TQString& name, int& value)
{ return integerValue_p(name, value, IPP_TAG_INTEGER); }
-inline bool IppRequest::enumvalue(const QString& name, int& value)
+inline bool IppRequest::enumvalue(const TQString& name, int& value)
{ return integerValue_p(name, value, IPP_TAG_ENUM); }
-inline bool IppRequest::name(const QString& name, QString& value)
+inline bool IppRequest::name(const TQString& name, TQString& value)
{ return stringValue_p(name, value, IPP_TAG_NAME); }
-inline bool IppRequest::name(const QString& name, QStringList& values)
+inline bool IppRequest::name(const TQString& name, TQStringList& values)
{ return stringListValue_p(name, values, IPP_TAG_NAME); }
-inline bool IppRequest::text(const QString& name, QString& value)
+inline bool IppRequest::text(const TQString& name, TQString& value)
{ return stringValue_p(name, value, IPP_TAG_TEXT); }
-inline bool IppRequest::text(const QString& name, QStringList& values)
+inline bool IppRequest::text(const TQString& name, TQStringList& values)
{ return stringListValue_p(name, values, IPP_TAG_TEXT); }
-inline bool IppRequest::uri(const QString& name, QString& value)
+inline bool IppRequest::uri(const TQString& name, TQString& value)
{ return stringValue_p(name, value, IPP_TAG_URI); }
-inline bool IppRequest::uri(const QString& name, QStringList& values)
+inline bool IppRequest::uri(const TQString& name, TQStringList& values)
{ return stringListValue_p(name, values, IPP_TAG_URI); }
-inline bool IppRequest::keyword(const QString& name, QString& value)
+inline bool IppRequest::keyword(const TQString& name, TQString& value)
{ return stringValue_p(name, value, IPP_TAG_KEYWORD); }
-inline bool IppRequest::keyword(const QString& name, QStringList& values)
+inline bool IppRequest::keyword(const TQString& name, TQStringList& values)
{ return stringListValue_p(name, values, IPP_TAG_KEYWORD); }
-inline bool IppRequest::mime(const QString& name, QString& value)
+inline bool IppRequest::mime(const TQString& name, TQString& value)
{ return stringValue_p(name, value, IPP_TAG_MIMETYPE); }
-inline bool IppRequest::doRequest(const QString& res)
+inline bool IppRequest::doRequest(const TQString& res)
{ return doFileRequest(res); }
inline ipp_attribute_t* IppRequest::first()
@@ -184,7 +184,7 @@ inline ipp_attribute_t* IppRequest::first()
inline ipp_attribute_t* IppRequest::last()
{ return (request_ ? request_->last : NULL); }
-inline void IppRequest::setHost(const QString& host)
+inline void IppRequest::setHost(const TQString& host)
{ host_ = host; }
inline void IppRequest::setPort(int p)
diff --git a/kdeprint/cups/kcupsprinterimpl.cpp b/kdeprint/cups/kcupsprinterimpl.cpp
index 665183063..1bf6d55bf 100644
--- a/kdeprint/cups/kcupsprinterimpl.cpp
+++ b/kdeprint/cups/kcupsprinterimpl.cpp
@@ -24,14 +24,14 @@
#include "kmmanager.h"
#include "cupsinfos.h"
-#include <qfile.h>
+#include <tqfile.h>
#include <cups/cups.h>
#include <stdlib.h>
#include <kprocess.h>
-static void mapToCupsOptions(const QMap<QString,QString>& opts, QString& cmd);
+static void mapToCupsOptions(const TQMap<TQString,TQString>& opts, TQString& cmd);
-QSize rangeToSize(const QString& s)
+TQSize rangeToSize(const TQString& s)
{
QString range = s;
int p(-1);
@@ -49,11 +49,11 @@ QSize rangeToSize(const QString& s)
else
from = to = 0;
- return QSize(from,to);
+ return TQSize(from,to);
}
//******************************************************************************************************
-KCupsPrinterImpl::KCupsPrinterImpl(QObject *parent, const char *name, const QStringList & /*args*/)
+KCupsPrinterImpl::KCupsPrinterImpl(TQObject *parent, const char *name, const TQStringList & /*args*/)
: KPrinterImpl(parent,name)
{
}
@@ -62,13 +62,13 @@ KCupsPrinterImpl::~KCupsPrinterImpl()
{
}
-bool KCupsPrinterImpl::setupCommand(QString& cmd, KPrinter *printer)
+bool KCupsPrinterImpl::setupCommand(TQString& cmd, KPrinter *printer)
{
// check printer object
if (!printer) return false;
- QString hoststr = QString::fromLatin1("%1:%2").arg(CupsInfos::self()->host()).arg(CupsInfos::self()->port());
- cmd = QString::fromLatin1("cupsdoprint -P %1 -J %3 -H %2").arg(quote(printer->printerName())).arg(quote(hoststr)).arg(quote(printer->docName()));
+ QString hoststr = TQString::fromLatin1("%1:%2").arg(CupsInfos::self()->host()).arg(CupsInfos::self()->port());
+ cmd = TQString::fromLatin1("cupsdoprint -P %1 -J %3 -H %2").arg(quote(printer->printerName())).arg(quote(hoststr)).arg(quote(printer->docName()));
if (!CupsInfos::self()->login().isEmpty())
{
QString userstr(CupsInfos::self()->login());
@@ -107,12 +107,12 @@ void KCupsPrinterImpl::preparePrinting(KPrinter *printer)
}
else
{ // No translation needed (but range => (from,to))
- QString range = printer->option("kde-range");
+ TQString range = printer->option("kde-range");
if (!range.isEmpty())
{
QSize s = rangeToSize(range);
- printer->setOption("kde-from",QString::number(s.width()));
- printer->setOption("kde-to",QString::number(s.height()));
+ printer->setOption("kde-from",TQString::number(s.width()));
+ printer->setOption("kde-to",TQString::number(s.height()));
}
}
@@ -120,14 +120,14 @@ void KCupsPrinterImpl::preparePrinting(KPrinter *printer)
KPrinterImpl::preparePrinting(printer);
}
-void KCupsPrinterImpl::broadcastOption(const QString& key, const QString& value)
+void KCupsPrinterImpl::broadcastOption(const TQString& key, const TQString& value)
{
KPrinterImpl::broadcastOption(key,value);
if (key == "kde-orientation")
KPrinterImpl::broadcastOption("orientation-requested",(value == "Landscape" ? "4" : "3"));
else if (key == "kde-pagesize")
{
- QString pagename = QString::fromLatin1(pageSizeToPageName((KPrinter::PageSize)value.toInt()));
+ QString pagename = TQString::fromLatin1(pageSizeToPageName((KPrinter::PageSize)value.toInt()));
KPrinterImpl::broadcastOption("PageSize",pagename);
// simple hack for classes
KPrinterImpl::broadcastOption("media",pagename);
@@ -136,15 +136,15 @@ void KCupsPrinterImpl::broadcastOption(const QString& key, const QString& value)
//******************************************************************************************************
-static void mapToCupsOptions(const QMap<QString,QString>& opts, QString& cmd)
+static void mapToCupsOptions(const TQMap<TQString,TQString>& opts, TQString& cmd)
{
QString optstr;
- for (QMap<QString,QString>::ConstIterator it=opts.begin(); it!=opts.end(); ++it)
+ for (TQMap<TQString,TQString>::ConstIterator it=opts.begin(); it!=opts.end(); ++it)
{
// only encode those options that doesn't start with "kde-" or "app-".
if (!it.key().startsWith("kde-") && !it.key().startsWith("app-") && !it.key().startsWith("_kde"))
{
- QString key = it.key();
+ TQString key = it.key();
if (key.startsWith("KDEPrint-"))
/* Those are keys added by the "Additional Tags" page. *
* Strip the prefix to build valid a CUPS option. */
diff --git a/kdeprint/cups/kcupsprinterimpl.h b/kdeprint/cups/kcupsprinterimpl.h
index 81b0a364a..f2eeab88f 100644
--- a/kdeprint/cups/kcupsprinterimpl.h
+++ b/kdeprint/cups/kcupsprinterimpl.h
@@ -25,12 +25,12 @@
class KCupsPrinterImpl : public KPrinterImpl
{
public:
- KCupsPrinterImpl(QObject *parent, const char *name, const QStringList & /*args*/ = QStringList());
+ KCupsPrinterImpl(TQObject *parent, const char *name, const TQStringList & /*args*/ = TQStringList());
~KCupsPrinterImpl();
- bool setupCommand(QString&, KPrinter*);
+ bool setupCommand(TQString&, KPrinter*);
void preparePrinting(KPrinter*);
- void broadcastOption(const QString& key, const QString& value);
+ void broadcastOption(const TQString& key, const TQString& value);
};
#endif
diff --git a/kdeprint/cups/kmconfigcups.cpp b/kdeprint/cups/kmconfigcups.cpp
index 3d5ece0ab..c23f5d54c 100644
--- a/kdeprint/cups/kmconfigcups.cpp
+++ b/kdeprint/cups/kmconfigcups.cpp
@@ -24,9 +24,9 @@
#include <kconfig.h>
#include <kdialog.h>
-#include <qlayout.h>
+#include <tqlayout.h>
-KMConfigCups::KMConfigCups(QWidget *parent)
+KMConfigCups::KMConfigCups(TQWidget *parent)
: KMConfigPage(parent,"ConfigCups")
{
setPageName(i18n("CUPS Server"));
@@ -35,7 +35,7 @@ KMConfigCups::KMConfigCups(QWidget *parent)
m_widget = new KMCupsConfigWidget(this);
- QVBoxLayout *lay0 = new QVBoxLayout(this, 0, KDialog::spacingHint());
+ TQVBoxLayout *lay0 = new TQVBoxLayout(this, 0, KDialog::spacingHint());
lay0->addWidget(m_widget);
lay0->addStretch(1);
}
diff --git a/kdeprint/cups/kmconfigcups.h b/kdeprint/cups/kmconfigcups.h
index 3f0afa2bb..52dac657c 100644
--- a/kdeprint/cups/kmconfigcups.h
+++ b/kdeprint/cups/kmconfigcups.h
@@ -27,7 +27,7 @@ class KMCupsConfigWidget;
class KMConfigCups : public KMConfigPage
{
public:
- KMConfigCups(QWidget *parent = 0);
+ KMConfigCups(TQWidget *parent = 0);
void loadConfig(KConfig*);
void saveConfig(KConfig*);
diff --git a/kdeprint/cups/kmconfigcupsdir.cpp b/kdeprint/cups/kmconfigcupsdir.cpp
index 31005752d..5e6958565 100644
--- a/kdeprint/cups/kmconfigcupsdir.cpp
+++ b/kdeprint/cups/kmconfigcupsdir.cpp
@@ -19,36 +19,36 @@
#include "kmconfigcupsdir.h"
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
#include <kurlrequester.h>
#include <klocale.h>
#include <kdialog.h>
#include <kconfig.h>
-#include <qgroupbox.h>
-#include <qlayout.h>
+#include <tqgroupbox.h>
+#include <tqlayout.h>
#include <kcursor.h>
-KMConfigCupsDir::KMConfigCupsDir(QWidget *parent)
+KMConfigCupsDir::KMConfigCupsDir(TQWidget *parent)
: KMConfigPage(parent,"ConfigCupsDir")
{
setPageName(i18n("Folder"));
setPageHeader(i18n("CUPS Folder Settings"));
setPagePixmap("folder");
- QGroupBox *m_dirbox = new QGroupBox(0, Qt::Vertical, i18n("Installation Folder"), this);
+ TQGroupBox *m_dirbox = new TQGroupBox(0, Qt::Vertical, i18n("Installation Folder"), this);
m_installdir = new KURLRequester(m_dirbox);
m_installdir->setMode((KFile::Mode)(KFile::Directory|KFile::ExistingOnly|KFile::LocalOnly));
- m_stddir = new QCheckBox(i18n("Standard installation (/)"), m_dirbox);
+ m_stddir = new TQCheckBox(i18n("Standard installation (/)"), m_dirbox);
m_stddir->setCursor(KCursor::handCursor());
- QVBoxLayout *lay0 = new QVBoxLayout(this, 0, KDialog::spacingHint());
+ TQVBoxLayout *lay0 = new TQVBoxLayout(this, 0, KDialog::spacingHint());
lay0->addWidget(m_dirbox);
lay0->addStretch(1);
- QVBoxLayout *lay1 = new QVBoxLayout(m_dirbox->layout(), 10);
+ TQVBoxLayout *lay1 = new TQVBoxLayout(m_dirbox->layout(), 10);
lay1->addWidget(m_stddir);
lay1->addWidget(m_installdir);
- connect(m_stddir,SIGNAL(toggled(bool)),m_installdir,SLOT(setDisabled(bool)));
+ connect(m_stddir,TQT_SIGNAL(toggled(bool)),m_installdir,TQT_SLOT(setDisabled(bool)));
m_stddir->setChecked(true);
}
@@ -63,5 +63,5 @@ void KMConfigCupsDir::loadConfig(KConfig *conf)
void KMConfigCupsDir::saveConfig(KConfig *conf)
{
conf->setGroup("CUPS");
- conf->writePathEntry("InstallDir",(m_stddir->isChecked() ? QString::null : m_installdir->url()));
+ conf->writePathEntry("InstallDir",(m_stddir->isChecked() ? TQString::null : m_installdir->url()));
}
diff --git a/kdeprint/cups/kmconfigcupsdir.h b/kdeprint/cups/kmconfigcupsdir.h
index 253b2bd2d..ca365ba19 100644
--- a/kdeprint/cups/kmconfigcupsdir.h
+++ b/kdeprint/cups/kmconfigcupsdir.h
@@ -28,7 +28,7 @@ class QCheckBox;
class KMConfigCupsDir : public KMConfigPage
{
public:
- KMConfigCupsDir(QWidget *parent = 0);
+ KMConfigCupsDir(TQWidget *parent = 0);
void loadConfig(KConfig*);
void saveConfig(KConfig*);
diff --git a/kdeprint/cups/kmcupsconfigwidget.cpp b/kdeprint/cups/kmcupsconfigwidget.cpp
index 9c3fa7516..684d8b850 100644
--- a/kdeprint/cups/kmcupsconfigwidget.cpp
+++ b/kdeprint/cups/kmcupsconfigwidget.cpp
@@ -20,13 +20,13 @@
#include "kmcupsconfigwidget.h"
#include "cupsinfos.h"
-#include <qlabel.h>
-#include <qgroupbox.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qvalidator.h>
+#include <tqlabel.h>
+#include <tqgroupbox.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqvalidator.h>
#include <klocale.h>
#include <kcursor.h>
@@ -36,64 +36,64 @@
class PortValidator : public QIntValidator
{
public:
- PortValidator(QWidget *parent, const char *name = 0);
- virtual QValidator::State validate(QString&, int&) const;
+ PortValidator(TQWidget *parent, const char *name = 0);
+ virtual TQValidator::State validate(TQString&, int&) const;
};
-PortValidator::PortValidator(QWidget *parent, const char *name)
-: QIntValidator(1, 65535, parent, name)
+PortValidator::PortValidator(TQWidget *parent, const char *name)
+: TQIntValidator(1, 65535, parent, name)
{
}
-QValidator::State PortValidator::validate(QString& txt, int&) const
+TQValidator::State PortValidator::validate(TQString& txt, int&) const
{
bool ok(false);
int p = txt.toInt(&ok);
if (txt.isEmpty())
- return QValidator::Intermediate;
+ return TQValidator::Intermediate;
else if (ok && p >= bottom() && p <= top())
- return QValidator::Acceptable;
- return QValidator::Invalid;
+ return TQValidator::Acceptable;
+ return TQValidator::Invalid;
}
//******************************************************************************************
-KMCupsConfigWidget::KMCupsConfigWidget(QWidget *parent, const char *name)
-: QWidget(parent,name)
+KMCupsConfigWidget::KMCupsConfigWidget(TQWidget *parent, const char *name)
+: TQWidget(parent,name)
{
// widget creation
- QGroupBox *m_hostbox = new QGroupBox(0, Qt::Vertical, i18n("Server Information"), this);
- QGroupBox *m_loginbox = new QGroupBox(0, Qt::Vertical, i18n("Account Information"), this);
- QLabel *m_hostlabel = new QLabel(i18n("&Host:"), m_hostbox);
- QLabel *m_portlabel = new QLabel(i18n("&Port:"), m_hostbox);
- m_host = new QLineEdit(m_hostbox);
- m_port = new QLineEdit(m_hostbox);
+ QGroupBox *m_hostbox = new TQGroupBox(0, Qt::Vertical, i18n("Server Information"), this);
+ QGroupBox *m_loginbox = new TQGroupBox(0, Qt::Vertical, i18n("Account Information"), this);
+ QLabel *m_hostlabel = new TQLabel(i18n("&Host:"), m_hostbox);
+ QLabel *m_portlabel = new TQLabel(i18n("&Port:"), m_hostbox);
+ m_host = new TQLineEdit(m_hostbox);
+ m_port = new TQLineEdit(m_hostbox);
m_hostlabel->setBuddy(m_host);
m_portlabel->setBuddy(m_port);
m_port->setValidator(new PortValidator(m_port));
- m_login = new QLineEdit(m_loginbox);
- QLabel *m_loginlabel = new QLabel(i18n("&User:"), m_loginbox);
- QLabel *m_passwordlabel = new QLabel(i18n("Pass&word:"), m_loginbox);
- m_password = new QLineEdit(m_loginbox);
- m_password->setEchoMode(QLineEdit::Password);
- m_savepwd = new QCheckBox( i18n( "&Store password in configuration file" ), m_loginbox );
+ m_login = new TQLineEdit(m_loginbox);
+ QLabel *m_loginlabel = new TQLabel(i18n("&User:"), m_loginbox);
+ QLabel *m_passwordlabel = new TQLabel(i18n("Pass&word:"), m_loginbox);
+ m_password = new TQLineEdit(m_loginbox);
+ m_password->setEchoMode(TQLineEdit::Password);
+ m_savepwd = new TQCheckBox( i18n( "&Store password in configuration file" ), m_loginbox );
m_savepwd->setCursor( KCursor::handCursor() );
- m_anonymous = new QCheckBox(i18n("Use &anonymous access"), m_loginbox);
+ m_anonymous = new TQCheckBox(i18n("Use &anonymous access"), m_loginbox);
m_anonymous->setCursor(KCursor::handCursor());
m_loginlabel->setBuddy(m_login);
m_passwordlabel->setBuddy(m_password);
// layout creation
- QVBoxLayout *lay0 = new QVBoxLayout(this, 0, 10);
+ QVBoxLayout *lay0 = new TQVBoxLayout(this, 0, 10);
lay0->addWidget(m_hostbox,1);
lay0->addWidget(m_loginbox,1);
- QGridLayout *lay2 = new QGridLayout(m_hostbox->layout(), 2, 2, 10);
+ QGridLayout *lay2 = new TQGridLayout(m_hostbox->layout(), 2, 2, 10);
lay2->setColStretch(1,1);
lay2->addWidget(m_hostlabel,0,0);
lay2->addWidget(m_portlabel,1,0);
lay2->addWidget(m_host,0,1);
lay2->addWidget(m_port,1,1);
- QGridLayout *lay3 = new QGridLayout(m_loginbox->layout(), 4, 2, 10);
+ QGridLayout *lay3 = new TQGridLayout(m_loginbox->layout(), 4, 2, 10);
lay3->setColStretch(1,1);
lay3->addWidget(m_loginlabel,0,0);
lay3->addWidget(m_passwordlabel,1,0);
@@ -103,16 +103,16 @@ KMCupsConfigWidget::KMCupsConfigWidget(QWidget *parent, const char *name)
lay3->addMultiCellWidget(m_anonymous,3,3,0,1);
// connections
- connect(m_anonymous,SIGNAL(toggled(bool)),m_login,SLOT(setDisabled(bool)));
- connect(m_anonymous,SIGNAL(toggled(bool)),m_password,SLOT(setDisabled(bool)));
- connect(m_anonymous,SIGNAL(toggled(bool)),m_savepwd,SLOT(setDisabled(bool)));
+ connect(m_anonymous,TQT_SIGNAL(toggled(bool)),m_login,TQT_SLOT(setDisabled(bool)));
+ connect(m_anonymous,TQT_SIGNAL(toggled(bool)),m_password,TQT_SLOT(setDisabled(bool)));
+ connect(m_anonymous,TQT_SIGNAL(toggled(bool)),m_savepwd,TQT_SLOT(setDisabled(bool)));
}
void KMCupsConfigWidget::load()
{
CupsInfos *inf = CupsInfos::self();
m_host->setText(inf->host());
- m_port->setText(QString::number(inf->port()));
+ m_port->setText(TQString::number(inf->port()));
if (inf->login().isEmpty())
m_anonymous->setChecked(true);
else
@@ -130,8 +130,8 @@ void KMCupsConfigWidget::save(bool sync)
inf->setPort(m_port->text().toInt());
if (m_anonymous->isChecked())
{
- inf->setLogin(QString::null);
- inf->setPassword(QString::null);
+ inf->setLogin(TQString::null);
+ inf->setPassword(TQString::null);
inf->setSavePassword( false );
}
else
@@ -148,10 +148,10 @@ void KMCupsConfigWidget::saveConfig(KConfig *conf)
conf->setGroup("CUPS");
conf->writeEntry("Host",m_host->text());
conf->writeEntry("Port",m_port->text().toInt());
- conf->writeEntry("Login",(m_anonymous->isChecked() ? QString::null : m_login->text()));
+ conf->writeEntry("Login",(m_anonymous->isChecked() ? TQString::null : m_login->text()));
conf->writeEntry( "SavePassword", ( m_anonymous->isChecked() ? false : m_savepwd->isChecked() ) );
if ( m_savepwd->isChecked() && !m_anonymous->isChecked() )
- conf->writeEntry( "Password", ( m_anonymous->isChecked() ? QString::null : KStringHandler::obscure( m_password->text() ) ) );
+ conf->writeEntry( "Password", ( m_anonymous->isChecked() ? TQString::null : KStringHandler::obscure( m_password->text() ) ) );
else
conf->deleteEntry( "Password" );
// synchronize CupsInfos object
diff --git a/kdeprint/cups/kmcupsconfigwidget.h b/kdeprint/cups/kmcupsconfigwidget.h
index 34c488290..ef493166a 100644
--- a/kdeprint/cups/kmcupsconfigwidget.h
+++ b/kdeprint/cups/kmcupsconfigwidget.h
@@ -20,7 +20,7 @@
#ifndef KMCUPSCONFIGWIDGET_H
#define KMCUPSCONFIGWIDGET_H
-#include <qwidget.h>
+#include <tqwidget.h>
class QLineEdit;
class QCheckBox;
@@ -29,7 +29,7 @@ class KConfig;
class KMCupsConfigWidget : public QWidget
{
public:
- KMCupsConfigWidget(QWidget *parent = 0, const char *name = 0);
+ KMCupsConfigWidget(TQWidget *parent = 0, const char *name = 0);
void load();
void save(bool sync = true);
diff --git a/kdeprint/cups/kmcupsjobmanager.cpp b/kdeprint/cups/kmcupsjobmanager.cpp
index 73f6005d9..011256cd6 100644
--- a/kdeprint/cups/kmcupsjobmanager.cpp
+++ b/kdeprint/cups/kmcupsjobmanager.cpp
@@ -36,7 +36,7 @@
#include <kdebug.h>
#include <kurl.h>
-KMCupsJobManager::KMCupsJobManager(QObject *parent, const char *name, const QStringList & /*args*/)
+KMCupsJobManager::KMCupsJobManager(TQObject *parent, const char *name, const TQStringList & /*args*/)
: KMJobManager(parent,name)
{
}
@@ -50,13 +50,13 @@ int KMCupsJobManager::actions()
return KMJob::All;
}
-bool KMCupsJobManager::sendCommandSystemJob(const QPtrList<KMJob>& jobs, int action, const QString& argstr)
+bool KMCupsJobManager::sendCommandSystemJob(const TQPtrList<KMJob>& jobs, int action, const TQString& argstr)
{
IppRequest req;
QString uri;
bool value(true);
- QPtrListIterator<KMJob> it(jobs);
+ TQPtrListIterator<KMJob> it(jobs);
for (;it.current() && value;++it)
{
// hypothesis: job operation are always done on local jobs. The only operation
@@ -93,7 +93,7 @@ bool KMCupsJobManager::sendCommandSystemJob(const QPtrList<KMJob>& jobs, int act
if (argstr.isEmpty()) return false;
req.setOperation(CUPS_MOVE_JOB);
uri =
- QString::fromLatin1("ipp://%1/printers/%2").arg(CupsInfos::self()->hostaddr(),
+ TQString::fromLatin1("ipp://%1/printers/%2").arg(CupsInfos::self()->hostaddr(),
argstr);
req.addURI(IPP_TAG_OPERATION, "job-printer-uri", uri);
break;
@@ -108,7 +108,7 @@ bool KMCupsJobManager::sendCommandSystemJob(const QPtrList<KMJob>& jobs, int act
return value;
}
-bool KMCupsJobManager::listJobs(const QString& prname, KMJobManager::JobType type, int limit)
+bool KMCupsJobManager::listJobs(const TQString& prname, KMJobManager::JobType type, int limit)
{
IppRequest req;
QStringList keys;
@@ -144,13 +144,13 @@ bool KMCupsJobManager::listJobs(const QString& prname, KMJobManager::JobType typ
*/
}
else
- req.addURI(IPP_TAG_OPERATION, "printer-uri", QString("ipp://%1/%2/%3").arg(infos->hostaddr(),
+ req.addURI(IPP_TAG_OPERATION, "printer-uri", TQString("ipp://%1/%2/%3").arg(infos->hostaddr(),
(mp&&mp->isClass())?"classes":"printers", prname));
// other attributes
req.addKeyword(IPP_TAG_OPERATION, "requested-attributes", keys);
if (type == KMJobManager::CompletedJobs)
- req.addKeyword(IPP_TAG_OPERATION,"which-jobs",QString::fromLatin1("completed"));
+ req.addKeyword(IPP_TAG_OPERATION,"which-jobs",TQString::fromLatin1("completed"));
if (limit > 0)
req.addInteger(IPP_TAG_OPERATION,"limit",limit);
@@ -172,8 +172,8 @@ void KMCupsJobManager::parseListAnswer(IppRequest& req, KMPrinter *pr)
{
QString name(attr->name);
if (name == "job-id") job->setId(attr->values[0].integer);
- else if (name == "job-uri") job->setUri(QString::fromLocal8Bit(attr->values[0].string.text));
- else if (name == "job-name") job->setName(QString::fromLocal8Bit(attr->values[0].string.text));
+ else if (name == "job-uri") job->setUri(TQString::fromLocal8Bit(attr->values[0].string.text));
+ else if (name == "job-name") job->setName(TQString::fromLocal8Bit(attr->values[0].string.text));
else if (name == "job-state")
{
switch (attr->values[0].integer)
@@ -205,7 +205,7 @@ void KMCupsJobManager::parseListAnswer(IppRequest& req, KMPrinter *pr)
}
}
else if (name == "job-k-octets") job->setSize(attr->values[0].integer);
- else if (name == "job-originating-user-name") job->setOwner(QString::fromLocal8Bit(attr->values[0].string.text));
+ else if (name == "job-originating-user-name") job->setOwner(TQString::fromLocal8Bit(attr->values[0].string.text));
else if (name == "job-k-octets-completed") job->setProcessedSize(attr->values[0].integer);
else if (name == "job-media-sheets") job->setPages(attr->values[0].integer);
else if (name == "job-media-sheets-completed") job->setProcessedPages(attr->values[0].integer);
@@ -218,12 +218,12 @@ void KMCupsJobManager::parseListAnswer(IppRequest& req, KMPrinter *pr)
}
else if (name == "job-priority")
{
- job->setAttribute(0, QString::fromLatin1("%1").arg(attr->values[0].integer, 3));
+ job->setAttribute(0, TQString::fromLatin1("%1").arg(attr->values[0].integer, 3));
}
else if (name == "job-billing")
{
job->setAttributeCount(2);
- job->setAttribute(1, QString::fromLocal8Bit(attr->values[0].string.text));
+ job->setAttribute(1, TQString::fromLocal8Bit(attr->values[0].string.text));
}
if (name.isEmpty() || attr == req.last())
@@ -240,7 +240,7 @@ void KMCupsJobManager::parseListAnswer(IppRequest& req, KMPrinter *pr)
delete job;
}
-bool KMCupsJobManager::doPluginAction(int ID, const QPtrList<KMJob>& jobs)
+bool KMCupsJobManager::doPluginAction(int ID, const TQPtrList<KMJob>& jobs)
{
switch (ID)
{
@@ -280,9 +280,9 @@ bool KMCupsJobManager::jobIppReport(KMJob *j)
return result;
}
-QValueList<KAction*> KMCupsJobManager::createPluginActions(KActionCollection *coll)
+TQValueList<KAction*> KMCupsJobManager::createPluginActions(KActionCollection *coll)
{
- QValueList<KAction*> list;
+ TQValueList<KAction*> list;
KAction *act(0);
list << (act = new PluginAction(0, i18n("&Job IPP Report"), "kdeprint_report", 0, coll, "plugin_ipp"));
@@ -297,9 +297,9 @@ QValueList<KAction*> KMCupsJobManager::createPluginActions(KActionCollection *co
return list;
}
-void KMCupsJobManager::validatePluginActions(KActionCollection *coll, const QPtrList<KMJob>& joblist)
+void KMCupsJobManager::validatePluginActions(KActionCollection *coll, const TQPtrList<KMJob>& joblist)
{
- QPtrListIterator<KMJob> it(joblist);
+ TQPtrListIterator<KMJob> it(joblist);
bool flag(true);
for (; it.current(); ++it)
{
@@ -319,9 +319,9 @@ void KMCupsJobManager::validatePluginActions(KActionCollection *coll, const QPtr
a->setEnabled( flag && ( joblist.count() == 1 ) );
}
-bool KMCupsJobManager::changePriority(const QPtrList<KMJob>& jobs, bool up)
+bool KMCupsJobManager::changePriority(const TQPtrList<KMJob>& jobs, bool up)
{
- QPtrListIterator<KMJob> it(jobs);
+ TQPtrListIterator<KMJob> it(jobs);
bool result(true);
for (; it.current() && result; ++it)
{
@@ -349,11 +349,11 @@ bool KMCupsJobManager::changePriority(const QPtrList<KMJob>& jobs, bool up)
return result;
}
-static QString processRange(const QString& range)
+static TQString processRange(const TQString& range)
{
- QStringList l = QStringList::split(',', range, false);
+ QStringList l = TQStringList::split(',', range, false);
QString s;
- for (QStringList::ConstIterator it=l.begin(); it!=l.end(); ++it)
+ for (TQStringList::ConstIterator it=l.begin(); it!=l.end(); ++it)
{
s.append(*it);
if ((*it).find('-') == -1)
@@ -385,7 +385,7 @@ bool KMCupsJobManager::editJobAttributes(KMJob *j)
return false;
}
- QMap<QString,QString> opts = req.toMap(IPP_TAG_JOB);
+ TQMap<TQString,TQString> opts = req.toMap(IPP_TAG_JOB);
// translate the "Copies" option to non-CUPS syntax
if (opts.contains("copies"))
opts["kde-copies"] = opts["copies"];
diff --git a/kdeprint/cups/kmcupsjobmanager.h b/kdeprint/cups/kmcupsjobmanager.h
index 27f3073aa..cba3371dc 100644
--- a/kdeprint/cups/kmcupsjobmanager.h
+++ b/kdeprint/cups/kmcupsjobmanager.h
@@ -22,7 +22,7 @@
#include "kmjobmanager.h"
#include "ipprequest.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
class KMPrinter;
@@ -31,22 +31,22 @@ class KMCupsJobManager : public KMJobManager
Q_OBJECT
public:
- KMCupsJobManager(QObject *parent, const char *name, const QStringList &/*args*/);
+ KMCupsJobManager(TQObject *parent, const char *name, const TQStringList &/*args*/);
virtual ~KMCupsJobManager();
int actions();
- QValueList<KAction*> createPluginActions(KActionCollection*);
- void validatePluginActions(KActionCollection*, const QPtrList<KMJob>&);
- bool doPluginAction(int, const QPtrList<KMJob>&);
+ TQValueList<KAction*> createPluginActions(KActionCollection*);
+ void validatePluginActions(KActionCollection*, const TQPtrList<KMJob>&);
+ bool doPluginAction(int, const TQPtrList<KMJob>&);
protected:
bool jobIppReport(KMJob*);
- bool changePriority(const QPtrList<KMJob>&, bool);
+ bool changePriority(const TQPtrList<KMJob>&, bool);
bool editJobAttributes(KMJob*);
protected:
- bool listJobs(const QString&, JobType, int = 0);
- bool sendCommandSystemJob(const QPtrList<KMJob>& jobs, int action, const QString& arg = QString::null);
+ bool listJobs(const TQString&, JobType, int = 0);
+ bool sendCommandSystemJob(const TQPtrList<KMJob>& jobs, int action, const TQString& arg = TQString::null);
void parseListAnswer(IppRequest& req, KMPrinter *pr);
};
diff --git a/kdeprint/cups/kmcupsmanager.cpp b/kdeprint/cups/kmcupsmanager.cpp
index 003d408fc..63513ba55 100644
--- a/kdeprint/cups/kmcupsmanager.cpp
+++ b/kdeprint/cups/kmcupsmanager.cpp
@@ -33,12 +33,12 @@
#include "foomatic2loader.h"
#include "ppdloader.h"
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qregexp.h>
-#include <qtimer.h>
-#include <qsocket.h>
-#include <qdatetime.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
+#include <tqsocket.h>
+#include <tqdatetime.h>
#include <kdebug.h>
#include <kapplication.h>
@@ -58,17 +58,17 @@
#include <cups/ppd.h>
#include <math.h>
-#define ppdi18n(s) i18n(QString::fromLocal8Bit(s).utf8())
+#define ppdi18n(s) i18n(TQString::fromLocal8Bit(s).utf8())
-static void extractMaticData(QString& buf, const QString& filename);
-static QString printerURI(KMPrinter *p, bool useExistingURI);
-static QString downloadDriver(KMPrinter *p);
+static void extractMaticData(TQString& buf, const TQString& filename);
+static TQString printerURI(KMPrinter *p, bool useExistingURI);
+static TQString downloadDriver(KMPrinter *p);
static int trials = 5;
//*****************************************************************************************************
- KMCupsManager::KMCupsManager(QObject *parent, const char *name, const QStringList & /*args*/)
+ KMCupsManager::KMCupsManager(TQObject *parent, const char *name, const TQStringList & /*args*/)
: KMManager(parent,name)
{
// be sure to create the CupsInfos object -> password
@@ -93,12 +93,12 @@ KMCupsManager::~KMCupsManager()
delete m_socket;
}
-QString KMCupsManager::driverDbCreationProgram()
+TQString KMCupsManager::driverDbCreationProgram()
{
- return QString::fromLatin1("/opt/kde3/bin/make_driver_db_cups");
+ return TQString::fromLatin1("/opt/kde3/bin/make_driver_db_cups");
}
-QString KMCupsManager::driverDirectory()
+TQString KMCupsManager::driverDirectory()
{
QString d = cupsInstallDir();
if (d.isEmpty())
@@ -109,7 +109,7 @@ QString KMCupsManager::driverDirectory()
return d;
}
-QString KMCupsManager::cupsInstallDir()
+TQString KMCupsManager::cupsInstallDir()
{
KConfig *conf= KMFactory::self()->printConfig();
conf->setGroup("CUPS");
@@ -138,8 +138,8 @@ bool KMCupsManager::createPrinter(KMPrinter *p)
req.setOperation(CUPS_ADD_CLASS);
QStringList members = p->members(), uris;
QString s;
- s = QString::fromLocal8Bit("ipp://%1/printers/").arg(CupsInfos::self()->hostaddr());
- for (QStringList::ConstIterator it=members.begin(); it!=members.end(); ++it)
+ s = TQString::fromLocal8Bit("ipp://%1/printers/").arg(CupsInfos::self()->hostaddr());
+ for (TQStringList::ConstIterator it=members.begin(); it!=members.end(); ++it)
uris.append(s+(*it));
req.addURI(IPP_TAG_PRINTER,"member-uris",uris);
}
@@ -152,7 +152,7 @@ bool KMCupsManager::createPrinter(KMPrinter *p)
if (!otherP || otherP->device() != p->device())
{
/**
- * As now the device is a QString instead of KURL, special encoding
+ * As now the device is a TQString instead of KURL, special encoding
* required for SMB is not needed anymore. Use a unique mechanism
* for all backends.
*/
@@ -160,7 +160,7 @@ bool KMCupsManager::createPrinter(KMPrinter *p)
}
if (!p->option("kde-banners").isEmpty())
{
- QStringList bans = QStringList::split(',',p->option("kde-banners"),false);
+ QStringList bans = TQStringList::split(',',p->option("kde-banners"),false);
while (bans.count() < 2)
bans.append("none");
req.addName(IPP_TAG_PRINTER,"job-sheets-default",bans);
@@ -169,11 +169,11 @@ bool KMCupsManager::createPrinter(KMPrinter *p)
req.addInteger(IPP_TAG_PRINTER,"job-k-limit",p->option("job-k-limit").toInt());
req.addInteger(IPP_TAG_PRINTER,"job-page-limit",p->option("job-page-limit").toInt());
if (!p->option("requesting-user-name-denied").isEmpty())
- req.addName(IPP_TAG_PRINTER,"requesting-user-name-denied",QStringList::split(",",p->option("requesting-user-name-denied"),false));
+ req.addName(IPP_TAG_PRINTER,"requesting-user-name-denied",TQStringList::split(",",p->option("requesting-user-name-denied"),false));
else if (!p->option("requesting-user-name-allowed").isEmpty())
- req.addName(IPP_TAG_PRINTER,"requesting-user-name-allowed",QStringList::split(",",p->option("requesting-user-name-allowed"),false));
+ req.addName(IPP_TAG_PRINTER,"requesting-user-name-allowed",TQStringList::split(",",p->option("requesting-user-name-allowed"),false));
else
- req.addName(IPP_TAG_PRINTER,"requesting-user-name-allowed",QString::fromLatin1("all"));
+ req.addName(IPP_TAG_PRINTER,"requesting-user-name-allowed",TQString::fromLatin1("all"));
}
req.addText(IPP_TAG_PRINTER,"printer-info",p->description());
req.addText(IPP_TAG_PRINTER,"printer-location",p->location());
@@ -247,11 +247,11 @@ bool KMCupsManager::completePrinter(KMPrinter *p)
// update the KMPrinter object
p->setManufacturer(entry.manufacturer);
p->setModel(entry.model);
- p->setDriverInfo(QString::fromLocal8Bit(ppd->nickname));
+ p->setDriverInfo(TQString::fromLocal8Bit(ppd->nickname));
ppdClose(ppd);
}
if (!ppdname.isEmpty())
- QFile::remove(ppdname);
+ TQFile::remove(ppdname);
return true;
}
@@ -281,14 +281,14 @@ bool KMCupsManager::completePrinterShort(KMPrinter *p)
// Give 2 seconds to connect to the printer, or abort
KExtendedSocket *kes = new KExtendedSocket(p->uri().host(),
p->uri().port());
- connect(kes, SIGNAL(connectionSuccess()), this, SLOT(hostPingSlot()));
- connect(kes, SIGNAL(connectionFailed(int)), this, SLOT(hostPingFailedSlot()));
+ connect(kes, TQT_SIGNAL(connectionSuccess()), this, TQT_SLOT(hostPingSlot()));
+ connect(kes, TQT_SIGNAL(connectionFailed(int)), this, TQT_SLOT(hostPingFailedSlot()));
if (kes->startAsyncConnect() != 0) {
delete kes;
m_hostSuccess = false;
} else {
- QDateTime tm = QDateTime::currentDateTime().addSecs(2);
- while (!m_lookupDone && (QDateTime::currentDateTime() < tm))
+ TQDateTime tm = TQDateTime::currentDateTime().addSecs(2);
+ while (!m_lookupDone && (TQDateTime::currentDateTime() < tm))
qApp->processEvents();
kes->cancelAsyncConnect();
@@ -337,7 +337,7 @@ bool KMCupsManager::completePrinterShort(KMPrinter *p)
{
/**
* No specific treatment required as the device is
- * a normal QString instead of a KURL
+ * a normal TQString instead of a KURL
*/
p->setDevice( value );
}
@@ -345,7 +345,7 @@ bool KMCupsManager::completePrinterShort(KMPrinter *p)
/* if (req.uri("member-uris",values))
{
QStringList members;
- for (QStringList::ConstIterator it=values.begin(); it!=values.end(); ++it)
+ for (TQStringList::ConstIterator it=values.begin(); it!=values.end(); ++it)
{
int p = (*it).findRev('/');
if (p != -1)
@@ -358,14 +358,14 @@ bool KMCupsManager::completePrinterShort(KMPrinter *p)
// banners
req.name("job-sheets-default",values);
while (values.count() < 2) values.append("none");
- p->setOption("kde-banners",values.join(QString::fromLatin1(",")));
- if (req.name("job-sheets-supported",values)) p->setOption("kde-banners-supported",values.join(QString::fromLatin1(",")));
+ p->setOption("kde-banners",values.join(TQString::fromLatin1(",")));
+ if (req.name("job-sheets-supported",values)) p->setOption("kde-banners-supported",values.join(TQString::fromLatin1(",")));
// quotas
int ival;
- if (req.integer("job-quota-period",ival)) p->setOption("job-quota-period",QString::number(ival));
- if (req.integer("job-k-limit",ival)) p->setOption("job-k-limit",QString::number(ival));
- if (req.integer("job-page-limit",ival)) p->setOption("job-page-limit",QString::number(ival));
+ if (req.integer("job-quota-period",ival)) p->setOption("job-quota-period",TQString::number(ival));
+ if (req.integer("job-k-limit",ival)) p->setOption("job-k-limit",TQString::number(ival));
+ if (req.integer("job-page-limit",ival)) p->setOption("job-page-limit",TQString::number(ival));
// access permissions (allow and deny are mutually exclusives)
if (req.name("requesting-user-name-allowed",values) && values.count() > 0)
@@ -405,7 +405,7 @@ bool KMCupsManager::testPrinter(KMPrinter *p)
req.addURI(IPP_TAG_OPERATION,"printer-uri",uri);
req.addMime(IPP_TAG_OPERATION,"document-format","application/postscript");
if (!CupsInfos::self()->login().isEmpty()) req.addName(IPP_TAG_OPERATION,"requesting-user-name",CupsInfos::self()->login());
- req.addName(IPP_TAG_OPERATION,"job-name",QString::fromLatin1("KDE Print Test"));
+ req.addName(IPP_TAG_OPERATION,"job-name",TQString::fromLatin1("KDE Print Test"));
if (req.doFileRequest("/printers/",testpage))
return true;
reportIppError(&req);
@@ -435,7 +435,7 @@ void KMCupsManager::loadServerPrinters()
req.addKeyword(IPP_TAG_OPERATION,"requested-attributes",keys);
// filtering by username (hides printers user doesn't have allowance to use)
- req.addName(IPP_TAG_OPERATION, "requesting-user-name", QString(cupsUser()));
+ req.addName(IPP_TAG_OPERATION, "requesting-user-name", TQString(cupsUser()));
if (req.doRequest("/printers/"))
{
@@ -453,10 +453,10 @@ void KMCupsManager::loadServerPrinters()
// load default
req.init();
req.setOperation(CUPS_GET_DEFAULT);
- req.addKeyword(IPP_TAG_OPERATION,"requested-attributes",QString::fromLatin1("printer-name"));
+ req.addKeyword(IPP_TAG_OPERATION,"requested-attributes",TQString::fromLatin1("printer-name"));
if (req.doRequest("/printers/"))
{
- QString s = QString::null;
+ QString s = TQString::null;
req.name("printer-name",s);
setHardDefault(findPrinter(s));
}
@@ -482,7 +482,7 @@ void KMCupsManager::processRequest(IppRequest* req)
QString attrname(attr->name);
if (attrname == "printer-name")
{
- QString value = QString::fromLocal8Bit(attr->values[0].string.text);
+ QString value = TQString::fromLocal8Bit(attr->values[0].string.text);
printer->setName(value);
printer->setPrinterName(value);
}
@@ -512,7 +512,7 @@ void KMCupsManager::processRequest(IppRequest* req)
}
else if (attrname == "printer-location")
{
- printer->setLocation(QString::fromLocal8Bit(attr->values[0].string.text));
+ printer->setLocation(TQString::fromLocal8Bit(attr->values[0].string.text));
}
else if (attrname == "printer-is-accepting-jobs")
{
@@ -562,7 +562,7 @@ DrMain* KMCupsManager::loadPrinterDriver(KMPrinter *p, bool)
return driver;
}
-DrMain* KMCupsManager::loadFileDriver(const QString& filename)
+DrMain* KMCupsManager::loadFileDriver(const TQString& filename)
{
if (filename.startsWith("ppd:"))
return loadDriverFile(filename.mid(4));
@@ -572,11 +572,11 @@ DrMain* KMCupsManager::loadFileDriver(const QString& filename)
return loadDriverFile(filename);
}
-DrMain* KMCupsManager::loadMaticDriver(const QString& drname)
+DrMain* KMCupsManager::loadMaticDriver(const TQString& drname)
{
- QStringList comps = QStringList::split('/', drname, false);
+ QStringList comps = TQStringList::split('/', drname, false);
QString tmpFile = locateLocal("tmp", "foomatic_" + kapp->randomString(8));
- QString PATH = getenv("PATH") + QString::fromLatin1(":/usr/sbin:/usr/local/sbin:/opt/sbin:/opt/local/sbin");
+ QString PATH = getenv("PATH") + TQString::fromLatin1(":/usr/sbin:/usr/local/sbin:/opt/sbin:/opt/local/sbin");
QString exe = KStandardDirs::findExe("foomatic-datafile", PATH);
if (exe.isEmpty())
{
@@ -587,7 +587,7 @@ DrMain* KMCupsManager::loadMaticDriver(const QString& drname)
KPipeProcess in;
QFile out(tmpFile);
- QString cmd = KProcess::quote(exe);
+ TQString cmd = KProcess::quote(exe);
cmd += " -t cups -d ";
cmd += KProcess::quote(comps[2]);
cmd += " -p ";
@@ -615,15 +615,15 @@ DrMain* KMCupsManager::loadMaticDriver(const QString& drname)
setErrorMsg(i18n("Unable to create the Foomatic driver [%1,%2]. "
"Either that driver does not exist, or you don't have "
"the required permissions to perform that operation.").arg(comps[1]).arg(comps[2]));
- QFile::remove(tmpFile);
+ TQFile::remove(tmpFile);
return NULL;
}
-DrMain* KMCupsManager::loadDriverFile(const QString& fname)
+DrMain* KMCupsManager::loadDriverFile(const TQString& fname)
{
- if (QFile::exists(fname))
+ if (TQFile::exists(fname))
{
- QString msg; /* possible error message */
+ TQString msg; /* possible error message */
DrMain *driver = PPDLoader::loadDriver( fname, &msg );
if ( driver )
{
@@ -637,10 +637,10 @@ DrMain* KMCupsManager::loadDriverFile(const QString& fname)
return NULL;
}
-void KMCupsManager::saveDriverFile(DrMain *driver, const QString& filename)
+void KMCupsManager::saveDriverFile(DrMain *driver, const TQString& filename)
{
kdDebug( 500 ) << "Saving PPD file with template=" << driver->get( "template" ) << endl;
- QIODevice *in = KFilterDev::deviceForFile( driver->get( "template" ) );
+ TQIODevice *in = KFilterDev::deviceForFile( driver->get( "template" ) );
QFile out(filename);
if (in && in->open(IO_ReadOnly) && out.open(IO_WriteOnly))
{
@@ -691,7 +691,7 @@ void KMCupsManager::saveDriverFile(DrMain *driver, const QString& filename)
keyword = line.mid(8,p-8);
DrBase *bopt = 0;
if ( keyword == "PageRegion" || keyword == "ImageableArea" || keyword == "PaperDimension" )
- bopt = driver->findOption( QString::fromLatin1( "PageSize" ) );
+ bopt = driver->findOption( TQString::fromLatin1( "PageSize" ) );
else
bopt = driver->findOption( keyword );
if (bopt)
@@ -751,7 +751,7 @@ bool KMCupsManager::savePrinterDriver(KMPrinter *p, DrMain *d)
result = req.doFileRequest("/admin/",tmpfilename);
// remove temporary file
- QFile::remove(tmpfilename);
+ TQFile::remove(tmpfilename);
if (!result)
reportIppError(&req);
@@ -787,7 +787,7 @@ void KMCupsManager::unloadCupsdConf()
bool KMCupsManager::restartServer()
{
QString msg;
- bool (*f1)(QString&) = (bool(*)(QString&))loadCupsdConfFunction("restartServer");
+ bool (*f1)(TQString&) = (bool(*)(TQString&))loadCupsdConfFunction("restartServer");
bool result(false);
if (f1)
{
@@ -798,10 +798,10 @@ bool KMCupsManager::restartServer()
return result;
}
-bool KMCupsManager::configureServer(QWidget *parent)
+bool KMCupsManager::configureServer(TQWidget *parent)
{
- QString msg;
- bool (*f2)(QWidget*, QString&) = (bool(*)(QWidget*, QString&))loadCupsdConfFunction("configureServer");
+ TQString msg;
+ bool (*f2)(TQWidget*, TQString&) = (bool(*)(TQWidget*, TQString&))loadCupsdConfFunction("configureServer");
bool result(false);
if (f2)
{
@@ -813,7 +813,7 @@ bool KMCupsManager::configureServer(QWidget *parent)
return result;
}
-QStringList KMCupsManager::detectLocalPrinters()
+TQStringList KMCupsManager::detectLocalPrinters()
{
QStringList list;
IppRequest req;
@@ -833,10 +833,10 @@ QStringList KMCupsManager::detectLocalPrinters()
{
if (!uri.isEmpty())
{
- if (printer == "Unknown") printer = QString::null;
+ if (printer == "Unknown") printer = TQString::null;
list << cl << uri << desc << printer;
}
- uri = desc = printer = cl = QString::null;
+ uri = desc = printer = cl = TQString::null;
}
attr = attr->next;
}
@@ -846,9 +846,9 @@ QStringList KMCupsManager::detectLocalPrinters()
void KMCupsManager::createPluginActions(KActionCollection *coll)
{
- KAction *act = new KAction(i18n("&Export Driver..."), "kdeprint_uploadsmb", 0, this, SLOT(exportDriver()), coll, "plugin_export_driver");
+ KAction *act = new KAction(i18n("&Export Driver..."), "kdeprint_uploadsmb", 0, this, TQT_SLOT(exportDriver()), coll, "plugin_export_driver");
act->setGroup("plugin");
- act = new KAction(i18n("&Printer IPP Report"), "kdeprint_report", 0, this, SLOT(printerIppReport()), coll, "plugin_printer_ipp_report");
+ act = new KAction(i18n("&Printer IPP Report"), "kdeprint_report", 0, this, TQT_SLOT(printerIppReport()), coll, "plugin_printer_ipp_report");
act->setGroup("plugin");
}
@@ -903,17 +903,17 @@ void KMCupsManager::printerIppReport()
}
}
-void KMCupsManager::ippReport(IppRequest& req, int group, const QString& caption)
+void KMCupsManager::ippReport(IppRequest& req, int group, const TQString& caption)
{
IppReportDlg::report(&req, group, caption);
}
-QString KMCupsManager::stateInformation()
+TQString KMCupsManager::stateInformation()
{
- return QString("%1: %2")
+ return TQString("%1: %2")
.arg(i18n("Server"))
.arg(CupsInfos::self()->host()[0] != '/' ?
- QString("%1:%2").arg(CupsInfos::self()->host()).arg(CupsInfos::self()->port())
+ TQString("%1:%2").arg(CupsInfos::self()->host()).arg(CupsInfos::self()->port())
: CupsInfos::self()->host());
}
@@ -923,12 +923,12 @@ void KMCupsManager::checkUpdatePossibleInternal()
delete m_socket;
m_socket = new KNetwork::KBufferedSocket;
m_socket->setTimeout( 1500 );
- connect( m_socket, SIGNAL( connected(const KResolverEntry&) ),
- SLOT( slotConnectionSuccess() ) );
- connect( m_socket, SIGNAL( gotError( int ) ), SLOT( slotConnectionFailed( int ) ) );
+ connect( m_socket, TQT_SIGNAL( connected(const KResolverEntry&) ),
+ TQT_SLOT( slotConnectionSuccess() ) );
+ connect( m_socket, TQT_SIGNAL( gotError( int ) ), TQT_SLOT( slotConnectionFailed( int ) ) );
trials = 5;
- QTimer::singleShot( 1, this, SLOT( slotAsyncConnect() ) );
+ TQTimer::singleShot( 1, this, TQT_SLOT( slotAsyncConnect() ) );
}
void KMCupsManager::slotConnectionSuccess()
@@ -938,7 +938,7 @@ void KMCupsManager::slotConnectionSuccess()
IppRequest req;
req.setOperation( CUPS_GET_PRINTERS );
- req.addKeyword( IPP_TAG_OPERATION, "requested-attributes", QString::fromLatin1( "printer-name" ) );
+ req.addKeyword( IPP_TAG_OPERATION, "requested-attributes", TQString::fromLatin1( "printer-name" ) );
if ( req.doRequest( "/printers/" ) )
setUpdatePossible( true );
else
@@ -947,7 +947,7 @@ void KMCupsManager::slotConnectionSuccess()
if ( trials > 0 )
{
trials--;
- QTimer::singleShot( 1000, this, SLOT( slotAsyncConnect() ) );
+ TQTimer::singleShot( 1000, this, TQT_SLOT( slotAsyncConnect() ) );
}
else
{
@@ -963,7 +963,7 @@ void KMCupsManager::slotAsyncConnect()
kdDebug(500) << "Starting async connect to " << CupsInfos::self()->hostaddr() << endl;
//m_socket->startAsyncConnect();
if (CupsInfos::self()->host().startsWith("/"))
- m_socket->connect( QString(), CupsInfos::self()->host());
+ m_socket->connect( TQString(), CupsInfos::self()->host());
else
m_socket->connectToHost( CupsInfos::self()->host(), CupsInfos::self()->port() );
}
@@ -977,19 +977,19 @@ void KMCupsManager::slotConnectionFailed( int errcode )
//m_socket->cancelAsyncConnect();
trials--;
m_socket->close();
- QTimer::singleShot( 1000, this, SLOT( slotAsyncConnect() ) );
+ TQTimer::singleShot( 1000, this, TQT_SLOT( slotAsyncConnect() ) );
return;
}
- QString einfo;
+ TQString einfo;
switch (errcode) {
case KNetwork::KSocketBase::ConnectionRefused:
case KNetwork::KSocketBase::ConnectionTimedOut:
- einfo = i18n("connection refused") + QString(" (%1)").arg(errcode);
+ einfo = i18n("connection refused") + TQString(" (%1)").arg(errcode);
break;
case KNetwork::KSocketBase::LookupFailure:
- einfo = i18n("host not found") + QString(" (%1)").arg(errcode);
+ einfo = i18n("host not found") + TQString(" (%1)").arg(errcode);
break;
case KNetwork::KSocketBase::WouldBlock:
default:
@@ -1014,7 +1014,7 @@ void KMCupsManager::hostPingFailedSlot() {
//*****************************************************************************************************
-static void extractMaticData(QString& buf, const QString& filename)
+static void extractMaticData(TQString& buf, const TQString& filename)
{
QFile f(filename);
if (f.exists() && f.open(IO_ReadOnly))
@@ -1030,17 +1030,17 @@ static void extractMaticData(QString& buf, const QString& filename)
}
}
-static QString printerURI(KMPrinter *p, bool use)
+static TQString printerURI(KMPrinter *p, bool use)
{
QString uri;
if (use && !p->uri().isEmpty())
uri = p->uri().prettyURL();
else
- uri = QString("ipp://%1/%3/%2").arg(CupsInfos::self()->hostaddr()).arg(p->printerName()).arg((p->isClass(false) ? "classes" : "printers"));
+ uri = TQString("ipp://%1/%3/%2").arg(CupsInfos::self()->hostaddr()).arg(p->printerName()).arg((p->isClass(false) ? "classes" : "printers"));
return uri;
}
-static QString downloadDriver(KMPrinter *p)
+static TQString downloadDriver(KMPrinter *p)
{
QString driverfile, prname = p->printerName();
bool changed(false);
@@ -1056,7 +1056,7 @@ static QString downloadDriver(KMPrinter *p)
cupsSetServer(p->uri().host().local8Bit());
ippSetPort(p->uri().port());
// strip any "@..." from the printer name
- prname = prname.replace(QRegExp("@.*"), "");
+ prname = prname.replace(TQRegExp("@.*"), "");
changed = true;
}
*/
diff --git a/kdeprint/cups/kmcupsmanager.h b/kdeprint/cups/kmcupsmanager.h
index 54307fc86..132decb34 100644
--- a/kdeprint/cups/kmcupsmanager.h
+++ b/kdeprint/cups/kmcupsmanager.h
@@ -37,7 +37,7 @@ class KMCupsManager : public KMManager
Q_OBJECT
public:
- KMCupsManager(QObject *parent, const char *name, const QStringList & /*args*/);
+ KMCupsManager(TQObject *parent, const char *name, const TQStringList & /*args*/);
virtual ~KMCupsManager();
// printer management functions
@@ -52,20 +52,20 @@ public:
// printer listing functions
// driver DB functions
- QString driverDbCreationProgram();
- QString driverDirectory();
+ TQString driverDbCreationProgram();
+ TQString driverDirectory();
DrMain* loadPrinterDriver(KMPrinter *p, bool config = false);
- DrMain* loadFileDriver(const QString& filename);
+ DrMain* loadFileDriver(const TQString& filename);
bool savePrinterDriver(KMPrinter *p, DrMain *d);
bool restartServer();
- bool configureServer(QWidget *parent = 0);
- QStringList detectLocalPrinters();
+ bool configureServer(TQWidget *parent = 0);
+ TQStringList detectLocalPrinters();
void createPluginActions(KActionCollection*);
void validatePluginActions(KActionCollection*, KMPrinter*);
- QString stateInformation();
+ TQString stateInformation();
public slots:
void exportDriver();
@@ -85,14 +85,14 @@ protected:
void loadServerPrinters();
void processRequest(IppRequest*);
bool setPrinterState(KMPrinter *p, int st);
- DrMain* loadDriverFile(const QString& filename);
- DrMain* loadMaticDriver(const QString& drname);
- void saveDriverFile(DrMain *driver, const QString& filename);
+ DrMain* loadDriverFile(const TQString& filename);
+ DrMain* loadMaticDriver(const TQString& drname);
+ void saveDriverFile(DrMain *driver, const TQString& filename);
void reportIppError(IppRequest*);
void* loadCupsdConfFunction(const char*);
void unloadCupsdConf();
- QString cupsInstallDir();
- void ippReport(IppRequest&, int, const QString&);
+ TQString cupsInstallDir();
+ void ippReport(IppRequest&, int, const TQString&);
void checkUpdatePossibleInternal();
private:
diff --git a/kdeprint/cups/kmcupsuimanager.cpp b/kdeprint/cups/kmcupsuimanager.cpp
index 897199f88..9cefccac3 100644
--- a/kdeprint/cups/kmcupsuimanager.cpp
+++ b/kdeprint/cups/kmcupsuimanager.cpp
@@ -53,14 +53,14 @@
#include "ipprequest.h"
#include "cupsinfos.h"
-#include <qlistview.h>
-#include <qwhatsthis.h>
+#include <tqlistview.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
#include <kdebug.h>
#include <kaction.h>
#include <kmessagebox.h>
-KMCupsUiManager::KMCupsUiManager(QObject *parent, const char *name, const QStringList & /*args*/)
+KMCupsUiManager::KMCupsUiManager(TQObject *parent, const char *name, const TQStringList & /*args*/)
: KMUiManager(parent,name)
{
}
@@ -81,28 +81,28 @@ void KMCupsUiManager::setupPropertyPages(KMPropertyPage *p)
void KMCupsUiManager::setupWizard(KMWizard *wizard)
{
- QString whatsThisRemoteCUPSIPPBackend =
+ TQString whatsThisRemoteCUPSIPPBackend =
i18n( "<qt><p>Print queue on remote CUPS server</p>"
"<p>Use this for a print queue installed on a remote "
"machine running a CUPS server. This allows to use "
"remote printers when CUPS browsing is turned off.</p></qt>"
);
- QString whatsThisRemotePrinterIPPBackend =
+ TQString whatsThisRemotePrinterIPPBackend =
i18n( "<qt><p>Network IPP printer</p>"
"<p>Use this for a network-enabled printer using the "
"IPP protocol. Modern high-end printers can use this mode. "
"Use this mode instead of TCP if your printer can do both.</p></qt>"
);
- QString whatsThisSerialFaxModemBackend =
+ TQString whatsThisSerialFaxModemBackend =
i18n( "<qt><p>Fax/Modem printer</p>"
"<p>Use this for a fax/modem printer. This requires the installation "
"of the <a href=\"http://vigna.dsi.unimi.it/fax4CUPS/\">fax4CUPS</a> backend. Documents sent on this printer will be faxed "
"to the given target fax number.</p></qt>"
);
- QString whatsThisOtherPrintertypeBackend =
+ TQString whatsThisOtherPrintertypeBackend =
i18n( "<qt><p>Other printer</p>"
"<p>Use this for any printer type. To use this option, you must know "
"the URI of the printer you want to install. Refer to the CUPS documentation "
@@ -110,7 +110,7 @@ void KMCupsUiManager::setupWizard(KMWizard *wizard)
"printer types using 3rd party backends not covered by the other possibilities.</p></qt>"
);
- QString whatsThisClassOfPrinters =
+ TQString whatsThisClassOfPrinters =
i18n( "<qt><p>Class of printers</p>"
"<p>Use this to create a class of printers. When sending a document to a class, "
"the document is actually sent to the first available (idle) printer in the class. "
@@ -135,7 +135,7 @@ void KMCupsUiManager::setupWizard(KMWizard *wizard)
QString uri;
req.setOperation(CUPS_GET_DEVICES);
- uri = QString::fromLocal8Bit("ipp://%1/printers/").arg(CupsInfos::self()->hostaddr());
+ uri = TQString::fromLocal8Bit("ipp://%1/printers/").arg(CupsInfos::self()->hostaddr());
req.addURI(IPP_TAG_OPERATION,"printer-uri",uri);
if (req.doRequest("/"))
@@ -204,13 +204,13 @@ int KMCupsUiManager::pluginPageCap()
return (KMUiManager::CopyAll & ~KMUiManager::Current);
}
-void KMCupsUiManager::setupPrintDialogPages(QPtrList<KPrintDialogPage>* pages)
+void KMCupsUiManager::setupPrintDialogPages(TQPtrList<KPrintDialogPage>* pages)
{
pages->append(new KPSchedulePage());
pages->append(new KPTagsPage());
}
-void KMCupsUiManager::setupJobViewer(QListView *lv)
+void KMCupsUiManager::setupJobViewer(TQListView *lv)
{
lv->addColumn(i18n("Priority"));
lv->setColumnAlignment(lv->columns()-1, Qt::AlignRight|Qt::AlignVCenter);
diff --git a/kdeprint/cups/kmcupsuimanager.h b/kdeprint/cups/kmcupsuimanager.h
index 15ab8684d..88c2c962a 100644
--- a/kdeprint/cups/kmcupsuimanager.h
+++ b/kdeprint/cups/kmcupsuimanager.h
@@ -25,7 +25,7 @@
class KMCupsUiManager : public KMUiManager
{
public:
- KMCupsUiManager(QObject *parent, const char *name, const QStringList & /*args*/);
+ KMCupsUiManager(TQObject *parent, const char *name, const TQStringList & /*args*/);
~KMCupsUiManager();
void setupPropertyPages(KMPropertyPage*);
@@ -33,8 +33,8 @@ public:
void setupPrinterPropertyDialog(KPrinterPropertyDialog*);
void setupConfigDialog(KMConfigDialog*);
int pluginPageCap();
- void setupPrintDialogPages(QPtrList<KPrintDialogPage>*);
- void setupJobViewer(QListView*);
+ void setupPrintDialogPages(TQPtrList<KPrintDialogPage>*);
+ void setupJobViewer(TQListView*);
};
#endif
diff --git a/kdeprint/cups/kmpropbanners.cpp b/kdeprint/cups/kmpropbanners.cpp
index 3826de708..7be161f6d 100644
--- a/kdeprint/cups/kmpropbanners.cpp
+++ b/kdeprint/cups/kmpropbanners.cpp
@@ -22,23 +22,23 @@
#include "kmwizard.h"
#include "kmwbanners.h"
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <klocale.h>
-KMPropBanners::KMPropBanners(QWidget *parent, const char *name)
+KMPropBanners::KMPropBanners(TQWidget *parent, const char *name)
: KMPropWidget(parent,name)
{
- m_startbanner = new QLabel(this);
- m_stopbanner = new QLabel(this);
+ m_startbanner = new TQLabel(this);
+ m_stopbanner = new TQLabel(this);
- QLabel *l1 = new QLabel(i18n("&Starting banner:"), this);
- QLabel *l2 = new QLabel(i18n("&Ending banner:"), this);
+ QLabel *l1 = new TQLabel(i18n("&Starting banner:"), this);
+ QLabel *l2 = new TQLabel(i18n("&Ending banner:"), this);
l1->setBuddy(m_startbanner);
l2->setBuddy(m_stopbanner);
- QGridLayout *main_ = new QGridLayout(this, 3, 2, 10, 10);
+ QGridLayout *main_ = new TQGridLayout(this, 3, 2, 10, 10);
main_->setColStretch(1,1);
main_->setRowStretch(2,1);
main_->addWidget(l1,0,0);
@@ -59,7 +59,7 @@ void KMPropBanners::setPrinter(KMPrinter *p)
{
if (p && p->isPrinter())
{
- QStringList l = QStringList::split(',',p->option("kde-banners"),false);
+ QStringList l = TQStringList::split(',',p->option("kde-banners"),false);
while ( l.count() < 2 )
l.append( "none" );
m_startbanner->setText(i18n(mapBanner(l[0]).utf8()));
diff --git a/kdeprint/cups/kmpropbanners.h b/kdeprint/cups/kmpropbanners.h
index eb8d85204..1b5b51115 100644
--- a/kdeprint/cups/kmpropbanners.h
+++ b/kdeprint/cups/kmpropbanners.h
@@ -27,7 +27,7 @@ class QLabel;
class KMPropBanners : public KMPropWidget
{
public:
- KMPropBanners(QWidget *parent = 0, const char *name = 0);
+ KMPropBanners(TQWidget *parent = 0, const char *name = 0);
~KMPropBanners();
void setPrinter(KMPrinter*);
diff --git a/kdeprint/cups/kmpropquota.cpp b/kdeprint/cups/kmpropquota.cpp
index ffce459e0..12e360746 100644
--- a/kdeprint/cups/kmpropquota.cpp
+++ b/kdeprint/cups/kmpropquota.cpp
@@ -21,30 +21,30 @@
#include "kmprinter.h"
#include "kmwizard.h"
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <klocale.h>
// some forward declarations (see kmwquota.cpp)
const char* unitKeyword(int);
int findUnit(int&);
-KMPropQuota::KMPropQuota(QWidget *parent, const char *name)
+KMPropQuota::KMPropQuota(TQWidget *parent, const char *name)
: KMPropWidget(parent,name)
{
- m_period = new QLabel(this);
- m_sizelimit = new QLabel(this);
- m_pagelimit = new QLabel(this);
+ m_period = new TQLabel(this);
+ m_sizelimit = new TQLabel(this);
+ m_pagelimit = new TQLabel(this);
- QLabel *l1 = new QLabel(i18n("&Period:"), this);
- QLabel *l2 = new QLabel(i18n("&Size limit (KB):"), this);
- QLabel *l3 = new QLabel(i18n("&Page limit:"), this);
+ QLabel *l1 = new TQLabel(i18n("&Period:"), this);
+ QLabel *l2 = new TQLabel(i18n("&Size limit (KB):"), this);
+ QLabel *l3 = new TQLabel(i18n("&Page limit:"), this);
l1->setBuddy(m_period);
l2->setBuddy(m_sizelimit);
l3->setBuddy(m_pagelimit);
- QGridLayout *main_ = new QGridLayout(this, 4, 2, 10, 10);
+ QGridLayout *main_ = new TQGridLayout(this, 4, 2, 10, 10);
main_->setColStretch(1,1);
main_->setRowStretch(3,1);
main_->addWidget(l1,0,0);
@@ -75,9 +75,9 @@ void KMPropQuota::setPrinter(KMPrinter *p)
qu = -1;
if (qu > 0)
un = findUnit(qu);
- m_period->setText(qu == -1 ? i18n("No quota") : QString::number(qu).append(" ").append(i18n(unitKeyword(un))));
- m_sizelimit->setText(si ? QString::number(si) : i18n("None"));
- m_pagelimit->setText(pa ? QString::number(pa) : i18n("None"));
+ m_period->setText(qu == -1 ? i18n("No quota") : TQString::number(qu).append(" ").append(i18n(unitKeyword(un))));
+ m_sizelimit->setText(si ? TQString::number(si) : i18n("None"));
+ m_pagelimit->setText(pa ? TQString::number(pa) : i18n("None"));
emit enable(true);
emit enableChange(p->isLocal());
}
diff --git a/kdeprint/cups/kmpropquota.h b/kdeprint/cups/kmpropquota.h
index 53ed8c59c..b7845894d 100644
--- a/kdeprint/cups/kmpropquota.h
+++ b/kdeprint/cups/kmpropquota.h
@@ -27,7 +27,7 @@ class QLabel;
class KMPropQuota : public KMPropWidget
{
public:
- KMPropQuota(QWidget *parent = 0, const char *name = 0);
+ KMPropQuota(TQWidget *parent = 0, const char *name = 0);
~KMPropQuota();
void setPrinter(KMPrinter*);
diff --git a/kdeprint/cups/kmpropusers.cpp b/kdeprint/cups/kmpropusers.cpp
index 58b3301de..3f0792d9c 100644
--- a/kdeprint/cups/kmpropusers.cpp
+++ b/kdeprint/cups/kmpropusers.cpp
@@ -21,18 +21,18 @@
#include "kmprinter.h"
#include "kmwizard.h"
-#include <qtextview.h>
-#include <qlayout.h>
+#include <tqtextview.h>
+#include <tqlayout.h>
#include <klocale.h>
-KMPropUsers::KMPropUsers(QWidget *parent, const char *name)
+KMPropUsers::KMPropUsers(TQWidget *parent, const char *name)
: KMPropWidget(parent,name)
{
- m_text = new QTextView(this);
+ m_text = new TQTextView(this);
m_text->setPaper(colorGroup().background());
- m_text->setFrameStyle(QFrame::NoFrame);
+ m_text->setFrameStyle(TQFrame::NoFrame);
- QVBoxLayout *l0 = new QVBoxLayout(this, 10, 0);
+ QVBoxLayout *l0 = new TQVBoxLayout(this, 10, 0);
l0->addWidget(m_text, 1);
m_title = i18n("Users");
@@ -53,21 +53,21 @@ void KMPropUsers::setPrinter(KMPrinter *p)
if (!p->option("requesting-user-name-denied").isEmpty())
{
txt = txt.arg(i18n("Denied users"));
- users = QStringList::split(",", p->option("requesting-user-name-denied"), false);
+ users = TQStringList::split(",", p->option("requesting-user-name-denied"), false);
if (users.count() == 1 && users[0] == "none")
users.clear();
}
else if (!p->option("requesting-user-name-allowed").isEmpty())
{
txt = txt.arg(i18n("Allowed users"));
- users = QStringList::split(",", p->option("requesting-user-name-allowed"), false);
+ users = TQStringList::split(",", p->option("requesting-user-name-allowed"), false);
if (users.count() == 1 && users[0] == "all")
users.clear();
}
if (users.count() > 0)
{
QString s;
- for (QStringList::ConstIterator it=users.begin(); it!=users.end(); ++it)
+ for (TQStringList::ConstIterator it=users.begin(); it!=users.end(); ++it)
s.append("<li>").append(*it).append("</li>");
txt = txt.arg(s);
m_text->setText(txt);
diff --git a/kdeprint/cups/kmpropusers.h b/kdeprint/cups/kmpropusers.h
index 2d007baf8..6421006c9 100644
--- a/kdeprint/cups/kmpropusers.h
+++ b/kdeprint/cups/kmpropusers.h
@@ -27,7 +27,7 @@ class QTextView;
class KMPropUsers : public KMPropWidget
{
public:
- KMPropUsers(QWidget *parent = 0, const char *name = 0);
+ KMPropUsers(TQWidget *parent = 0, const char *name = 0);
~KMPropUsers();
void setPrinter(KMPrinter*);
diff --git a/kdeprint/cups/kmwbanners.cpp b/kdeprint/cups/kmwbanners.cpp
index 0572d0e34..80a21a37c 100644
--- a/kdeprint/cups/kmwbanners.cpp
+++ b/kdeprint/cups/kmwbanners.cpp
@@ -23,24 +23,24 @@
#include "kmfactory.h"
#include "kmmanager.h"
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qmap.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqmap.h>
#include <klocale.h>
-QStringList defaultBanners()
+TQStringList defaultBanners()
{
QStringList bans;
- QPtrList<KMPrinter> *list = KMFactory::self()->manager()->printerList(false);
+ TQPtrList<KMPrinter> *list = KMFactory::self()->manager()->printerList(false);
if (list && list->count() > 0)
{
- QPtrListIterator<KMPrinter> it(*list);
+ TQPtrListIterator<KMPrinter> it(*list);
for (;it.current() && !it.current()->isPrinter(); ++it) ;
if (it.current() && KMFactory::self()->manager()->completePrinter(it.current()))
{
QString s = list->getFirst()->option("kde-banners-supported");
- bans = QStringList::split(',',s,false);
+ bans = TQStringList::split(',',s,false);
}
}
if (bans.count() == 0)
@@ -64,13 +64,13 @@ static struct
{ 0, 0 }
};
-QString mapBanner( const QString& ban )
+TQString mapBanner( const TQString& ban )
{
- static QMap<QString,QString> map;
+ static TQMap<TQString,TQString> map;
if ( map.size() == 0 )
for ( int i=0; bannermap[ i ].banner; i++ )
map[ bannermap[ i ].banner ] = bannermap[ i ].name;
- QMap<QString,QString>::ConstIterator it = map.find( ban );
+ TQMap<TQString,TQString>::ConstIterator it = map.find( ban );
if ( it == map.end() )
return ban;
else
@@ -79,28 +79,28 @@ QString mapBanner( const QString& ban )
//**************************************************************************************************************
-KMWBanners::KMWBanners(QWidget *parent, const char *name)
+KMWBanners::KMWBanners(TQWidget *parent, const char *name)
: KMWizardPage(parent,name)
{
m_ID = KMWizard::Banners;
m_title = i18n("Banner Selection");
m_nextpage = KMWizard::Custom+3;
- m_start = new QComboBox(this);
- m_end = new QComboBox(this);
+ m_start = new TQComboBox(this);
+ m_end = new TQComboBox(this);
- QLabel *l1 = new QLabel(i18n("&Starting banner:"),this);
- QLabel *l2 = new QLabel(i18n("&Ending banner:"),this);
+ QLabel *l1 = new TQLabel(i18n("&Starting banner:"),this);
+ QLabel *l2 = new TQLabel(i18n("&Ending banner:"),this);
l1->setBuddy(m_start);
l2->setBuddy(m_end);
- QLabel *l0 = new QLabel(this);
+ QLabel *l0 = new TQLabel(this);
l0->setText(i18n("<p>Select the default banners associated with this printer. These "
"banners will be inserted before and/or after each print job sent "
"to the printer. If you don't want to use banners, select <b>No Banner</b>.</p>"));
- QGridLayout *lay = new QGridLayout(this, 5, 2, 0, 10);
+ QGridLayout *lay = new TQGridLayout(this, 5, 2, 0, 10);
lay->setColStretch(1,1);
lay->addRowSpacing(1,20);
lay->setRowStretch(4,1);
@@ -117,18 +117,18 @@ void KMWBanners::initPrinter(KMPrinter *p)
{
if (m_start->count() == 0)
{
- m_bans = QStringList::split(',',p->option("kde-banners-supported"),false);
+ m_bans = TQStringList::split(',',p->option("kde-banners-supported"),false);
if (m_bans.count() == 0)
m_bans = defaultBanners();
if (m_bans.find("none") == m_bans.end())
m_bans.prepend("none");
- for ( QStringList::Iterator it=m_bans.begin(); it!=m_bans.end(); ++it )
+ for ( TQStringList::Iterator it=m_bans.begin(); it!=m_bans.end(); ++it )
{
m_start->insertItem( i18n( mapBanner(*it).utf8() ) );
m_end->insertItem( i18n( mapBanner(*it).utf8() ) );
}
}
- QStringList l = QStringList::split(',',p->option("kde-banners"),false);
+ QStringList l = TQStringList::split(',',p->option("kde-banners"),false);
while (l.count() < 2)
l.append("none");
m_start->setCurrentItem(m_bans.findIndex(l[0]));
diff --git a/kdeprint/cups/kmwbanners.h b/kdeprint/cups/kmwbanners.h
index 2fa820767..ce3bdca31 100644
--- a/kdeprint/cups/kmwbanners.h
+++ b/kdeprint/cups/kmwbanners.h
@@ -21,14 +21,14 @@
#define KMWBANNERS_H
#include "kmwizardpage.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
class QComboBox;
class KMWBanners : public KMWizardPage
{
public:
- KMWBanners(QWidget *parent = 0, const char *name = 0);
+ KMWBanners(TQWidget *parent = 0, const char *name = 0);
void initPrinter(KMPrinter*);
void updatePrinter(KMPrinter*);
@@ -38,6 +38,6 @@ private:
QStringList m_bans;
};
-QString mapBanner( const QString& );
+TQString mapBanner( const TQString& );
#endif
diff --git a/kdeprint/cups/kmwfax.cpp b/kdeprint/cups/kmwfax.cpp
index da42b8400..ea5b98f3b 100644
--- a/kdeprint/cups/kmwfax.cpp
+++ b/kdeprint/cups/kmwfax.cpp
@@ -23,32 +23,32 @@
#include "ipprequest.h"
#include "cupsinfos.h"
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <klistbox.h>
#include <klocale.h>
#include <kiconloader.h>
#include <kurl.h>
-KMWFax::KMWFax(QWidget *parent, const char *name)
+KMWFax::KMWFax(TQWidget *parent, const char *name)
: KMWizardPage(parent,name)
{
m_ID = KMWizard::Custom+2;
m_title = i18n("Fax Serial Device");
m_nextpage = KMWizard::Driver;
- QLabel *lab = new QLabel(this);
+ QLabel *lab = new TQLabel(this);
lab->setText(i18n("<p>Select the device which your serial Fax/Modem is connected to.</p>"));
m_list = new KListBox(this);
- QVBoxLayout *l1 = new QVBoxLayout(this,0,10);
+ QVBoxLayout *l1 = new TQVBoxLayout(this,0,10);
l1->addWidget(lab,0);
l1->addWidget(m_list,1);
// initialize
IppRequest req;
req.setOperation(CUPS_GET_DEVICES);
- QString uri = QString::fromLatin1("ipp://%1/printers/").arg(CupsInfos::self()->hostaddr());
+ QString uri = TQString::fromLatin1("ipp://%1/printers/").arg(CupsInfos::self()->hostaddr());
req.addURI(IPP_TAG_OPERATION,"printer-uri",uri);
if (req.doRequest("/"))
{
@@ -57,14 +57,14 @@ KMWFax::KMWFax(QWidget *parent, const char *name)
{
if (attr->name && strcmp(attr->name,"device-uri") == 0 && strncmp(attr->values[0].string.text,"fax",3) == 0)
{
- m_list->insertItem(SmallIcon("blockdevice"),QString::fromLatin1(attr->values[0].string.text));
+ m_list->insertItem(SmallIcon("blockdevice"),TQString::fromLatin1(attr->values[0].string.text));
}
attr = attr->next;
}
}
}
-bool KMWFax::isValid(QString& msg)
+bool KMWFax::isValid(TQString& msg)
{
if (m_list->currentItem() == -1)
{
diff --git a/kdeprint/cups/kmwfax.h b/kdeprint/cups/kmwfax.h
index 4a46bc29b..8fc846a7b 100644
--- a/kdeprint/cups/kmwfax.h
+++ b/kdeprint/cups/kmwfax.h
@@ -27,9 +27,9 @@ class KListBox;
class KMWFax : public KMWizardPage
{
public:
- KMWFax(QWidget *parent = 0, const char *name = 0);
+ KMWFax(TQWidget *parent = 0, const char *name = 0);
- bool isValid(QString&);
+ bool isValid(TQString&);
void updatePrinter(KMPrinter*);
private:
diff --git a/kdeprint/cups/kmwipp.cpp b/kdeprint/cups/kmwipp.cpp
index fbef937cf..c0d30c452 100644
--- a/kdeprint/cups/kmwipp.cpp
+++ b/kdeprint/cups/kmwipp.cpp
@@ -21,30 +21,30 @@
#include "kmwizard.h"
#include "kmprinter.h"
-#include <qlabel.h>
-#include <qlineedit.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
#include <klocale.h>
-#include <qvalidator.h>
+#include <tqvalidator.h>
#include <cups/http.h>
-KMWIpp::KMWIpp(QWidget *parent, const char *name)
+KMWIpp::KMWIpp(TQWidget *parent, const char *name)
: KMWInfoBase(2,parent,name)
{
m_ID = KMWizard::IPP;
m_title = i18n("Remote IPP server");
m_nextpage = KMWizard::IPPSelect;
- lineEdit( 1 )->setValidator( new QIntValidator( this ) );
+ lineEdit( 1 )->setValidator( new TQIntValidator( this ) );
setInfo(i18n("<p>Enter the information concerning the remote IPP server "
"owning the targeted printer. This wizard will poll the server "
"before continuing.</p>"));
setLabel(0,i18n("Host:"));
setLabel(1,i18n("Port:"));
- setText( 1, QString::fromLatin1( "631" ) );
+ setText( 1, TQString::fromLatin1( "631" ) );
}
-bool KMWIpp::isValid(QString& msg)
+bool KMWIpp::isValid(TQString& msg)
{
// check informations
if (text(0).isEmpty())
diff --git a/kdeprint/cups/kmwipp.h b/kdeprint/cups/kmwipp.h
index 81856c8cd..42e36814e 100644
--- a/kdeprint/cups/kmwipp.h
+++ b/kdeprint/cups/kmwipp.h
@@ -25,9 +25,9 @@
class KMWIpp : public KMWInfoBase
{
public:
- KMWIpp(QWidget *parent = 0, const char *name = 0);
+ KMWIpp(TQWidget *parent = 0, const char *name = 0);
- bool isValid(QString&);
+ bool isValid(TQString&);
void updatePrinter(KMPrinter*);
};
diff --git a/kdeprint/cups/kmwippprinter.cpp b/kdeprint/cups/kmwippprinter.cpp
index de636ea8c..4900a584b 100644
--- a/kdeprint/cups/kmwippprinter.cpp
+++ b/kdeprint/cups/kmwippprinter.cpp
@@ -25,21 +25,21 @@
#include "networkscanner.h"
#include <klistview.h>
-#include <qheader.h>
+#include <tqheader.h>
#include <kpushbutton.h>
-#include <qlineedit.h>
-#include <qlabel.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
#include <kmessagebox.h>
-#include <qtextview.h>
-#include <qlayout.h>
-#include <qregexp.h>
+#include <tqtextview.h>
+#include <tqlayout.h>
+#include <tqregexp.h>
#include <kseparator.h>
#include <klocale.h>
#include <kiconloader.h>
#include <kguiitem.h>
#include <kurl.h>
-KMWIppPrinter::KMWIppPrinter(QWidget *parent, const char *name)
+KMWIppPrinter::KMWIppPrinter(TQWidget *parent, const char *name)
: KMWizardPage(parent,name)
{
m_title = i18n("IPP Printer Information");
@@ -49,16 +49,16 @@ KMWIppPrinter::KMWIppPrinter(QWidget *parent, const char *name)
m_list = new KListView(this);
m_list->addColumn("");
m_list->header()->hide();
- m_list->setFrameStyle(QFrame::WinPanel|QFrame::Sunken);
+ m_list->setFrameStyle(TQFrame::WinPanel|TQFrame::Sunken);
m_list->setLineWidth(1);
- QLabel *l1 = new QLabel(i18n("&Printer URI:"),this);
+ QLabel *l1 = new TQLabel(i18n("&Printer URI:"),this);
- m_uri = new QLineEdit(this);
+ m_uri = new TQLineEdit(this);
l1->setBuddy(m_uri);
- m_info = new QTextView(this);
+ m_info = new TQTextView(this);
m_info->setPaper(colorGroup().background());
m_info->setMinimumHeight(100);
m_info->setText(i18n("<p>Either enter the printer URI directly, or use the network scanning facility.</p>"));
@@ -70,17 +70,17 @@ KMWIppPrinter::KMWIppPrinter(QWidget *parent, const char *name)
KSeparator* sep = new KSeparator( KSeparator::HLine, this);
sep->setFixedHeight(20);
- connect(m_list,SIGNAL(selectionChanged(QListViewItem*)),SLOT(slotPrinterSelected(QListViewItem*)));
- connect( m_scanner, SIGNAL( scanStarted() ), SLOT( slotScanStarted() ) );
- connect( m_scanner, SIGNAL( scanFinished() ), SLOT( slotScanFinished() ) );
- connect( m_scanner, SIGNAL( scanStarted() ), parent, SLOT( disableWizard() ) );
- connect( m_scanner, SIGNAL( scanFinished() ), parent, SLOT( enableWizard() ) );
- connect(m_ippreport, SIGNAL(clicked()), SLOT(slotIppReport()));
+ connect(m_list,TQT_SIGNAL(selectionChanged(TQListViewItem*)),TQT_SLOT(slotPrinterSelected(TQListViewItem*)));
+ connect( m_scanner, TQT_SIGNAL( scanStarted() ), TQT_SLOT( slotScanStarted() ) );
+ connect( m_scanner, TQT_SIGNAL( scanFinished() ), TQT_SLOT( slotScanFinished() ) );
+ connect( m_scanner, TQT_SIGNAL( scanStarted() ), parent, TQT_SLOT( disableWizard() ) );
+ connect( m_scanner, TQT_SIGNAL( scanFinished() ), parent, TQT_SLOT( enableWizard() ) );
+ connect(m_ippreport, TQT_SIGNAL(clicked()), TQT_SLOT(slotIppReport()));
// layout
- QHBoxLayout *lay3 = new QHBoxLayout(this, 0, 10);
- QVBoxLayout *lay2 = new QVBoxLayout(0, 0, 0);
- QHBoxLayout *lay4 = new QHBoxLayout(0, 0, 0);
+ QHBoxLayout *lay3 = new TQHBoxLayout(this, 0, 10);
+ QVBoxLayout *lay2 = new TQVBoxLayout(0, 0, 0);
+ QHBoxLayout *lay4 = new TQHBoxLayout(0, 0, 0);
lay3->addWidget(m_list,1);
lay3->addLayout(lay2,1);
@@ -105,7 +105,7 @@ void KMWIppPrinter::updatePrinter(KMPrinter *p)
p->setDevice(m_uri->text());
}
-bool KMWIppPrinter::isValid(QString& msg)
+bool KMWIppPrinter::isValid(TQString& msg)
{
if (m_uri->text().isEmpty())
{
@@ -130,8 +130,8 @@ void KMWIppPrinter::slotScanStarted()
void KMWIppPrinter::slotScanFinished()
{
m_ippreport->setEnabled(false);
- const QPtrList<NetworkScanner::SocketInfo> *list = m_scanner->printerList();
- QPtrListIterator<NetworkScanner::SocketInfo> it(*list);
+ const TQPtrList<NetworkScanner::SocketInfo> *list = m_scanner->printerList();
+ TQPtrListIterator<NetworkScanner::SocketInfo> it(*list);
for (;it.current();++it)
{
QString name;
@@ -139,12 +139,12 @@ void KMWIppPrinter::slotScanFinished()
name = i18n("Unknown host - 1 is the IP", "<Unknown> (%1)").arg(it.current()->IP);
else
name = it.current()->Name;
- QListViewItem *item = new QListViewItem(m_list,name,it.current()->IP,QString::number(it.current()->Port));
+ QListViewItem *item = new TQListViewItem(m_list,name,it.current()->IP,TQString::number(it.current()->Port));
item->setPixmap(0,SmallIcon("kdeprint_printer"));
}
}
-void KMWIppPrinter::slotPrinterSelected(QListViewItem *item)
+void KMWIppPrinter::slotPrinterSelected(TQListViewItem *item)
{
m_ippreport->setEnabled(item != 0);
if (!item) return;
@@ -157,7 +157,7 @@ void KMWIppPrinter::slotPrinterSelected(QListViewItem *item)
req.setOperation(IPP_GET_PRINTER_ATTRIBUTES);
req.setHost(item->text(1));
req.setPort(item->text(2).toInt());
- uri = QString::fromLatin1("ipp://%1:%2/ipp").arg(item->text(1)).arg(item->text(2));
+ uri = TQString::fromLatin1("ipp://%1:%2/ipp").arg(item->text(1)).arg(item->text(2));
req.addURI(IPP_TAG_OPERATION,"printer-uri",uri);
keys.append("printer-name");
keys.append("printer-state");
@@ -172,11 +172,11 @@ void KMWIppPrinter::slotPrinterSelected(QListViewItem *item)
int state;
if (req.name("printer-name",value)) txt.append(i18n("<b>Name</b>: %1<br>").arg(value));
if (req.text("printer-location",value) && !value.isEmpty()) txt.append(i18n("<b>Location</b>: %1<br>").arg(value));
- if (req.text("printer-info",value) && !value.isEmpty()) txt.append(i18n("<b>Description</b>: %1<br>").arg(value.replace(QRegExp(";"),"<br>")));
+ if (req.text("printer-info",value) && !value.isEmpty()) txt.append(i18n("<b>Description</b>: %1<br>").arg(value.replace(TQRegExp(";"),"<br>")));
if (req.uri("printer-uri-supported",value))
{
if (value[0] == '/')
- value.prepend(QString::fromLatin1("ipp://%1:%2").arg(item->text(1)).arg(item->text(2)));
+ value.prepend(TQString::fromLatin1("ipp://%1:%2").arg(item->text(1)).arg(item->text(2)));
m_uri->setText(value);
}
if (req.text("printer-make-and-model",value) && !value.isEmpty()) txt.append(i18n("<b>Model</b>: %1<br>").arg(value));
diff --git a/kdeprint/cups/kmwippprinter.h b/kdeprint/cups/kmwippprinter.h
index f928c3e68..627a28f7d 100644
--- a/kdeprint/cups/kmwippprinter.h
+++ b/kdeprint/cups/kmwippprinter.h
@@ -33,16 +33,16 @@ class KMWIppPrinter : public KMWizardPage
{
Q_OBJECT
public:
- KMWIppPrinter(QWidget *parent = 0, const char *name = 0);
+ KMWIppPrinter(TQWidget *parent = 0, const char *name = 0);
~KMWIppPrinter();
- bool isValid(QString&);
+ bool isValid(TQString&);
void updatePrinter(KMPrinter*);
protected slots:
void slotScanStarted();
void slotScanFinished();
- void slotPrinterSelected(QListViewItem*);
+ void slotPrinterSelected(TQListViewItem*);
void slotIppReport();
private:
diff --git a/kdeprint/cups/kmwippselect.cpp b/kdeprint/cups/kmwippselect.cpp
index d70c8603d..fbfa597c7 100644
--- a/kdeprint/cups/kmwippselect.cpp
+++ b/kdeprint/cups/kmwippselect.cpp
@@ -24,12 +24,12 @@
#include "ipprequest.h"
#include <klistbox.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kdebug.h>
#include <kiconloader.h>
-KMWIppSelect::KMWIppSelect(QWidget *parent, const char *name)
+KMWIppSelect::KMWIppSelect(TQWidget *parent, const char *name)
: KMWizardPage(parent,name)
{
m_ID = KMWizard::IPPSelect;
@@ -38,11 +38,11 @@ KMWIppSelect::KMWIppSelect(QWidget *parent, const char *name)
m_list = new KListBox(this);
- QVBoxLayout *lay = new QVBoxLayout(this, 0, 0);
+ QVBoxLayout *lay = new TQVBoxLayout(this, 0, 0);
lay->addWidget(m_list);
}
-bool KMWIppSelect::isValid(QString& msg)
+bool KMWIppSelect::isValid(TQString& msg)
{
if (m_list->currentItem() == -1)
{
@@ -75,16 +75,16 @@ void KMWIppSelect::initPrinter(KMPrinter *p)
IppRequest req;
QString uri;
req.setOperation(CUPS_GET_PRINTERS);
- uri = QString::fromLatin1("ipp://%1/printers/").arg(CupsInfos::self()->hostaddr());
+ uri = TQString::fromLatin1("ipp://%1/printers/").arg(CupsInfos::self()->hostaddr());
req.addURI(IPP_TAG_OPERATION,"printer-uri",uri);
- req.addKeyword(IPP_TAG_OPERATION,"requested-attributes",QString::fromLatin1("printer-name"));
+ req.addKeyword(IPP_TAG_OPERATION,"requested-attributes",TQString::fromLatin1("printer-name"));
if (req.doRequest("/printers/"))
{
ipp_attribute_t *attr = req.first();
while (attr)
{
if (attr->name && strcmp(attr->name,"printer-name") == 0)
- m_list->insertItem(SmallIcon("kdeprint_printer"),QString::fromLatin1(attr->values[0].string.text));
+ m_list->insertItem(SmallIcon("kdeprint_printer"),TQString::fromLatin1(attr->values[0].string.text));
attr = attr->next;
}
m_list->sort();
diff --git a/kdeprint/cups/kmwippselect.h b/kdeprint/cups/kmwippselect.h
index 5bf12e0c8..26ce6e563 100644
--- a/kdeprint/cups/kmwippselect.h
+++ b/kdeprint/cups/kmwippselect.h
@@ -27,9 +27,9 @@ class KListBox;
class KMWIppSelect : public KMWizardPage
{
public:
- KMWIppSelect(QWidget *parent = 0, const char *name = 0);
+ KMWIppSelect(TQWidget *parent = 0, const char *name = 0);
- bool isValid(QString&);
+ bool isValid(TQString&);
void initPrinter(KMPrinter*);
void updatePrinter(KMPrinter*);
diff --git a/kdeprint/cups/kmwother.cpp b/kdeprint/cups/kmwother.cpp
index 034c88bb2..36e80c76d 100644
--- a/kdeprint/cups/kmwother.cpp
+++ b/kdeprint/cups/kmwother.cpp
@@ -23,40 +23,40 @@
#include "kmmanager.h"
#include "cupsinfos.h"
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qheader.h>
-#include <qdict.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqheader.h>
+#include <tqdict.h>
#include <klocale.h>
#include <klistview.h>
#include <kiconloader.h>
#include <kdebug.h>
-KMWOther::KMWOther(QWidget *parent, const char *name)
+KMWOther::KMWOther(TQWidget *parent, const char *name)
: KMWizardPage(parent,name)
{
m_ID = KMWizard::Custom+5;
m_title = i18n("URI Selection");
m_nextpage = KMWizard::Driver;
- m_uri = new QLineEdit(this);
- QLabel *l1 = new QLabel(this);
+ m_uri = new TQLineEdit(this);
+ QLabel *l1 = new TQLabel(this);
l1->setText(i18n("<p>Enter the URI corresponding to the printer to be installed. "
"Examples:</p><ul>"
"<li>smb://[login[:passwd]@]server/printer</li>"
"<li>lpd://server/queue</li>"
"<li>parallel:/dev/lp0</li></ul>"));
- QLabel *l2 = new QLabel(i18n("URI:"), this);
+ QLabel *l2 = new TQLabel(i18n("URI:"), this);
m_uriview = new KListView( this );
m_uriview->addColumn( "" );
m_uriview->header()->hide();
m_uriview->setSorting( -1 );
- connect( m_uriview, SIGNAL( pressed( QListViewItem* ) ), SLOT( slotPressed( QListViewItem* ) ) );
+ connect( m_uriview, TQT_SIGNAL( pressed( TQListViewItem* ) ), TQT_SLOT( slotPressed( TQListViewItem* ) ) );
- QVBoxLayout *lay1 = new QVBoxLayout(this, 0, 15);
- QVBoxLayout *lay2 = new QVBoxLayout(0, 0, 5);
+ QVBoxLayout *lay1 = new TQVBoxLayout(this, 0, 15);
+ QVBoxLayout *lay2 = new TQVBoxLayout(0, 0, 5);
lay1->addWidget(l1);
lay1->addLayout(lay2);
lay1->addWidget( m_uriview );
@@ -70,29 +70,29 @@ void KMWOther::initPrinter(KMPrinter *p)
if ( m_uriview->childCount() == 0 )
{
- QStringList l = KMManager::self()->detectLocalPrinters();
+ TQStringList l = KMManager::self()->detectLocalPrinters();
if ( l.isEmpty() || l.count() % 4 != 0 )
return;
- QListViewItem *item = 0, *lastparent = 0, *root;
- root = new QListViewItem( m_uriview, i18n( "CUPS Server %1:%2" ).arg( CupsInfos::self()->host() ).arg( CupsInfos::self()->port() ) );
+ TQListViewItem *item = 0, *lastparent = 0, *root;
+ root = new TQListViewItem( m_uriview, i18n( "CUPS Server %1:%2" ).arg( CupsInfos::self()->host() ).arg( CupsInfos::self()->port() ) );
root->setPixmap( 0, SmallIcon( "gear" ) );
root->setOpen( true );
- QDict<QListViewItem> parents, last;
+ TQDict<TQListViewItem> parents, last;
parents.setAutoDelete( false );
last.setAutoDelete( false );
- for ( QStringList::Iterator it=l.begin(); it!=l.end(); ++it )
+ for ( TQStringList::Iterator it=l.begin(); it!=l.end(); ++it )
{
- QString cl = *it;
- QString uri = *( ++it );
- QString desc = *( ++it );
- QString prt = *( ++it );
+ TQString cl = *it;
+ TQString uri = *( ++it );
+ TQString desc = *( ++it );
+ TQString prt = *( ++it );
if ( !prt.isEmpty() )
desc.append( " [" + prt + "]" );
- QListViewItem *parent = parents.find( cl );
+ TQListViewItem *parent = parents.find( cl );
if ( !parent )
{
- parent = new QListViewItem( root, lastparent, cl );
+ parent = new TQListViewItem( root, lastparent, cl );
parent->setOpen( true );
if ( cl == "network" )
parent->setPixmap( 0, SmallIcon( "network" ) );
@@ -105,7 +105,7 @@ void KMWOther::initPrinter(KMPrinter *p)
lastparent = parent;
parents.insert( cl, parent );
}
- item = new QListViewItem( parent, last.find( cl ), desc, uri);
+ item = new TQListViewItem( parent, last.find( cl ), desc, uri);
last.insert( cl, item );
}
}
@@ -116,7 +116,7 @@ void KMWOther::updatePrinter(KMPrinter *p)
p->setDevice( m_uri->text() );
}
-void KMWOther::slotPressed( QListViewItem *item )
+void KMWOther::slotPressed( TQListViewItem *item )
{
if ( item && !item->text( 1 ).isEmpty() )
m_uri->setText( item->text( 1 ) );
diff --git a/kdeprint/cups/kmwother.h b/kdeprint/cups/kmwother.h
index 211a670e9..68f13077f 100644
--- a/kdeprint/cups/kmwother.h
+++ b/kdeprint/cups/kmwother.h
@@ -30,13 +30,13 @@ class KMWOther : public KMWizardPage
{
Q_OBJECT
public:
- KMWOther(QWidget *parent = 0, const char *name = 0);
+ KMWOther(TQWidget *parent = 0, const char *name = 0);
void initPrinter(KMPrinter*);
void updatePrinter(KMPrinter*);
protected slots:
- void slotPressed( QListViewItem* );
+ void slotPressed( TQListViewItem* );
private:
QLineEdit *m_uri;
diff --git a/kdeprint/cups/kmwquota.cpp b/kdeprint/cups/kmwquota.cpp
index e0b5d5f27..f9c34c04a 100644
--- a/kdeprint/cups/kmwquota.cpp
+++ b/kdeprint/cups/kmwquota.cpp
@@ -23,10 +23,10 @@
#include "kmwizard.h"
#include "kmprinter.h"
-#include <qspinbox.h>
-#include <qlabel.h>
-#include <qcombobox.h>
-#include <qlayout.h>
+#include <tqspinbox.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
+#include <tqlayout.h>
#include <klocale.h>
#ifdef HAVE_LIMITS_H
@@ -72,41 +72,41 @@ int findUnit(int& period)
const char* unitKeyword(int i)
{ return time_keywords[i]; }
-KMWQuota::KMWQuota(QWidget *parent, const char *name)
+KMWQuota::KMWQuota(TQWidget *parent, const char *name)
: KMWizardPage(parent, name)
{
m_ID = KMWizard::Custom+3;
m_title = i18n("Printer Quota Settings");
m_nextpage = KMWizard::Custom+4;
- m_period = new QSpinBox(this);
+ m_period = new TQSpinBox(this);
m_period->setRange(-1, INT_MAX);
m_period->setSpecialValueText(i18n("No quota"));
- m_sizelimit = new QSpinBox(this);
+ m_sizelimit = new TQSpinBox(this);
m_sizelimit->setRange(0, INT_MAX);
m_sizelimit->setSpecialValueText(i18n("None"));
- m_pagelimit = new QSpinBox(this);
+ m_pagelimit = new TQSpinBox(this);
m_pagelimit->setRange(0, INT_MAX);
m_pagelimit->setSpecialValueText(i18n("None"));
- m_timeunit = new QComboBox(this);
+ m_timeunit = new TQComboBox(this);
for (int i=0;i<N_TIME_LIMITS;i++)
m_timeunit->insertItem(i18n(time_keywords[i]));
m_timeunit->setCurrentItem(3);
- QLabel *lab1 = new QLabel(i18n("&Period:"), this);
- QLabel *lab2 = new QLabel(i18n("&Size limit (KB):"), this);
- QLabel *lab3 = new QLabel(i18n("&Page limit:"), this);
+ QLabel *lab1 = new TQLabel(i18n("&Period:"), this);
+ QLabel *lab2 = new TQLabel(i18n("&Size limit (KB):"), this);
+ QLabel *lab3 = new TQLabel(i18n("&Page limit:"), this);
lab1->setBuddy(m_period);
lab2->setBuddy(m_sizelimit);
lab3->setBuddy(m_pagelimit);
- QLabel *lab4 = new QLabel(i18n("<p>Set here the quota for this printer. Using limits of <b>0</b> means "
+ QLabel *lab4 = new TQLabel(i18n("<p>Set here the quota for this printer. Using limits of <b>0</b> means "
"that no quota will be used. This is equivalent to set quota period to "
"<b><nobr>No quota</nobr></b> (-1). Quota limits are defined on a per-user base and "
"applied to all users.</p>"), this);
- QGridLayout *l0 = new QGridLayout(this, 5, 3, 0, 10);
+ QGridLayout *l0 = new TQGridLayout(this, 5, 3, 0, 10);
l0->setRowStretch(4, 1);
l0->setColStretch(1, 1);
l0->addMultiCellWidget(lab4, 0, 0, 0, 2);
@@ -123,7 +123,7 @@ KMWQuota::~KMWQuota()
{
}
-bool KMWQuota::isValid(QString& msg)
+bool KMWQuota::isValid(TQString& msg)
{
if (m_period->value() >= 0 && m_sizelimit->value() == 0 && m_pagelimit->value() == 0)
{
@@ -164,8 +164,8 @@ void KMWQuota::updatePrinter(KMPrinter *p)
}
qu *= time_periods[m_timeunit->currentItem()];
- p->setOption("job-quota-period", QString::number(qu));
- p->setOption("job-k-limit", QString::number(si));
- p->setOption("job-page-limit", QString::number(pa));
+ p->setOption("job-quota-period", TQString::number(qu));
+ p->setOption("job-k-limit", TQString::number(si));
+ p->setOption("job-page-limit", TQString::number(pa));
}
#include "kmwquota.moc"
diff --git a/kdeprint/cups/kmwquota.h b/kdeprint/cups/kmwquota.h
index 88b6359c9..8261546b9 100644
--- a/kdeprint/cups/kmwquota.h
+++ b/kdeprint/cups/kmwquota.h
@@ -29,10 +29,10 @@ class KMWQuota : public KMWizardPage
{
Q_OBJECT
public:
- KMWQuota(QWidget *parent = 0, const char *name = 0);
+ KMWQuota(TQWidget *parent = 0, const char *name = 0);
virtual ~KMWQuota();
- bool isValid(QString&);
+ bool isValid(TQString&);
void initPrinter(KMPrinter*);
void updatePrinter(KMPrinter*);
diff --git a/kdeprint/cups/kmwusers.cpp b/kdeprint/cups/kmwusers.cpp
index 3dedddd47..4466c4223 100644
--- a/kdeprint/cups/kmwusers.cpp
+++ b/kdeprint/cups/kmwusers.cpp
@@ -23,13 +23,13 @@
#include "kmwizard.h"
#include "kmprinter.h"
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qcombobox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqcombobox.h>
#include <klocale.h>
#include <keditlistbox.h>
-KMWUsers::KMWUsers(QWidget *parent, const char *name)
+KMWUsers::KMWUsers(TQWidget *parent, const char *name)
: KMWizardPage(parent, name)
{
m_ID = KMWizard::Custom+4;
@@ -37,17 +37,17 @@ KMWUsers::KMWUsers(QWidget *parent, const char *name)
m_nextpage = KMWizard::Name;
m_users = new KEditListBox(i18n("Users"), this, 0, false, KEditListBox::Add|KEditListBox::Remove);
- m_type = new QComboBox(this);
+ m_type = new TQComboBox(this);
m_type->insertItem(i18n("Allowed Users"));
m_type->insertItem(i18n("Denied Users"));
- QLabel *lab1 = new QLabel(i18n("Define here a group of allowed/denied users for this printer."), this);
- QLabel *lab2 = new QLabel(i18n("&Type:"), this);
+ QLabel *lab1 = new TQLabel(i18n("Define here a group of allowed/denied users for this printer."), this);
+ QLabel *lab2 = new TQLabel(i18n("&Type:"), this);
lab2->setBuddy(m_type);
- QVBoxLayout *l0 = new QVBoxLayout(this, 0, 10);
- QHBoxLayout *l1 = new QHBoxLayout(0, 0, 10);
+ QVBoxLayout *l0 = new TQVBoxLayout(this, 0, 10);
+ QHBoxLayout *l1 = new TQHBoxLayout(0, 0, 10);
l0->addWidget(lab1, 0);
l0->addLayout(l1, 0);
l1->addWidget(lab2, 0);
@@ -65,14 +65,14 @@ void KMWUsers::initPrinter(KMPrinter *p)
int i(1);
if (!p->option("requesting-user-name-denied").isEmpty())
{
- l = QStringList::split(",", p->option("requesting-user-name-denied"), false);
+ l = TQStringList::split(",", p->option("requesting-user-name-denied"), false);
if (l.count() == 1 && l[0] == "none")
l.clear();
}
else if (!p->option("requesting-user-name-allowed").isEmpty())
{
i = 0;
- l = QStringList::split(",", p->option("requesting-user-name-allowed"), false);
+ l = TQStringList::split(",", p->option("requesting-user-name-allowed"), false);
if (l.count() && l[0] == "all")
l.clear();
}
diff --git a/kdeprint/cups/kmwusers.h b/kdeprint/cups/kmwusers.h
index 9c970bb54..cb269cd76 100644
--- a/kdeprint/cups/kmwusers.h
+++ b/kdeprint/cups/kmwusers.h
@@ -29,7 +29,7 @@ class KMWUsers : public KMWizardPage
{
Q_OBJECT
public:
- KMWUsers(QWidget *parent = 0, const char *name = 0);
+ KMWUsers(TQWidget *parent = 0, const char *name = 0);
virtual ~KMWUsers();
void initPrinter(KMPrinter*);
diff --git a/kdeprint/cups/kphpgl2page.cpp b/kdeprint/cups/kphpgl2page.cpp
index c6672aeaf..7ec413e52 100644
--- a/kdeprint/cups/kphpgl2page.cpp
+++ b/kdeprint/cups/kphpgl2page.cpp
@@ -19,18 +19,18 @@
#include "kphpgl2page.h"
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
#include <knuminput.h>
-KPHpgl2Page::KPHpgl2Page(QWidget *parent, const char *name)
+KPHpgl2Page::KPHpgl2Page(TQWidget *parent, const char *name)
: KPrintDialogPage(parent, name)
{
//WhatsThis strings.... (added by pfeifle@kde.org)
- QString whatsThisBlackplotHpgl2Page = i18n( " <qt> "
+ TQString whatsThisBlackplotHpgl2Page = i18n( " <qt> "
" <b>Print in Black Only (Blackplot)</b> "
" <p>The \'blackplot\' option specifies that all pens should plot in black-only:"
" The default is to use the colors defined in the plot file, or the standard "
@@ -45,7 +45,7 @@ KPHpgl2Page::KPHpgl2Page(QWidget *parent, const char *name)
" </p> "
" </qt>" );
- QString whatsThisFitplotHpgl2Page = i18n( " <qt> "
+ TQString whatsThisFitplotHpgl2Page = i18n( " <qt> "
" <b>Scale Print Image to Page Size</b> "
" <p>The 'fitplot' option specifies that the HP-GL image should be scaled to fill "
" exactly the page with the (elsewhere selected) media size. </p> "
@@ -65,7 +65,7 @@ KPHpgl2Page::KPHpgl2Page(QWidget *parent, const char *name)
" </p> "
" </qt>" );
- QString whatsThisPenwidthHpgl2Page = i18n( " <qt> "
+ TQString whatsThisPenwidthHpgl2Page = i18n( " <qt> "
" <b>Set Pen Width for HP-GL (if not defined in file)</b>. "
" <p>The pen width value can be set here in case the original HP-GL file does not have it "
" set. The pen width specifies the value in micrometers. The default value of 1000 produces "
@@ -82,7 +82,7 @@ KPHpgl2Page::KPHpgl2Page(QWidget *parent, const char *name)
" </p> "
" </qt>" );
- QString whatsThisAllOptionsHpgl2Page = i18n( " <qt> "
+ TQString whatsThisAllOptionsHpgl2Page = i18n( " <qt> "
" <b>HP-GL Print Options</b> "
" <p>All options on this page are only applicable if you use KDEPrint to send HP-GL and "
" HP-GL/2 files to one of your printers. </p> "
@@ -110,36 +110,36 @@ KPHpgl2Page::KPHpgl2Page(QWidget *parent, const char *name)
setTitle("HP-GL/2");
- QGroupBox *box = new QGroupBox(0, Qt::Vertical, i18n("HP-GL/2 Options"), this);
+ QGroupBox *box = new TQGroupBox(0, Qt::Vertical, i18n("HP-GL/2 Options"), this);
- m_blackplot = new QCheckBox(i18n("&Use only black pen"), box);
- QWhatsThis::add(m_blackplot, whatsThisBlackplotHpgl2Page);
+ m_blackplot = new TQCheckBox(i18n("&Use only black pen"), box);
+ TQWhatsThis::add(m_blackplot, whatsThisBlackplotHpgl2Page);
- m_fitplot = new QCheckBox(i18n("&Fit plot to page"), box);
- QWhatsThis::add(m_fitplot, whatsThisFitplotHpgl2Page);
+ m_fitplot = new TQCheckBox(i18n("&Fit plot to page"), box);
+ TQWhatsThis::add(m_fitplot, whatsThisFitplotHpgl2Page);
m_penwidth = new KIntNumInput(1000, box);
m_penwidth->setLabel(i18n("&Pen width:"), Qt::AlignLeft|Qt::AlignVCenter);
m_penwidth->setSuffix(" [um]");
m_penwidth->setRange(0, 10000, 100, true);
- QWhatsThis::add(m_penwidth, whatsThisPenwidthHpgl2Page);
+ TQWhatsThis::add(m_penwidth, whatsThisPenwidthHpgl2Page);
- QVBoxLayout *l0 = new QVBoxLayout(this, 0, 10);
+ QVBoxLayout *l0 = new TQVBoxLayout(this, 0, 10);
l0->addWidget(box);
l0->addStretch(1);
- QVBoxLayout *l1 = new QVBoxLayout(box->layout(), 10);
+ QVBoxLayout *l1 = new TQVBoxLayout(box->layout(), 10);
l1->addWidget(m_blackplot);
l1->addWidget(m_fitplot);
l1->addWidget(m_penwidth);
- QWhatsThis::add(this, whatsThisAllOptionsHpgl2Page);
+ TQWhatsThis::add(this, whatsThisAllOptionsHpgl2Page);
}
KPHpgl2Page::~KPHpgl2Page()
{
}
-void KPHpgl2Page::setOptions(const QMap<QString,QString>& opts)
+void KPHpgl2Page::setOptions(const TQMap<TQString,TQString>& opts)
{
QString value;
if (opts.contains("blackplot") && ((value=opts["blackplot"]).isEmpty() || value == "true"))
@@ -150,10 +150,10 @@ void KPHpgl2Page::setOptions(const QMap<QString,QString>& opts)
m_penwidth->setValue(value.toInt());
}
-void KPHpgl2Page::getOptions(QMap<QString,QString>& opts, bool incldef)
+void KPHpgl2Page::getOptions(TQMap<TQString,TQString>& opts, bool incldef)
{
if (incldef || m_penwidth->value() != 1000)
- opts["penwidth"] = QString::number(m_penwidth->value());
+ opts["penwidth"] = TQString::number(m_penwidth->value());
if (m_blackplot->isChecked())
opts["blackplot"] = "true";
else if (incldef)
diff --git a/kdeprint/cups/kphpgl2page.h b/kdeprint/cups/kphpgl2page.h
index 206c409d8..cc77e8ab8 100644
--- a/kdeprint/cups/kphpgl2page.h
+++ b/kdeprint/cups/kphpgl2page.h
@@ -28,11 +28,11 @@ class QCheckBox;
class KPHpgl2Page : public KPrintDialogPage
{
public:
- KPHpgl2Page(QWidget *parent = 0, const char *name = 0);
+ KPHpgl2Page(TQWidget *parent = 0, const char *name = 0);
~KPHpgl2Page();
- void setOptions(const QMap<QString,QString>& opts);
- void getOptions(QMap<QString,QString>& opts, bool incldef = false);
+ void setOptions(const TQMap<TQString,TQString>& opts);
+ void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false);
private:
KIntNumInput *m_penwidth;
diff --git a/kdeprint/cups/kpimagepage.cpp b/kdeprint/cups/kpimagepage.cpp
index 9ebdc9548..c4cf50e48 100644
--- a/kdeprint/cups/kpimagepage.cpp
+++ b/kdeprint/cups/kpimagepage.cpp
@@ -22,26 +22,26 @@
#include "imagepreview.h"
#include "driver.h"
-#include <qcombobox.h>
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
-#include <qgroupbox.h>
-#include <qpushbutton.h>
-#include <qapplication.h>
-#include <qimage.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
+#include <tqcombobox.h>
+#include <tqbuttongroup.h>
+#include <tqradiobutton.h>
+#include <tqgroupbox.h>
+#include <tqpushbutton.h>
+#include <tqapplication.h>
+#include <tqimage.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
#include <knuminput.h>
#include <kseparator.h>
#include <kstandarddirs.h>
-KPImagePage::KPImagePage(DrMain *driver, QWidget *parent, const char *name)
+KPImagePage::KPImagePage(DrMain *driver, TQWidget *parent, const char *name)
: KPrintDialogPage(parent, name)
{
//WhatsThis strings.... (added by pfeifle@kde.org)
- QString whatsThisBrightnessImagePage = i18n( " <qt> "
+ TQString whatsThisBrightnessImagePage = i18n( " <qt> "
" <p><b>Brightness:</b> Slider to control the brightness value of all colors used.</p>"
" <p> The brightness value can range from 0 to 200. Values greater than 100 will "
" lighten the print. Values less than 100 will darken the print. </p> "
@@ -55,7 +55,7 @@ KPImagePage::KPImagePage(DrMain *driver, QWidget *parent, const char *name)
" </p> "
" </qt>" );
- QString whatsThisHueImagePage = i18n( " <qt> "
+ TQString whatsThisHueImagePage = i18n( " <qt> "
" <p><b>Hue (Tint):</b> Slider to control the hue value for color rotation.</p>"
" <p> The hue value is a number from -360 to 360 and represents the color hue rotation. "
" The following table summarizes the change you will see for the base colors: "
@@ -80,7 +80,7 @@ KPImagePage::KPImagePage(DrMain *driver, QWidget *parent, const char *name)
" </p> "
" </qt>" );
- QString whatsThisSaturationImagePage = i18n( " <qt> "
+ TQString whatsThisSaturationImagePage = i18n( " <qt> "
" <p><b>Saturation:</b> Slider to control the saturation value for all colors used.</p>"
" <p> The saturation value adjusts the saturation of the colors in an image, similar to "
" the color knob on your television. The color saturation value.can range from 0 to 200."
@@ -98,7 +98,7 @@ KPImagePage::KPImagePage(DrMain *driver, QWidget *parent, const char *name)
" </p> "
" </qt>" );
- QString whatsThisGammaImagePage = i18n( " <qt> "
+ TQString whatsThisGammaImagePage = i18n( " <qt> "
" <p><b>Gamma:</b> Slider to control the gamma value for color correction.</p>"
" <p> The gamma value can range from 1 to 3000. "
" A gamma values greater than 1000 lightens the print. A gamma value less than 1000 "
@@ -115,7 +115,7 @@ KPImagePage::KPImagePage(DrMain *driver, QWidget *parent, const char *name)
" </p> "
" </qt>" );
- QString whatsThisImagePage = i18n( " <qt> "
+ TQString whatsThisImagePage = i18n( " <qt> "
" <p><b>Image Printing Options</b></p> "
" <p>All options controlled on this page only apply to printing images. "
" Most image file formats are supported. To name a few: JPEG, TIFF, PNG, GIF, "
@@ -133,7 +133,7 @@ KPImagePage::KPImagePage(DrMain *driver, QWidget *parent, const char *name)
" </p> "
" </qt>" );
- QString whatsThisColorationPreviewImagePage = i18n( " <qt> "
+ TQString whatsThisColorationPreviewImagePage = i18n( " <qt> "
" <p><b>Coloration Preview Thumbnail</b></p> "
" <p>The coloration preview thumbnail indicates change of image coloration by different settings. "
" Options to influence output are: "
@@ -149,7 +149,7 @@ KPImagePage::KPImagePage(DrMain *driver, QWidget *parent, const char *name)
" </p> "
" </qt>" );
- QString whatsThisSizeImagePage = i18n( " <qt> "
+ TQString whatsThisSizeImagePage = i18n( " <qt> "
" <p><b>Image Size:</b> Dropdown menu to control the image size on the printed paper. Dropdown "
" works in conjunction with slider below. Dropdown options are:.</p>"
" <ul> "
@@ -189,7 +189,7 @@ KPImagePage::KPImagePage(DrMain *driver, QWidget *parent, const char *name)
" </p> "
" </qt>" );
- QString whatsThisPreviewPositionImagePage = i18n( " <qt> "
+ TQString whatsThisPreviewPositionImagePage = i18n( " <qt> "
" <p><b>Position Preview Thumbnail</b></p> "
" <p>This position preview thumbnail indicates the position of the image on the paper sheet. "
" <p>Click on horizontal and vertical radio buttons to move image alignment on paper around. Options are: "
@@ -207,7 +207,7 @@ KPImagePage::KPImagePage(DrMain *driver, QWidget *parent, const char *name)
" </p> "
" </qt>" );
- QString whatsThisResetButtonImagePage = i18n( " <qt> "
+ TQString whatsThisResetButtonImagePage = i18n( " <qt> "
" <p><b>Reset to Default Values</b> </p> "
" <p> Reset all coloration settings to default values. Default values are: "
" <ul> "
@@ -219,7 +219,7 @@ KPImagePage::KPImagePage(DrMain *driver, QWidget *parent, const char *name)
" </p> "
" </qt>" );
- QString whatsThisPositionImagePage = i18n( " <qt> "
+ TQString whatsThisPositionImagePage = i18n( " <qt> "
" <p><b>Image Positioning:</b></p> "
" <p>Select a pair of radiobuttons to "
" move image to the position you want on the paper printout. Default "
@@ -236,42 +236,42 @@ KPImagePage::KPImagePage(DrMain *driver, QWidget *parent, const char *name)
setTitle(i18n("Image"));
- QGroupBox *colorbox = new QGroupBox(0, Qt::Vertical, i18n("Color Settings"), this);
- QWhatsThis::add(this, whatsThisImagePage);
- QGroupBox *sizebox = new QGroupBox(0, Qt::Vertical, i18n("Image Size"), this);
- QWhatsThis::add(sizebox, whatsThisSizeImagePage);
- QGroupBox *positionbox = new QGroupBox(0, Qt::Vertical, i18n("Image Position"), this);
- QWhatsThis::add(positionbox, whatsThisPositionImagePage);
+ QGroupBox *colorbox = new TQGroupBox(0, Qt::Vertical, i18n("Color Settings"), this);
+ TQWhatsThis::add(this, whatsThisImagePage);
+ QGroupBox *sizebox = new TQGroupBox(0, Qt::Vertical, i18n("Image Size"), this);
+ TQWhatsThis::add(sizebox, whatsThisSizeImagePage);
+ QGroupBox *positionbox = new TQGroupBox(0, Qt::Vertical, i18n("Image Position"), this);
+ TQWhatsThis::add(positionbox, whatsThisPositionImagePage);
m_brightness = new KIntNumInput(100, colorbox);
m_brightness->setLabel(i18n("&Brightness:"));
m_brightness->setRange(0, 200, 20, true);
- QWhatsThis::add(m_brightness, whatsThisBrightnessImagePage);
+ TQWhatsThis::add(m_brightness, whatsThisBrightnessImagePage);
m_hue = new KIntNumInput(m_brightness, 0, colorbox);
m_hue->setLabel(i18n("&Hue (Color rotation):"));
m_hue->setRange(-360, 360, 36, true);
- QWhatsThis::add(m_hue, whatsThisHueImagePage);
+ TQWhatsThis::add(m_hue, whatsThisHueImagePage);
m_saturation = new KIntNumInput(m_brightness, 100, colorbox);
m_saturation->setLabel(i18n("&Saturation:"));
m_saturation->setRange(0, 200, 20, true);
- QWhatsThis::add(m_saturation, whatsThisSaturationImagePage);
+ TQWhatsThis::add(m_saturation, whatsThisSaturationImagePage);
m_gamma = new KIntNumInput(m_saturation, 1000, colorbox);
m_gamma->setLabel(i18n("&Gamma (Color correction):"));
m_gamma->setRange(1, 3000, 100, true);
- QWhatsThis::add(m_gamma, whatsThisGammaImagePage);
+ TQWhatsThis::add(m_gamma, whatsThisGammaImagePage);
- connect(m_brightness, SIGNAL(valueChanged(int)), SLOT(slotImageSettingsChanged()));
- connect(m_hue, SIGNAL(valueChanged(int)), SLOT(slotImageSettingsChanged()));
- connect(m_saturation, SIGNAL(valueChanged(int)), SLOT(slotImageSettingsChanged()));
- //connect(m_gamma, SIGNAL(valueChanged(int)), SLOT(slotImageSettingsChanged()));
+ connect(m_brightness, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotImageSettingsChanged()));
+ connect(m_hue, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotImageSettingsChanged()));
+ connect(m_saturation, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotImageSettingsChanged()));
+ //connect(m_gamma, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotImageSettingsChanged()));
m_preview = new ImagePreview(colorbox);
bool useColor = (driver ? driver->get("colordevice") == "1" : true);
m_preview->setBlackAndWhite(!useColor);
- QWhatsThis::add(m_preview, whatsThisColorationPreviewImagePage);
+ TQWhatsThis::add(m_preview, whatsThisColorationPreviewImagePage);
m_hue->setEnabled(useColor);
m_saturation->setEnabled(useColor);
@@ -280,12 +280,12 @@ KPImagePage::KPImagePage(DrMain *driver, QWidget *parent, const char *name)
KSeparator *sep = new KSeparator(Qt::Horizontal, colorbox);
- QPushButton *defbtn = new QPushButton(i18n("&Default Settings"), colorbox);
- QWhatsThis::add(defbtn, whatsThisResetButtonImagePage);
- connect(defbtn, SIGNAL(clicked()), SLOT(slotDefaultClicked()));
+ QPushButton *defbtn = new TQPushButton(i18n("&Default Settings"), colorbox);
+ TQWhatsThis::add(defbtn, whatsThisResetButtonImagePage);
+ connect(defbtn, TQT_SIGNAL(clicked()), TQT_SLOT(slotDefaultClicked()));
slotDefaultClicked();
- m_sizetype = new QComboBox(sizebox);
+ m_sizetype = new TQComboBox(sizebox);
m_sizetype->insertItem(i18n("Natural Image Size"));
m_sizetype->insertItem(i18n("Resolution (ppi)"));
// xgettext:no-c-format
@@ -297,22 +297,22 @@ KPImagePage::KPImagePage(DrMain *driver, QWidget *parent, const char *name)
m_size->setRange(1, 1200, 20, true);
m_size->setValue(72);
- connect(m_sizetype, SIGNAL(activated(int)), SLOT(slotSizeTypeChanged(int)));
+ connect(m_sizetype, TQT_SIGNAL(activated(int)), TQT_SLOT(slotSizeTypeChanged(int)));
m_sizetype->setCurrentItem(0);
slotSizeTypeChanged(0);
- QLabel *lab = new QLabel(i18n("&Image size type:"), sizebox);
+ QLabel *lab = new TQLabel(i18n("&Image size type:"), sizebox);
lab->setBuddy(m_sizetype);
m_position = new ImagePosition(positionbox);
- QWhatsThis::add(m_position, whatsThisPreviewPositionImagePage);
-
- QRadioButton *bottom = new QRadioButton(positionbox);
- QRadioButton *top = new QRadioButton(positionbox);
- QRadioButton *vcenter = new QRadioButton(positionbox);
- QRadioButton *left = new QRadioButton(positionbox);
- QRadioButton *right = new QRadioButton(positionbox);
- QRadioButton *hcenter = new QRadioButton(positionbox);
+ TQWhatsThis::add(m_position, whatsThisPreviewPositionImagePage);
+
+ QRadioButton *bottom = new TQRadioButton(positionbox);
+ QRadioButton *top = new TQRadioButton(positionbox);
+ QRadioButton *vcenter = new TQRadioButton(positionbox);
+ QRadioButton *left = new TQRadioButton(positionbox);
+ QRadioButton *right = new TQRadioButton(positionbox);
+ QRadioButton *hcenter = new TQRadioButton(positionbox);
QSize sz = bottom->sizeHint();
bottom->setFixedSize(sz);
vcenter->setFixedSize(sz);
@@ -321,16 +321,16 @@ KPImagePage::KPImagePage(DrMain *driver, QWidget *parent, const char *name)
hcenter->setFixedSize(sz);
right->setFixedSize(sz);
- m_vertgrp = new QButtonGroup(positionbox);
+ m_vertgrp = new TQButtonGroup(positionbox);
m_vertgrp->hide();
- m_horizgrp = new QButtonGroup(positionbox);
+ m_horizgrp = new TQButtonGroup(positionbox);
m_horizgrp->hide();
m_vertgrp->insert(top, 0);
m_vertgrp->insert(vcenter, 1);
m_vertgrp->insert(bottom, 2);
- if ( QApplication::reverseLayout() )
+ if ( TQApplication::reverseLayout() )
{
m_horizgrp->insert(left, 2);
m_horizgrp->insert(hcenter, 1);
@@ -342,18 +342,18 @@ KPImagePage::KPImagePage(DrMain *driver, QWidget *parent, const char *name)
m_horizgrp->insert(hcenter, 1);
m_horizgrp->insert(right, 2);
}
- connect(m_vertgrp, SIGNAL(clicked(int)), SLOT(slotPositionChanged()));
- connect(m_horizgrp, SIGNAL(clicked(int)), SLOT(slotPositionChanged()));
+ connect(m_vertgrp, TQT_SIGNAL(clicked(int)), TQT_SLOT(slotPositionChanged()));
+ connect(m_horizgrp, TQT_SIGNAL(clicked(int)), TQT_SLOT(slotPositionChanged()));
m_vertgrp->setButton(1);
m_horizgrp->setButton(1);
slotPositionChanged();
- QGridLayout *l0 = new QGridLayout(this, 2, 2, 0, 10);
+ QGridLayout *l0 = new TQGridLayout(this, 2, 2, 0, 10);
l0->addMultiCellWidget(colorbox, 0, 0, 0, 1);
l0->addWidget(sizebox, 1, 0);
l0->addWidget(positionbox, 1, 1);
l0->setColStretch(0, 1);
- QGridLayout *l1 = new QGridLayout(colorbox->layout(), 5, 2, 10);
+ QGridLayout *l1 = new TQGridLayout(colorbox->layout(), 5, 2, 10);
l1->addWidget(m_brightness, 0, 0);
l1->addWidget(m_hue, 1, 0);
l1->addWidget(m_saturation, 2, 0);
@@ -361,16 +361,16 @@ KPImagePage::KPImagePage(DrMain *driver, QWidget *parent, const char *name)
l1->addWidget(m_gamma, 4, 0);
l1->addMultiCellWidget(m_preview, 0, 3, 1, 1);
l1->addWidget(defbtn, 4, 1);
- QVBoxLayout *l2 = new QVBoxLayout(sizebox->layout(), 3);
+ QVBoxLayout *l2 = new TQVBoxLayout(sizebox->layout(), 3);
l2->addStretch(1);
l2->addWidget(lab);
l2->addWidget(m_sizetype);
l2->addSpacing(10);
l2->addWidget(m_size);
l2->addStretch(1);
- QGridLayout *l3 = new QGridLayout(positionbox->layout(), 2, 2, 10);
- QHBoxLayout *l4 = new QHBoxLayout(0, 0, 10);
- QVBoxLayout *l5 = new QVBoxLayout(0, 0, 10);
+ QGridLayout *l3 = new TQGridLayout(positionbox->layout(), 2, 2, 10);
+ QHBoxLayout *l4 = new TQHBoxLayout(0, 0, 10);
+ QVBoxLayout *l5 = new TQVBoxLayout(0, 0, 10);
l3->addLayout(l4, 0, 1);
l3->addLayout(l5, 1, 0);
l3->addWidget(m_position, 1, 1);
@@ -386,7 +386,7 @@ KPImagePage::~KPImagePage()
{
}
-void KPImagePage::setOptions(const QMap<QString,QString>& opts)
+void KPImagePage::setOptions(const TQMap<TQString,TQString>& opts)
{
QString value;
if (!(value=opts["brightness"]).isEmpty())
@@ -420,19 +420,19 @@ void KPImagePage::setOptions(const QMap<QString,QString>& opts)
}
}
-void KPImagePage::getOptions(QMap<QString,QString>& opts, bool incldef)
+void KPImagePage::getOptions(TQMap<TQString,TQString>& opts, bool incldef)
{
if (incldef || m_brightness->value() != 100)
- opts["brightness"] = QString::number(m_brightness->value());
+ opts["brightness"] = TQString::number(m_brightness->value());
if (m_hue->isEnabled())
{
if (incldef || m_hue->value() != 0)
- opts["hue"] = QString::number(m_hue->value());
+ opts["hue"] = TQString::number(m_hue->value());
if (incldef || m_saturation->value() != 100)
- opts["saturation"] = QString::number(m_saturation->value());
+ opts["saturation"] = TQString::number(m_saturation->value());
}
if (incldef || m_gamma->value() != 1000)
- opts["gamma"] = QString::number(m_gamma->value());
+ opts["gamma"] = TQString::number(m_gamma->value());
QString name;
if (incldef)
@@ -449,7 +449,7 @@ void KPImagePage::getOptions(QMap<QString,QString>& opts, bool incldef)
case 3: name = "natural-scaling"; break;
}
if (!name.isEmpty())
- opts[name] = QString::number(m_size->value());
+ opts[name] = TQString::number(m_size->value());
if (incldef || m_position->position() != ImagePosition::Center)
opts["position"] = m_position->positionString();
diff --git a/kdeprint/cups/kpimagepage.h b/kdeprint/cups/kpimagepage.h
index 9ec623686..49b7ec0ea 100644
--- a/kdeprint/cups/kpimagepage.h
+++ b/kdeprint/cups/kpimagepage.h
@@ -32,11 +32,11 @@ class KPImagePage : public KPrintDialogPage
{
Q_OBJECT
public:
- KPImagePage(DrMain *driver = 0, QWidget *parent = 0, const char *name = 0);
+ KPImagePage(DrMain *driver = 0, TQWidget *parent = 0, const char *name = 0);
~KPImagePage();
- void setOptions(const QMap<QString,QString>& opts);
- void getOptions(QMap<QString,QString>& opts, bool incldef = false);
+ void setOptions(const TQMap<TQString,TQString>& opts);
+ void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false);
protected slots:
void slotSizeTypeChanged(int);
diff --git a/kdeprint/cups/kpschedulepage.cpp b/kdeprint/cups/kpschedulepage.cpp
index a698b1d51..3c2edaf0f 100644
--- a/kdeprint/cups/kpschedulepage.cpp
+++ b/kdeprint/cups/kpschedulepage.cpp
@@ -19,25 +19,25 @@
#include "kpschedulepage.h"
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qcombobox.h>
-#include <qregexp.h>
-#include <qdatetimeedit.h>
-#include <qdatetime.h>
-#include <qlineedit.h>
-#include <qwhatsthis.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqcombobox.h>
+#include <tqregexp.h>
+#include <tqdatetimeedit.h>
+#include <tqdatetime.h>
+#include <tqlineedit.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
#include <kseparator.h>
#include <knuminput.h>
#include <time.h>
-KPSchedulePage::KPSchedulePage(QWidget *parent, const char *name)
+KPSchedulePage::KPSchedulePage(TQWidget *parent, const char *name)
: KPrintDialogPage(parent, name)
{
//WhatsThis strings.... (added by pfeifle@kde.org)
- QString whatsThisBillingInfo = i18n( " <qt> <p><b>Print Job Billing and Accounting</b></p> "
+ TQString whatsThisBillingInfo = i18n( " <qt> <p><b>Print Job Billing and Accounting</b></p> "
" <p>Insert a meaningful string here to associate"
" the current print job with a certain account. This"
" string will appear in the CUPS \"page_log\" to help"
@@ -57,7 +57,7 @@ KPSchedulePage::KPSchedulePage(QWidget *parent, const char *name)
" </p> "
" </qt>" );
- QString whatsThisScheduledPrinting = i18n(" <qt> <p><b>Scheduled Printing</b></p> "
+ TQString whatsThisScheduledPrinting = i18n(" <qt> <p><b>Scheduled Printing</b></p> "
" <p>Scheduled printing lets you control the time"
" of the actual printout, while you can still send away your"
" job <b>now</b> and have it out of your way."
@@ -84,7 +84,7 @@ KPSchedulePage::KPSchedulePage(QWidget *parent, const char *name)
" </p> "
" </qt>" );
- QString whatsThisPageLabel = i18n( " <qt> <p><b>Page Labels</b></p> "
+ TQString whatsThisPageLabel = i18n( " <qt> <p><b>Page Labels</b></p> "
" <p>Page Labels are printed by CUPS at the top and bottom"
" of each page. They appear on the pages surrounded by a little"
" frame box."
@@ -99,7 +99,7 @@ KPSchedulePage::KPSchedulePage(QWidget *parent, const char *name)
" </p> "
" </qt>" );
- QString whatsThisJobPriority = i18n( " <qt> <p><b>Job Priority</b></p> "
+ TQString whatsThisJobPriority = i18n( " <qt> <p><b>Job Priority</b></p> "
" <p>Usually CUPS prints all jobs per queue according to"
" the \"FIFO\" principle: <em>First In, First Out</em>."
" <p> The"
@@ -133,7 +133,7 @@ KPSchedulePage::KPSchedulePage(QWidget *parent, const char *name)
ts = localtime(&ct);
m_gmtdiff -= ts->tm_hour;
- m_time = new QComboBox(this);
+ m_time = new TQComboBox(this);
m_time->insertItem(i18n("Immediately"));
m_time->insertItem(i18n("Never (hold indefinitely)"));
m_time->insertItem(i18n("Daytime (6 am - 6 pm)"));
@@ -143,38 +143,38 @@ KPSchedulePage::KPSchedulePage(QWidget *parent, const char *name)
m_time->insertItem(i18n("Second Shift (4 pm - 12 am)"));
m_time->insertItem(i18n("Third Shift (12 am - 8 am)"));
m_time->insertItem(i18n("Specified Time"));
- QWhatsThis::add(m_time, whatsThisScheduledPrinting);
+ TQWhatsThis::add(m_time, whatsThisScheduledPrinting);
m_tedit = new QTimeEdit(this);
m_tedit->setAutoAdvance(true);
- m_tedit->setTime(QTime::currentTime());
+ m_tedit->setTime(TQTime::currentTime());
m_tedit->setEnabled(false);
- QWhatsThis::add(m_tedit, whatsThisScheduledPrinting);
- m_billing = new QLineEdit(this);
- QWhatsThis::add(m_billing, whatsThisBillingInfo);
- m_pagelabel = new QLineEdit(this);
- QWhatsThis::add(m_pagelabel, whatsThisPageLabel);
+ TQWhatsThis::add(m_tedit, whatsThisScheduledPrinting);
+ m_billing = new TQLineEdit(this);
+ TQWhatsThis::add(m_billing, whatsThisBillingInfo);
+ m_pagelabel = new TQLineEdit(this);
+ TQWhatsThis::add(m_pagelabel, whatsThisPageLabel);
m_priority = new KIntNumInput(50, this);
- QWhatsThis::add(m_priority, whatsThisJobPriority);
+ TQWhatsThis::add(m_priority, whatsThisJobPriority);
m_priority->setRange(1, 100, 10, true);
- QLabel *lab = new QLabel(i18n("&Scheduled printing:"), this);
+ QLabel *lab = new TQLabel(i18n("&Scheduled printing:"), this);
lab->setBuddy(m_time);
- QWhatsThis::add(lab, whatsThisScheduledPrinting);
- QLabel *lab1 = new QLabel(i18n("&Billing information:"), this);
- QWhatsThis::add(lab1, whatsThisBillingInfo);
+ TQWhatsThis::add(lab, whatsThisScheduledPrinting);
+ QLabel *lab1 = new TQLabel(i18n("&Billing information:"), this);
+ TQWhatsThis::add(lab1, whatsThisBillingInfo);
lab1->setBuddy(m_billing);
- QLabel *lab2 = new QLabel(i18n("T&op/Bottom page label:"), this);
- QWhatsThis::add(lab2, whatsThisPageLabel);
+ QLabel *lab2 = new TQLabel(i18n("T&op/Bottom page label:"), this);
+ TQWhatsThis::add(lab2, whatsThisPageLabel);
lab2->setBuddy(m_pagelabel);
m_priority->setLabel(i18n("&Job priority:"), Qt::AlignVCenter|Qt::AlignLeft);
- QWhatsThis::add(m_priority, whatsThisJobPriority);
+ TQWhatsThis::add(m_priority, whatsThisJobPriority);
KSeparator *sep0 = new KSeparator(this);
sep0->setFixedHeight(10);
- QGridLayout *l0 = new QGridLayout(this, 6, 2, 0, 7);
+ QGridLayout *l0 = new TQGridLayout(this, 6, 2, 0, 7);
l0->addWidget(lab, 0, 0);
- QHBoxLayout *l1 = new QHBoxLayout(0, 0, 5);
+ QHBoxLayout *l1 = new TQHBoxLayout(0, 0, 5);
l0->addLayout(l1, 0, 1);
l1->addWidget(m_time);
l1->addWidget(m_tedit);
@@ -186,14 +186,14 @@ KPSchedulePage::KPSchedulePage(QWidget *parent, const char *name)
l0->addMultiCellWidget(m_priority, 4, 4, 0, 1);
l0->setRowStretch(5, 1);
- connect(m_time, SIGNAL(activated(int)), SLOT(slotTimeChanged()));
+ connect(m_time, TQT_SIGNAL(activated(int)), TQT_SLOT(slotTimeChanged()));
}
KPSchedulePage::~KPSchedulePage()
{
}
-bool KPSchedulePage::isValid(QString& msg)
+bool KPSchedulePage::isValid(TQString& msg)
{
if (m_time->currentItem() == 8 && !m_tedit->time().isValid())
{
@@ -203,7 +203,7 @@ bool KPSchedulePage::isValid(QString& msg)
return true;
}
-void KPSchedulePage::setOptions(const QMap<QString,QString>& opts)
+void KPSchedulePage::setOptions(const TQMap<TQString,TQString>& opts)
{
QString t = opts["job-hold-until"];
if (!t.isEmpty())
@@ -220,7 +220,7 @@ void KPSchedulePage::setOptions(const QMap<QString,QString>& opts)
else if (t == "third-shift") item = 7;
else
{
- QTime qt = QTime::fromString(t);
+ QTime qt = TQTime::fromString(t);
m_tedit->setTime(qt.addSecs(-3600 * m_gmtdiff));
item = 8;
}
@@ -243,7 +243,7 @@ void KPSchedulePage::setOptions(const QMap<QString,QString>& opts)
m_priority->setValue(val);
}
-void KPSchedulePage::getOptions(QMap<QString,QString>& opts, bool incldef)
+void KPSchedulePage::getOptions(TQMap<TQString,TQString>& opts, bool incldef)
{
if (incldef || m_time->currentItem() != 0)
{
@@ -269,7 +269,7 @@ void KPSchedulePage::getOptions(QMap<QString,QString>& opts, bool incldef)
if (incldef || !m_pagelabel->text().isEmpty())
opts["page-label"] = "\"" + m_pagelabel->text() + "\"";
if (incldef || m_priority->value() != 50)
- opts["job-priority"] = QString::number(m_priority->value());
+ opts["job-priority"] = TQString::number(m_priority->value());
}
void KPSchedulePage::slotTimeChanged()
diff --git a/kdeprint/cups/kpschedulepage.h b/kdeprint/cups/kpschedulepage.h
index b8a5946fe..5753747c9 100644
--- a/kdeprint/cups/kpschedulepage.h
+++ b/kdeprint/cups/kpschedulepage.h
@@ -31,12 +31,12 @@ class KPSchedulePage : public KPrintDialogPage
{
Q_OBJECT
public:
- KPSchedulePage(QWidget *parent = 0, const char *name = 0);
+ KPSchedulePage(TQWidget *parent = 0, const char *name = 0);
~KPSchedulePage();
- void getOptions(QMap<QString,QString>& opts, bool incldef = false);
- void setOptions(const QMap<QString,QString>& opts);
- bool isValid(QString& msg);
+ void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false);
+ void setOptions(const TQMap<TQString,TQString>& opts);
+ bool isValid(TQString& msg);
protected slots:
void slotTimeChanged();
diff --git a/kdeprint/cups/kptagspage.cpp b/kdeprint/cups/kptagspage.cpp
index ec7e451b7..7a1fd0924 100644
--- a/kdeprint/cups/kptagspage.cpp
+++ b/kdeprint/cups/kptagspage.cpp
@@ -19,21 +19,21 @@
#include "kptagspage.h"
-#include <qtable.h>
-#include <qheader.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qregexp.h>
-#include <qwhatsthis.h>
+#include <tqtable.h>
+#include <tqheader.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqregexp.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
-KPTagsPage::KPTagsPage(bool ro, QWidget *parent, const char *name)
+KPTagsPage::KPTagsPage(bool ro, TQWidget *parent, const char *name)
: KPrintDialogPage(parent, name)
{
//WhatsThis strings.... (added by pfeifle@kde.org)
- QString whatsThisAdditionalTagsTable = i18n(" <qt><p><b>Additional Tags</b></p>"
+ TQString whatsThisAdditionalTagsTable = i18n(" <qt><p><b>Additional Tags</b></p>"
" You may send additional commands to the CUPS server via this editable list. "
" There are 3 purposes for this:"
" <ul>"
@@ -77,19 +77,19 @@ KPTagsPage::KPTagsPage(bool ro, QWidget *parent, const char *name)
setTitle(i18n("Additional Tags"));
setOnlyRealPrinters(true);
- m_tags = new QTable(10, 2, this);
+ m_tags = new TQTable(10, 2, this);
m_tags->horizontalHeader()->setStretchEnabled(true);
m_tags->horizontalHeader()->setLabel(0, i18n("Name"));
m_tags->horizontalHeader()->setLabel(1, i18n("Value"));
m_tags->setReadOnly(ro);
- QWhatsThis::add(m_tags, whatsThisAdditionalTagsTable);
+ TQWhatsThis::add(m_tags, whatsThisAdditionalTagsTable);
- QVBoxLayout *l0 = new QVBoxLayout(this, 0, 5);
+ QVBoxLayout *l0 = new TQVBoxLayout(this, 0, 5);
l0->addWidget(m_tags);
if (ro)
{
- QLabel *lab = new QLabel(i18n("Read-Only"), this);
+ QLabel *lab = new TQLabel(i18n("Read-Only"), this);
QFont f = lab->font();
f.setBold(true);
lab->setFont(f);
@@ -102,7 +102,7 @@ KPTagsPage::~KPTagsPage()
{
}
-bool KPTagsPage::isValid(QString& msg)
+bool KPTagsPage::isValid(TQString& msg)
{
QRegExp re("\\s");
for (int r=0; r<m_tags->numCols(); r++)
@@ -119,11 +119,11 @@ bool KPTagsPage::isValid(QString& msg)
return true;
}
-void KPTagsPage::setOptions(const QMap<QString,QString>& opts)
+void KPTagsPage::setOptions(const TQMap<TQString,TQString>& opts)
{
int r(0);
QRegExp re("^\"|\"$");
- for (QMap<QString,QString>::ConstIterator it=opts.begin(); it!=opts.end() && r<m_tags->numRows(); ++it)
+ for (TQMap<TQString,TQString>::ConstIterator it=opts.begin(); it!=opts.end() && r<m_tags->numRows(); ++it)
{
if (it.key().startsWith("KDEPrint-"))
{
@@ -135,12 +135,12 @@ void KPTagsPage::setOptions(const QMap<QString,QString>& opts)
}
for (; r<m_tags->numRows(); r++)
{
- m_tags->setText(r, 0, QString::null);
- m_tags->setText(r, 1, QString::null);
+ m_tags->setText(r, 0, TQString::null);
+ m_tags->setText(r, 1, TQString::null);
}
}
-void KPTagsPage::getOptions(QMap<QString,QString>& opts, bool)
+void KPTagsPage::getOptions(TQMap<TQString,TQString>& opts, bool)
{
for (int r=0; r<m_tags->numRows(); r++)
{
@@ -153,12 +153,12 @@ void KPTagsPage::getOptions(QMap<QString,QString>& opts, bool)
}
}
-QSize KPTagsPage::sizeHint() const
+TQSize KPTagsPage::sizeHint() const
{
- return QSize(-1, -1);
+ return TQSize(-1, -1);
}
-QSize KPTagsPage::minimumSizeHint() const
+TQSize KPTagsPage::minimumSizeHint() const
{
- return QSize(-1, -1);
+ return TQSize(-1, -1);
}
diff --git a/kdeprint/cups/kptagspage.h b/kdeprint/cups/kptagspage.h
index 2dd55c8d8..800f7ddc6 100644
--- a/kdeprint/cups/kptagspage.h
+++ b/kdeprint/cups/kptagspage.h
@@ -27,15 +27,15 @@ class QTable;
class KPTagsPage : public KPrintDialogPage
{
public:
- KPTagsPage(bool ro = false, QWidget *parent = 0, const char *name = 0);
+ KPTagsPage(bool ro = false, TQWidget *parent = 0, const char *name = 0);
~KPTagsPage();
- void getOptions(QMap<QString,QString>& opts, bool incldef = false);
- void setOptions(const QMap<QString,QString>& opts);
- bool isValid(QString& msg);
+ void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false);
+ void setOptions(const TQMap<TQString,TQString>& opts);
+ bool isValid(TQString& msg);
- QSize sizeHint() const;
- QSize minimumSizeHint() const;
+ TQSize sizeHint() const;
+ TQSize minimumSizeHint() const;
private:
QTable *m_tags;
diff --git a/kdeprint/cups/kptextpage.cpp b/kdeprint/cups/kptextpage.cpp
index b896606e0..75fc838cc 100644
--- a/kdeprint/cups/kptextpage.cpp
+++ b/kdeprint/cups/kptextpage.cpp
@@ -22,23 +22,23 @@
#include "driver.h"
#include "kprinter.h"
-#include <qbuttongroup.h>
-#include <qgroupbox.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qradiobutton.h>
-#include <qwhatsthis.h>
+#include <tqbuttongroup.h>
+#include <tqgroupbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqradiobutton.h>
+#include <tqwhatsthis.h>
#include <knuminput.h>
#include <klocale.h>
#include <kiconloader.h>
#include <kseparator.h>
#include <kdebug.h>
-KPTextPage::KPTextPage(DrMain *driver, QWidget *parent, const char *name)
+KPTextPage::KPTextPage(DrMain *driver, TQWidget *parent, const char *name)
: KPrintDialogPage(0, driver, parent, name)
{
//WhatsThis strings.... (added by pfeifle@kde.org)
- QString whatsThisCPITextPage = i18n( " <qt> "
+ TQString whatsThisCPITextPage = i18n( " <qt> "
" <p><b>Characters Per Inch</b></p> "
" <p>This setting controls the horizontal size of characters when printing a text file. </p>"
" <p>The default value is 10, meaning that the font is scaled in a way that 10 characters "
@@ -52,7 +52,7 @@ KPTextPage::KPTextPage(DrMain *driver, QWidget *parent, const char *name)
" </p> "
" </qt>" );
- QString whatsThisLPITextPage = i18n( " <qt> "
+ TQString whatsThisLPITextPage = i18n( " <qt> "
" <p><b>Lines Per Inch</b></p> "
" <p>This setting controls the vertical size of characters when printing a text file. </p>"
" <p>The default value is 6, meaning that the font is scaled in a way that 6 lines "
@@ -66,7 +66,7 @@ KPTextPage::KPTextPage(DrMain *driver, QWidget *parent, const char *name)
" </p> "
" </qt>" );
- QString whatsThisColumnsTextPage = i18n( " <qt> "
+ TQString whatsThisColumnsTextPage = i18n( " <qt> "
" <p><b>Columns</b></p> "
" <p>This setting controls how many columns of text will be printed on each page when."
" printing text files. </p> "
@@ -81,10 +81,10 @@ KPTextPage::KPTextPage(DrMain *driver, QWidget *parent, const char *name)
" </p> "
" </qt>" );
- QString whatsThisPrettyprintPreviewIconTextPage = i18n( " <qt> "
+ TQString whatsThisPrettyprintPreviewIconTextPage = i18n( " <qt> "
" Preview icon changes when you turn on or off prettyprint. "
" </qt>" );
- QString whatsThisFormatTextPage = i18n( " <qt> "
+ TQString whatsThisFormatTextPage = i18n( " <qt> "
" <p><b>Text Formats</b></p> "
" <p>These settings control the appearance of text on printouts. They are only valid for "
" printing text files or input directly through kprinter. </p> "
@@ -105,7 +105,7 @@ KPTextPage::KPTextPage(DrMain *driver, QWidget *parent, const char *name)
" </p> "
" </qt>" );
- QString whatsThisMarginsTextPage = i18n( " <qt> "
+ TQString whatsThisMarginsTextPage = i18n( " <qt> "
" <p><b>Margins</b></p> "
" <p>These settings control the margins of printouts on the paper. They are not valid for "
" jobs originating from applications which define their own page layout internally and "
@@ -131,7 +131,7 @@ KPTextPage::KPTextPage(DrMain *driver, QWidget *parent, const char *name)
" </p> "
" </qt>" );
- QString whatsThisPrettyprintButtonOnTextPage = i18n( " <qt> "
+ TQString whatsThisPrettyprintButtonOnTextPage = i18n( " <qt> "
" <p><b>Turn Text Printing with Syntax Highlighting (Prettyprint) On!</b></p> "
" <p>ASCII text file printouts can be 'prettyfied' by enabling this option. If you do so, "
" a header is printed at the top of each page. The header contains "
@@ -150,7 +150,7 @@ KPTextPage::KPTextPage(DrMain *driver, QWidget *parent, const char *name)
" </p> "
" </qt>" );
- QString whatsThisPrettyprintButtonOffTextPage = i18n( " <qt> "
+ TQString whatsThisPrettyprintButtonOffTextPage = i18n( " <qt> "
" <p><b>Turn Text Printing with Syntax Highlighting (Prettyprint) Off! </b></p> "
" <p>ASCII text file printing with this option turned off are appearing without a page "
" header and without syntax highlighting. (You can still set the page margins, though.) </p> "
@@ -164,7 +164,7 @@ KPTextPage::KPTextPage(DrMain *driver, QWidget *parent, const char *name)
" </p> "
" </qt>" );
- QString whatsThisPrettyprintFrameTextPage = i18n( " <qt> "
+ TQString whatsThisPrettyprintFrameTextPage = i18n( " <qt> "
" <p><b>Print Text with Syntax Highlighting (Prettyprint)</b></p> "
" <p>ASCII file printouts can be 'prettyfied' by enabling this option. If you do so, "
" a header is printed at the top of each page. The header contains "
@@ -188,61 +188,61 @@ KPTextPage::KPTextPage(DrMain *driver, QWidget *parent, const char *name)
setTitle(i18n("Text"));
m_block = false;
- QGroupBox *formatbox = new QGroupBox(0, Qt::Vertical, i18n("Text Format"), this);
- QWhatsThis::add(formatbox, whatsThisFormatTextPage);
- QGroupBox *prettybox = new QGroupBox(0, Qt::Vertical, i18n("Syntax Highlighting"), this);
- QWhatsThis::add(prettybox, whatsThisPrettyprintFrameTextPage);
- QGroupBox *marginbox = new QGroupBox(0, Qt::Vertical, i18n("Margins"), this);
- QWhatsThis::add(marginbox, whatsThisMarginsTextPage);
+ QGroupBox *formatbox = new TQGroupBox(0, Qt::Vertical, i18n("Text Format"), this);
+ TQWhatsThis::add(formatbox, whatsThisFormatTextPage);
+ QGroupBox *prettybox = new TQGroupBox(0, Qt::Vertical, i18n("Syntax Highlighting"), this);
+ TQWhatsThis::add(prettybox, whatsThisPrettyprintFrameTextPage);
+ QGroupBox *marginbox = new TQGroupBox(0, Qt::Vertical, i18n("Margins"), this);
+ TQWhatsThis::add(marginbox, whatsThisMarginsTextPage);
m_cpi = new KIntNumInput(10, formatbox);
- QWhatsThis::add(m_cpi, whatsThisCPITextPage);
+ TQWhatsThis::add(m_cpi, whatsThisCPITextPage);
m_cpi->setLabel(i18n("&Chars per inch:"), Qt::AlignLeft|Qt::AlignVCenter);
m_cpi->setRange(1, 999, 1, false);
m_lpi = new KIntNumInput(m_cpi, 6, formatbox);
- QWhatsThis::add(m_lpi, whatsThisLPITextPage);
+ TQWhatsThis::add(m_lpi, whatsThisLPITextPage);
m_lpi->setLabel(i18n("&Lines per inch:"), Qt::AlignLeft|Qt::AlignVCenter);
m_lpi->setRange(1, 999, 1, false);
m_columns = new KIntNumInput(m_lpi, 1, formatbox);
- QWhatsThis::add(m_columns, whatsThisColumnsTextPage);
+ TQWhatsThis::add(m_columns, whatsThisColumnsTextPage);
m_columns->setLabel(i18n("C&olumns:"), Qt::AlignLeft|Qt::AlignVCenter);
m_columns->setRange(1, 10, 1, false);
KSeparator *sep = new KSeparator(Qt::Horizontal, formatbox);
- connect(m_columns, SIGNAL(valueChanged(int)), SLOT(slotColumnsChanged(int)));
+ connect(m_columns, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotColumnsChanged(int)));
- m_prettypix = new QLabel(prettybox);
- QWhatsThis::add(m_prettypix, whatsThisPrettyprintPreviewIconTextPage);
+ m_prettypix = new TQLabel(prettybox);
+ TQWhatsThis::add(m_prettypix, whatsThisPrettyprintPreviewIconTextPage);
m_prettypix->setAlignment(Qt::AlignCenter);
- QRadioButton *off = new QRadioButton(i18n("&Disabled"), prettybox);
- QWhatsThis::add(off, whatsThisPrettyprintButtonOffTextPage);
- QRadioButton *on = new QRadioButton(i18n("&Enabled"), prettybox);
- QWhatsThis::add(on, whatsThisPrettyprintButtonOnTextPage);
- m_prettyprint = new QButtonGroup(prettybox);
+ QRadioButton *off = new TQRadioButton(i18n("&Disabled"), prettybox);
+ TQWhatsThis::add(off, whatsThisPrettyprintButtonOffTextPage);
+ QRadioButton *on = new TQRadioButton(i18n("&Enabled"), prettybox);
+ TQWhatsThis::add(on, whatsThisPrettyprintButtonOnTextPage);
+ m_prettyprint = new TQButtonGroup(prettybox);
m_prettyprint->hide();
m_prettyprint->insert(off, 0);
m_prettyprint->insert(on, 1);
m_prettyprint->setButton(0);
- connect(m_prettyprint, SIGNAL(clicked(int)), SLOT(slotPrettyChanged(int)));
+ connect(m_prettyprint, TQT_SIGNAL(clicked(int)), TQT_SLOT(slotPrettyChanged(int)));
slotPrettyChanged(0);
m_margin = new MarginWidget(marginbox);
- QWhatsThis::add(m_margin, whatsThisMarginsTextPage);
+ TQWhatsThis::add(m_margin, whatsThisMarginsTextPage);
m_margin->setPageSize(595, 842);
- QGridLayout *l0 = new QGridLayout(this, 2, 2, 0, 10);
+ QGridLayout *l0 = new TQGridLayout(this, 2, 2, 0, 10);
l0->addWidget(formatbox, 0, 0);
l0->addWidget(prettybox, 0, 1);
l0->addMultiCellWidget(marginbox, 1, 1, 0, 1);
- QVBoxLayout *l1 = new QVBoxLayout(formatbox->layout(), 5);
+ QVBoxLayout *l1 = new TQVBoxLayout(formatbox->layout(), 5);
l1->addWidget(m_cpi);
l1->addWidget(m_lpi);
l1->addWidget(sep);
l1->addWidget(m_columns);
- QGridLayout *l2 = new QGridLayout(prettybox->layout(), 2, 2, 10);
+ QGridLayout *l2 = new TQGridLayout(prettybox->layout(), 2, 2, 10);
l2->addWidget(off, 0, 0);
l2->addWidget(on, 1, 0);
l2->addMultiCellWidget(m_prettypix, 0, 1, 1, 1);
- QVBoxLayout *l3 = new QVBoxLayout(marginbox->layout(), 10);
+ QVBoxLayout *l3 = new TQVBoxLayout(marginbox->layout(), 10);
l3->addWidget(m_margin);
}
@@ -250,7 +250,7 @@ KPTextPage::~KPTextPage()
{
}
-void KPTextPage::setOptions(const QMap<QString,QString>& opts)
+void KPTextPage::setOptions(const TQMap<TQString,TQString>& opts)
{
QString value;
@@ -296,22 +296,22 @@ void KPTextPage::setOptions(const QMap<QString,QString>& opts)
m_margin->setCustomEnabled(marginset);
}
-void KPTextPage::getOptions(QMap<QString,QString>& opts, bool incldef)
+void KPTextPage::getOptions(TQMap<TQString,TQString>& opts, bool incldef)
{
if (incldef || m_cpi->value() != 10)
- opts["cpi"] = QString::number(m_cpi->value());
+ opts["cpi"] = TQString::number(m_cpi->value());
if (incldef || m_lpi->value() != 6)
- opts["lpi"] = QString::number(m_lpi->value());
+ opts["lpi"] = TQString::number(m_lpi->value());
if (incldef || m_columns->value() != 1)
- opts["columns"] = QString::number(m_columns->value());
+ opts["columns"] = TQString::number(m_columns->value());
//if (m_margin->isCustomEnabled() || incldef)
if (m_margin->isCustomEnabled())
{
- opts["page-top"] = QString::number(( int )( m_margin->top()+0.5 ));
- opts["page-bottom"] = QString::number(( int )( m_margin->bottom()+0.5 ));
- opts["page-left"] = QString::number(( int )( m_margin->left()+0.5 ));
- opts["page-right"] = QString::number(( int )( m_margin->right()+0.5 ));
+ opts["page-top"] = TQString::number(( int )( m_margin->top()+0.5 ));
+ opts["page-bottom"] = TQString::number(( int )( m_margin->bottom()+0.5 ));
+ opts["page-left"] = TQString::number(( int )( m_margin->left()+0.5 ));
+ opts["page-right"] = TQString::number(( int )( m_margin->right()+0.5 ));
}
else
{
diff --git a/kdeprint/cups/kptextpage.h b/kdeprint/cups/kptextpage.h
index 72029f4af..b2550afa0 100644
--- a/kdeprint/cups/kptextpage.h
+++ b/kdeprint/cups/kptextpage.h
@@ -32,11 +32,11 @@ class KPTextPage : public KPrintDialogPage
{
Q_OBJECT
public:
- KPTextPage(DrMain *driver, QWidget *parent = 0, const char *name = 0);
+ KPTextPage(DrMain *driver, TQWidget *parent = 0, const char *name = 0);
~KPTextPage();
- void setOptions(const QMap<QString,QString>& opts);
- void getOptions(QMap<QString,QString>& opts, bool incldef = false);
+ void setOptions(const TQMap<TQString,TQString>& opts);
+ void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false);
protected slots:
void slotPrettyChanged(int);
diff --git a/kdeprint/driver.cpp b/kdeprint/driver.cpp
index c1e2b434d..ce411f0a4 100644
--- a/kdeprint/driver.cpp
+++ b/kdeprint/driver.cpp
@@ -20,8 +20,8 @@
#include "driver.h"
#include "driveritem.h"
-#include <qfile.h>
-#include <qstringlist.h>
+#include <tqfile.h>
+#include <tqstringlist.h>
#include <kdebug.h>
#include <klocale.h>
#include <stdlib.h>
@@ -40,17 +40,17 @@ DrBase::~DrBase()
{
}
-QString DrBase::valueText()
+TQString DrBase::valueText()
{
- return QString::null;
+ return TQString::null;
}
-QString DrBase::prettyText()
+TQString DrBase::prettyText()
{
return valueText();
}
-void DrBase::setValueText(const QString&)
+void DrBase::setValueText(const TQString&)
{
}
@@ -59,12 +59,12 @@ DriverItem* DrBase::createItem(DriverItem *parent, DriverItem *after)
return new DriverItem(parent, after, this);
}
-void DrBase::setOptions(const QMap<QString,QString>& opts)
+void DrBase::setOptions(const TQMap<TQString,TQString>& opts)
{
if (opts.contains(name())) setValueText(opts[name()]);
}
-void DrBase::getOptions(QMap<QString,QString>& opts, bool incldef)
+void DrBase::getOptions(TQMap<TQString,TQString>& opts, bool incldef)
{
QString val = valueText();
if ( incldef || get( "persistent" ) == "1" || get("default") != val )
@@ -109,10 +109,10 @@ DrMain::~DrMain()
{
// remove a possible temporary file
if (has("temporary"))
- QFile::remove(get("temporary"));
+ TQFile::remove(get("temporary"));
}
-DriverItem* DrMain::createTreeView(QListView *parent)
+DriverItem* DrMain::createTreeView(TQListView *parent)
{
DriverItem *root = new DriverItem(parent, this);
createTree(root);
@@ -123,7 +123,7 @@ int DrMain::checkConstraints()
{
int result(0);
clearConflict();
- QPtrListIterator<DrConstraint> it(m_constraints);
+ TQPtrListIterator<DrConstraint> it(m_constraints);
for (;it.current();++it)
if (it.current()->check(this))
result++;
@@ -135,7 +135,7 @@ void DrMain::addPageSize(DrPageSize *ps)
m_pagesizes.insert(ps->pageName(),ps);
}
-void DrMain::removeOptionGlobally(const QString& name)
+void DrMain::removeOptionGlobally(const TQString& name)
{
DrGroup *grp(0);
DrBase *opt = findOption(name, &grp);
@@ -159,9 +159,9 @@ void DrMain::removeGroupGlobally(DrGroup *grp)
}
}
-QMap<QString, DrBase*> DrMain::flatten()
+TQMap<TQString, DrBase*> DrMain::flatten()
{
- QMap<QString, DrBase*> optmap;
+ TQMap<TQString, DrBase*> optmap;
int index(0);
flattenGroup(optmap, index);
return optmap;
@@ -171,11 +171,11 @@ DrMain* DrMain::cloneDriver()
{
DrMain *driver = static_cast<DrMain*>(clone());
- QPtrListIterator<DrConstraint> cit(m_constraints);
+ TQPtrListIterator<DrConstraint> cit(m_constraints);
for (; cit.current(); ++cit)
driver->addConstraint(new DrConstraint(*(cit.current())));
- QDictIterator<DrPageSize> pit(m_pagesizes);
+ TQDictIterator<DrPageSize> pit(m_pagesizes);
for (; pit.current(); ++pit)
driver->addPageSize(new DrPageSize(*(pit.current())));
@@ -222,7 +222,7 @@ void DrGroup::addObject(DrBase *optgrp)
addGroup(static_cast<DrGroup*>(optgrp));
}
-void DrGroup::removeOption(const QString& name)
+void DrGroup::removeOption(const TQString& name)
{
DrBase *opt = m_options.find(name);
if (opt)
@@ -253,21 +253,21 @@ void DrGroup::createTree(DriverItem *parent)
{
DriverItem *item(0);
- QPtrListIterator<DrGroup> lit(m_subgroups);
+ TQPtrListIterator<DrGroup> lit(m_subgroups);
for (;lit.current();++lit)
item = lit.current()->createItem(parent, item);
- QPtrListIterator<DrBase> dit(m_listoptions);
+ TQPtrListIterator<DrBase> dit(m_listoptions);
for (;dit.current();++dit)
item = dit.current()->createItem(parent, item);
}
-DrBase* DrGroup::findOption(const QString& name, DrGroup **parentGroup)
+DrBase* DrGroup::findOption(const TQString& name, DrGroup **parentGroup)
{
DrBase *opt = m_options.find(name);
if (!opt)
{
- QPtrListIterator<DrGroup> it(m_subgroups);
+ TQPtrListIterator<DrGroup> it(m_subgroups);
for (;it.current() && !opt; ++it)
opt = it.current()->findOption(name, parentGroup);
}
@@ -281,7 +281,7 @@ DrGroup* DrGroup::findGroup(DrGroup *grp, DrGroup ** parentGroup)
DrGroup *group = (m_subgroups.findRef(grp) == -1 ? 0 : grp);
if (!group)
{
- QPtrListIterator<DrGroup> it(m_subgroups);
+ TQPtrListIterator<DrGroup> it(m_subgroups);
for (;it.current() && !group; ++it)
group = it.current()->findGroup(grp, parentGroup);
}
@@ -292,49 +292,49 @@ DrGroup* DrGroup::findGroup(DrGroup *grp, DrGroup ** parentGroup)
void DrGroup::clearConflict()
{
- QDictIterator<DrBase> dit(m_options);
+ TQDictIterator<DrBase> dit(m_options);
for (;dit.current();++dit)
dit.current()->setConflict(false);
- QPtrListIterator<DrGroup> lit(m_subgroups);
+ TQPtrListIterator<DrGroup> lit(m_subgroups);
for (;lit.current();++lit)
lit.current()->clearConflict();
}
-void DrGroup::setOptions(const QMap<QString,QString>& opts)
+void DrGroup::setOptions(const TQMap<TQString,TQString>& opts)
{
- QDictIterator<DrBase> dit(m_options);
+ TQDictIterator<DrBase> dit(m_options);
for (;dit.current();++dit)
dit.current()->setOptions(opts);
- QPtrListIterator<DrGroup> lit(m_subgroups);
+ TQPtrListIterator<DrGroup> lit(m_subgroups);
for (;lit.current();++lit)
lit.current()->setOptions(opts);
}
-void DrGroup::getOptions(QMap<QString,QString>& opts, bool incldef)
+void DrGroup::getOptions(TQMap<TQString,TQString>& opts, bool incldef)
{
- QDictIterator<DrBase> dit(m_options);
+ TQDictIterator<DrBase> dit(m_options);
for (;dit.current();++dit)
dit.current()->getOptions(opts,incldef);
- QPtrListIterator<DrGroup> lit(m_subgroups);
+ TQPtrListIterator<DrGroup> lit(m_subgroups);
for (;lit.current();++lit)
lit.current()->getOptions(opts,incldef);
}
-void DrGroup::flattenGroup(QMap<QString, DrBase*>& optmap, int& index)
+void DrGroup::flattenGroup(TQMap<TQString, DrBase*>& optmap, int& index)
{
- QPtrListIterator<DrGroup> git(m_subgroups);
+ TQPtrListIterator<DrGroup> git(m_subgroups);
for (; git.current(); ++git)
git.current()->flattenGroup(optmap, index);
- QDictIterator<DrBase> oit(m_options);
+ TQDictIterator<DrBase> oit(m_options);
for (; oit.current(); ++oit)
optmap[oit.current()->name()] = oit.current();
if (name().isEmpty())
- optmap[QString::fromLatin1("group%1").arg(index++)] = this;
+ optmap[TQString::fromLatin1("group%1").arg(index++)] = this;
else
optmap[name()] = this;
@@ -351,20 +351,20 @@ DrBase* DrGroup::clone()
{
DrGroup *grp = static_cast<DrGroup*>(DrBase::clone());
- QPtrListIterator<DrGroup> git(m_subgroups);
+ TQPtrListIterator<DrGroup> git(m_subgroups);
for (; git.current(); ++git)
grp->addGroup(static_cast<DrGroup*>(git.current()->clone()));
- QPtrListIterator<DrBase> oit(m_listoptions);
+ TQPtrListIterator<DrBase> oit(m_listoptions);
for (; oit.current(); ++oit)
grp->addOption(oit.current()->clone());
return static_cast<DrBase*>(grp);
}
-QString DrGroup::groupForOption( const QString& optname )
+TQString DrGroup::groupForOption( const TQString& optname )
{
- QString grpname;
+ TQString grpname;
if ( optname == "PageSize" ||
optname == "InputSlot" ||
optname == "ManualFeed" ||
@@ -424,12 +424,12 @@ DrStringOption::~DrStringOption()
{
}
-QString DrStringOption::valueText()
+TQString DrStringOption::valueText()
{
return m_value;
}
-void DrStringOption::setValueText(const QString& s)
+void DrStringOption::setValueText(const TQString& s)
{
m_value = s;
}
@@ -451,25 +451,25 @@ DrIntegerOption::~DrIntegerOption()
{
}
-QString DrIntegerOption::valueText()
+TQString DrIntegerOption::valueText()
{
- QString s = QString::number(m_value);
+ QString s = TQString::number(m_value);
return s;
}
-void DrIntegerOption::setValueText(const QString& s)
+void DrIntegerOption::setValueText(const TQString& s)
{
m_value = s.toInt();
}
-QString DrIntegerOption::fixedVal()
+TQString DrIntegerOption::fixedVal()
{
- QStringList vals = QStringList::split("|", get("fixedvals"), false);
+ QStringList vals = TQStringList::split("|", get("fixedvals"), false);
if (vals.count() == 0)
return valueText();
int d(0);
QString val;
- for (QStringList::Iterator it=vals.begin(); it!=vals.end(); ++it)
+ for (TQStringList::Iterator it=vals.begin(); it!=vals.end(); ++it)
{
int thisVal = (*it).toInt();
if (val.isEmpty() || abs(thisVal - m_value) < d)
@@ -501,25 +501,25 @@ DrFloatOption::~DrFloatOption()
{
}
-QString DrFloatOption::valueText()
+TQString DrFloatOption::valueText()
{
- QString s = QString::number(m_value,'f',3);
+ QString s = TQString::number(m_value,'f',3);
return s;
}
-void DrFloatOption::setValueText(const QString& s)
+void DrFloatOption::setValueText(const TQString& s)
{
m_value = s.toFloat();
}
-QString DrFloatOption::fixedVal()
+TQString DrFloatOption::fixedVal()
{
- QStringList vals = QStringList::split("|", get("fixedvals"), false);
+ QStringList vals = TQStringList::split("|", get("fixedvals"), false);
if (vals.count() == 0)
return valueText();
float d(0);
QString val;
- for (QStringList::Iterator it=vals.begin(); it!=vals.end(); ++it)
+ for (TQStringList::Iterator it=vals.begin(); it!=vals.end(); ++it)
{
float thisVal = (*it).toFloat();
if (val.isEmpty() || fabs(thisVal - m_value) < d)
@@ -551,21 +551,21 @@ DrListOption::~DrListOption()
{
}
-QString DrListOption::valueText()
+TQString DrListOption::valueText()
{
- QString s = (m_current ? m_current->name() : QString::null);
+ QString s = (m_current ? m_current->name() : TQString::null);
return s;
}
-QString DrListOption::prettyText()
+TQString DrListOption::prettyText()
{
if (m_current)
return m_current->get("text");
else
- return QString::null;
+ return TQString::null;
}
-void DrListOption::setValueText(const QString& s)
+void DrListOption::setValueText(const TQString& s)
{
m_current = findChoice(s);
if (!m_current)
@@ -577,9 +577,9 @@ void DrListOption::setValueText(const QString& s)
}
}
-DrBase* DrListOption::findChoice(const QString& txt)
+DrBase* DrListOption::findChoice(const TQString& txt)
{
- QPtrListIterator<DrBase> it(m_choices);
+ TQPtrListIterator<DrBase> it(m_choices);
for (;it.current();++it)
if (it.current()->name() == txt)
return it.current();
@@ -590,7 +590,7 @@ DrBase* DrListOption::clone()
{
DrListOption *opt = static_cast<DrListOption*>(DrBase::clone());
- QPtrListIterator<DrBase> it(m_choices);
+ TQPtrListIterator<DrBase> it(m_choices);
for (; it.current(); ++it)
opt->addChoice(it.current()->clone());
@@ -599,14 +599,14 @@ DrBase* DrListOption::clone()
return static_cast<DrBase*>(opt);
}
-void DrListOption::getOptions(QMap<QString,QString>& opts, bool incldef)
+void DrListOption::getOptions(TQMap<TQString,TQString>& opts, bool incldef)
{
DrBase::getOptions(opts, incldef);
if (currentChoice() && currentChoice()->type() == DrBase::ChoiceGroup)
currentChoice()->getOptions(opts, incldef);
}
-void DrListOption::setOptions(const QMap<QString,QString>& opts)
+void DrListOption::setOptions(const TQMap<TQString,TQString>& opts)
{
DrBase::setOptions(opts);
if (currentChoice() && currentChoice()->type() == DrBase::ChoiceGroup)
@@ -635,7 +635,7 @@ void DrListOption::setChoice(int choicenum)
* DrConstraint members *
************************/
-DrConstraint::DrConstraint(const QString& o1, const QString& o2, const QString& c1, const QString& c2)
+DrConstraint::DrConstraint(const TQString& o1, const TQString& o2, const TQString& c1, const TQString& c2)
: m_opt1(o1), m_opt2(o2), m_choice1(c1), m_choice2(c2), m_option1(0), m_option2(0)
{
}
@@ -676,7 +676,7 @@ bool DrConstraint::check(DrMain *driver)
* DrPageSize members *
**********************/
-DrPageSize::DrPageSize(const QString& s, float width, float height, float left, float bottom, float right, float top)
+DrPageSize::DrPageSize(const TQString& s, float width, float height, float left, float bottom, float right, float top)
: m_name(s),
m_width( width ),
m_height( height ),
@@ -698,17 +698,17 @@ DrPageSize::DrPageSize(const DrPageSize& d)
{
}
-QSize DrPageSize::pageSize() const
+TQSize DrPageSize::pageSize() const
{
- return QSize( ( int )m_width, ( int )m_height );
+ return TQSize( ( int )m_width, ( int )m_height );
}
-QRect DrPageSize::pageRect() const
+TQRect DrPageSize::pageRect() const
{
- return QRect( ( int )( m_left+0.5 ), ( int )( m_top+0.5 ), ( int )( m_width-m_left-m_right ), ( int )( m_height-m_top-m_bottom ) );
+ return TQRect( ( int )( m_left+0.5 ), ( int )( m_top+0.5 ), ( int )( m_width-m_left-m_right ), ( int )( m_height-m_top-m_bottom ) );
}
-QSize DrPageSize::margins() const
+TQSize DrPageSize::margins() const
{
- return QSize( ( int )( m_left+0.5 ), ( int )( m_top+0.5 ) );
+ return TQSize( ( int )( m_left+0.5 ), ( int )( m_top+0.5 ) );
}
diff --git a/kdeprint/driver.h b/kdeprint/driver.h
index 3bba797a8..f8102d175 100644
--- a/kdeprint/driver.h
+++ b/kdeprint/driver.h
@@ -25,12 +25,12 @@
#warning internal header, do not use except if you are a KDEPrint developer
#endif
-#include <qstring.h>
-#include <qptrlist.h>
-#include <qdict.h>
-#include <qmap.h>
-#include <qrect.h>
-#include <qsize.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
+#include <tqdict.h>
+#include <tqmap.h>
+#include <tqrect.h>
+#include <tqsize.h>
#include <kdelibs_export.h>
@@ -69,24 +69,24 @@ public:
Type type() const { return m_type; }
bool isOption() const { return (m_type >= DrBase::String); }
- const QString& get(const QString& key) const { return m_map[key]; }
- void set(const QString& key, const QString& val) { m_map[key] = val; }
- bool has(const QString& key) const { return m_map.contains(key); }
- const QString& name() const { return m_name; }
- void setName(const QString& s) { m_name = s; }
+ const TQString& get(const TQString& key) const { return m_map[key]; }
+ void set(const TQString& key, const TQString& val) { m_map[key] = val; }
+ bool has(const TQString& key) const { return m_map.contains(key); }
+ const TQString& name() const { return m_name; }
+ void setName(const TQString& s) { m_name = s; }
bool conflict() const { return m_conflict; }
void setConflict(bool on) { m_conflict = on; }
- virtual QString valueText();
- virtual QString prettyText();
- virtual void setValueText(const QString&);
+ virtual TQString valueText();
+ virtual TQString prettyText();
+ virtual void setValueText(const TQString&);
virtual DriverItem* createItem(DriverItem *parent, DriverItem *after = 0);
- virtual void setOptions(const QMap<QString,QString>& opts);
- virtual void getOptions(QMap<QString,QString>& opts, bool incldef = false);
+ virtual void setOptions(const TQMap<TQString,TQString>& opts);
+ virtual void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false);
virtual DrBase* clone();
protected:
- QMap<QString,QString> m_map;
+ TQMap<TQString,TQString> m_map;
QString m_name; // used as a search key, better to have defined directly
Type m_type;
bool m_conflict;
@@ -113,30 +113,30 @@ public:
void addGroup(DrGroup *grp);
void addObject(DrBase *optgrp);
void clearConflict();
- void removeOption(const QString& name);
+ void removeOption(const TQString& name);
void removeGroup(DrGroup *grp);
bool isEmpty();
virtual DriverItem* createItem(DriverItem *parent, DriverItem *after = 0);
- DrBase* findOption(const QString& name, DrGroup **parentGroup = 0);
+ DrBase* findOption(const TQString& name, DrGroup **parentGroup = 0);
DrGroup* findGroup(DrGroup *grp, DrGroup **parentGroup = 0);
- void setOptions(const QMap<QString,QString>& opts);
- void getOptions(QMap<QString,QString>& opts, bool incldef = false);
+ void setOptions(const TQMap<TQString,TQString>& opts);
+ void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false);
DrBase* clone();
- const QPtrList<DrGroup>& groups() { return m_subgroups; }
- const QPtrList<DrBase>& options() { return m_listoptions; }
+ const TQPtrList<DrGroup>& groups() { return m_subgroups; }
+ const TQPtrList<DrBase>& options() { return m_listoptions; }
- static QString groupForOption( const QString& optname );
+ static TQString groupForOption( const TQString& optname );
protected:
void createTree(DriverItem *parent);
- void flattenGroup(QMap<QString, DrBase*>&, int&);
+ void flattenGroup(TQMap<TQString, DrBase*>&, int&);
protected:
- QPtrList<DrGroup> m_subgroups;
- QDict<DrBase> m_options;
- QPtrList<DrBase> m_listoptions; // keep track of order of appearance
+ TQPtrList<DrGroup> m_subgroups;
+ TQDict<DrBase> m_options;
+ TQPtrList<DrBase> m_listoptions; // keep track of order of appearance
};
/*********************
@@ -156,19 +156,19 @@ public:
DrMain();
~DrMain();
- DriverItem* createTreeView(QListView *parent);
+ DriverItem* createTreeView(TQListView *parent);
void addConstraint(DrConstraint *c) { m_constraints.append(c); }
int checkConstraints();
- DrPageSize* findPageSize(const QString& name) { return m_pagesizes.find(name); }
+ DrPageSize* findPageSize(const TQString& name) { return m_pagesizes.find(name); }
void addPageSize(DrPageSize *sz);
- void removeOptionGlobally(const QString& name);
+ void removeOptionGlobally(const TQString& name);
void removeGroupGlobally(DrGroup *grp);
- QMap<QString, DrBase*> flatten();
+ TQMap<TQString, DrBase*> flatten();
DrMain* cloneDriver();
protected:
- QPtrList<DrConstraint> m_constraints;
- QDict<DrPageSize> m_pagesizes;
+ TQPtrList<DrConstraint> m_constraints;
+ TQDict<DrPageSize> m_pagesizes;
};
/**********************************************************
@@ -208,8 +208,8 @@ public:
DrStringOption();
~DrStringOption();
- virtual QString valueText();
- virtual void setValueText(const QString& s);
+ virtual TQString valueText();
+ virtual void setValueText(const TQString& s);
protected:
QString m_value;
@@ -232,9 +232,9 @@ public:
DrIntegerOption();
~DrIntegerOption();
- virtual QString valueText();
- virtual void setValueText(const QString& s);
- QString fixedVal();
+ virtual TQString valueText();
+ virtual void setValueText(const TQString& s);
+ TQString fixedVal();
protected:
int m_value;
@@ -257,9 +257,9 @@ public:
DrFloatOption();
~DrFloatOption();
- virtual QString valueText();
- virtual void setValueText(const QString& s);
- QString fixedVal();
+ virtual TQString valueText();
+ virtual void setValueText(const TQString& s);
+ TQString fixedVal();
protected:
float m_value;
@@ -283,21 +283,21 @@ public:
~DrListOption();
void addChoice(DrBase *ch) { m_choices.append(ch); }
- QPtrList<DrBase>* choices() { return &m_choices; }
+ TQPtrList<DrBase>* choices() { return &m_choices; }
DrBase* currentChoice() const { return m_current; }
- DrBase* findChoice(const QString& txt);
+ DrBase* findChoice(const TQString& txt);
void setChoice(int choicenum);
- virtual QString valueText();
- virtual QString prettyText();
- virtual void setValueText(const QString& s);
- void setOptions(const QMap<QString,QString>& opts);
- void getOptions(QMap<QString,QString>& opts, bool incldef = false);
+ virtual TQString valueText();
+ virtual TQString prettyText();
+ virtual void setValueText(const TQString& s);
+ void setOptions(const TQMap<TQString,TQString>& opts);
+ void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false);
DriverItem* createItem(DriverItem *parent, DriverItem *after = 0);
DrBase* clone();
protected:
- QPtrList<DrBase> m_choices;
+ TQPtrList<DrBase> m_choices;
DrBase *m_current;
};
@@ -330,7 +330,7 @@ public:
class DrConstraint
{
public:
- DrConstraint(const QString& o1, const QString& o2, const QString& c1 = QString::null, const QString& c2 = QString::null);
+ DrConstraint(const TQString& o1, const TQString& o2, const TQString& c1 = TQString::null, const TQString& c2 = TQString::null);
DrConstraint(const DrConstraint&);
bool check(DrMain*);
@@ -355,7 +355,7 @@ protected:
class DrPageSize
{
public:
- DrPageSize(const QString& s, float width, float height, float left, float bottom, float right, float top);
+ DrPageSize(const TQString& s, float width, float height, float left, float bottom, float right, float top);
DrPageSize(const DrPageSize&);
/**
@@ -369,11 +369,11 @@ public:
float rightMargin() const { return m_right; }
float topMargin() const { return m_top; }
float bottomMargin() const { return m_bottom; }
- QString pageName() const { return m_name; }
+ TQString pageName() const { return m_name; }
- QSize pageSize() const;
- QRect pageRect() const;
- QSize margins() const;
+ TQSize pageSize() const;
+ TQRect pageRect() const;
+ TQSize margins() const;
protected:
QString m_name;
diff --git a/kdeprint/driveritem.cpp b/kdeprint/driveritem.cpp
index 026c369a6..7bb1715aa 100644
--- a/kdeprint/driveritem.cpp
+++ b/kdeprint/driveritem.cpp
@@ -20,20 +20,20 @@
#include "driveritem.h"
#include "driver.h"
-#include <qpainter.h>
+#include <tqpainter.h>
#include <kiconloader.h>
#include <kdebug.h>
-DriverItem::DriverItem(QListView *parent, DrBase *item)
-: QListViewItem(parent), m_item(item), m_conflict(false)
+DriverItem::DriverItem(TQListView *parent, DrBase *item)
+: TQListViewItem(parent), m_item(item), m_conflict(false)
{
setOpen(depth() < 3);
setPixmap(0,SmallIcon("fileprint"));
updateText();
}
-DriverItem::DriverItem(QListViewItem *parent, QListViewItem *after, DrBase *item)
-: QListViewItem(parent, after), m_item(item), m_conflict(false)
+DriverItem::DriverItem(TQListViewItem *parent, TQListViewItem *after, DrBase *item)
+: TQListViewItem(parent, after), m_item(item), m_conflict(false)
{
setOpen(depth() < 3);
if (item) setPixmap(0,SmallIcon((item->isOption() ? "document" : "folder")));
@@ -46,7 +46,7 @@ void DriverItem::updateText()
{
QString s(m_item->get("text"));
if (m_item->isOption())
- s.append(QString::fromLatin1(": <%1>").arg(m_item->prettyText()));
+ s.append(TQString::fromLatin1(": <%1>").arg(m_item->prettyText()));
if (m_item->type() == DrBase::List)
{
// remove all children: something has changed (otherwise this
@@ -69,7 +69,7 @@ void DriverItem::updateText()
widthChanged();
}
-void DriverItem::paintCell(QPainter *p, const QColorGroup& cg, int, int width, int)
+void DriverItem::paintCell(TQPainter *p, const TQColorGroup& cg, int, int width, int)
{
// background
p->fillRect(0, 0, width, height(), cg.base());
@@ -107,7 +107,7 @@ void DriverItem::paintCell(QPainter *p, const QColorGroup& cg, int, int width, i
p->drawText(w,0,w1,height(),Qt::AlignLeft|Qt::AlignVCenter,s);
w += w1;
p->setPen(cg.text());
- s = QString::fromLatin1(">");
+ s = TQString::fromLatin1(">");
w1 = p->fontMetrics().width(s);
p->drawText(w,0,w1,height(),Qt::AlignLeft|Qt::AlignVCenter,s);
}
diff --git a/kdeprint/driveritem.h b/kdeprint/driveritem.h
index cb1227574..1d6fdcd4a 100644
--- a/kdeprint/driveritem.h
+++ b/kdeprint/driveritem.h
@@ -21,15 +21,15 @@
#ifndef DRIVERITEM_H
#define DRIVERITEM_H
-#include <qlistview.h>
+#include <tqlistview.h>
class DrBase;
class DriverItem : public QListViewItem
{
public:
- DriverItem(QListView *parent, DrBase *item);
- DriverItem(QListViewItem *parent, QListViewItem *after, DrBase *item);
+ DriverItem(TQListView *parent, DrBase *item);
+ DriverItem(TQListViewItem *parent, TQListViewItem *after, DrBase *item);
void updateText();
void updateTextRecursive();
@@ -37,7 +37,7 @@ public:
bool hasConflict() { return m_conflict; }
bool updateConflict();
- void paintCell(QPainter*, const QColorGroup&, int, int, int);
+ void paintCell(TQPainter*, const TQColorGroup&, int, int, int);
private:
DrBase *m_item;
diff --git a/kdeprint/driverview.cpp b/kdeprint/driverview.cpp
index 60fe0b26d..8b1ad67c7 100644
--- a/kdeprint/driverview.cpp
+++ b/kdeprint/driverview.cpp
@@ -22,29 +22,29 @@
#include "driveritem.h"
#include "driver.h"
-#include <qlistview.h>
-#include <qsplitter.h>
-#include <qheader.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
+#include <tqlistview.h>
+#include <tqsplitter.h>
+#include <tqheader.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
-DrListView::DrListView(QWidget *parent, const char *name)
+DrListView::DrListView(TQWidget *parent, const char *name)
: KListView(parent,name)
{
addColumn("");
header()->hide();
- setFrameStyle(QFrame::WinPanel|QFrame::Sunken);
+ setFrameStyle(TQFrame::WinPanel|TQFrame::Sunken);
setSorting(-1);
}
//****************************************************************************************************
-DriverView::DriverView(QWidget *parent, const char *name)
-: QWidget(parent,name)
+DriverView::DriverView(TQWidget *parent, const char *name)
+: TQWidget(parent,name)
{
//WhatsThis strings.... (added by pfeifle@kde.org)
- QString whatsThisPPDOptionsDriverPage = i18n( " <qt> "
+ TQString whatsThisPPDOptionsDriverPage = i18n( " <qt> "
" <b>List of Driver Options (from PPD)</b>. "
" <p>The upper pane of this dialog page contains all printjob options as laid "
" down in the printer's description file (PostScript Printer Description == 'PPD') </p>"
@@ -68,7 +68,7 @@ DriverView::DriverView(QWidget *parent, const char *name)
" in the kprinter dialog.</p> "
" </qt>" );
- QString whatsThisOptionSettingsDriverPage = i18n( " <qt> "
+ TQString whatsThisOptionSettingsDriverPage = i18n( " <qt> "
" <b>List of Possible Values for given Option (from PPD)</b>. "
" <p>The lower pane of this dialog page contains all possible values of the printoption "
" highlighted above, as laid "
@@ -94,19 +94,19 @@ DriverView::DriverView(QWidget *parent, const char *name)
m_driver = 0;
- QSplitter *splitter = new QSplitter(this);
- splitter->setOrientation(QSplitter::Vertical);
+ QSplitter *splitter = new TQSplitter(this);
+ splitter->setOrientation(TQSplitter::Vertical);
- QVBoxLayout *vbox = new QVBoxLayout(this, 0, 10);
+ TQVBoxLayout *vbox = new TQVBoxLayout(this, 0, 10);
vbox->addWidget(splitter);
m_view = new DrListView(splitter);
- QWhatsThis::add(m_view, whatsThisPPDOptionsDriverPage);
+ TQWhatsThis::add(m_view, whatsThisPPDOptionsDriverPage);
m_optview = new DrOptionView(splitter);
- QWhatsThis::add(m_optview, whatsThisOptionSettingsDriverPage);
+ TQWhatsThis::add(m_optview, whatsThisOptionSettingsDriverPage);
- connect(m_view,SIGNAL(selectionChanged(QListViewItem*)),m_optview,SLOT(slotItemSelected(QListViewItem*)));
- connect(m_optview,SIGNAL(changed()),SLOT(slotChanged()));
+ connect(m_view,TQT_SIGNAL(selectionChanged(TQListViewItem*)),m_optview,TQT_SLOT(slotItemSelected(TQListViewItem*)));
+ connect(m_optview,TQT_SIGNAL(changed()),TQT_SLOT(slotChanged()));
}
DriverView::~DriverView()
@@ -133,7 +133,7 @@ void DriverView::slotChanged()
}
}
-void DriverView::setOptions(const QMap<QString,QString>& opts)
+void DriverView::setOptions(const TQMap<TQString,TQString>& opts)
{
if (m_driver)
{
@@ -144,7 +144,7 @@ void DriverView::setOptions(const QMap<QString,QString>& opts)
}
}
-void DriverView::getOptions(QMap<QString,QString>& opts, bool incldef)
+void DriverView::getOptions(TQMap<TQString,TQString>& opts, bool incldef)
{
if (m_driver)
m_driver->getOptions(opts,incldef);
diff --git a/kdeprint/driverview.h b/kdeprint/driverview.h
index a35c3e14c..59f72133b 100644
--- a/kdeprint/driverview.h
+++ b/kdeprint/driverview.h
@@ -21,9 +21,9 @@
#ifndef DRIVERVIEW_H
#define DRIVERVIEW_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <klistview.h>
-#include <qmap.h>
+#include <tqmap.h>
#include <kdelibs_export.h>
@@ -33,19 +33,19 @@ class DrMain;
class KDEPRINT_EXPORT DrListView : public KListView
{
public:
- DrListView(QWidget *parent = 0, const char *name = 0);
+ DrListView(TQWidget *parent = 0, const char *name = 0);
};
class KDEPRINT_EXPORT DriverView : public QWidget
{
Q_OBJECT
public:
- DriverView(QWidget *parent = 0, const char *name = 0);
+ DriverView(TQWidget *parent = 0, const char *name = 0);
~DriverView();
void setDriver(DrMain*);
- void setOptions(const QMap<QString,QString>& opts);
- void getOptions(QMap<QString,QString>& opts, bool incldef = false);
+ void setOptions(const TQMap<TQString,TQString>& opts);
+ void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false);
void setAllowFixed(bool on);
bool hasConflict() const { return (m_conflict != 0); }
diff --git a/kdeprint/droptionview.cpp b/kdeprint/droptionview.cpp
index c8a91f4b9..f4ccedca4 100644
--- a/kdeprint/droptionview.cpp
+++ b/kdeprint/droptionview.cpp
@@ -22,22 +22,22 @@
#include "driveritem.h"
#include <math.h>
-#include <qlineedit.h>
-#include <qslider.h>
-#include <qlabel.h>
+#include <tqlineedit.h>
+#include <tqslider.h>
+#include <tqlabel.h>
#include <klistbox.h>
-#include <qvbuttongroup.h>
-#include <qradiobutton.h>
-#include <qwidgetstack.h>
-#include <qlayout.h>
-#include <qapplication.h>
+#include <tqvbuttongroup.h>
+#include <tqradiobutton.h>
+#include <tqwidgetstack.h>
+#include <tqlayout.h>
+#include <tqapplication.h>
#include <kcursor.h>
#include <kdialog.h>
#include <klocale.h>
-OptionBaseView::OptionBaseView(QWidget *parent, const char *name)
-: QWidget(parent,name)
+OptionBaseView::OptionBaseView(TQWidget *parent, const char *name)
+: TQWidget(parent,name)
{
blockSS = false;
}
@@ -46,27 +46,27 @@ void OptionBaseView::setOption(DrBase*)
{
}
-void OptionBaseView::setValue(const QString&)
+void OptionBaseView::setValue(const TQString&)
{
}
//******************************************************************************************************
-OptionNumericView::OptionNumericView(QWidget *parent, const char *name)
+OptionNumericView::OptionNumericView(TQWidget *parent, const char *name)
: OptionBaseView(parent,name)
{
- m_edit = new QLineEdit(this);
- m_slider = new QSlider(Qt::Horizontal,this);
- m_slider->setTickmarks(QSlider::Below);
- QLabel *lab = new QLabel(i18n("Value:"),this);
- m_minval = new QLabel(this);
- m_maxval = new QLabel(this);
+ m_edit = new TQLineEdit(this);
+ m_slider = new TQSlider(Qt::Horizontal,this);
+ m_slider->setTickmarks(TQSlider::Below);
+ QLabel *lab = new TQLabel(i18n("Value:"),this);
+ m_minval = new TQLabel(this);
+ m_maxval = new TQLabel(this);
m_integer = true;
- QVBoxLayout *main_ = new QVBoxLayout(this, 0, 10);
- QHBoxLayout *sub_ = new QHBoxLayout(0, 0, 10);
- QHBoxLayout *sub2_ = new QHBoxLayout(0, 0, 5);
+ QVBoxLayout *main_ = new TQVBoxLayout(this, 0, 10);
+ QHBoxLayout *sub_ = new TQHBoxLayout(0, 0, 10);
+ QHBoxLayout *sub2_ = new TQHBoxLayout(0, 0, 5);
main_->addStretch(1);
main_->addLayout(sub_,0);
main_->addLayout(sub2_,0);
@@ -78,8 +78,8 @@ OptionNumericView::OptionNumericView(QWidget *parent, const char *name)
sub2_->addWidget(m_slider,1);
sub2_->addWidget(m_maxval,0);
- connect(m_slider,SIGNAL(valueChanged(int)),SLOT(slotSliderChanged(int)));
- connect(m_edit,SIGNAL(textChanged(const QString&)),SLOT(slotEditChanged(const QString&)));
+ connect(m_slider,TQT_SIGNAL(valueChanged(int)),TQT_SLOT(slotSliderChanged(int)));
+ connect(m_edit,TQT_SIGNAL(textChanged(const TQString&)),TQT_SLOT(slotEditChanged(const TQString&)));
}
void OptionNumericView::setOption(DrBase *opt)
@@ -95,8 +95,8 @@ void OptionNumericView::setOption(DrBase *opt)
int max_ = opt->get("maxval").toInt();
m_slider->setRange(min_,max_);
m_slider->setSteps(1,QMAX((max_-min_)/20,1));
- m_minval->setText(QString::number(min_));
- m_maxval->setText(QString::number(max_));
+ m_minval->setText(TQString::number(min_));
+ m_maxval->setText(TQString::number(max_));
}
else
{
@@ -114,7 +114,7 @@ void OptionNumericView::setOption(DrBase *opt)
setValue(opt->valueText());
}
-void OptionNumericView::setValue(const QString& val)
+void OptionNumericView::setValue(const TQString& val)
{
m_edit->setText(val);
}
@@ -125,16 +125,16 @@ void OptionNumericView::slotSliderChanged(int value)
QString txt;
if (m_integer)
- txt = QString::number(value);
+ txt = TQString::number(value);
else
- txt = QString::number(float(value)/1000.0,'f',3);
+ txt = TQString::number(float(value)/1000.0,'f',3);
blockSS = true;
m_edit->setText(txt);
blockSS = false;
emit valueChanged(txt);
}
-void OptionNumericView::slotEditChanged(const QString& txt)
+void OptionNumericView::slotEditChanged(const TQString& txt)
{
if (blockSS) return;
@@ -154,25 +154,25 @@ void OptionNumericView::slotEditChanged(const QString& txt)
else
{
m_edit->selectAll();
- QApplication::beep();
+ TQApplication::beep();
}
}
//******************************************************************************************************
-OptionStringView::OptionStringView(QWidget *parent, const char *name)
+OptionStringView::OptionStringView(TQWidget *parent, const char *name)
: OptionBaseView(parent,name)
{
- m_edit = new QLineEdit(this);
- QLabel *lab = new QLabel(i18n("String value:"),this);
+ m_edit = new TQLineEdit(this);
+ QLabel *lab = new TQLabel(i18n("String value:"),this);
- QVBoxLayout *main_ = new QVBoxLayout(this, 0, 5);
+ QVBoxLayout *main_ = new TQVBoxLayout(this, 0, 5);
main_->addStretch(1);
main_->addWidget(lab,0);
main_->addWidget(m_edit,0);
main_->addStretch(1);
- connect(m_edit,SIGNAL(textChanged(const QString&)),SIGNAL(valueChanged(const QString&)));
+ connect(m_edit,TQT_SIGNAL(textChanged(const TQString&)),TQT_SIGNAL(valueChanged(const TQString&)));
}
void OptionStringView::setOption(DrBase *opt)
@@ -181,22 +181,22 @@ void OptionStringView::setOption(DrBase *opt)
m_edit->setText(opt->valueText());
}
-void OptionStringView::setValue(const QString& val)
+void OptionStringView::setValue(const TQString& val)
{
m_edit->setText(val);
}
//******************************************************************************************************
-OptionListView::OptionListView(QWidget *parent, const char *name)
+OptionListView::OptionListView(TQWidget *parent, const char *name)
: OptionBaseView(parent,name)
{
m_list = new KListBox(this);
- QVBoxLayout *main_ = new QVBoxLayout(this, 0, 10);
+ QVBoxLayout *main_ = new TQVBoxLayout(this, 0, 10);
main_->addWidget(m_list);
- connect(m_list,SIGNAL(selectionChanged()),SLOT(slotSelectionChanged()));
+ connect(m_list,TQT_SIGNAL(selectionChanged()),TQT_SLOT(slotSelectionChanged()));
}
void OptionListView::setOption(DrBase *opt)
@@ -206,7 +206,7 @@ void OptionListView::setOption(DrBase *opt)
blockSS = true;
m_list->clear();
m_choices.clear();
- QPtrListIterator<DrBase> it(*(((DrListOption*)opt)->choices()));
+ TQPtrListIterator<DrBase> it(*(((DrListOption*)opt)->choices()));
for (;it.current();++it)
{
m_list->insertItem(it.current()->get("text"));
@@ -217,7 +217,7 @@ void OptionListView::setOption(DrBase *opt)
}
}
-void OptionListView::setValue(const QString& val)
+void OptionListView::setValue(const TQString& val)
{
m_list->setCurrentItem(m_choices.findIndex(val));
}
@@ -232,28 +232,28 @@ void OptionListView::slotSelectionChanged()
//******************************************************************************************************
-OptionBooleanView::OptionBooleanView(QWidget *parent, const char *name)
+OptionBooleanView::OptionBooleanView(TQWidget *parent, const char *name)
: OptionBaseView(parent,name)
{
- m_group = new QVButtonGroup(this);
- m_group->setFrameStyle(QFrame::NoFrame);
+ m_group = new TQVButtonGroup(this);
+ m_group->setFrameStyle(TQFrame::NoFrame);
- QRadioButton *btn = new QRadioButton(m_group);
+ QRadioButton *btn = new TQRadioButton(m_group);
btn->setCursor(KCursor::handCursor());
- btn = new QRadioButton(m_group);
+ btn = new TQRadioButton(m_group);
btn->setCursor(KCursor::handCursor());
- QVBoxLayout *main_ = new QVBoxLayout(this, 0, 10);
+ QVBoxLayout *main_ = new TQVBoxLayout(this, 0, 10);
main_->addWidget(m_group);
- connect(m_group,SIGNAL(clicked(int)),SLOT(slotSelected(int)));
+ connect(m_group,TQT_SIGNAL(clicked(int)),TQT_SLOT(slotSelected(int)));
}
void OptionBooleanView::setOption(DrBase *opt)
{
if (opt->type() == DrBase::Boolean)
{
- QPtrListIterator<DrBase> it(*(((DrBooleanOption*)opt)->choices()));
+ TQPtrListIterator<DrBase> it(*(((DrBooleanOption*)opt)->choices()));
m_choices.clear();
m_group->find(0)->setText(it.toFirst()->get("text"));
m_choices.append(it.toFirst()->name());
@@ -263,7 +263,7 @@ void OptionBooleanView::setOption(DrBase *opt)
}
}
-void OptionBooleanView::setValue(const QString& val)
+void OptionBooleanView::setValue(const TQString& val)
{
int ID = m_choices.findIndex(val);
m_group->setButton(ID);
@@ -277,29 +277,29 @@ void OptionBooleanView::slotSelected(int ID)
//******************************************************************************************************
-DrOptionView::DrOptionView(QWidget *parent, const char *name)
-: QGroupBox(parent,name)
+DrOptionView::DrOptionView(TQWidget *parent, const char *name)
+: TQGroupBox(parent,name)
{
- m_stack = new QWidgetStack(this);
+ m_stack = new TQWidgetStack(this);
OptionBaseView *w = new OptionListView(m_stack);
- connect(w,SIGNAL(valueChanged(const QString&)),SLOT(slotValueChanged(const QString&)));
+ connect(w,TQT_SIGNAL(valueChanged(const TQString&)),TQT_SLOT(slotValueChanged(const TQString&)));
m_stack->addWidget(w,DrBase::List);
w = new OptionStringView(m_stack);
- connect(w,SIGNAL(valueChanged(const QString&)),SLOT(slotValueChanged(const QString&)));
+ connect(w,TQT_SIGNAL(valueChanged(const TQString&)),TQT_SLOT(slotValueChanged(const TQString&)));
m_stack->addWidget(w,DrBase::String);
w = new OptionNumericView(m_stack);
- connect(w,SIGNAL(valueChanged(const QString&)),SLOT(slotValueChanged(const QString&)));
+ connect(w,TQT_SIGNAL(valueChanged(const TQString&)),TQT_SLOT(slotValueChanged(const TQString&)));
m_stack->addWidget(w,DrBase::Integer);
w = new OptionBooleanView(m_stack);
- connect(w,SIGNAL(valueChanged(const QString&)),SLOT(slotValueChanged(const QString&)));
+ connect(w,TQT_SIGNAL(valueChanged(const TQString&)),TQT_SLOT(slotValueChanged(const TQString&)));
m_stack->addWidget(w,DrBase::Boolean);
w = new OptionBaseView(m_stack);
- connect(w,SIGNAL(valueChanged(const QString&)),SLOT(slotValueChanged(const QString&)));
+ connect(w,TQT_SIGNAL(valueChanged(const TQString&)),TQT_SLOT(slotValueChanged(const TQString&)));
m_stack->addWidget(w,0); // empty widget
m_stack->raiseWidget(w);
@@ -308,7 +308,7 @@ DrOptionView::DrOptionView(QWidget *parent, const char *name)
setColumnLayout(0, Qt::Vertical );
layout()->setSpacing( KDialog::spacingHint() );
layout()->setMargin( KDialog::marginHint() );
- QVBoxLayout *main_ = new QVBoxLayout(layout(), KDialog::marginHint());
+ QVBoxLayout *main_ = new TQVBoxLayout(layout(), KDialog::marginHint());
main_->addWidget(m_stack);
m_item = 0;
@@ -316,7 +316,7 @@ DrOptionView::DrOptionView(QWidget *parent, const char *name)
m_allowfixed = true;
}
-void DrOptionView::slotItemSelected(QListViewItem *i)
+void DrOptionView::slotItemSelected(TQListViewItem *i)
{
m_item = (DriverItem*)i;
if (m_item && !m_item->drItem()->isOption())
@@ -345,7 +345,7 @@ void DrOptionView::slotItemSelected(QListViewItem *i)
}
}
-void DrOptionView::slotValueChanged(const QString& val)
+void DrOptionView::slotValueChanged(const TQString& val)
{
if (m_item && m_item->drItem() && !m_block)
{
diff --git a/kdeprint/droptionview.h b/kdeprint/droptionview.h
index 4426f91c6..3a36b8510 100644
--- a/kdeprint/droptionview.h
+++ b/kdeprint/droptionview.h
@@ -20,9 +20,9 @@
#ifndef DROPTIONVIEW_H
#define DROPTIONVIEW_H
-#include <qwidget.h>
-#include <qgroupbox.h>
-#include <qstringlist.h>
+#include <tqwidget.h>
+#include <tqgroupbox.h>
+#include <tqstringlist.h>
class QLineEdit;
class QSlider;
@@ -39,12 +39,12 @@ class OptionBaseView : public QWidget
{
Q_OBJECT
public:
- OptionBaseView(QWidget *parent = 0, const char *name = 0);
+ OptionBaseView(TQWidget *parent = 0, const char *name = 0);
virtual void setOption(DrBase*);
- virtual void setValue(const QString&);
+ virtual void setValue(const TQString&);
signals:
- void valueChanged(const QString&);
+ void valueChanged(const TQString&);
protected:
bool blockSS;
@@ -54,13 +54,13 @@ class OptionNumericView : public OptionBaseView
{
Q_OBJECT
public:
- OptionNumericView(QWidget *parent = 0, const char *name = 0);
+ OptionNumericView(TQWidget *parent = 0, const char *name = 0);
void setOption(DrBase *opt);
- void setValue(const QString& val);
+ void setValue(const TQString& val);
protected slots:
void slotSliderChanged(int);
- void slotEditChanged(const QString&);
+ void slotEditChanged(const TQString&);
private:
QLineEdit *m_edit;
@@ -72,9 +72,9 @@ private:
class OptionStringView : public OptionBaseView
{
public:
- OptionStringView(QWidget *parent = 0, const char *name = 0);
+ OptionStringView(TQWidget *parent = 0, const char *name = 0);
void setOption(DrBase *opt);
- void setValue(const QString& val);
+ void setValue(const TQString& val);
private:
QLineEdit *m_edit;
@@ -84,9 +84,9 @@ class OptionListView : public OptionBaseView
{
Q_OBJECT
public:
- OptionListView(QWidget *parent = 0, const char *name = 0);
+ OptionListView(TQWidget *parent = 0, const char *name = 0);
void setOption(DrBase *opt);
- void setValue(const QString& val);
+ void setValue(const TQString& val);
protected slots:
void slotSelectionChanged();
@@ -100,9 +100,9 @@ class OptionBooleanView : public OptionBaseView
{
Q_OBJECT
public:
- OptionBooleanView(QWidget *parent = 0, const char *name = 0);
+ OptionBooleanView(TQWidget *parent = 0, const char *name = 0);
void setOption(DrBase *opt);
- void setValue(const QString& val);
+ void setValue(const TQString& val);
protected slots:
void slotSelected(int);
@@ -116,15 +116,15 @@ class DrOptionView : public QGroupBox
{
Q_OBJECT
public:
- DrOptionView(QWidget *parent = 0, const char *name = 0);
+ DrOptionView(TQWidget *parent = 0, const char *name = 0);
void setAllowFixed(bool on) { m_allowfixed = on; }
signals:
void changed();
public slots:
- void slotValueChanged(const QString&);
- void slotItemSelected(QListViewItem*);
+ void slotValueChanged(const TQString&);
+ void slotItemSelected(TQListViewItem*);
private:
QWidgetStack *m_stack;
diff --git a/kdeprint/ext/kextprinterimpl.cpp b/kdeprint/ext/kextprinterimpl.cpp
index 09dc74832..c92657497 100644
--- a/kdeprint/ext/kextprinterimpl.cpp
+++ b/kdeprint/ext/kextprinterimpl.cpp
@@ -20,12 +20,12 @@
#include "kextprinterimpl.h"
#include "kprinter.h"
-#include <qfile.h>
+#include <tqfile.h>
#include <kstandarddirs.h>
#include <kconfig.h>
#include <klocale.h>
-KExtPrinterImpl::KExtPrinterImpl(QObject *parent, const char *name, const QStringList & /*args*/)
+KExtPrinterImpl::KExtPrinterImpl(TQObject *parent, const char *name, const TQStringList & /*args*/)
: KPrinterImpl(parent,name)
{
}
@@ -36,10 +36,10 @@ KExtPrinterImpl::~KExtPrinterImpl()
void KExtPrinterImpl::preparePrinting(KPrinter *printer)
{
- printer->setOption("kde-qtcopies",QString::number(printer->numCopies()));
+ printer->setOption("kde-qtcopies",TQString::number(printer->numCopies()));
}
-bool KExtPrinterImpl::setupCommand(QString& cmd, KPrinter *printer)
+bool KExtPrinterImpl::setupCommand(TQString& cmd, KPrinter *printer)
{
cmd = printer->option("kde-printcommand").stripWhiteSpace();
if (cmd.isEmpty())
diff --git a/kdeprint/ext/kextprinterimpl.h b/kdeprint/ext/kextprinterimpl.h
index b73c6d1c9..653593592 100644
--- a/kdeprint/ext/kextprinterimpl.h
+++ b/kdeprint/ext/kextprinterimpl.h
@@ -25,11 +25,11 @@
class KExtPrinterImpl : public KPrinterImpl
{
public:
- KExtPrinterImpl(QObject *parent, const char *name, const QStringList & /*args*/);
+ KExtPrinterImpl(TQObject *parent, const char *name, const TQStringList & /*args*/);
~KExtPrinterImpl();
void preparePrinting(KPrinter*);
- bool setupCommand(QString&, KPrinter*);
+ bool setupCommand(TQString&, KPrinter*);
};
#endif
diff --git a/kdeprint/ext/kmextmanager.cpp b/kdeprint/ext/kmextmanager.cpp
index 94e126e09..017142a14 100644
--- a/kdeprint/ext/kmextmanager.cpp
+++ b/kdeprint/ext/kmextmanager.cpp
@@ -22,7 +22,7 @@
#include <klocale.h>
-KMExtManager::KMExtManager(QObject *parent, const char *name, const QStringList & /*args*/)
+KMExtManager::KMExtManager(TQObject *parent, const char *name, const TQStringList & /*args*/)
: KMManager(parent,name)
{
setHasManagement(false);
diff --git a/kdeprint/ext/kmextmanager.h b/kdeprint/ext/kmextmanager.h
index 56094acee..8811f952d 100644
--- a/kdeprint/ext/kmextmanager.h
+++ b/kdeprint/ext/kmextmanager.h
@@ -21,13 +21,13 @@
#define KMEXTMANAGER_H
#include "kmmanager.h"
-#include <qdict.h>
-#include <qdatetime.h>
+#include <tqdict.h>
+#include <tqdatetime.h>
class KMExtManager : public KMManager
{
public:
- KMExtManager(QObject *parent, const char *name, const QStringList & /*args*/);
+ KMExtManager(TQObject *parent, const char *name, const TQStringList & /*args*/);
~KMExtManager();
protected:
diff --git a/kdeprint/ext/kmextuimanager.cpp b/kdeprint/ext/kmextuimanager.cpp
index 55981231b..ea698b8cd 100644
--- a/kdeprint/ext/kmextuimanager.cpp
+++ b/kdeprint/ext/kmextuimanager.cpp
@@ -23,7 +23,7 @@
#include <klocale.h>
-KMExtUiManager::KMExtUiManager(QObject *parent, const char *name, const QStringList & /*args*/)
+KMExtUiManager::KMExtUiManager(TQObject *parent, const char *name, const TQStringList & /*args*/)
: KMUiManager(parent,name)
{
m_printdialogflags |= KMUiManager::PrintCommand;
diff --git a/kdeprint/ext/kmextuimanager.h b/kdeprint/ext/kmextuimanager.h
index daf31a406..671d8e76b 100644
--- a/kdeprint/ext/kmextuimanager.h
+++ b/kdeprint/ext/kmextuimanager.h
@@ -25,7 +25,7 @@
class KMExtUiManager : public KMUiManager
{
public:
- KMExtUiManager(QObject *parent, const char *name, const QStringList & /*args*/);
+ KMExtUiManager(TQObject *parent, const char *name, const TQStringList & /*args*/);
~KMExtUiManager();
int pluginPageCap();
diff --git a/kdeprint/foomatic/kfoomaticprinterimpl.cpp b/kdeprint/foomatic/kfoomaticprinterimpl.cpp
index e476b5581..b72fbd191 100644
--- a/kdeprint/foomatic/kfoomaticprinterimpl.cpp
+++ b/kdeprint/foomatic/kfoomaticprinterimpl.cpp
@@ -23,7 +23,7 @@
#include <kstandarddirs.h>
#include <klocale.h>
-KFoomaticPrinterImpl::KFoomaticPrinterImpl(QObject *parent, const char *name, const QStringList & /*args*/)
+KFoomaticPrinterImpl::KFoomaticPrinterImpl(TQObject *parent, const char *name, const TQStringList & /*args*/)
: KPrinterImpl(parent,name)
{
}
@@ -33,18 +33,18 @@ KFoomaticPrinterImpl::~KFoomaticPrinterImpl()
}
// look for executable
-QString KFoomaticPrinterImpl::executable()
+TQString KFoomaticPrinterImpl::executable()
{
QString exe = KStandardDirs::findExe("foomatic-printjob");
return exe;
}
-bool KFoomaticPrinterImpl::setupCommand(QString& cmd, KPrinter *printer)
+bool KFoomaticPrinterImpl::setupCommand(TQString& cmd, KPrinter *printer)
{
QString exe = executable();
if (!exe.isEmpty())
{
- cmd = exe + QString::fromLatin1(" -P %1 -# %2").arg(quote(printer->printerName())).arg(printer->numCopies());
+ cmd = exe + TQString::fromLatin1(" -P %1 -# %2").arg(quote(printer->printerName())).arg(printer->numCopies());
return true;
}
else
diff --git a/kdeprint/foomatic/kfoomaticprinterimpl.h b/kdeprint/foomatic/kfoomaticprinterimpl.h
index 7d0699b58..74dfdc8f4 100644
--- a/kdeprint/foomatic/kfoomaticprinterimpl.h
+++ b/kdeprint/foomatic/kfoomaticprinterimpl.h
@@ -25,13 +25,13 @@
class KFoomaticPrinterImpl : public KPrinterImpl
{
public:
- KFoomaticPrinterImpl(QObject *parent, const char *name, const QStringList & /*args*/);
+ KFoomaticPrinterImpl(TQObject *parent, const char *name, const TQStringList & /*args*/);
~KFoomaticPrinterImpl();
- bool setupCommand(QString&, KPrinter*);
+ bool setupCommand(TQString&, KPrinter*);
protected:
- QString executable();
+ TQString executable();
};
#endif
diff --git a/kdeprint/foomatic/kmfoomaticmanager.cpp b/kdeprint/foomatic/kmfoomaticmanager.cpp
index 33be966b9..57edf07c9 100644
--- a/kdeprint/foomatic/kmfoomaticmanager.cpp
+++ b/kdeprint/foomatic/kmfoomaticmanager.cpp
@@ -21,14 +21,14 @@
#include "kpipeprocess.h"
#include "driver.h"
-#include <qdom.h>
+#include <tqdom.h>
#include <klocale.h>
#include <kdebug.h>
#include <kprocess.h>
#include <unistd.h>
-KMFoomaticManager::KMFoomaticManager(QObject *parent, const char *name, const QStringList & /*args*/)
+KMFoomaticManager::KMFoomaticManager(TQObject *parent, const char *name, const TQStringList & /*args*/)
: KMManager(parent,name)
{
setHasManagement(getuid() == 0);
@@ -87,7 +87,7 @@ DrMain* KMFoomaticManager::loadPrinterDriver(KMPrinter *printer, bool)
return createDriverFromXML(&docElem);
}
-KMPrinter* KMFoomaticManager::createPrinterFromElement(QDomElement *elem)
+KMPrinter* KMFoomaticManager::createPrinterFromElement(TQDomElement *elem)
{
QDomElement e = elem->namedItem("name").toElement();
if (!e.isNull())
@@ -128,7 +128,7 @@ KMPrinter* KMFoomaticManager::createPrinterFromElement(QDomElement *elem)
return NULL;
}
-DrMain* KMFoomaticManager::createDriverFromXML(QDomElement *elem)
+DrMain* KMFoomaticManager::createDriverFromXML(TQDomElement *elem)
{
DrMain *driver = new DrMain();
QDomElement pelem = elem->namedItem("printer").toElement(), delem = elem->namedItem("driver").toElement();
@@ -136,7 +136,7 @@ DrMain* KMFoomaticManager::createDriverFromXML(QDomElement *elem)
{
driver->set("manufacturer", pelem.namedItem("make").toElement().text());
driver->set("model", pelem.namedItem("model").toElement().text());
- QString s = QString::fromLatin1("%1 %2 (%3)").arg(driver->get("manufacturer")).arg(driver->get("model")).arg(delem.namedItem("name").toElement().text());
+ QString s = TQString::fromLatin1("%1 %2 (%3)").arg(driver->get("manufacturer")).arg(driver->get("model")).arg(delem.namedItem("name").toElement().text());
driver->set("description", s);
driver->set("text", s);
diff --git a/kdeprint/foomatic/kmfoomaticmanager.h b/kdeprint/foomatic/kmfoomaticmanager.h
index b5d18fc0c..65fa0067e 100644
--- a/kdeprint/foomatic/kmfoomaticmanager.h
+++ b/kdeprint/foomatic/kmfoomaticmanager.h
@@ -28,15 +28,15 @@ class KMPrinter;
class KMFoomaticManager : public KMManager
{
public:
- KMFoomaticManager(QObject *parent, const char *name, const QStringList & /*args*/);
+ KMFoomaticManager(TQObject *parent, const char *name, const TQStringList & /*args*/);
virtual ~KMFoomaticManager();
DrMain* loadPrinterDriver(KMPrinter *p, bool config = false);
protected:
void listPrinters();
- KMPrinter* createPrinterFromElement(QDomElement*);
- DrMain* createDriverFromXML(QDomElement*);
+ KMPrinter* createPrinterFromElement(TQDomElement*);
+ DrMain* createDriverFromXML(TQDomElement*);
};
#endif
diff --git a/kdeprint/foomatic2loader.cpp b/kdeprint/foomatic2loader.cpp
index 4fdd990ce..4ca1464dd 100644
--- a/kdeprint/foomatic2loader.cpp
+++ b/kdeprint/foomatic2loader.cpp
@@ -20,13 +20,13 @@
#include "foomatic2loader.h"
#include "driver.h"
-#include <qfile.h>
-#include <qregexp.h>
-#include <qbuffer.h>
+#include <tqfile.h>
+#include <tqregexp.h>
+#include <tqbuffer.h>
#include <kdebug.h>
#include <klocale.h>
-void kdeprint_foomatic2scanner_init( QIODevice* );
+void kdeprint_foomatic2scanner_init( TQIODevice* );
void kdeprint_foomatic2scanner_terminate();
Foomatic2Loader::Foomatic2Loader()
@@ -37,7 +37,7 @@ Foomatic2Loader::~Foomatic2Loader()
{
}
-bool Foomatic2Loader::read( QIODevice *d )
+bool Foomatic2Loader::read( TQIODevice *d )
{
bool result = true;
m_foodata.clear();
@@ -48,26 +48,26 @@ bool Foomatic2Loader::read( QIODevice *d )
return result;
}
-bool Foomatic2Loader::readFromFile( const QString& filename )
+bool Foomatic2Loader::readFromFile( const TQString& filename )
{
- QFile f( filename );
+ TQFile f( filename );
m_foodata.clear();
if ( f.open( IO_ReadOnly ) )
return read( &f );
return false;
}
-bool Foomatic2Loader::readFromBuffer( const QString& buffer )
+bool Foomatic2Loader::readFromBuffer( const TQString& buffer )
{
- QCString buf = buffer.utf8();
- QBuffer d( buf );
+ TQCString buf = buffer.utf8();
+ TQBuffer d( buf );
m_foodata.clear();
if ( d.open( IO_ReadOnly ) )
return read( &d );
return false;
}
-DrBase* Foomatic2Loader::createValue( const QString& name, const QMap<QString,QVariant>& m ) const
+DrBase* Foomatic2Loader::createValue( const TQString& name, const TQMap<TQString,TQVariant>& m ) const
{
DrBase *choice = new DrBase;
choice->setName( name );
@@ -75,18 +75,18 @@ DrBase* Foomatic2Loader::createValue( const QString& name, const QMap<QString,QV
return choice;
}
-DrBase* Foomatic2Loader::createOption( const QMap<QString,QVariant>& m ) const
+DrBase* Foomatic2Loader::createOption( const TQMap<TQString,TQVariant>& m ) const
{
- QString type = m.operator[]( "type" ).toString();
+ TQString type = m.operator[]( "type" ).toString();
DrBase *opt = NULL;
if ( type == "enum" )
{
DrListOption *lopt = new DrListOption;
- QVariant a = m.operator[]( "vals_byname" );
- QMap<QString,QVariant>::ConstIterator it = a.mapBegin();
+ TQVariant a = m.operator[]( "vals_byname" );
+ TQMap<TQString,TQVariant>::ConstIterator it = a.mapBegin();
for ( ; it!=a.mapEnd(); ++it )
{
- if ( it.data().type() != QVariant::Map )
+ if ( it.data().type() != TQVariant::Map )
continue;
DrBase *ch = createValue( it.key(), it.data().toMap() );
if ( ch )
@@ -126,7 +126,7 @@ DrBase* Foomatic2Loader::createOption( const QMap<QString,QVariant>& m ) const
{
opt->setName( m.operator[]( "name" ).toString() );
opt->set( "text", m.operator[]( "comment" ).toString() );
- QString defval = m.operator[]( "default" ).toString();
+ TQString defval = m.operator[]( "default" ).toString();
if ( !defval.isEmpty() )
{
opt->setValueText( defval );
@@ -141,30 +141,30 @@ DrMain* Foomatic2Loader::buildDriver() const
if ( m_foodata.isEmpty() )
return NULL;
- QVariant v = m_foodata.find( "VAR" ).data();
- if ( !v.isNull() && v.type() == QVariant::Map )
+ TQVariant v = m_foodata.find( "VAR" ).data();
+ if ( !v.isNull() && v.type() == TQVariant::Map )
{
DrMain *driver = new DrMain;
- QMap<QString,DrGroup*> groups;
+ TQMap<TQString,DrGroup*> groups;
driver->set( "manufacturer", v.mapFind( "make" ).data().toString() );
driver->set( "model", v.mapFind( "model" ).data().toString() );
driver->set( "matic_printer", v.mapFind( "id" ).data().toString() );
driver->set( "matic_driver", v.mapFind( "driver" ).data().toString() );
- driver->set( "text", QString( "%1 %2 (%3)" ).arg( driver->get( "manufacturer" ) ).arg( driver->get( "model" ) ).arg( driver->get( "matic_driver" ) ) );
+ driver->set( "text", TQString( "%1 %2 (%3)" ).arg( driver->get( "manufacturer" ) ).arg( driver->get( "model" ) ).arg( driver->get( "matic_driver" ) ) );
if ( m_foodata.contains( "POSTPIPE" ) )
driver->set( "postpipe", m_foodata.find( "POSTPIPE" ).data().toString() );
v = v.mapFind( "args" ).data();
- if ( !v.isNull() && v.type() == QVariant::List )
+ if ( !v.isNull() && v.type() == TQVariant::List )
{
- QValueList<QVariant>::ConstIterator it = v.listBegin();
+ TQValueList<TQVariant>::ConstIterator it = v.listBegin();
for ( ; it!=v.listEnd(); ++it )
{
- if ( ( *it ).type() != QVariant::Map )
+ if ( ( *it ).type() != TQVariant::Map )
continue;
DrBase *opt = createOption( ( *it ).toMap() );
if ( opt )
{
- QString group = DrGroup::groupForOption( opt->name() );
+ TQString group = DrGroup::groupForOption( opt->name() );
DrGroup *grp = NULL;
if ( !groups.contains( group ) )
{
@@ -179,14 +179,14 @@ DrMain* Foomatic2Loader::buildDriver() const
if ( opt->name() == "PageSize" )
{
// try to add the corresponding page sizes
- QVariant choices = ( *it ).mapFind( "vals_byname" ).data();
- QRegExp re( "(\\d+) +(\\d+)" );
- if ( choices.type() == QVariant::Map )
+ TQVariant choices = ( *it ).mapFind( "vals_byname" ).data();
+ TQRegExp re( "(\\d+) +(\\d+)" );
+ if ( choices.type() == TQVariant::Map )
{
- QMap<QString,QVariant>::ConstIterator it = choices.mapBegin();
+ TQMap<TQString,TQVariant>::ConstIterator it = choices.mapBegin();
for ( ; it!=choices.mapEnd(); ++it )
{
- QString driverval = ( *it ).mapFind( "driverval" ).data().toString();
+ TQString driverval = ( *it ).mapFind( "driverval" ).data().toString();
if ( re.exactMatch( driverval ) )
{
driver->addPageSize( new DrPageSize( it.key(), re.cap( 1 ).toInt(), re.cap( 2 ).toInt(), 36, 24, 36, 24 ) );
@@ -208,19 +208,19 @@ DrMain* Foomatic2Loader::modifyDriver( DrMain *driver ) const
{
if ( !m_foodata.isEmpty() )
{
- QValueList<DrBase*> optList;
+ TQValueList<DrBase*> optList;
DrGroup *grp = NULL;
- QVariant V = m_foodata.find( "VAR" ).data();
- if ( !V.isNull() && V.type() == QVariant::Map )
+ TQVariant V = m_foodata.find( "VAR" ).data();
+ if ( !V.isNull() && V.type() == TQVariant::Map )
{
- QVariant v = V.mapFind( "args" ).data();
- if ( !v.isNull() && v.type() == QVariant::List )
+ TQVariant v = V.mapFind( "args" ).data();
+ if ( !v.isNull() && v.type() == TQVariant::List )
{
- QValueList<QVariant>::ConstIterator it = v.listBegin();
+ TQValueList<TQVariant>::ConstIterator it = v.listBegin();
for ( ; it!=v.listEnd(); ++it )
{
- if ( ( *it ).type() != QVariant::Map )
+ if ( ( *it ).type() != TQVariant::Map )
continue;
DrBase *opt = createOption( ( *it ).toMap() );
if ( opt )
@@ -232,12 +232,12 @@ DrMain* Foomatic2Loader::modifyDriver( DrMain *driver ) const
else
{
v = V.mapFind( "args_byname" ).data();
- if ( !v.isNull() && v.type() == QVariant::Map )
+ if ( !v.isNull() && v.type() == TQVariant::Map )
{
- QMap<QString,QVariant>::ConstIterator it = v.mapBegin();
+ TQMap<TQString,TQVariant>::ConstIterator it = v.mapBegin();
for ( ; it!=v.mapEnd(); ++it )
{
- if ( ( *it ).type() != QVariant::Map )
+ if ( ( *it ).type() != TQVariant::Map )
continue;
DrBase *opt = createOption( ( *it ).toMap() );
if ( opt )
@@ -249,7 +249,7 @@ DrMain* Foomatic2Loader::modifyDriver( DrMain *driver ) const
}
}
- for ( QValueList<DrBase*>::ConstIterator it=optList.begin(); it!=optList.end(); ++it )
+ for ( TQValueList<DrBase*>::ConstIterator it=optList.begin(); it!=optList.end(); ++it )
{
DrBase *opt = ( *it );
if ( opt )
@@ -271,8 +271,8 @@ DrMain* Foomatic2Loader::modifyDriver( DrMain *driver ) const
DrBase *oldOpt = driver->findOption( opt->name() );
if ( oldOpt && oldOpt->type() == DrBase::List )
{
- QPtrListIterator<DrBase> it( *( static_cast<DrListOption*>( oldOpt )->choices() ) );
- QString fixedvals;
+ TQPtrListIterator<DrBase> it( *( static_cast<DrListOption*>( oldOpt )->choices() ) );
+ TQString fixedvals;
for ( ; it.current(); ++it )
{
fixedvals.append( it.current()->name() );
@@ -292,7 +292,7 @@ DrMain* Foomatic2Loader::modifyDriver( DrMain *driver ) const
return driver;
}
-DrMain* Foomatic2Loader::loadDriver( const QString& filename )
+DrMain* Foomatic2Loader::loadDriver( const TQString& filename )
{
Foomatic2Loader loader;
if ( loader.readFromFile( filename ) )
diff --git a/kdeprint/foomatic2loader.h b/kdeprint/foomatic2loader.h
index 2456ff693..3559bfd73 100644
--- a/kdeprint/foomatic2loader.h
+++ b/kdeprint/foomatic2loader.h
@@ -20,7 +20,7 @@
#ifndef FOOMATIC2LOADER_H
#define FOOMATIC2LOADER_H
-#include <qvariant.h>
+#include <tqvariant.h>
#include <kdelibs_export.h>
@@ -33,24 +33,24 @@ public:
Foomatic2Loader();
~Foomatic2Loader();
- bool read( QIODevice *d );
- bool readFromBuffer( const QString& buffer );
- bool readFromFile( const QString& filename );
- QMap<QString,QVariant> data() const;
+ bool read( TQIODevice *d );
+ bool readFromBuffer( const TQString& buffer );
+ bool readFromFile( const TQString& filename );
+ TQMap<TQString,TQVariant> data() const;
DrMain* buildDriver() const;
DrMain* modifyDriver( DrMain* ) const;
- static DrMain* loadDriver( const QString& filename );
+ static DrMain* loadDriver( const TQString& filename );
private:
- QMap<QString,QVariant> m_foodata;
+ TQMap<TQString,TQVariant> m_foodata;
friend int kdeprint_foomatic2parse( void* );
- DrBase* createValue( const QString&, const QMap<QString,QVariant>& ) const;
- DrBase* createOption( const QMap<QString,QVariant>& ) const;
+ DrBase* createValue( const TQString&, const TQMap<TQString,TQVariant>& ) const;
+ DrBase* createOption( const TQMap<TQString,TQVariant>& ) const;
};
-inline QMap<QString,QVariant> Foomatic2Loader::data() const
+inline TQMap<TQString,TQVariant> Foomatic2Loader::data() const
{ return m_foodata; }
#endif /* FOOMATIC2LOADER_H */
diff --git a/kdeprint/fooparser.cpp b/kdeprint/fooparser.cpp
index f434e79b3..329f80ca5 100644
--- a/kdeprint/fooparser.cpp
+++ b/kdeprint/fooparser.cpp
@@ -44,7 +44,7 @@
#define YYDEBUG 1
#include <stdlib.h>
-#include <qvariant.h>
+#include <tqvariant.h>
#include "foomatic2loader.h"
void yyerror(const char*) {}
@@ -737,7 +737,7 @@ case 5:
break;}
case 6:
#line 51 "./fooparser.y"
-{ QMap<QString,QVariant>::ConstIterator it = yyvsp[0].mapBegin(); yyvsp[-2].asMap().insert(it.key(), it.data()); yyval = yyvsp[-2]; ;
+{ TQMap<TQString,TQVariant>::ConstIterator it = yyvsp[0].mapBegin(); yyvsp[-2].asMap().insert(it.key(), it.data()); yyval = yyvsp[-2]; ;
break;}
case 7:
#line 54 "./fooparser.y"
@@ -753,7 +753,7 @@ case 9:
break;}
case 10:
#line 61 "./fooparser.y"
-{ yyval = QVariant(); ;
+{ yyval = TQVariant(); ;
break;}
case 11:
#line 62 "./fooparser.y"
@@ -773,11 +773,11 @@ case 14:
break;}
case 15:
#line 66 "./fooparser.y"
-{ yyval = QVariant(); ;
+{ yyval = TQVariant(); ;
break;}
case 16:
#line 67 "./fooparser.y"
-{ yyval = QVariant(); ;
+{ yyval = TQVariant(); ;
break;}
}
/* the action file gets copied in in place of this dollarsign */
diff --git a/kdeprint/fooscanner.cpp b/kdeprint/fooscanner.cpp
index f67b2f186..cab7426ab 100644
--- a/kdeprint/fooscanner.cpp
+++ b/kdeprint/fooscanner.cpp
@@ -444,8 +444,8 @@ char *yytext;
* Boston, MA 02110-1301, USA.
**/
-#include <qvariant.h>
-#include <qiodevice.h>
+#include <tqvariant.h>
+#include <tqiodevice.h>
#define YYSTYPE QVariant
#include "fooparser.cpp.h"
@@ -463,7 +463,7 @@ char *yytext;
result = 0; \
}
-QIODevice* kdeprint_foomatic2scanner_device = NULL;
+TQIODevice* kdeprint_foomatic2scanner_device = NULL;
#line 468 "./fooscanner.cpp"
/* Macros after this point can all be overridden by user definitions in
@@ -776,12 +776,12 @@ YY_RULE_SETUP
case 14:
YY_RULE_SETUP
#line 64 "./fooscanner.l"
-{ yylval = QCString(yytext+1, strlen(yytext)-1); return STRING; }
+{ yylval = TQCString(yytext+1, strlen(yytext)-1); return STRING; }
YY_BREAK
case 15:
YY_RULE_SETUP
#line 65 "./fooscanner.l"
-{ yylval = QCString(yytext+1, strlen(yytext)-1); return QUOTED; }
+{ yylval = TQCString(yytext+1, strlen(yytext)-1); return QUOTED; }
YY_BREAK
case 16:
YY_RULE_SETUP
@@ -1696,7 +1696,7 @@ int main()
#line 73 "./fooscanner.l"
-void kdeprint_foomatic2scanner_init( QIODevice *d )
+void kdeprint_foomatic2scanner_init( TQIODevice *d )
{
kdeprint_foomatic2scanner_device = d;
}
diff --git a/kdeprint/kdeprintcheck.cpp b/kdeprint/kdeprintcheck.cpp
index 9e9cccac4..5c807ae9b 100644
--- a/kdeprint/kdeprintcheck.cpp
+++ b/kdeprint/kdeprintcheck.cpp
@@ -41,7 +41,7 @@
#include <kstandarddirs.h>
#include <kdebug.h>
#include <kextsock.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <unistd.h>
static const char* const config_stddirs[] = {
@@ -53,7 +53,7 @@ static const char* const config_stddirs[] = {
0
};
-bool KdeprintChecker::check(KConfig *conf, const QString& group)
+bool KdeprintChecker::check(KConfig *conf, const TQString& group)
{
if (!group.isEmpty())
conf->setGroup(group);
@@ -61,10 +61,10 @@ bool KdeprintChecker::check(KConfig *conf, const QString& group)
return check(uris);
}
-bool KdeprintChecker::check(const QStringList& uris)
+bool KdeprintChecker::check(const TQStringList& uris)
{
bool state(true);
- for (QStringList::ConstIterator it=uris.begin(); it!=uris.end() && state; ++it)
+ for (TQStringList::ConstIterator it=uris.begin(); it!=uris.end() && state; ++it)
{
state = (state && checkURL(KURL(*it)));
// kdDebug( 500 ) << "auto-detection uri=" << *it << ", state=" << state << endl;
@@ -101,8 +101,8 @@ bool KdeprintChecker::checkConfig(const KURL& url)
const char* const *p = config_stddirs;
while (*p)
{
- // kdDebug( 500 ) << "checkConfig() with " << QString::fromLatin1( *p ) + f << endl;
- if ( QFile::exists( QString::fromLatin1( *p ) + f ) )
+ // kdDebug( 500 ) << "checkConfig() with " << TQString::fromLatin1( *p ) + f << endl;
+ if ( TQFile::exists( TQString::fromLatin1( *p ) + f ) )
{
state = true;
break;
diff --git a/kdeprint/kdeprintcheck.h b/kdeprint/kdeprintcheck.h
index c188c9f3a..f538dc2a4 100644
--- a/kdeprint/kdeprintcheck.h
+++ b/kdeprint/kdeprintcheck.h
@@ -20,16 +20,16 @@
#ifndef KDEPRINTCHECK_H
#define KDEPRINTCHECK_H
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <kconfig.h>
#include <kurl.h>
class KDEPRINT_EXPORT KdeprintChecker
{
public:
- static bool check(KConfig *conf, const QString& group = QString::null);
- static bool check(const QStringList& uris);
+ static bool check(KConfig *conf, const TQString& group = TQString::null);
+ static bool check(const TQStringList& uris);
private:
static bool checkURL(const KURL&);
diff --git a/kdeprint/kdeprintd.cpp b/kdeprint/kdeprintd.cpp
index 3506b6469..198147463 100644
--- a/kdeprint/kdeprintd.cpp
+++ b/kdeprint/kdeprintd.cpp
@@ -20,7 +20,7 @@
#include "kdeprintd.h"
#include "kprintprocess.h"
-#include <qfile.h>
+#include <tqfile.h>
#include <klocale.h>
#include <knotifyclient.h>
#include <kmessagebox.h>
@@ -28,21 +28,21 @@
#include <dcopclient.h>
#include <kio/passdlg.h>
#include <kio/authinfo.h>
-#include <qlabel.h>
+#include <tqlabel.h>
#include <kpushbutton.h>
#include <kiconloader.h>
#include <kstandarddirs.h>
#include <kwin.h>
#include <kapplication.h>
-#include <qlayout.h>
-#include <qtimer.h>
-#include <qregexp.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
+#include <tqregexp.h>
#include <unistd.h>
extern "C"
{
- KDE_EXPORT KDEDModule *create_kdeprintd(const QCString& name)
+ KDE_EXPORT KDEDModule *create_kdeprintd(const TQCString& name)
{
return new KDEPrintd(name);
}
@@ -52,7 +52,7 @@ class StatusWindow : public QWidget
{
public:
StatusWindow(int pid = -1);
- void setMessage(const QString&);
+ void setMessage(const TQString&);
int pid() const { return m_pid; }
private:
@@ -63,31 +63,31 @@ private:
};
StatusWindow::StatusWindow(int pid)
-: QWidget(NULL, "StatusWindow", WType_TopLevel|WStyle_DialogBorder|WStyle_StaysOnTop|WDestructiveClose), m_pid(pid)
+: TQWidget(NULL, "StatusWindow", WType_TopLevel|WStyle_DialogBorder|WStyle_StaysOnTop|WDestructiveClose), m_pid(pid)
{
- m_label = new QLabel(this);
+ m_label = new TQLabel(this);
m_label->setAlignment(AlignCenter);
m_button = new KPushButton(KStdGuiItem::close(), this);
- m_icon = new QLabel(this);
+ m_icon = new TQLabel(this);
m_icon->setPixmap(DesktopIcon("fileprint"));
m_icon->setAlignment(AlignCenter);
KWin::setIcons(winId(), *(m_icon->pixmap()), SmallIcon("fileprint"));
- QGridLayout *l0 = new QGridLayout(this, 2, 3, 10, 10);
+ QGridLayout *l0 = new TQGridLayout(this, 2, 3, 10, 10);
l0->setRowStretch(0, 1);
l0->setColStretch(1, 1);
l0->addMultiCellWidget(m_label, 0, 0, 1, 2);
l0->addWidget(m_button, 1, 2);
l0->addMultiCellWidget(m_icon, 0, 1, 0, 0);
- connect(m_button, SIGNAL(clicked()), SLOT(hide()));
+ connect(m_button, TQT_SIGNAL(clicked()), TQT_SLOT(hide()));
resize(200, 50);
}
-void StatusWindow::setMessage(const QString& msg)
+void StatusWindow::setMessage(const TQString& msg)
{
//QSize oldSz = size();
m_label->setText(msg);
//QSize sz = m_label->sizeHint();
- //sz += QSize(layout()->margin()*2, layout()->margin()*2+layout()->spacing()+m_button->sizeHint().height());
+ //sz += TQSize(layout()->margin()*2, layout()->margin()*2+layout()->spacing()+m_button->sizeHint().height());
// dialog will never be smaller
//sz = sz.expandedTo(oldSz);
//resize(sz);
@@ -97,7 +97,7 @@ void StatusWindow::setMessage(const QString& msg)
//*****************************************************************************************************
-KDEPrintd::KDEPrintd(const QCString& obj)
+KDEPrintd::KDEPrintd(const TQCString& obj)
: KDEDModule(obj)
{
m_processpool.setAutoDelete(true);
@@ -109,21 +109,21 @@ KDEPrintd::~KDEPrintd()
{
}
-int KDEPrintd::print(const QString& cmd, const QStringList& files, bool remflag)
+int KDEPrintd::print(const TQString& cmd, const TQStringList& files, bool remflag)
{
KPrintProcess *proc = new KPrintProcess;
QString command(cmd);
- QRegExp re( "\\$out\\{([^}]*)\\}" );
+ TQRegExp re( "\\$out\\{([^}]*)\\}" );
- connect(proc,SIGNAL(printTerminated(KPrintProcess*)),SLOT(slotPrintTerminated(KPrintProcess*)));
- connect(proc,SIGNAL(printError(KPrintProcess*,const QString&)),SLOT(slotPrintError(KPrintProcess*,const QString&)));
+ connect(proc,TQT_SIGNAL(printTerminated(KPrintProcess*)),TQT_SLOT(slotPrintTerminated(KPrintProcess*)));
+ connect(proc,TQT_SIGNAL(printError(KPrintProcess*,const TQString&)),TQT_SLOT(slotPrintError(KPrintProcess*,const TQString&)));
proc->setCommand( command );
if ( re.search( command ) != -1 )
{
KURL url( re.cap( 1 ) );
if ( !url.isLocalFile() )
{
- QString tmpFilename = locateLocal( "tmp", "kdeprint_" + kapp->randomString( 8 ) );
+ TQString tmpFilename = locateLocal( "tmp", "kdeprint_" + kapp->randomString( 8 ) );
command.replace( re, KProcess::quote( tmpFilename ) );
proc->setOutput( re.cap( 1 ) );
proc->setTempOutput( tmpFilename );
@@ -153,13 +153,13 @@ void KDEPrintd::slotPrintTerminated( KPrintProcess *proc )
m_processpool.removeRef( proc );
}
-void KDEPrintd::slotPrintError( KPrintProcess *proc, const QString& msg )
+void KDEPrintd::slotPrintError( KPrintProcess *proc, const TQString& msg )
{
KNotifyClient::event("printerror",i18n("<p><nobr>A print error occurred. Error message received from system:</nobr></p><br>%1").arg(msg));
m_processpool.removeRef( proc );
}
-QString KDEPrintd::openPassDlg(const QString& user)
+TQString KDEPrintd::openPassDlg(const TQString& user)
{
QString user_(user), pass_, result;
if (KIO::PasswordDialog::getNameAndPassword(user_, pass_, NULL) == KDialog::Accepted)
@@ -167,17 +167,17 @@ QString KDEPrintd::openPassDlg(const QString& user)
return result;
}
-bool KDEPrintd::checkFiles(QString& cmd, const QStringList& files)
+bool KDEPrintd::checkFiles(TQString& cmd, const TQStringList& files)
{
- for (QStringList::ConstIterator it=files.begin(); it!=files.end(); ++it)
- if (::access(QFile::encodeName(*it).data(), R_OK) != 0)
+ for (TQStringList::ConstIterator it=files.begin(); it!=files.end(); ++it)
+ if (::access(TQFile::encodeName(*it).data(), R_OK) != 0)
{
if (KMessageBox::warningContinueCancel(0,
i18n("Some of the files to print are not readable by the KDE "
"print daemon. This may happen if you are trying to print "
"as a different user to the one currently logged in. To continue "
"printing, you need to provide root's password."),
- QString::null,
+ TQString::null,
i18n("Provide root's Password"),
"provideRootsPassword") == KMessageBox::Continue)
{
@@ -190,17 +190,17 @@ bool KDEPrintd::checkFiles(QString& cmd, const QStringList& files)
return true;
}
-void KDEPrintd::statusMessage(const QString& msg, int pid, const QString& appName)
+void KDEPrintd::statusMessage(const TQString& msg, int pid, const TQString& appName)
{
StatusWindow *w = m_windows.find(pid);
if (!w && !msg.isEmpty())
{
w = new StatusWindow(pid);
if (appName.isEmpty())
- w->setCaption(i18n("Printing Status - %1").arg("(pid="+QString::number(pid)+")"));
+ w->setCaption(i18n("Printing Status - %1").arg("(pid="+TQString::number(pid)+")"));
else
w->setCaption(i18n("Printing Status - %1").arg(appName));
- connect(w, SIGNAL(destroyed()), SLOT(slotClosed()));
+ connect(w, TQT_SIGNAL(destroyed()), TQT_SLOT(slotClosed()));
w->show();
m_windows.insert(pid, w);
}
@@ -228,21 +228,21 @@ class KDEPrintd::Request
{
public:
DCOPClientTransaction *transaction;
- QString user;
- QString uri;
+ TQString user;
+ TQString uri;
int seqNbr;
};
-QString KDEPrintd::requestPassword( const QString& user, const QString& host, int port, int seqNbr )
+TQString KDEPrintd::requestPassword( const TQString& user, const TQString& host, int port, int seqNbr )
{
Request *req = new Request;
req->user = user;
- req->uri = "print://" + user + "@" + host + ":" + QString::number(port);
+ req->uri = "print://" + user + "@" + host + ":" + TQString::number(port);
req->seqNbr = seqNbr;
req->transaction = callingDcopClient()->beginTransaction();
m_requestsPending.append( req );
if ( m_requestsPending.count() == 1 )
- QTimer::singleShot( 0, this, SLOT( processRequest() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( processRequest() ) );
return "::";
}
@@ -253,29 +253,29 @@ void KDEPrintd::processRequest()
Request *req = m_requestsPending.first();
KIO::AuthInfo info;
- QByteArray params, reply;
- QCString replyType;
- QString authString( "::" );
+ TQByteArray params, reply;
+ TQCString replyType;
+ TQString authString( "::" );
info.username = req->user;
info.keepPassword = true;
info.url = req->uri;
info.comment = i18n( "Printing system" );
- QDataStream input( params, IO_WriteOnly );
+ TQDataStream input( params, IO_WriteOnly );
input << info << i18n( "Authentication failed (user name=%1)" ).arg( info.username ) << 0L << (long int) req->seqNbr;
- if ( callingDcopClient()->call( "kded", "kpasswdserver", "queryAuthInfo(KIO::AuthInfo,QString,long int,long int)",
+ if ( callingDcopClient()->call( "kded", "kpasswdserver", "queryAuthInfo(KIO::AuthInfo,TQString,long int,long int)",
params, replyType, reply ) )
{
if ( replyType == "KIO::AuthInfo" )
{
- QDataStream output( reply, IO_ReadOnly );
+ TQDataStream output( reply, IO_ReadOnly );
KIO::AuthInfo result;
int seqNbr;
output >> result >> seqNbr;
if ( result.isModified() )
- authString = result.username + ":" + result.password + ":" + QString::number( seqNbr );
+ authString = result.username + ":" + result.password + ":" + TQString::number( seqNbr );
}
else
kdWarning( 500 ) << "DCOP returned type error, expected KIO::AuthInfo, received " << replyType << endl;
@@ -283,28 +283,28 @@ void KDEPrintd::processRequest()
else
kdWarning( 500 ) << "Cannot communicate with kded_kpasswdserver" << endl;
- QByteArray outputData;
- QDataStream output( outputData, IO_WriteOnly );
+ TQByteArray outputData;
+ TQDataStream output( outputData, IO_WriteOnly );
output << authString;
- replyType = "QString";
+ replyType = "TQString";
callingDcopClient()->endTransaction( req->transaction, replyType, outputData );
m_requestsPending.remove( ( unsigned int )0 );
if ( m_requestsPending.count() > 0 )
- QTimer::singleShot( 0, this, SLOT( processRequest() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( processRequest() ) );
}
-void KDEPrintd::initPassword( const QString& user, const QString& passwd, const QString& host, int port )
+void KDEPrintd::initPassword( const TQString& user, const TQString& passwd, const TQString& host, int port )
{
- QByteArray params, reply;
- QCString replyType;
+ TQByteArray params, reply;
+ TQCString replyType;
KIO::AuthInfo info;
info.username = user;
info.password = passwd;
- info.url = "print://" + user + "@" + host + ":" + QString::number(port);
+ info.url = "print://" + user + "@" + host + ":" + TQString::number(port);
- QDataStream input( params, IO_WriteOnly );
+ TQDataStream input( params, IO_WriteOnly );
input << info << ( long int )0;
if ( !callingDcopClient()->call( "kded", "kpasswdserver", "addAuthInfo(KIO::AuthInfo,long int)",
diff --git a/kdeprint/kdeprintd.h b/kdeprint/kdeprintd.h
index 50c805624..48fcdd021 100644
--- a/kdeprint/kdeprintd.h
+++ b/kdeprint/kdeprintd.h
@@ -21,11 +21,11 @@
#define KDEPRINTD_H
#include <kdedmodule.h>
-#include <qptrlist.h>
-#include <qstringlist.h>
-#include <qptrdict.h>
-#include <qguardedptr.h>
-#include <qintdict.h>
+#include <tqptrlist.h>
+#include <tqstringlist.h>
+#include <tqptrdict.h>
+#include <tqguardedptr.h>
+#include <tqintdict.h>
class KPrintProcess;
class KProcess;
@@ -37,30 +37,30 @@ class KDEPrintd : public KDEDModule
K_DCOP
public:
- KDEPrintd(const QCString& obj);
+ KDEPrintd(const TQCString& obj);
~KDEPrintd();
k_dcop:
- int print(const QString& cmd, const QStringList& files, bool remove);
- QString openPassDlg(const QString& user);
- ASYNC statusMessage(const QString& msg, int pid = -1, const QString& appName = QString::null);
- QString requestPassword( const QString& user, const QString& host, int port, int seqNbr );
- void initPassword( const QString& user, const QString& passwd, const QString& host, int port );
+ int print(const TQString& cmd, const TQStringList& files, bool remove);
+ TQString openPassDlg(const TQString& user);
+ ASYNC statusMessage(const TQString& msg, int pid = -1, const TQString& appName = TQString::null);
+ TQString requestPassword( const TQString& user, const TQString& host, int port, int seqNbr );
+ void initPassword( const TQString& user, const TQString& passwd, const TQString& host, int port );
protected slots:
void slotPrintTerminated( KPrintProcess* );
- void slotPrintError( KPrintProcess*, const QString& );
+ void slotPrintError( KPrintProcess*, const TQString& );
void slotClosed();
void processRequest();
protected:
- bool checkFiles(QString& cmd, const QStringList& files);
+ bool checkFiles(TQString& cmd, const TQStringList& files);
private:
class Request;
- QPtrList<KPrintProcess> m_processpool;
- QIntDict<StatusWindow> m_windows;
- QPtrList<Request> m_requestsPending;
+ TQPtrList<KPrintProcess> m_processpool;
+ TQIntDict<StatusWindow> m_windows;
+ TQPtrList<Request> m_requestsPending;
};
#endif
diff --git a/kdeprint/kfilelist.cpp b/kdeprint/kfilelist.cpp
index 6be6f4ecb..c61f3b948 100644
--- a/kdeprint/kfilelist.cpp
+++ b/kdeprint/kfilelist.cpp
@@ -19,12 +19,12 @@
#include "kfilelist.h"
-#include <qtoolbutton.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qheader.h>
-#include <qwhatsthis.h>
+#include <tqtoolbutton.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqheader.h>
+#include <tqwhatsthis.h>
#include <kio/netaccess.h>
#include <kurldrag.h>
@@ -35,11 +35,11 @@
#include <krun.h>
#include <kmimetype.h>
-KFileList::KFileList(QWidget *parent, const char *name)
-: QWidget(parent, name)
+KFileList::KFileList(TQWidget *parent, const char *name)
+: TQWidget(parent, name)
{
//WhatsThis strings.... (added by pfeifle@kde.org)
- QString whatsThisAddFileButton = i18n( " <qt> <b>Add File button</b>"
+ TQString whatsThisAddFileButton = i18n( " <qt> <b>Add File button</b>"
" <p>This button calls the <em>'File Open'</em> dialog to let you"
" select a file for printing. Note, that "
" <ul><li>you can select ASCII or International Text, PDF,"
@@ -51,26 +51,26 @@ KFileList::KFileList(QWidget *parent, const char *name)
" </ul>"
" </qt>" );
- QString whatsThisRemoveFileButton = i18n(" <qt> <b>Remove File button</b>"
+ TQString whatsThisRemoveFileButton = i18n(" <qt> <b>Remove File button</b>"
" <p>This button removes the highlighted file from the"
" list of to-be-printed files."
" </qt>" );
- QString whatsThisMoveFileUpButton = i18n(" <qt> <b>Move File Up button</b>"
+ TQString whatsThisMoveFileUpButton = i18n(" <qt> <b>Move File Up button</b>"
" <p>This button moves the highlighted file up in the list"
" of files to be printed.</p>"
" <p>In effect, this changes the order"
" of the files' printout.</p>"
" </qt>" );
- QString whatsThisMoveFileDownButton = i18n(" <qt> <b>Move File Down button</b>"
+ TQString whatsThisMoveFileDownButton = i18n(" <qt> <b>Move File Down button</b>"
" <p>This button moves the highlighted file down in the list"
" of files to be printed.</p>"
" <p>In effect, this changes the order"
" of the files' printout.</p>"
" </qt>" );
- QString whatsThisOpenFileButton = i18n( " <qt> <b>File Open button</b>"
+ TQString whatsThisOpenFileButton = i18n( " <qt> <b>File Open button</b>"
" <p>This button tries to open the highlighted file, so"
" you can view or edit it before you send it to the printing"
" system.</p>"
@@ -79,7 +79,7 @@ KFileList::KFileList(QWidget *parent, const char *name)
" the file.</p>"
" </qt>" );
- QString whatsThisFileSelectionListview = i18n( " <qt> <b>File List view</b>"
+ TQString whatsThisFileSelectionListview = i18n( " <qt> <b>File List view</b>"
" <p>This list displays all the files you selected for printing."
" You can see the file name(s), file path(s) and the file"
" (MIME) type(s) as determined by KDEPrint. You may re-arrange the "
@@ -104,53 +104,53 @@ KFileList::KFileList(QWidget *parent, const char *name)
m_files->setAllColumnsShowFocus(true);
m_files->setSorting(-1);
m_files->setAcceptDrops(false);
- m_files->setSelectionMode(QListView::Extended);
+ m_files->setSelectionMode(TQListView::Extended);
m_files->header()->setStretchEnabled(true, 2);
- QWhatsThis::add(m_files, whatsThisFileSelectionListview);
- connect(m_files, SIGNAL(selectionChanged()), SLOT(slotSelectionChanged()));
+ TQWhatsThis::add(m_files, whatsThisFileSelectionListview);
+ connect(m_files, TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotSelectionChanged()));
- m_add = new QToolButton(this);
+ m_add = new TQToolButton(this);
m_add->setIconSet(SmallIconSet("fileopen"));
- connect(m_add, SIGNAL(clicked()), SLOT(slotAddFile()));
- QToolTip::add(m_add, i18n("Add file"));
- QWhatsThis::add(m_add, whatsThisAddFileButton);
+ connect(m_add, TQT_SIGNAL(clicked()), TQT_SLOT(slotAddFile()));
+ TQToolTip::add(m_add, i18n("Add file"));
+ TQWhatsThis::add(m_add, whatsThisAddFileButton);
- m_remove = new QToolButton(this);
+ m_remove = new TQToolButton(this);
m_remove->setIconSet(SmallIconSet("remove"));
- connect(m_remove, SIGNAL(clicked()), SLOT(slotRemoveFile()));
- QToolTip::add(m_remove, i18n("Remove file"));
- QWhatsThis::add(m_remove, whatsThisRemoveFileButton);
+ connect(m_remove, TQT_SIGNAL(clicked()), TQT_SLOT(slotRemoveFile()));
+ TQToolTip::add(m_remove, i18n("Remove file"));
+ TQWhatsThis::add(m_remove, whatsThisRemoveFileButton);
m_remove->setEnabled(false);
- m_open = new QToolButton(this);
+ m_open = new TQToolButton(this);
m_open->setIconSet(SmallIconSet("filefind"));
- connect(m_open, SIGNAL(clicked()), SLOT(slotOpenFile()));
- QToolTip::add(m_open, i18n("Open file"));
- QWhatsThis::add(m_open, whatsThisOpenFileButton);
+ connect(m_open, TQT_SIGNAL(clicked()), TQT_SLOT(slotOpenFile()));
+ TQToolTip::add(m_open, i18n("Open file"));
+ TQWhatsThis::add(m_open, whatsThisOpenFileButton);
m_open->setEnabled(false);
- m_up = new QToolButton(this);
+ m_up = new TQToolButton(this);
m_up->setIconSet(SmallIconSet("up"));
- connect(m_up, SIGNAL(clicked()), SLOT(slotUp()));
- QToolTip::add(m_up, i18n("Move up"));
- QWhatsThis::add(m_up, whatsThisMoveFileUpButton);
+ connect(m_up, TQT_SIGNAL(clicked()), TQT_SLOT(slotUp()));
+ TQToolTip::add(m_up, i18n("Move up"));
+ TQWhatsThis::add(m_up, whatsThisMoveFileUpButton);
m_up->setEnabled(false);
- m_down = new QToolButton(this);
+ m_down = new TQToolButton(this);
m_down->setIconSet(SmallIconSet("down"));
- connect(m_down, SIGNAL(clicked()), SLOT(slotDown()));
- QToolTip::add(m_down, i18n("Move down"));
- QWhatsThis::add(m_down, whatsThisMoveFileDownButton);
+ connect(m_down, TQT_SIGNAL(clicked()), TQT_SLOT(slotDown()));
+ TQToolTip::add(m_down, i18n("Move down"));
+ TQWhatsThis::add(m_down, whatsThisMoveFileDownButton);
m_down->setEnabled(false);
setAcceptDrops(true);
- QToolTip::add(m_files, i18n(
+ TQToolTip::add(m_files, i18n(
"Drag file(s) here or use the button to open a file dialog. "
"Leave empty for <b>&lt;STDIN&gt;</b>."));
- QHBoxLayout *l0 = new QHBoxLayout(this, 0, KDialog::spacingHint());
- QVBoxLayout *l1 = new QVBoxLayout(0, 0, 1);
+ QHBoxLayout *l0 = new TQHBoxLayout(this, 0, KDialog::spacingHint());
+ QVBoxLayout *l1 = new TQVBoxLayout(0, 0, 1);
l0->addWidget(m_files);
l0->addLayout(l1);
l1->addWidget(m_add);
@@ -166,12 +166,12 @@ KFileList::~KFileList()
{
}
-void KFileList::dragEnterEvent(QDragEnterEvent *e)
+void KFileList::dragEnterEvent(TQDragEnterEvent *e)
{
e->accept(KURLDrag::canDecode(e));
}
-void KFileList::dropEvent(QDropEvent *e)
+void KFileList::dropEvent(TQDropEvent *e)
{
KURL::List files;
if (KURLDrag::decode(e, files))
@@ -192,7 +192,7 @@ void KFileList::addFiles(const KURL::List& files)
for (KURL::List::ConstIterator it=files.begin(); it!=files.end(); ++it)
{
KMimeType::Ptr mime = KMimeType::findByURL( *it, 0, true, false);
- item = new QListViewItem(m_files, item, (*it).fileName(), mime->comment(), (*it).url());
+ item = new TQListViewItem(m_files, item, (*it).fileName(), mime->comment(), (*it).url());
item->setPixmap(0, mime->pixmap(*it, KIcon::Small));
}
@@ -209,21 +209,21 @@ void KFileList::addFiles(const KURL::List& files)
}
}
-void KFileList::setFileList(const QStringList& files)
+void KFileList::setFileList(const TQStringList& files)
{
m_files->clear();
- QListViewItem *item = 0;
- for (QStringList::ConstIterator it=files.begin(); it!=files.end(); ++it)
+ TQListViewItem *item = 0;
+ for (TQStringList::ConstIterator it=files.begin(); it!=files.end(); ++it)
{
KURL url = KURL::fromPathOrURL( *it );
KMimeType::Ptr mime = KMimeType::findByURL(url, 0, true, false);
- item = new QListViewItem(m_files, item, url.fileName(), mime->comment(), url.url());
+ item = new TQListViewItem(m_files, item, url.fileName(), mime->comment(), url.url());
item->setPixmap(0, mime->pixmap(url, KIcon::Small));
}
slotSelectionChanged();
}
-QStringList KFileList::fileList() const
+TQStringList KFileList::fileList() const
{
QStringList l;
QListViewItem *item = m_files->firstChild();
@@ -237,14 +237,14 @@ QStringList KFileList::fileList() const
void KFileList::slotAddFile()
{
- KURL::List fnames = KFileDialog::getOpenURLs(QString::null, QString::null, this);
+ KURL::List fnames = KFileDialog::getOpenURLs(TQString::null, TQString::null, this);
if (!fnames.empty())
addFiles(fnames);
}
void KFileList::slotRemoveFile()
{
- QPtrList<QListViewItem> l;
+ TQPtrList<TQListViewItem> l;
selection(l);
l.setAutoDelete(true);
m_block = true;
@@ -263,12 +263,12 @@ void KFileList::slotOpenFile()
}
}
-QSize KFileList::sizeHint() const
+TQSize KFileList::sizeHint() const
{
- return QSize(100, 100);
+ return TQSize(100, 100);
}
-void KFileList::selection(QPtrList<QListViewItem>& l)
+void KFileList::selection(TQPtrList<TQListViewItem>& l)
{
l.setAutoDelete(false);
QListViewItem *item = m_files->firstChild();
@@ -285,7 +285,7 @@ void KFileList::slotSelectionChanged()
if (m_block)
return;
- QPtrList<QListViewItem> l;
+ TQPtrList<TQListViewItem> l;
selection(l);
m_remove->setEnabled(l.count() > 0);
m_open->setEnabled(l.count() == 1);
@@ -295,12 +295,12 @@ void KFileList::slotSelectionChanged()
void KFileList::slotUp()
{
- QPtrList<QListViewItem> l;
+ TQPtrList<TQListViewItem> l;
selection(l);
if (l.count() == 1 && l.first()->itemAbove())
{
QListViewItem *item(l.first()), *clone;
- clone = new QListViewItem(m_files, item->itemAbove()->itemAbove(), item->text(0), item->text(1), item->text(2));
+ clone = new TQListViewItem(m_files, item->itemAbove()->itemAbove(), item->text(0), item->text(1), item->text(2));
clone->setPixmap(0, *(item->pixmap(0)));
delete item;
m_files->setCurrentItem(clone);
@@ -310,12 +310,12 @@ void KFileList::slotUp()
void KFileList::slotDown()
{
- QPtrList<QListViewItem> l;
+ TQPtrList<TQListViewItem> l;
selection(l);
if (l.count() == 1 && l.first()->itemBelow())
{
QListViewItem *item(l.first()), *clone;
- clone = new QListViewItem(m_files, item->itemBelow(), item->text(0), item->text(1), item->text(2));
+ clone = new TQListViewItem(m_files, item->itemBelow(), item->text(0), item->text(1), item->text(2));
clone->setPixmap(0, *(item->pixmap(0)));
delete item;
m_files->setCurrentItem(clone);
diff --git a/kdeprint/kfilelist.h b/kdeprint/kfilelist.h
index 730e5bab3..2fdcc60dd 100644
--- a/kdeprint/kfilelist.h
+++ b/kdeprint/kfilelist.h
@@ -20,8 +20,8 @@
#ifndef KFILELIST_H
#define KFILELIST_H
-#include <qwidget.h>
-#include <qptrlist.h>
+#include <tqwidget.h>
+#include <tqptrlist.h>
#include <kurl.h>
class KListView;
@@ -32,12 +32,12 @@ class KFileList : public QWidget
{
Q_OBJECT
public:
- KFileList(QWidget *parent = 0, const char *name = 0);
+ KFileList(TQWidget *parent = 0, const char *name = 0);
virtual ~KFileList();
- void setFileList(const QStringList&);
- QStringList fileList() const;
- QSize sizeHint() const;
+ void setFileList(const TQStringList&);
+ TQStringList fileList() const;
+ TQSize sizeHint() const;
protected slots:
void slotAddFile();
@@ -48,10 +48,10 @@ protected slots:
void slotDown();
protected:
- void dragEnterEvent(QDragEnterEvent*);
- void dropEvent(QDropEvent*);
+ void dragEnterEvent(TQDragEnterEvent*);
+ void dropEvent(TQDropEvent*);
void addFiles(const KURL::List&);
- void selection(QPtrList<QListViewItem>&);
+ void selection(TQPtrList<TQListViewItem>&);
private:
KListView *m_files;
diff --git a/kdeprint/kmdbentry.h b/kdeprint/kmdbentry.h
index 327bc2a20..901980a34 100644
--- a/kdeprint/kmdbentry.h
+++ b/kdeprint/kmdbentry.h
@@ -20,8 +20,8 @@
#ifndef KMDBENTRY_H
#define KMDBENTRY_H
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
#include <kdelibs_export.h>
@@ -46,7 +46,7 @@ struct KDEPRINT_EXPORT KMDBEntry
bool validate(bool checkIt = true);
};
-typedef QPtrList<KMDBEntry> KMDBEntryList;
-typedef QPtrListIterator<KMDBEntry> KMDBEntryListIterator;
+typedef TQPtrList<KMDBEntry> KMDBEntryList;
+typedef TQPtrListIterator<KMDBEntry> KMDBEntryListIterator;
#endif
diff --git a/kdeprint/kmfactory.cpp b/kdeprint/kmfactory.cpp
index 4fb7f7ca5..96397adc4 100644
--- a/kdeprint/kmfactory.cpp
+++ b/kdeprint/kmfactory.cpp
@@ -27,9 +27,9 @@
#include "kdeprintcheck.h"
#include "kxmlcommand.h"
-#include <qdir.h>
-#include <qfile.h>
-#include <qsettings.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqsettings.h>
#include <klibloader.h>
#include <kconfig.h>
@@ -79,7 +79,7 @@ void KMFactory::release()
}
KMFactory::KMFactory()
- : QObject(NULL, "Factory")
+ : TQObject(NULL, "Factory")
{
m_settings = new Settings;
m_settings->application = KPrinter::Dialog;
@@ -108,7 +108,7 @@ KMFactory::KMFactory()
// By default, embed PS fonts
bool ok = false;
- QSettings settings;
+ TQSettings settings;
settings.readBoolEntry( "/qt/embedFonts", true, &ok );
if ( !ok )
settings.writeEntry( "/qt/embedFonts", true );
@@ -205,7 +205,7 @@ void KMFactory::createPrinterImpl()
if (!m_implementation) m_implementation = new KPrinterImpl(this,"PrinterImpl");
}
-void KMFactory::loadFactory(const QString& syst)
+void KMFactory::loadFactory(const TQString& syst)
{
if (!m_factory)
{
@@ -213,8 +213,8 @@ void KMFactory::loadFactory(const QString& syst)
if (sys.isEmpty())
// load default configured print plugin
sys = printSystem();
- QString libname = QString::fromLatin1("kdeprint_%1").arg(sys);
- m_factory = KLibLoader::self()->factory(QFile::encodeName(libname));
+ QString libname = TQString::fromLatin1("kdeprint_%1").arg(sys);
+ m_factory = KLibLoader::self()->factory(TQFile::encodeName(libname));
if (!m_factory)
{
KMessageBox::error(0,
@@ -224,7 +224,7 @@ void KMFactory::loadFactory(const QString& syst)
}
}
-KConfig* KMFactory::printConfig(const QString& group)
+KConfig* KMFactory::printConfig(const TQString& group)
{
if (!m_printconfig)
{
@@ -236,7 +236,7 @@ KConfig* KMFactory::printConfig(const QString& group)
return m_printconfig;
}
-QString KMFactory::printSystem()
+TQString KMFactory::printSystem()
{
KConfig *conf = printConfig();
conf->setGroup("General");
@@ -265,10 +265,10 @@ void KMFactory::unload()
m_factory = 0;
}
-void KMFactory::reload(const QString& syst, bool saveSyst)
+void KMFactory::reload(const TQString& syst, bool saveSyst)
{
// notify all registered objects about the coming reload
- QPtrListIterator<KPReloadObject> it(m_objects);
+ TQPtrListIterator<KPReloadObject> it(m_objects);
for (;it.current();++it)
it.current()->aboutToReload();
@@ -293,10 +293,10 @@ void KMFactory::reload(const QString& syst, bool saveSyst)
it.current()->reload();
}
-QValueList<KMFactory::PluginInfo> KMFactory::pluginList()
+TQValueList<KMFactory::PluginInfo> KMFactory::pluginList()
{
- QDir d(locate("data", "kdeprint/plugins/"), "*.print", QDir::Name, QDir::Files);
- QValueList<PluginInfo> list;
+ QDir d(locate("data", "kdeprint/plugins/"), "*.print", TQDir::Name, TQDir::Files);
+ TQValueList<PluginInfo> list;
for (uint i=0; i<d.count(); i++)
{
PluginInfo info(pluginInfo(d.absFilePath(d[i])));
@@ -307,11 +307,11 @@ QValueList<KMFactory::PluginInfo> KMFactory::pluginList()
return list;
}
-KMFactory::PluginInfo KMFactory::pluginInfo(const QString& name)
+KMFactory::PluginInfo KMFactory::pluginInfo(const TQString& name)
{
QString path(name);
if (path[0] != '/')
- path = locate("data", QString::fromLatin1("kdeprint/plugins/%1.print").arg(name));
+ path = locate("data", TQString::fromLatin1("kdeprint/plugins/%1.print").arg(name));
KSimpleConfig conf(path);
PluginInfo info;
@@ -350,9 +350,9 @@ void KMFactory::unregisterObject(KPReloadObject *obj)
kdDebug(500) << "kdeprint: unregistering " << (void*)obj << ", number of objects = " << m_objects.count() << endl;
}
-QString KMFactory::autoDetect()
+TQString KMFactory::autoDetect()
{
- QValueList<PluginInfo> plugins = pluginList();
+ TQValueList<PluginInfo> plugins = pluginList();
int pluginIndex(-1), currentPrecedence(0);
for (uint i=0;i<plugins.count();i++)
{
@@ -363,7 +363,7 @@ QString KMFactory::autoDetect()
currentPrecedence = plugins[i].detectPrecedence;
}
}
- return (pluginIndex == -1 ? QString::fromLatin1("lpdunix") : plugins[pluginIndex].name);
+ return (pluginIndex == -1 ? TQString::fromLatin1("lpdunix") : plugins[pluginIndex].name);
}
void KMFactory::slot_pluginChanged(pid_t pid)
@@ -392,7 +392,7 @@ void KMFactory::slot_configChanged()
printConfig();
// notify all registered objects about the coming reload
- QPtrListIterator<KPReloadObject> it(m_objects);
+ TQPtrListIterator<KPReloadObject> it(m_objects);
/*for (;it.current();++it)
it.current()->aboutToReload();*/
@@ -412,7 +412,7 @@ void KMFactory::saveConfig()
// need to reload the config file.
}
-QPair<QString,QString> KMFactory::requestPassword( int& seqNbr, const QString& user, const QString& host, int port )
+QPair<TQString,TQString> KMFactory::requestPassword( int& seqNbr, const TQString& user, const TQString& host, int port )
{
DCOPRef kdeprintd( "kded", "kdeprintd" );
/**
@@ -424,21 +424,21 @@ QPair<QString,QString> KMFactory::requestPassword( int& seqNbr, const QString& u
DCOPReply reply = kdeprintd.call( "requestPassword", user, host, port, seqNbr );
if ( reply.isValid() )
{
- QString replyString = reply;
+ TQString replyString = reply;
if ( replyString != "::" )
{
- QStringList l = QStringList::split( ':', replyString, true );
+ TQStringList l = TQStringList::split( ':', replyString, true );
if ( l.count() == 3 )
{
seqNbr = l[ 2 ].toInt();
- return QPair<QString,QString>( l[ 0 ], l[ 1 ] );
+ return QPair<TQString,TQString>( l[ 0 ], l[ 1 ] );
}
}
}
- return QPair<QString,QString>( QString::null, QString::null );
+ return QPair<TQString,TQString>( TQString::null, TQString::null );
}
-void KMFactory::initPassword( const QString& user, const QString& password, const QString& host, int port )
+void KMFactory::initPassword( const TQString& user, const TQString& password, const TQString& host, int port )
{
DCOPRef kdeprintd( "kded", "kdeprintd" );
/**
diff --git a/kdeprint/kmfactory.h b/kdeprint/kmfactory.h
index 05cd124fe..0e9ad8021 100644
--- a/kdeprint/kmfactory.h
+++ b/kdeprint/kmfactory.h
@@ -21,12 +21,12 @@
#ifndef KMFACTORY_H
#define KMFACTORY_H
-#include <qstring.h>
-#include <qvaluelist.h>
-#include <qstringlist.h>
-#include <qptrlist.h>
-#include <qobject.h>
-#include <qpair.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
+#include <tqstringlist.h>
+#include <tqptrlist.h>
+#include <tqobject.h>
+#include <tqpair.h>
#include <dcopobject.h>
#include <sys/types.h>
@@ -42,7 +42,7 @@ class KLibFactory;
class KConfig;
class KPReloadObject;
-class KDEPRINT_EXPORT KMFactory : public QObject, public DCOPObject
+class KDEPRINT_EXPORT KMFactory : public TQObject, public DCOPObject
{
Q_OBJECT
K_DCOP
@@ -72,13 +72,13 @@ public:
KMSpecialManager* specialManager();
KXmlCommandManager* commandManager();
KPrinterImpl* printerImplementation();
- KConfig* printConfig(const QString& group = QString::null);
- QString printSystem();
- QValueList<PluginInfo> pluginList();
- PluginInfo pluginInfo(const QString& name);
+ KConfig* printConfig(const TQString& group = TQString::null);
+ TQString printSystem();
+ TQValueList<PluginInfo> pluginList();
+ PluginInfo pluginInfo(const TQString& name);
void saveConfig();
- void reload(const QString& syst, bool saveSyst = true);
+ void reload(const TQString& syst, bool saveSyst = true);
void registerObject(KPReloadObject*, bool = false);
void unregisterObject(KPReloadObject*);
@@ -92,8 +92,8 @@ public:
};
Settings* settings() const { return m_settings; }
- QPair<QString,QString> requestPassword( int& seqNbr, const QString& user, const QString& host = "localhost", int port = 0 );
- void initPassword( const QString& user, const QString& password, const QString& host = "localhsot", int port = 0 );
+ QPair<TQString,TQString> requestPassword( int& seqNbr, const TQString& user, const TQString& host = "localhost", int port = 0 );
+ void initPassword( const TQString& user, const TQString& password, const TQString& host = "localhsot", int port = 0 );
k_dcop:
ASYNC slot_pluginChanged(pid_t);
@@ -108,9 +108,9 @@ private:
void createJobManager();
void createUiManager();
void createPrinterImpl();
- void loadFactory(const QString& syst = QString::null);
+ void loadFactory(const TQString& syst = TQString::null);
void unload();
- QString autoDetect();
+ TQString autoDetect();
private:
static KMFactory *m_self;
@@ -123,7 +123,7 @@ private:
KConfig *m_printconfig;
Settings *m_settings;
- QPtrList<KPReloadObject> m_objects;
+ TQPtrList<KPReloadObject> m_objects;
};
#endif
diff --git a/kdeprint/kmjob.cpp b/kdeprint/kmjob.cpp
index 665c7474f..0576303e2 100644
--- a/kdeprint/kmjob.cpp
+++ b/kdeprint/kmjob.cpp
@@ -71,11 +71,11 @@ void KMJob::copy(const KMJob& j)
setDiscarded(false);
}
-QString KMJob::pixmap()
+TQString KMJob::pixmap()
{
// special case
if (m_type == KMJob::Threaded)
- return QString::fromLatin1("exec");
+ return TQString::fromLatin1("exec");
// normal case
QString str("kdeprint_job");
@@ -102,7 +102,7 @@ QString KMJob::pixmap()
return str;
}
-QString KMJob::stateString()
+TQString KMJob::stateString()
{
QString str;
switch (m_state)
diff --git a/kdeprint/kmjob.h b/kdeprint/kmjob.h
index 7ea5cf10b..379f7cfd8 100644
--- a/kdeprint/kmjob.h
+++ b/kdeprint/kmjob.h
@@ -25,8 +25,8 @@
#warning internal header, do not use except if you are a KDEPrint developer
#endif
-#include <qstring.h>
-#include <qvaluevector.h>
+#include <tqstring.h>
+#include <tqvaluevector.h>
#include <kdeprint/kmobject.h>
#include <kdelibs_export.h>
@@ -69,26 +69,26 @@ public:
KMJob& operator=(const KMJob& j);
void copy(const KMJob& j);
- QString pixmap();
- QString stateString();
+ TQString pixmap();
+ TQString stateString();
bool isCompleted() const { return (m_state >= Cancelled && m_state <= Completed); }
bool isActive() const { return !isCompleted(); }
// inline access functions
int id() const { return m_ID; }
void setId(int id) { m_ID = id; }
- const QString& name() const { return m_name; }
- void setName(const QString& s) { m_name = s; }
- const QString& printer() const { return m_printer; }
- void setPrinter(const QString& s) { m_printer = s; }
- const QString& owner() const { return m_owner; }
- void setOwner(const QString& s) { m_owner = s; }
+ const TQString& name() const { return m_name; }
+ void setName(const TQString& s) { m_name = s; }
+ const TQString& printer() const { return m_printer; }
+ void setPrinter(const TQString& s) { m_printer = s; }
+ const TQString& owner() const { return m_owner; }
+ void setOwner(const TQString& s) { m_owner = s; }
int state() const { return m_state; }
void setState(int s) { m_state = s; }
int size() const { return m_size; }
void setSize(int s) { m_size = s; }
- const QString& uri() const { return m_uri; }
- void setUri(const QString& s) { m_uri = s; }
+ const TQString& uri() const { return m_uri; }
+ void setUri(const TQString& s) { m_uri = s; }
int type() const { return m_type; }
void setType(int t) { m_type = t; }
int pages() const { return m_pages; }
@@ -100,8 +100,8 @@ public:
bool isRemote() const { return m_remote; }
void setRemote(bool on) { m_remote = on; }
- QString attribute(int i) const { return m_attributes[i]; }
- void setAttribute(int i, const QString& att) { m_attributes[i] = att; }
+ TQString attribute(int i) const { return m_attributes[i]; }
+ void setAttribute(int i, const TQString& att) { m_attributes[i] = att; }
int attributeCount() const { return m_attributes.size(); }
void setAttributeCount(int c) { m_attributes.resize(c); }
@@ -124,7 +124,7 @@ protected:
// internal members
QString m_uri;
- QValueVector<QString> m_attributes;
+ TQValueVector<TQString> m_attributes;
};
#endif
diff --git a/kdeprint/kmjobmanager.cpp b/kdeprint/kmjobmanager.cpp
index 470b73ee3..afbca7a2f 100644
--- a/kdeprint/kmjobmanager.cpp
+++ b/kdeprint/kmjobmanager.cpp
@@ -26,8 +26,8 @@
#include <kdebug.h>
#include <kconfig.h>
-KMJobManager::KMJobManager(QObject *parent, const char *name)
-: QObject(parent,name)
+KMJobManager::KMJobManager(TQObject *parent, const char *name)
+: TQObject(parent,name)
{
m_jobs.setAutoDelete(true);
m_threadjob = new KMThreadJob(this, "ThreadJob");
@@ -45,7 +45,7 @@ KMJobManager* KMJobManager::self()
void KMJobManager::discardAllJobs()
{
- QPtrListIterator<KMJob> it(m_jobs);
+ TQPtrListIterator<KMJob> it(m_jobs);
for (;it.current();++it)
it.current()->setDiscarded(true);
}
@@ -62,16 +62,16 @@ void KMJobManager::removeDiscardedJobs()
/*KMJob* KMJobManager::findJob(int ID)
{
- QPtrListIterator<KMJob> it(m_jobs);
+ TQPtrListIterator<KMJob> it(m_jobs);
for (;it.current();++it)
if (it.current()->id() == ID)
return it.current();
return 0;
}*/
-KMJob* KMJobManager::findJob(const QString& uri)
+KMJob* KMJobManager::findJob(const TQString& uri)
{
- QPtrListIterator<KMJob> it(m_jobs);
+ TQPtrListIterator<KMJob> it(m_jobs);
for (;it.current();++it)
if (it.current()->uri() == uri)
return it.current();
@@ -99,12 +99,12 @@ void KMJobManager::addJob(KMJob *job)
delete job;
}
-/*bool KMJobManager::sendCommand(int ID, int action, const QString& arg)
+/*bool KMJobManager::sendCommand(int ID, int action, const TQString& arg)
{
KMJob *job = findJob(ID);
if (job)
{
- QPtrList<KMJob> l;
+ TQPtrList<KMJob> l;
l.setAutoDelete(false);
l.append(job);
return sendCommand(l,action,arg);
@@ -112,12 +112,12 @@ void KMJobManager::addJob(KMJob *job)
return false;
}*/
-bool KMJobManager::sendCommand(const QString& uri, int action, const QString& arg)
+bool KMJobManager::sendCommand(const TQString& uri, int action, const TQString& arg)
{
KMJob *job = findJob(uri);
if (job)
{
- QPtrList<KMJob> l;
+ TQPtrList<KMJob> l;
l.setAutoDelete(false);
l.append(job);
return sendCommand(l,action,arg);
@@ -125,13 +125,13 @@ bool KMJobManager::sendCommand(const QString& uri, int action, const QString& ar
return false;
}
-bool KMJobManager::sendCommand(const QPtrList<KMJob>& jobs, int action, const QString& args)
+bool KMJobManager::sendCommand(const TQPtrList<KMJob>& jobs, int action, const TQString& args)
{
// split jobs in 2 classes
- QPtrList<KMJob> csystem, cthread;
+ TQPtrList<KMJob> csystem, cthread;
csystem.setAutoDelete(false);
cthread.setAutoDelete(false);
- QPtrListIterator<KMJob> it(jobs);
+ TQPtrListIterator<KMJob> it(jobs);
for (;it.current();++it)
if (it.current()->type() == KMJob::Threaded) cthread.append(it.current());
else csystem.append(it.current());
@@ -144,34 +144,34 @@ bool KMJobManager::sendCommand(const QPtrList<KMJob>& jobs, int action, const QS
return true;
}
-bool KMJobManager::sendCommandSystemJob(const QPtrList<KMJob>&, int, const QString&)
+bool KMJobManager::sendCommandSystemJob(const TQPtrList<KMJob>&, int, const TQString&)
{
return false;
}
-bool KMJobManager::sendCommandThreadJob(const QPtrList<KMJob>& jobs, int action, const QString&)
+bool KMJobManager::sendCommandThreadJob(const TQPtrList<KMJob>& jobs, int action, const TQString&)
{
if (action != KMJob::Remove)
return false;
- QPtrListIterator<KMJob> it(jobs);
+ TQPtrListIterator<KMJob> it(jobs);
bool result(true);
for (;it.current() && result; ++it)
result = m_threadjob->removeJob(it.current()->id());
return result;
}
-bool KMJobManager::listJobs(const QString&, KMJobManager::JobType, int)
+bool KMJobManager::listJobs(const TQString&, KMJobManager::JobType, int)
{
return true;
}
-const QPtrList<KMJob>& KMJobManager::jobList(bool reload)
+const TQPtrList<KMJob>& KMJobManager::jobList(bool reload)
{
if (reload || m_jobs.count() == 0)
{
discardAllJobs();
- QDictIterator<JobFilter> it(m_filter);
+ TQDictIterator<JobFilter> it(m_filter);
int joblimit = limit();
bool threadjobs_updated = false;
for (; it.current(); ++it)
@@ -203,16 +203,16 @@ int KMJobManager::actions()
return 0;
}
-QValueList<KAction*> KMJobManager::createPluginActions(KActionCollection*)
+TQValueList<KAction*> KMJobManager::createPluginActions(KActionCollection*)
{
- return QValueList<KAction*>();
+ return TQValueList<KAction*>();
}
-void KMJobManager::validatePluginActions(KActionCollection*, const QPtrList<KMJob>&)
+void KMJobManager::validatePluginActions(KActionCollection*, const TQPtrList<KMJob>&)
{
}
-void KMJobManager::addPrinter(const QString& pr, KMJobManager::JobType type, bool isSpecial)
+void KMJobManager::addPrinter(const TQString& pr, KMJobManager::JobType type, bool isSpecial)
{
struct JobFilter *jf = m_filter.find(pr);
if (!jf)
@@ -224,7 +224,7 @@ void KMJobManager::addPrinter(const QString& pr, KMJobManager::JobType type, boo
jf->m_isspecial = isSpecial;
}
-void KMJobManager::removePrinter(const QString& pr, KMJobManager::JobType type)
+void KMJobManager::removePrinter(const TQString& pr, KMJobManager::JobType type)
{
struct JobFilter *jf = m_filter.find(pr);
if (jf)
@@ -235,7 +235,7 @@ void KMJobManager::removePrinter(const QString& pr, KMJobManager::JobType type)
}
}
-bool KMJobManager::doPluginAction(int, const QPtrList<KMJob>&)
+bool KMJobManager::doPluginAction(int, const TQPtrList<KMJob>&)
{
return true;
}
diff --git a/kdeprint/kmjobmanager.h b/kdeprint/kmjobmanager.h
index 2148a4810..643be34d1 100644
--- a/kdeprint/kmjobmanager.h
+++ b/kdeprint/kmjobmanager.h
@@ -24,10 +24,10 @@
#warning internal header, do not use except if you are a KDEPrint developer
#endif
-#include <qobject.h>
-#include <qptrlist.h>
-#include <qdict.h>
-#include <qvaluelist.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
+#include <tqdict.h>
+#include <tqvaluelist.h>
#include <kdelibs_export.h>
@@ -56,48 +56,48 @@ public:
bool m_isspecial;
};
- KMJobManager(QObject *parent = 0, const char *name = 0);
+ KMJobManager(TQObject *parent = 0, const char *name = 0);
virtual ~KMJobManager();
static KMJobManager* self();
- void addPrinter(const QString& pr, JobType type = ActiveJobs, bool isSpecial = false);
- void removePrinter(const QString& pr, JobType type = ActiveJobs);
+ void addPrinter(const TQString& pr, JobType type = ActiveJobs, bool isSpecial = false);
+ void removePrinter(const TQString& pr, JobType type = ActiveJobs);
void clearFilter();
- QDict<JobFilter>* filter();
+ TQDict<JobFilter>* filter();
int limit();
void setLimit(int val);
//KMJob* findJob(int ID);
- KMJob* findJob(const QString& uri);
- //bool sendCommand(int ID, int action, const QString& arg = QString::null);
- bool sendCommand(const QString& uri, int action, const QString& arg = QString::null);
- bool sendCommand(const QPtrList<KMJob>& jobs, int action, const QString& arg = QString::null);
- const QPtrList<KMJob>& jobList(bool reload = true);
+ KMJob* findJob(const TQString& uri);
+ //bool sendCommand(int ID, int action, const TQString& arg = TQString::null);
+ bool sendCommand(const TQString& uri, int action, const TQString& arg = TQString::null);
+ bool sendCommand(const TQPtrList<KMJob>& jobs, int action, const TQString& arg = TQString::null);
+ const TQPtrList<KMJob>& jobList(bool reload = true);
void addJob(KMJob*);
KMThreadJob* threadJob();
virtual int actions();
- virtual QValueList<KAction*> createPluginActions(KActionCollection*);
- virtual void validatePluginActions(KActionCollection*, const QPtrList<KMJob>&);
- virtual bool doPluginAction(int, const QPtrList<KMJob>&);
+ virtual TQValueList<KAction*> createPluginActions(KActionCollection*);
+ virtual void validatePluginActions(KActionCollection*, const TQPtrList<KMJob>&);
+ virtual bool doPluginAction(int, const TQPtrList<KMJob>&);
protected:
void discardAllJobs();
void removeDiscardedJobs();
protected:
- virtual bool listJobs(const QString& prname, JobType type, int limit = 0);
- virtual bool sendCommandSystemJob(const QPtrList<KMJob>& jobs, int action, const QString& arg = QString::null);
- bool sendCommandThreadJob(const QPtrList<KMJob>& jobs, int action, const QString& arg = QString::null);
+ virtual bool listJobs(const TQString& prname, JobType type, int limit = 0);
+ virtual bool sendCommandSystemJob(const TQPtrList<KMJob>& jobs, int action, const TQString& arg = TQString::null);
+ bool sendCommandThreadJob(const TQPtrList<KMJob>& jobs, int action, const TQString& arg = TQString::null);
protected:
- QPtrList<KMJob> m_jobs;
- QDict<JobFilter> m_filter;
+ TQPtrList<KMJob> m_jobs;
+ TQDict<JobFilter> m_filter;
KMThreadJob *m_threadjob;
};
-inline QDict<KMJobManager::JobFilter>* KMJobManager::filter()
+inline TQDict<KMJobManager::JobFilter>* KMJobManager::filter()
{ return &m_filter; }
inline void KMJobManager::clearFilter()
diff --git a/kdeprint/kmmanager.cpp b/kdeprint/kmmanager.cpp
index 0905d029d..ec161d755 100644
--- a/kdeprint/kmmanager.cpp
+++ b/kdeprint/kmmanager.cpp
@@ -27,7 +27,7 @@
#include "kprinter.h"
#include <zlib.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <kstandarddirs.h>
#include <kconfig.h>
#include <klocale.h>
@@ -36,8 +36,8 @@
#include <klibloader.h>
#include <unistd.h>
-KMManager::KMManager(QObject *parent, const char *name)
-: QObject(parent,name)
+KMManager::KMManager(TQObject *parent, const char *name)
+: TQObject(parent,name)
{
m_printers.setAutoDelete(true);
m_fprinters.setAutoDelete(false);
@@ -96,7 +96,7 @@ bool KMManager::removePrinter(KMPrinter*)
return notImplemented();
}
-bool KMManager::removePrinter(const QString& name)
+bool KMManager::removePrinter(const TQString& name)
{
KMPrinter *p = findPrinter(name);
return (p ? removePrinter(p) : false);
@@ -107,7 +107,7 @@ bool KMManager::enablePrinter(KMPrinter*, bool)
return notImplemented();
}
-bool KMManager::enablePrinter(const QString& name, bool state)
+bool KMManager::enablePrinter(const TQString& name, bool state)
{
KMPrinter *p = findPrinter(name);
return (p ? enablePrinter(p, state) : false);
@@ -118,7 +118,7 @@ bool KMManager::startPrinter(KMPrinter*, bool)
return notImplemented();
}
-bool KMManager::startPrinter(const QString& name, bool state)
+bool KMManager::startPrinter(const TQString& name, bool state)
{
KMPrinter *p = findPrinter(name);
return (p ? startPrinter(p, state) : false);
@@ -143,7 +143,7 @@ bool KMManager::completePrinterShort(KMPrinter *p)
return completePrinter(p);
}
-bool KMManager::completePrinter(const QString& name)
+bool KMManager::completePrinter(const TQString& name)
{
KMPrinter *p = findPrinter(name);
return (p ? completePrinter(p) : false);
@@ -154,7 +154,7 @@ bool KMManager::setDefaultPrinter(KMPrinter*)
return notImplemented();
}
-bool KMManager::setDefaultPrinter(const QString& name)
+bool KMManager::setDefaultPrinter(const TQString& name)
{
KMPrinter *p = findPrinter(name);
return (p ? setDefaultPrinter(p) : false);
@@ -186,9 +186,9 @@ bool KMManager::testPrinter(KMPrinter *prt)
// return notImplemented();
}
-KMPrinter* KMManager::findPrinter(const QString& name)
+KMPrinter* KMManager::findPrinter(const TQString& name)
{
- QPtrListIterator<KMPrinter> it(m_printers);
+ TQPtrListIterator<KMPrinter> it(m_printers);
for (;it.current();++it)
if (it.current()->name() == name) return it.current();
//setErrorMsg(i18n("%1: printer not found.").arg(name));
@@ -197,7 +197,7 @@ KMPrinter* KMManager::findPrinter(const QString& name)
KMPrinter* KMManager::softDefault() const
{
- QPtrListIterator<KMPrinter> it(m_printers);
+ TQPtrListIterator<KMPrinter> it(m_printers);
for (;it.current();++it)
if (it.current()->isSoftDefault()) return it.current();
return 0;
@@ -205,7 +205,7 @@ KMPrinter* KMManager::softDefault() const
KMPrinter* KMManager::hardDefault() const
{
- QPtrListIterator<KMPrinter> it(m_printers);
+ TQPtrListIterator<KMPrinter> it(m_printers);
for (; it.current();++it)
if (it.current()->isHardDefault())
return it.current();
@@ -221,9 +221,9 @@ KMPrinter* KMManager::defaultPrinter()
return prt;
}
-QPtrList<KMPrinter>* KMManager::printerList(bool reload)
+TQPtrList<KMPrinter>* KMManager::printerList(bool reload)
{
- setErrorMsg(QString::null);
+ setErrorMsg(TQString::null);
//kdDebug(500) << "Getting printer list: " << reload << endl;
if (reload || m_printers.count() == 0)
@@ -268,7 +268,7 @@ QPtrList<KMPrinter>* KMManager::printerList(bool reload)
// - use the PRINTER variable
if (!softDefault())
{
- KMPrinter *defprinter = findPrinter(QString::fromLatin1(getenv("PRINTER")));
+ KMPrinter *defprinter = findPrinter(TQString::fromLatin1(getenv("PRINTER")));
if (defprinter)
setSoftDefault(defprinter);
}
@@ -277,7 +277,7 @@ QPtrList<KMPrinter>* KMManager::printerList(bool reload)
return &m_fprinters;
}
-QPtrList<KMPrinter>* KMManager::printerListComplete(bool reload)
+TQPtrList<KMPrinter>* KMManager::printerListComplete(bool reload)
{
printerList(reload);
return &m_printers;
@@ -312,14 +312,14 @@ void KMManager::addPrinter(KMPrinter *p)
}
}
-QString KMManager::driverDbCreationProgram()
+TQString KMManager::driverDbCreationProgram()
{
- return QString::null;
+ return TQString::null;
}
-QString KMManager::driverDirectory()
+TQString KMManager::driverDirectory()
{
- return QString::null;
+ return TQString::null;
}
DrMain* KMManager::loadPrinterDriver(KMPrinter*, bool)
@@ -332,7 +332,7 @@ DrMain* KMManager::loadDbDriver(KMDBEntry *entry)
return loadFileDriver(entry->file);
}
-DrMain* KMManager::loadFileDriver(const QString&)
+DrMain* KMManager::loadFileDriver(const TQString&)
{
return NULL;
}
@@ -350,11 +350,11 @@ bool KMManager::savePrinterDriver(KMPrinter*,DrMain*)
return notImplemented();
}
-bool KMManager::uncompressFile(const QString& filename, QString& destname)
+bool KMManager::uncompressFile(const TQString& filename, TQString& destname)
{
QFile f(filename);
bool result(true);
- destname = QString::null;
+ destname = TQString::null;
if (f.exists() && f.open(IO_ReadOnly))
{
char buf[1024] = {0};
@@ -383,7 +383,7 @@ bool KMManager::uncompressFile(const QString& filename, QString& destname)
void KMManager::setHardDefault(KMPrinter *p)
{
- QPtrListIterator<KMPrinter> it(m_printers);
+ TQPtrListIterator<KMPrinter> it(m_printers);
for (;it.current();++it)
it.current()->setHardDefault(false);
if (p) p->setHardDefault(true);
@@ -391,7 +391,7 @@ void KMManager::setHardDefault(KMPrinter *p)
void KMManager::setSoftDefault(KMPrinter *p)
{
- QPtrListIterator<KMPrinter> it(m_printers);
+ TQPtrListIterator<KMPrinter> it(m_printers);
for (;it.current();++it)
{
it.current()->setSoftDefault(false);
@@ -411,12 +411,12 @@ bool KMManager::restartServer()
return notImplemented();
}
-bool KMManager::configureServer(QWidget*)
+bool KMManager::configureServer(TQWidget*)
{
return notImplemented();
}
-QString KMManager::testPage()
+TQString KMManager::testPage()
{
KConfig *conf = KMFactory::self()->printConfig();
conf->setGroup("General");
@@ -428,7 +428,7 @@ QString KMManager::testPage()
void KMManager::discardAllPrinters(bool on)
{
- QPtrListIterator<KMPrinter> it(m_printers);
+ TQPtrListIterator<KMPrinter> it(m_printers);
for (;it.current();++it)
if (!on || !it.current()->isSpecial())
it.current()->setDiscarded(on);
@@ -471,22 +471,22 @@ bool KMManager::removeSpecialPrinter(KMPrinter *p)
Defaults to 3 parallel printers
*/
-QStringList KMManager::detectLocalPrinters()
+TQStringList KMManager::detectLocalPrinters()
{
QStringList list;
for (int i=0; i<3; i++)
- list << QString::null << QString::fromLatin1("parallel:/dev/lp%1").arg(i) << i18n("Parallel Port #%1").arg(i+1) << QString::null;
+ list << TQString::null << TQString::fromLatin1("parallel:/dev/lp%1").arg(i) << i18n("Parallel Port #%1").arg(i+1) << TQString::null;
return list;
}
-int KMManager::addPrinterWizard(QWidget *parent)
+int KMManager::addPrinterWizard(TQWidget *parent)
{
KLibrary *lib = KLibLoader::self()->library("libkdeprint_management_module");
if (!lib)
setErrorMsg(i18n("Unable to load KDE print management library: %1").arg(KLibLoader::self()->lastErrorMessage()));
else
{
- int (*func)(QWidget*) = (int(*)(QWidget*))lib->symbol("add_printer_wizard");
+ int (*func)(TQWidget*) = (int(*)(TQWidget*))lib->symbol("add_printer_wizard");
if (!func)
setErrorMsg(i18n("Unable to find wizard object in management library."));
else
@@ -495,14 +495,14 @@ int KMManager::addPrinterWizard(QWidget *parent)
return (-1);
}
-bool KMManager::invokeOptionsDialog(QWidget *parent)
+bool KMManager::invokeOptionsDialog(TQWidget *parent)
{
KLibrary *lib = KLibLoader::self()->library("libkdeprint_management_module");
if (!lib)
setErrorMsg(i18n("Unable to load KDE print management library: %1").arg(KLibLoader::self()->lastErrorMessage()));
else
{
- bool (*func)(QWidget*) = (bool(*)(QWidget*))lib->symbol("config_dialog");
+ bool (*func)(TQWidget*) = (bool(*)(TQWidget*))lib->symbol("config_dialog");
if (!func)
setErrorMsg(i18n("Unable to find options dialog in management library."));
else
@@ -529,7 +529,7 @@ bool KMManager::isFilterEnabled() const
return m_printerfilter->isEnabled();
}
-QString KMManager::stateInformation()
+TQString KMManager::stateInformation()
{
return i18n("No plugin information available");
}
diff --git a/kdeprint/kmmanager.h b/kdeprint/kmmanager.h
index 17bf3347a..ee3c4064f 100644
--- a/kdeprint/kmmanager.h
+++ b/kdeprint/kmmanager.h
@@ -26,9 +26,9 @@
#include <kdeprint/kmprinter.h>
-#include <qobject.h>
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
class DrMain;
class KMDBEntry;
@@ -69,14 +69,14 @@ public:
ServerAll = 0xF
};
- KMManager(QObject *parent = 0, const char *name = 0);
+ KMManager(TQObject *parent = 0, const char *name = 0);
virtual ~KMManager();
static KMManager* self();
// error management functions
- QString errorMsg() const { return m_errormsg; }
- void setErrorMsg(const QString& s) { m_errormsg = s; }
+ TQString errorMsg() const { return m_errormsg; }
+ void setErrorMsg(const TQString& s) { m_errormsg = s; }
// support management ?
bool hasManagement() const { return m_hasmanagement; }
@@ -92,47 +92,47 @@ public:
virtual bool testPrinter(KMPrinter *p);
bool upPrinter(KMPrinter *p, bool state);
bool modifyPrinter(KMPrinter *oldp, KMPrinter *newp);
- bool removePrinter(const QString& name);
- bool enablePrinter(const QString& name, bool state);
- bool startPrinter(const QString& name, bool state);
- bool completePrinter(const QString& name);
- bool setDefaultPrinter(const QString& name);
+ bool removePrinter(const TQString& name);
+ bool enablePrinter(const TQString& name, bool state);
+ bool startPrinter(const TQString& name, bool state);
+ bool completePrinter(const TQString& name);
+ bool setDefaultPrinter(const TQString& name);
int printerOperationMask() const { return m_printeroperationmask; }
- int addPrinterWizard(QWidget *parent = 0);
+ int addPrinterWizard(TQWidget *parent = 0);
// special printer management functions
bool createSpecialPrinter(KMPrinter *p);
bool removeSpecialPrinter(KMPrinter *p);
// printer listing functions
- KMPrinter* findPrinter(const QString& name);
- QPtrList<KMPrinter>* printerList(bool reload = true);
- QPtrList<KMPrinter>* printerListComplete(bool reload = true);
+ KMPrinter* findPrinter(const TQString& name);
+ TQPtrList<KMPrinter>* printerList(bool reload = true);
+ TQPtrList<KMPrinter>* printerListComplete(bool reload = true);
KMPrinter* defaultPrinter();
void enableFilter(bool on);
bool isFilterEnabled() const;
// driver DB functions
- virtual QString driverDbCreationProgram();
- virtual QString driverDirectory();
+ virtual TQString driverDbCreationProgram();
+ virtual TQString driverDirectory();
// driver functions
virtual DrMain* loadPrinterDriver(KMPrinter *p, bool config = false);
virtual DrMain* loadDbDriver(KMDBEntry *entry);
- virtual DrMain* loadFileDriver(const QString& filename);
+ virtual DrMain* loadFileDriver(const TQString& filename);
DrMain* loadDriver(KMPrinter *p, bool config = false);
virtual bool savePrinterDriver(KMPrinter *p, DrMain *d);
virtual bool validateDbDriver(KMDBEntry *entry);
// configuration functions
- bool invokeOptionsDialog(QWidget *parent = 0);
- virtual QString stateInformation();
+ bool invokeOptionsDialog(TQWidget *parent = 0);
+ virtual TQString stateInformation();
// server functions
int serverOperationMask() const { return m_serveroperationmask; }
virtual bool restartServer();
- virtual bool configureServer(QWidget *parent = 0);
- virtual QStringList detectLocalPrinters();
+ virtual bool configureServer(TQWidget *parent = 0);
+ virtual TQStringList detectLocalPrinters();
// additional actions (for print manager)
virtual void createPluginActions(KActionCollection*);
@@ -158,12 +158,12 @@ protected:
// this function uncompress the given file (or does nothing
// if the file is not compressed). Returns wether the file was
// compressed or not.
- bool uncompressFile(const QString& srcname, QString& destname);
+ bool uncompressFile(const TQString& srcname, TQString& destname);
bool notImplemented();
void setHasManagement(bool on) { m_hasmanagement = on; }
void setPrinterOperationMask(int m) { m_printeroperationmask = m; }
void setServerOperationMask(int m) { m_serveroperationmask = m; }
- QString testPage();
+ TQString testPage();
void discardAllPrinters(bool);
void setUpdatePossible( bool );
virtual void checkUpdatePossibleInternal();
diff --git a/kdeprint/kmprinter.cpp b/kdeprint/kmprinter.cpp
index 6467970c2..5749a47c5 100644
--- a/kdeprint/kmprinter.cpp
+++ b/kdeprint/kmprinter.cpp
@@ -86,7 +86,7 @@ DrMain* KMPrinter::takeDriver()
return dr;
}
-QString KMPrinter::pixmap()
+TQString KMPrinter::pixmap()
{
if (!m_pixmap.isEmpty()) return m_pixmap;
@@ -117,13 +117,13 @@ int KMPrinter::compare(KMPrinter *p1, KMPrinter *p2)
if (p1 && p2)
{
bool s1(p1->isSpecial()), s2(p2->isSpecial());
- if (s1 && s2) return QString::compare(p1->name(),p2->name());
+ if (s1 && s2) return TQString::compare(p1->name(),p2->name());
else if (s1) return 1;
else if (s2) return -1;
else
{
bool c1(p1->isClass(false)), c2(p2->isClass(false));
- if (c1 == c2) return QString::compare(p1->name(),p2->name());
+ if (c1 == c2) return TQString::compare(p1->name(),p2->name());
else if (c1 && !c2) return -1;
else if (!c1 && c2) return 1;
}
@@ -131,7 +131,7 @@ int KMPrinter::compare(KMPrinter *p1, KMPrinter *p2)
return 0;
}
-QString KMPrinter::stateString() const
+TQString KMPrinter::stateString() const
{
QString s;
switch (state())
@@ -145,7 +145,7 @@ QString KMPrinter::stateString() const
return s;
}
-bool KMPrinter::autoConfigure(KPrinter *printer, QWidget *parent)
+bool KMPrinter::autoConfigure(KPrinter *printer, TQWidget *parent)
{
// standard settings
printer->setPrinterName(printerName());
@@ -160,7 +160,7 @@ bool KMPrinter::autoConfigure(KPrinter *printer, QWidget *parent)
if (option("kde-special-file") == "1")
{
// build-up default filename/directory
- QString fName = printer->docFileName(), ext = option( "kde-special-extension" );
+ TQString fName = printer->docFileName(), ext = option( "kde-special-extension" );
if ( fName.isEmpty() )
fName = ( printer->docName() + "." + ext );
else
@@ -178,7 +178,7 @@ bool KMPrinter::autoConfigure(KPrinter *printer, QWidget *parent)
// build-up file dialog
KFileDialog *dialog = new KFileDialog (fName,
- QString::null,
+ TQString::null,
parent,
"filedialog",
true);
@@ -188,7 +188,7 @@ bool KMPrinter::autoConfigure(KPrinter *printer, QWidget *parent)
if (!mimetype.isEmpty())
{
- QStringList filter;
+ TQStringList filter;
filter << mimetype;
filter << "all/allfiles";
dialog->setMimeFilter (filter, mimetype);
@@ -214,11 +214,11 @@ bool KMPrinter::autoConfigure(KPrinter *printer, QWidget *parent)
return true;
}
-QString KMPrinter::deviceProtocol() const
+TQString KMPrinter::deviceProtocol() const
{
int p = m_device.find( ':' );
if ( p != -1 )
return m_device.left( p );
else
- return QString::null;
+ return TQString::null;
}
diff --git a/kdeprint/kmprinter.h b/kdeprint/kmprinter.h
index 810793e3d..4b78a4b01 100644
--- a/kdeprint/kmprinter.h
+++ b/kdeprint/kmprinter.h
@@ -24,11 +24,11 @@
#warning internal header, do not use except if you are a KDEPrint developer
#endif
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqptrlist.h>
#include <kurl.h>
-#include <qmap.h>
+#include <tqmap.h>
#include <kdeprint/kmobject.h>
class KMDBEntry;
@@ -88,38 +88,38 @@ public:
// inline access functions
- const QString& name() const { return m_name; }
- void setName(const QString& s) { m_name = s; if (m_printername.isEmpty()) m_printername = s; }
- const QString& printerName() const { return m_printername; }
- void setPrinterName(const QString& s) { m_printername = s; if (m_name.isEmpty()) m_name = s; }
- const QString& instanceName() const { return m_instancename; }
- void setInstanceName(const QString& s) { m_instancename = s; }
+ const TQString& name() const { return m_name; }
+ void setName(const TQString& s) { m_name = s; if (m_printername.isEmpty()) m_printername = s; }
+ const TQString& printerName() const { return m_printername; }
+ void setPrinterName(const TQString& s) { m_printername = s; if (m_name.isEmpty()) m_name = s; }
+ const TQString& instanceName() const { return m_instancename; }
+ void setInstanceName(const TQString& s) { m_instancename = s; }
int type() const { return m_type; }
void setType(int t) { m_type = t; }
void addType(int t) { m_type |= t; }
PrinterState state(bool complete = false) const { return PrinterState(m_state & (complete ? ~0x0 : StateMask)); }
- QString stateString() const;
+ TQString stateString() const;
void setState(PrinterState s) { m_state = PrinterState((m_state & ~StateMask) | s); }
bool acceptJobs() const { return !(m_state & Rejecting); }
void setAcceptJobs(bool on) { m_state = PrinterState((m_state & StateMask) | (on ? 0 : Rejecting)); }
- const QString& device() const { return m_device; }
- QString deviceProtocol() const;
- void setDevice(const QString& d) { m_device = d; }
- const QStringList& members() const { return m_members; }
- void setMembers(const QStringList& l) { m_members = l; }
- void addMember(const QString& s) { m_members.append(s); }
- const QString& description() const { return m_description; }
- void setDescription(const QString& s) { m_description = s; }
- const QString& location() const { return m_location; }
- void setLocation(const QString& s) { m_location = s; }
+ const TQString& device() const { return m_device; }
+ TQString deviceProtocol() const;
+ void setDevice(const TQString& d) { m_device = d; }
+ const TQStringList& members() const { return m_members; }
+ void setMembers(const TQStringList& l) { m_members = l; }
+ void addMember(const TQString& s) { m_members.append(s); }
+ const TQString& description() const { return m_description; }
+ void setDescription(const TQString& s) { m_description = s; }
+ const TQString& location() const { return m_location; }
+ void setLocation(const TQString& s) { m_location = s; }
const KURL& uri() const { return m_uri; }
void setUri(const KURL& u) { m_uri = u; }
- const QString& manufacturer() const { return m_manufacturer; }
- void setManufacturer(const QString&s ) { m_manufacturer = s; }
- const QString& model() const { return m_model; }
- void setModel(const QString& s) { m_model = s; }
- const QString& driverInfo() const { return m_driverinfo; }
- void setDriverInfo(const QString& s) { m_driverinfo = s; }
+ const TQString& manufacturer() const { return m_manufacturer; }
+ void setManufacturer(const TQString&s ) { m_manufacturer = s; }
+ const TQString& model() const { return m_model; }
+ void setModel(const TQString& s) { m_model = s; }
+ const TQString& driverInfo() const { return m_driverinfo; }
+ void setDriverInfo(const TQString& s) { m_driverinfo = s; }
int printerCap() const { return m_printercap; }
void setPrinterCap( int c ) { m_printercap = c; }
void addPrinterCap( int c ) { m_printercap |= c; }
@@ -137,8 +137,8 @@ public:
// misc
KMDBEntry* dbEntry() const { return m_dbentry; }
void setDbEntry(KMDBEntry *e) { m_dbentry = e; }
- QString pixmap();
- void setPixmap(const QString& s) { m_pixmap = s; }
+ TQString pixmap();
+ void setPixmap(const TQString& s) { m_pixmap = s; }
bool isHardDefault() const { return m_harddefault; }
void setHardDefault(bool on) { m_harddefault = on; }
bool isSoftDefault() const { return m_softdefault; }
@@ -146,29 +146,29 @@ public:
bool ownSoftDefault() const { return m_ownsoftdefault; }
void setOwnSoftDefault(bool on) { m_ownsoftdefault = on; }
static int compare(KMPrinter *p1, KMPrinter *p2);
- const QString& option(const QString& key) const { return m_options[key]; }
- bool hasOption(const QString& key) const { return m_options.contains(key); }
- void setOption(const QString& key, const QString& value) { if (!key.isEmpty()) m_options[key] = value; }
- void removeOption(const QString& key) { m_options.remove(key); }
- QMap<QString,QString> options() const { return m_options; }
- void setOptions(const QMap<QString,QString>& opts) { m_options = opts; }
+ const TQString& option(const TQString& key) const { return m_options[key]; }
+ bool hasOption(const TQString& key) const { return m_options.contains(key); }
+ void setOption(const TQString& key, const TQString& value) { if (!key.isEmpty()) m_options[key] = value; }
+ void removeOption(const TQString& key) { m_options.remove(key); }
+ TQMap<TQString,TQString> options() const { return m_options; }
+ void setOptions(const TQMap<TQString,TQString>& opts) { m_options = opts; }
DrMain* driver() const { return m_driver; }
void setDriver(DrMain*);
DrMain* takeDriver();
// configure an existing KPrinter object
- bool autoConfigure(KPrinter *prt, QWidget *parent = 0);
+ bool autoConfigure(KPrinter *prt, TQWidget *parent = 0);
// default options
- const QString& defaultOption(const QString& key) const { return m_defaultoptions[key]; }
- void setDefaultOption(const QString& key, const QString& value) { if (!key.isEmpty()) m_defaultoptions[key] = value; }
- QMap<QString,QString> defaultOptions() const { return m_defaultoptions; }
- void setDefaultOptions(const QMap<QString,QString>& opts) { m_defaultoptions = opts; }
+ const TQString& defaultOption(const TQString& key) const { return m_defaultoptions[key]; }
+ void setDefaultOption(const TQString& key, const TQString& value) { if (!key.isEmpty()) m_defaultoptions[key] = value; }
+ TQMap<TQString,TQString> defaultOptions() const { return m_defaultoptions; }
+ void setDefaultOptions(const TQMap<TQString,TQString>& opts) { m_defaultoptions = opts; }
// edited options
- const QString& editedOption(const QString& key) const { return m_editedoptions[key]; }
- void setEditedOption(const QString& key, const QString& value) { if (!key.isEmpty()) m_editedoptions[key] = value; }
- QMap<QString,QString> editedOptions() const { return m_editedoptions; }
- void setEditedOptions(const QMap<QString,QString>& opts) { m_editedoptions = opts; }
+ const TQString& editedOption(const TQString& key) const { return m_editedoptions[key]; }
+ void setEditedOption(const TQString& key, const TQString& value) { if (!key.isEmpty()) m_editedoptions[key] = value; }
+ TQMap<TQString,TQString> editedOptions() const { return m_editedoptions; }
+ void setEditedOptions(const TQMap<TQString,TQString>& opts) { m_editedoptions = opts; }
// edited flag
bool isEdited() const { return m_isedited; }
void setEdited(bool on) { m_isedited = on; }
@@ -210,26 +210,26 @@ protected:
bool m_ownsoftdefault;
// other options (for any use)
- QMap<QString,QString> m_options;
+ TQMap<TQString,TQString> m_options;
// options used for instances, and print library. These options are not
// overwritten when copying from another KMPrinter object. This allows to
// to keep the user settings through an application session. The difference
// between "default" and "edited" can be used for option saving (only save
// the options corresponding to current edited printer).
- QMap<QString,QString> m_defaultoptions;
- QMap<QString,QString> m_editedoptions;
+ TQMap<TQString,TQString> m_defaultoptions;
+ TQMap<TQString,TQString> m_editedoptions;
bool m_isedited;
// printer capabilities (based on CUPS model)
int m_printercap;
};
-class KMPrinterList : public QPtrList<KMPrinter>
+class KMPrinterList : public TQPtrList<KMPrinter>
{
public:
- KMPrinterList() : QPtrList<KMPrinter>() {}
- virtual int compareItems(QPtrCollection::Item i1, QPtrCollection::Item i2)
+ KMPrinterList() : TQPtrList<KMPrinter>() {}
+ virtual int compareItems(TQPtrCollection::Item i1, TQPtrCollection::Item i2)
{ return KMPrinter::compare((KMPrinter*)i1, (KMPrinter*)i2); }
};
diff --git a/kdeprint/kmspecialmanager.cpp b/kdeprint/kmspecialmanager.cpp
index 7e9288e6d..7ccebedff 100644
--- a/kdeprint/kmspecialmanager.cpp
+++ b/kdeprint/kmspecialmanager.cpp
@@ -24,7 +24,7 @@
#include "kxmlcommand.h"
#include "driver.h"
-#include <qfile.h>
+#include <tqfile.h>
#include <kstandarddirs.h>
#include <kglobal.h>
#include <ksimpleconfig.h>
@@ -36,7 +36,7 @@
#include <sys/stat.h>
KMSpecialManager::KMSpecialManager(KMManager *parent, const char *name)
-: QObject(parent,name), m_mgr(parent), m_loaded(false)
+: TQObject(parent,name), m_mgr(parent), m_loaded(false)
{
}
@@ -66,15 +66,15 @@ bool KMSpecialManager::savePrinters()
conf.setGroup("General");
int n = conf.readNumEntry("Number",0);
for (int i=0;i<n;i++)
- conf.deleteGroup(QString::fromLatin1("Printer %1").arg(i),true);
+ conf.deleteGroup(TQString::fromLatin1("Printer %1").arg(i),true);
// then add printers
n = 0;
- QPtrListIterator<KMPrinter> it(m_mgr->m_printers);
+ TQPtrListIterator<KMPrinter> it(m_mgr->m_printers);
for (;it.current();++it)
{
if (!it.current()->isSpecial() || it.current()->isVirtual()) continue;
- conf.setGroup(QString::fromLatin1("Printer %1").arg(n));
+ conf.setGroup(TQString::fromLatin1("Printer %1").arg(n));
conf.writeEntry("Name",it.current()->name());
conf.writeEntry("Description",it.current()->description());
conf.writeEntry("Comment",it.current()->location());
@@ -93,7 +93,7 @@ bool KMSpecialManager::savePrinters()
if (getuid() == 0)
{
conf.sync();
- ::chmod(QFile::encodeName(confname), S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
+ ::chmod(TQFile::encodeName(confname), S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
}
// force reload on next update
@@ -112,7 +112,7 @@ bool KMSpecialManager::loadPrinters()
// local files should processed last, so we need to reorder the list
// and put local files at the end
QStringList orderedFiles;
- for (QStringList::ConstIterator it=files.begin(); it!=files.end(); ++it)
+ for (TQStringList::ConstIterator it=files.begin(); it!=files.end(); ++it)
{
if ((*it).startsWith(localDir))
orderedFiles.append(*it);
@@ -120,7 +120,7 @@ bool KMSpecialManager::loadPrinters()
orderedFiles.prepend(*it);
}
// then parse the ordered list
- for (QStringList::ConstIterator it=orderedFiles.begin(); it!=orderedFiles.end() && result; ++it)
+ for (TQStringList::ConstIterator it=orderedFiles.begin(); it!=orderedFiles.end() && result; ++it)
{
// skip the local file for root
if (getuid() == 0 && (*it).startsWith(localDir))
@@ -132,14 +132,14 @@ bool KMSpecialManager::loadPrinters()
return result;
}
-bool KMSpecialManager::loadDesktopFile(const QString& filename)
+bool KMSpecialManager::loadDesktopFile(const TQString& filename)
{
KSimpleConfig conf(filename);
conf.setGroup("General");
int n = conf.readNumEntry("Number",0);
for (int i=0;i<n;i++)
{
- QString grpname = QString::fromLatin1("Printer %1").arg(i);
+ QString grpname = TQString::fromLatin1("Printer %1").arg(i);
if (!conf.hasGroup(grpname)) continue;
conf.setGroup(grpname);
KMPrinter *printer = new KMPrinter;
@@ -172,13 +172,13 @@ void KMSpecialManager::refresh()
loadPrinters();
else
{
- QPtrListIterator<KMPrinter> it(m_mgr->m_printers);
+ TQPtrListIterator<KMPrinter> it(m_mgr->m_printers);
for (;it.current();++it)
if (it.current()->isSpecial())
{
it.current()->setDiscarded(false);
it.current()->setType(KMPrinter::Special);
- if (KdeprintChecker::check(QStringList::split(',',it.current()->option("kde-special-require"),false)))
+ if (KdeprintChecker::check(TQStringList::split(',',it.current()->option("kde-special-require"),false)))
it.current()->addType(KMPrinter::Invalid);
}
}
@@ -192,7 +192,7 @@ KXmlCommand* KMSpecialManager::loadCommand(KMPrinter *pr)
return xmlCmd;
}
-KXmlCommand* KMSpecialManager::loadCommand(const QString& xmlId)
+KXmlCommand* KMSpecialManager::loadCommand(const TQString& xmlId)
{
return KXmlCommandManager::self()->loadCommand(xmlId, true);
}
@@ -211,7 +211,7 @@ DrMain* KMSpecialManager::loadDriver(KMPrinter *pr)
return driver;
}
-QString KMSpecialManager::setupCommand(const QString& cmd, const QMap<QString,QString>& opts)
+TQString KMSpecialManager::setupCommand(const TQString& cmd, const TQMap<TQString,TQString>& opts)
{
QString s(cmd);
if (!s.isEmpty())
diff --git a/kdeprint/kmspecialmanager.h b/kdeprint/kmspecialmanager.h
index fb4ae049a..f8619a6f9 100644
--- a/kdeprint/kmspecialmanager.h
+++ b/kdeprint/kmspecialmanager.h
@@ -20,8 +20,8 @@
#ifndef KMSPECIALMANAGER_H
#define KMSPECIALMANAGER_H
-#include <qobject.h>
-#include <qmap.h>
+#include <tqobject.h>
+#include <tqmap.h>
class KMPrinter;
class KMManager;
@@ -37,12 +37,12 @@ public:
bool savePrinters();
void refresh();
KXmlCommand* loadCommand(KMPrinter*);
- KXmlCommand* loadCommand(const QString& cmd);
+ KXmlCommand* loadCommand(const TQString& cmd);
DrMain* loadDriver(KMPrinter*);
- QString setupCommand(const QString& cmd, const QMap<QString,QString>& opts);
+ TQString setupCommand(const TQString& cmd, const TQMap<TQString,TQString>& opts);
protected:
- bool loadDesktopFile(const QString&);
+ bool loadDesktopFile(const TQString&);
private:
KMManager *m_mgr;
diff --git a/kdeprint/kmthreadjob.cpp b/kdeprint/kmthreadjob.cpp
index bc88f2042..bea9382db 100644
--- a/kdeprint/kmthreadjob.cpp
+++ b/kdeprint/kmthreadjob.cpp
@@ -21,9 +21,9 @@
#include "kmjob.h"
#include "kmjobmanager.h"
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qstringlist.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqstringlist.h>
#include <kstandarddirs.h>
#include <errno.h>
@@ -32,8 +32,8 @@
#define CHARSEP '$'
-KMThreadJob::KMThreadJob(QObject *parent, const char *name)
-: QObject(parent,name)
+KMThreadJob::KMThreadJob(TQObject *parent, const char *name)
+: TQObject(parent,name)
{
m_jobs.setAutoDelete(true);
}
@@ -42,7 +42,7 @@ KMThreadJob::~KMThreadJob()
{
}
-QString KMThreadJob::jobFile()
+TQString KMThreadJob::jobFile()
{
QString f = locateLocal("data","kdeprint/printjobs");
return f;
@@ -54,7 +54,7 @@ bool KMThreadJob::saveJobs()
if (f.open(IO_WriteOnly))
{
QTextStream t(&f);
- QIntDictIterator<KMJob> it(m_jobs);
+ TQIntDictIterator<KMJob> it(m_jobs);
for (;it.current();++it)
t << it.current()->id() << CHARSEP << it.current()->name() << CHARSEP << it.current()->printer() << CHARSEP << it.current()->owner() << CHARSEP << it.current()->size() << endl;
return true;
@@ -76,7 +76,7 @@ bool KMThreadJob::loadJobs()
line = t.readLine().stripWhiteSpace();
if (line.isEmpty())
continue;
- QStringList ll = QStringList::split(CHARSEP,line,true);
+ QStringList ll = TQStringList::split(CHARSEP,line,true);
if (ll.count() == 5)
{
KMJob *job = new KMJob();
@@ -109,7 +109,7 @@ KMJob* KMThreadJob::findJob(int ID)
return m_jobs.find(ID);
}
-KMJob* KMThreadJob::findJob(const QString& uri)
+KMJob* KMThreadJob::findJob(const TQString& uri)
{
if (uri.startsWith("proc:/"))
{
@@ -132,7 +132,7 @@ bool KMThreadJob::removeJob(int ID)
return false;
}
-void KMThreadJob::createJob(int ID, const QString& printer, const QString& name, const QString& owner, int size)
+void KMThreadJob::createJob(int ID, const TQString& printer, const TQString& name, const TQString& owner, int size)
{
KMThreadJob mth(0);
KMJob *job = new KMJob();
@@ -161,7 +161,7 @@ void KMThreadJob::createJob(KMJob *job)
void KMThreadJob::updateManager(KMJobManager *mgr)
{
loadJobs();
- QIntDictIterator<KMJob> it(m_jobs);
+ TQIntDictIterator<KMJob> it(m_jobs);
for (;it.current();++it)
{
KMJob *job = new KMJob(*(it.current()));
diff --git a/kdeprint/kmthreadjob.h b/kdeprint/kmthreadjob.h
index cd2f75aeb..3d2e6cf2f 100644
--- a/kdeprint/kmthreadjob.h
+++ b/kdeprint/kmthreadjob.h
@@ -20,8 +20,8 @@
#ifndef KMTHREADJOB_H
#define KMTHREADJOB_H
-#include <qintdict.h>
-#include <qobject.h>
+#include <tqintdict.h>
+#include <tqobject.h>
class KMJob;
class KMJobManager;
@@ -29,25 +29,25 @@ class KMJobManager;
class KMThreadJob : public QObject
{
public:
- KMThreadJob(QObject *parent = 0, const char *name = 0);
+ KMThreadJob(TQObject *parent = 0, const char *name = 0);
~KMThreadJob();
KMJob* findJob(int ID);
- KMJob* findJob(const QString& uri);
+ KMJob* findJob(const TQString& uri);
bool removeJob(int ID);
void createJob(KMJob*);
void updateManager(KMJobManager*);
- static void createJob(int ID, const QString& printer, const QString& name = QString::null, const QString& owner = QString::null, int size = 0);
+ static void createJob(int ID, const TQString& printer, const TQString& name = TQString::null, const TQString& owner = TQString::null, int size = 0);
protected:
- QString jobFile();
+ TQString jobFile();
bool loadJobs();
bool saveJobs();
bool checkJob(int ID);
private:
- QIntDict<KMJob> m_jobs;
+ TQIntDict<KMJob> m_jobs;
};
#endif
diff --git a/kdeprint/kmuimanager.cpp b/kdeprint/kmuimanager.cpp
index 96573fb3d..53921d39f 100644
--- a/kdeprint/kmuimanager.cpp
+++ b/kdeprint/kmuimanager.cpp
@@ -39,8 +39,8 @@
#include <klocale.h>
#include <kdebug.h>
-KMUiManager::KMUiManager(QObject *parent, const char *name)
-: QObject(parent,name)
+KMUiManager::KMUiManager(TQObject *parent, const char *name)
+: TQObject(parent,name)
{
m_printdialogflags = KMUiManager::PrintDialogAll;
m_printdialogpages.setAutoDelete(false);
@@ -190,11 +190,11 @@ int KMUiManager::pluginPageCap()
return 0;
}
-void KMUiManager::setupPrintDialogPages(QPtrList<KPrintDialogPage>*)
+void KMUiManager::setupPrintDialogPages(TQPtrList<KPrintDialogPage>*)
{
}
-void KMUiManager::setupJobViewer(QListView*)
+void KMUiManager::setupJobViewer(TQListView*)
{
}
diff --git a/kdeprint/kmuimanager.h b/kdeprint/kmuimanager.h
index ad55ccf9b..61088bd2f 100644
--- a/kdeprint/kmuimanager.h
+++ b/kdeprint/kmuimanager.h
@@ -20,8 +20,8 @@
#ifndef KMUIMANAGER_H
#define KMUIMANAGER_H
-#include <qobject.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
#include "kprinter.h"
@@ -59,7 +59,7 @@ public:
NoAutoCollate = 0x100
};
- KMUiManager(QObject *parent = 0, const char *name = 0);
+ KMUiManager(TQObject *parent = 0, const char *name = 0);
virtual ~KMUiManager();
// print management
@@ -72,7 +72,7 @@ public:
int copyFlags(KPrinter *pr = 0, bool usePlugin = true);
int dialogFlags();
void setupPrintDialog(KPrintDialog*);
- virtual void setupPrintDialogPages(QPtrList<KPrintDialogPage>*);
+ virtual void setupPrintDialogPages(TQPtrList<KPrintDialogPage>*);
// printer property dialog
void setupPropertyDialog(KPrinterPropertyDialog*);
@@ -84,11 +84,11 @@ public:
int pageCap();
// job management
- virtual void setupJobViewer(QListView*);
+ virtual void setupJobViewer(TQListView*);
protected:
int m_printdialogflags;
- QPtrList<KPrintDialogPage> m_printdialogpages;
+ TQPtrList<KPrintDialogPage> m_printdialogpages;
};
#endif
diff --git a/kdeprint/kmvirtualmanager.cpp b/kdeprint/kmvirtualmanager.cpp
index 51a50292a..a6e263faf 100644
--- a/kdeprint/kmvirtualmanager.cpp
+++ b/kdeprint/kmvirtualmanager.cpp
@@ -24,10 +24,10 @@
#include "kprinter.h"
#include <stdlib.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qdir.h>
-#include <qfileinfo.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
#include <klocale.h>
#include <kstandarddirs.h>
#include <kurl.h>
@@ -36,7 +36,7 @@
#include <unistd.h>
-static QString instanceName(const QString& prname, const QString& instname)
+static TQString instanceName(const TQString& prname, const TQString& instname)
{
QString str(prname);
if (!instname.isEmpty())
@@ -45,7 +45,7 @@ static QString instanceName(const QString& prname, const QString& instname)
}
KMVirtualManager::KMVirtualManager(KMManager *parent, const char *name)
-: QObject(parent,name), m_manager(parent)
+: TQObject(parent,name), m_manager(parent)
{
}
@@ -53,12 +53,12 @@ KMVirtualManager::~KMVirtualManager()
{
}
-KMPrinter* KMVirtualManager::findPrinter(const QString& name)
+KMPrinter* KMVirtualManager::findPrinter(const TQString& name)
{
return m_manager->findPrinter(name);
}
-KMPrinter* KMVirtualManager::findInstance(KMPrinter *p, const QString& name)
+KMPrinter* KMVirtualManager::findInstance(KMPrinter *p, const TQString& name)
{
QString instname(instanceName(p->printerName(),name));
return findPrinter(instname);
@@ -90,11 +90,11 @@ void KMVirtualManager::addPrinter(KMPrinter *p)
void KMVirtualManager::setDefault(KMPrinter *p, bool saveflag)
{
m_manager->setSoftDefault(p);
- m_defaultprinter = (p ? p->printerName() : QString::null);
+ m_defaultprinter = (p ? p->printerName() : TQString::null);
if (saveflag) triggerSave();
}
-bool KMVirtualManager::isDefault(KMPrinter *p, const QString& name)
+bool KMVirtualManager::isDefault(KMPrinter *p, const TQString& name)
{
QString instname(instanceName(p->printerName(),name));
KMPrinter *printer = findPrinter(instname);
@@ -104,7 +104,7 @@ bool KMVirtualManager::isDefault(KMPrinter *p, const QString& name)
return false;
}
-void KMVirtualManager::create(KMPrinter *p, const QString& name)
+void KMVirtualManager::create(KMPrinter *p, const TQString& name)
{
QString instname = instanceName(p->printerName(),name);
if (findPrinter(instname) != NULL) return;
@@ -121,7 +121,7 @@ void KMVirtualManager::create(KMPrinter *p, const QString& name)
triggerSave();
}
-void KMVirtualManager::copy(KMPrinter *p, const QString& src, const QString& name)
+void KMVirtualManager::copy(KMPrinter *p, const TQString& src, const TQString& name)
{
QString instsrc(instanceName(p->printerName(),src)), instname(instanceName(p->printerName(),name));
KMPrinter *prsrc = findPrinter(instsrc);
@@ -135,15 +135,15 @@ void KMVirtualManager::copy(KMPrinter *p, const QString& src, const QString& nam
triggerSave();
}
-void KMVirtualManager::remove(KMPrinter *p, const QString& name)
+void KMVirtualManager::remove(KMPrinter *p, const TQString& name)
{
QString instname = instanceName(p->printerName(),name);
KMPrinter *printer = findPrinter(instname);
if (!printer) return;
if (name.isEmpty())
{ // remove default instance => only remove options, keep the KMPrinter object
- printer->setDefaultOptions(QMap<QString,QString>());
- printer->setEditedOptions(QMap<QString,QString>());
+ printer->setDefaultOptions(TQMap<TQString,TQString>());
+ printer->setEditedOptions(TQMap<TQString,TQString>());
printer->setEdited(false);
}
else
@@ -151,7 +151,7 @@ void KMVirtualManager::remove(KMPrinter *p, const QString& name)
triggerSave();
}
-void KMVirtualManager::setAsDefault(KMPrinter *p, const QString& name, QWidget *parent)
+void KMVirtualManager::setAsDefault(KMPrinter *p, const TQString& name, TQWidget *parent)
{
QString instname(instanceName(p->printerName(),name));
@@ -163,7 +163,7 @@ void KMVirtualManager::setAsDefault(KMPrinter *p, const QString& name, QWidget *
"applications. Note that this will only make your personal default printer "
"as undefined for non-KDE applications and should not prevent you from "
"printing normally. Do you really want to set <b>%1</b> as your personal default?</qt>" ).arg( instname ),
- QString::null, i18n("Set as Default"), "setSpecialAsDefault" ) == KMessageBox::No )
+ TQString::null, i18n("Set as Default"), "setSpecialAsDefault" ) == KMessageBox::No )
return;
}
@@ -179,8 +179,8 @@ void KMVirtualManager::setAsDefault(KMPrinter *p, const QString& name, QWidget *
void KMVirtualManager::refresh()
{
- QFileInfo fi(QDir::homeDirPath() + QFile::decodeName("/.lpoptions"));
- QFileInfo fi2(QFile::decodeName("/etc/cups/lpoptions"));
+ QFileInfo fi(TQDir::homeDirPath() + TQFile::decodeName("/.lpoptions"));
+ QFileInfo fi2(TQFile::decodeName("/etc/cups/lpoptions"));
// if root, then only use global file: trick -> use twice the same file
if (getuid() == 0)
@@ -188,7 +188,7 @@ void KMVirtualManager::refresh()
if (!m_checktime.isValid() || m_checktime < QMAX(fi.lastModified(),fi2.lastModified()))
{
- m_defaultprinter = QString::null;
+ m_defaultprinter = TQString::null;
if (fi2.exists())
loadFile(fi2.absFilePath());
if (fi.exists() && fi.absFilePath() != fi2.absFilePath())
@@ -198,7 +198,7 @@ void KMVirtualManager::refresh()
else
{ // parse printers looking for instances -> undiscarded them, real printers
// are undiscarded by the manager itself. Also update printer status.
- QPtrListIterator<KMPrinter> it(m_manager->m_printers);
+ TQPtrListIterator<KMPrinter> it(m_manager->m_printers);
for (;it.current();++it)
if (!it.current()->instanceName().isEmpty())
{
@@ -224,12 +224,12 @@ void KMVirtualManager::checkPrinter(KMPrinter *p)
}
}
-QString KMVirtualManager::defaultPrinterName()
+TQString KMVirtualManager::defaultPrinterName()
{
return m_defaultprinter;
}
-void KMVirtualManager::virtualList(QPtrList<KMPrinter>& list, const QString& prname)
+void KMVirtualManager::virtualList(TQPtrList<KMPrinter>& list, const TQString& prname)
{
// load printers if necessary
refresh();
@@ -238,13 +238,13 @@ void KMVirtualManager::virtualList(QPtrList<KMPrinter>& list, const QString& prn
list.setAutoDelete(false);
list.clear();
kdDebug(500) << "KMVirtualManager::virtualList() prname=" << prname << endl;
- QPtrListIterator<KMPrinter> it(m_manager->m_printers);
+ TQPtrListIterator<KMPrinter> it(m_manager->m_printers);
for (;it.current();++it)
if (it.current()->printerName() == prname)
list.append(it.current());
}
-void KMVirtualManager::loadFile(const QString& filename)
+void KMVirtualManager::loadFile(const TQString& filename)
{
QFile f(filename);
if (f.exists() && f.open(IO_ReadOnly))
@@ -260,9 +260,9 @@ void KMVirtualManager::loadFile(const QString& filename)
{
line = t.readLine().stripWhiteSpace();
if (line.isEmpty()) continue;
- words = QStringList::split(' ',line,false);
+ words = TQStringList::split(' ',line,false);
if (words.count() < 2) continue;
- pair = QStringList::split('/',words[1],false);
+ pair = TQStringList::split('/',words[1],false);
realprinter = m_manager->findPrinter(KURL::decode_string(pair[0]));
if (realprinter && !realprinter->isDiscarded())
{ // keep only instances corresponding to an existing and
@@ -279,8 +279,8 @@ void KMVirtualManager::loadFile(const QString& filename)
// parse options
for (uint i=2; i<words.count(); i++)
{
- pair = QStringList::split('=',words[i],false);
- printer->setDefaultOption(pair[0],(pair.count() > 1 ? pair[1] : QString::null));
+ pair = TQStringList::split('=',words[i],false);
+ printer->setDefaultOption(pair[0],(pair.count() > 1 ? pair[1] : TQString::null));
}
// add printer to the manager
addPrinter(printer); // don't use "printer" after this point !!!
@@ -297,25 +297,25 @@ void KMVirtualManager::triggerSave()
QString filename;
if (getuid() == 0)
{
- if (KStandardDirs::makeDir(QFile::decodeName("/etc/cups")))
- filename = QFile::decodeName("/etc/cups/lpoptions");
+ if (KStandardDirs::makeDir(TQFile::decodeName("/etc/cups")))
+ filename = TQFile::decodeName("/etc/cups/lpoptions");
}
else
- filename = QDir::homeDirPath() + QFile::decodeName("/.lpoptions");
+ filename = TQDir::homeDirPath() + TQFile::decodeName("/.lpoptions");
if (!filename.isEmpty())
{
saveFile(filename);
- m_checktime = QFileInfo(filename).lastModified();
+ m_checktime = TQFileInfo(filename).lastModified();
}
}
-void KMVirtualManager::saveFile(const QString& filename)
+void KMVirtualManager::saveFile(const TQString& filename)
{
QFile f(filename);
if (f.open(IO_WriteOnly))
{
QTextStream t(&f);
- QPtrListIterator<KMPrinter> it(m_manager->m_printers);
+ TQPtrListIterator<KMPrinter> it(m_manager->m_printers);
for (;it.current();++it)
{
if (it.current()->isSpecial())
@@ -327,8 +327,8 @@ void KMVirtualManager::saveFile(const QString& filename)
}
else
t << (it.current()->isSoftDefault() ? "Default " : "Dest ") << it.current()->name();
- QMap<QString,QString> opts = it.current()->defaultOptions();
- for (QMap<QString,QString>::ConstIterator oit=opts.begin(); oit!=opts.end(); ++oit)
+ TQMap<TQString,TQString> opts = it.current()->defaultOptions();
+ for (TQMap<TQString,TQString>::ConstIterator oit=opts.begin(); oit!=opts.end(); ++oit)
{
t << ' ' << oit.key();
if (!oit.data().isEmpty())
diff --git a/kdeprint/kmvirtualmanager.h b/kdeprint/kmvirtualmanager.h
index de1d5e437..0f0820366 100644
--- a/kdeprint/kmvirtualmanager.h
+++ b/kdeprint/kmvirtualmanager.h
@@ -20,9 +20,9 @@
#ifndef KMVIRTUALMANAGER_H
#define KMVIRTUALMANAGER_H
-#include <qobject.h>
-#include <qptrlist.h>
-#include <qdatetime.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
+#include <tqdatetime.h>
#include <kdelibs_export.h>
@@ -32,7 +32,7 @@ class KMPrinter;
class KMManager;
class QWidget;
-class KDEPRINT_EXPORT KMVirtualManager : public QObject, public KPReloadObject
+class KDEPRINT_EXPORT KMVirtualManager : public TQObject, public KPReloadObject
{
public:
KMVirtualManager(KMManager *parent = 0, const char *name = 0);
@@ -40,24 +40,24 @@ public:
void refresh();
void reset();
- void virtualList(QPtrList<KMPrinter>& list, const QString& prname);
+ void virtualList(TQPtrList<KMPrinter>& list, const TQString& prname);
void triggerSave();
- KMPrinter* findPrinter(const QString& name);
- KMPrinter* findInstance(KMPrinter *p, const QString& name);
+ KMPrinter* findPrinter(const TQString& name);
+ KMPrinter* findInstance(KMPrinter *p, const TQString& name);
void setDefault(KMPrinter *p, bool save = true);
- QString defaultPrinterName();
- bool isDefault(KMPrinter *p, const QString& name);
+ TQString defaultPrinterName();
+ bool isDefault(KMPrinter *p, const TQString& name);
bool testInstance(KMPrinter *p);
- void create(KMPrinter *p, const QString& name);
- void remove(KMPrinter *p, const QString& name);
- void copy(KMPrinter *p, const QString& src, const QString& name);
- void setAsDefault(KMPrinter *p, const QString& name, QWidget *parent = NULL);
+ void create(KMPrinter *p, const TQString& name);
+ void remove(KMPrinter *p, const TQString& name);
+ void copy(KMPrinter *p, const TQString& src, const TQString& name);
+ void setAsDefault(KMPrinter *p, const TQString& name, TQWidget *parent = NULL);
protected:
- void loadFile(const QString& filename);
- void saveFile(const QString& filename);
+ void loadFile(const TQString& filename);
+ void saveFile(const TQString& filename);
void addPrinter(KMPrinter *p);
void checkPrinter(KMPrinter*);
void reload();
@@ -66,10 +66,10 @@ protected:
private:
KMManager *m_manager;
QDateTime m_checktime;
- QString m_defaultprinter;
+ TQString m_defaultprinter;
};
inline void KMVirtualManager::reset()
-{ m_checktime = QDateTime(); }
+{ m_checktime = TQDateTime(); }
#endif
diff --git a/kdeprint/kpcopiespage.cpp b/kdeprint/kpcopiespage.cpp
index af74ff19f..1a7756913 100644
--- a/kdeprint/kpcopiespage.cpp
+++ b/kdeprint/kpcopiespage.cpp
@@ -23,41 +23,41 @@
#include "kprinter.h"
#include "kxmlcommand.h"
-#include <qlabel.h>
-#include <qcombobox.h>
-#include <qspinbox.h>
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
+#include <tqspinbox.h>
+#include <tqbuttongroup.h>
+#include <tqradiobutton.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
+#include <tqlayout.h>
#include <kapplication.h>
#include <klocale.h>
#include <kiconloader.h>
#include <kseparator.h>
-KPCopiesPage::KPCopiesPage(KPrinter *prt, QWidget *parent, const char *name)
+KPCopiesPage::KPCopiesPage(KPrinter *prt, TQWidget *parent, const char *name)
: KPrintDialogPage(parent,name)
{
//WhatsThis strings.... (added by pfeifle@kde.org)
- QString whatsThisPageSelectionLabel = i18n( " <qt><p><b>Page Selection</b></p> "
+ TQString whatsThisPageSelectionLabel = i18n( " <qt><p><b>Page Selection</b></p> "
" <p>Here you can control if you print a certain selection only out of all"
" the pages from the complete document."
" </p>"
" </qt>" );
- QString whatsThisAllPagesLabel = i18n( " <qt><b>All Pages:</b> Select \"All\" to print the complete document."
+ TQString whatsThisAllPagesLabel = i18n( " <qt><b>All Pages:</b> Select \"All\" to print the complete document."
" Since this is the default, it is pre-selected."
" </p>"
" </qt>" );
- QString whatsThisCurrentPagesLabel = i18n( " <qt><b>Current Page:</b> Select <em>\"Current\"</em> if you want "
+ TQString whatsThisCurrentPagesLabel = i18n( " <qt><b>Current Page:</b> Select <em>\"Current\"</em> if you want "
" to print the page currently visible in your KDE application.</p>"
" <p><b>Note:</b> this field is disabled if you print from"
" non-KDE applications like Mozilla or OpenOffice.org, since here KDEPrint has no"
" means to determine which document page you are currently viewing.</p></qt>" );
- QString whatsThisPageRangeLabel = i18n( " <qt><b>Page Range:</b> Choose a \"Page Range\" to select a subset of the"
+ TQString whatsThisPageRangeLabel = i18n( " <qt><b>Page Range:</b> Choose a \"Page Range\" to select a subset of the"
" complete document pages"
" to be printed. The format is <em>\"n,m,o-p,q,r,s-t, u\"</em>.</p>"
" <p><b>Example:</b> <em>\"4,6,10-13,17,20,23-25\"</em> will print"
@@ -71,7 +71,7 @@ KPCopiesPage::KPCopiesPage(KPrinter *prt, QWidget *parent, const char *name)
" </pre>"
" </p> "
"</qt>" );
- QString whatsThisPageSetLabel = i18n( " <qt><b>Page Set:</b>"
+ TQString whatsThisPageSetLabel = i18n( " <qt><b>Page Set:</b>"
" <p>Choose <em>\"All Pages\"</em>, <em>\"Even Pages\"</em> or"
" <em>\"Odd Pages\"</em>"
" if you want to print a page selection matching one of these terms. The default"
@@ -94,7 +94,7 @@ KPCopiesPage::KPCopiesPage(KPrinter *prt, QWidget *parent, const char *name)
" </pre>"
" </p> "
" </qt>" );
- QString whatsThisCopiesLabel = i18n( " <qt><b>Output Settings:</b>"
+ TQString whatsThisCopiesLabel = i18n( " <qt><b>Output Settings:</b>"
" Here you can determine the number of copies, the output order and the collate"
" mode for the pages of your printjob. (Note, that the maximum number of copies "
" allowed to print may be restricted by your print subsystem.)</p>"
@@ -112,7 +112,7 @@ KPCopiesPage::KPCopiesPage(KPrinter *prt, QWidget *parent, const char *name)
" </pre>"
" </p> "
".</qt>" );
- QString whatsThisNumberOfCopiesLabel = i18n( " <qt><b>Number of Copies:</b> Determine the number of requested copies here."
+ TQString whatsThisNumberOfCopiesLabel = i18n( " <qt><b>Number of Copies:</b> Determine the number of requested copies here."
" You can increase or decrease"
" the number of printed copies by clicking on the up and down arrows. You can also type the figure"
" directly into the box. </p>"
@@ -125,7 +125,7 @@ KPCopiesPage::KPCopiesPage(KPrinter *prt, QWidget *parent, const char *name)
" </pre>"
" </p> "
" </qt>" );
- QString whatsThisCollateLabel = i18n( " <qt><b>Collate Copies</b>"
+ TQString whatsThisCollateLabel = i18n( " <qt><b>Collate Copies</b>"
" <p>If the <em>\"Collate\"</em> checkbox is enabled (default), the output order for"
" multiple copies of a multi-page document will be \"1-2-3-..., 1-2-3-..., 1-2-3-...\".</p>"
" <p>If the <em>\"Collate\"</em> checkbox is disabled, the output order for"
@@ -139,7 +139,7 @@ KPCopiesPage::KPCopiesPage(KPrinter *prt, QWidget *parent, const char *name)
" </pre>"
" </p> "
" </qt>" );
- QString whatsThisReverseLabel = i18n( " <qt><b>Reverse Order</b>"
+ TQString whatsThisReverseLabel = i18n( " <qt><b>Reverse Order</b>"
" <p> If the <em>\"Reverse\"</em> checkbox is enabled, the output order for"
" multiple copies of a multi-page document will be \"...-3-2-1, ...-3-2-1, ...-3-2-1\", if you"
" also have <em>en</em>abled the <em>\"Collate\"</em> checkbox at the same time"
@@ -164,76 +164,76 @@ KPCopiesPage::KPCopiesPage(KPrinter *prt, QWidget *parent, const char *name)
setId(KPrinter::CopiesPage);
// widget creation
- QButtonGroup *m_pagebox = new QButtonGroup(0, Qt::Vertical, i18n("Page Selection"), this);
- QWhatsThis::add(m_pagebox, whatsThisPageSelectionLabel);
- m_all = new QRadioButton(i18n("&All"), m_pagebox);
- QWhatsThis::add(m_all, whatsThisAllPagesLabel);
- m_current = new QRadioButton(i18n("Cu&rrent"), m_pagebox);
- QWhatsThis::add(m_current, whatsThisCurrentPagesLabel);
- m_range = new QRadioButton(i18n("Ran&ge"), m_pagebox);
- QWhatsThis::add(m_range, whatsThisPageRangeLabel);
- m_rangeedit = new QLineEdit(m_pagebox);
- QWhatsThis::add(m_rangeedit, whatsThisPageRangeLabel);
- connect(m_range, SIGNAL(clicked()), m_rangeedit, SLOT(setFocus()));
- QToolTip::add(m_rangeedit, i18n("<p>Enter pages or group of pages to print separated by commas (1,2-5,8).</p>"));
-// QWhatsThis::add(m_rangeedit, i18n("<p>Enter pages or group of pages to print separated by commas (1,2-5,8).</p>"));
- //QLabel *m_rangeexpl = new QLabel(m_pagebox);
+ QButtonGroup *m_pagebox = new TQButtonGroup(0, Qt::Vertical, i18n("Page Selection"), this);
+ TQWhatsThis::add(m_pagebox, whatsThisPageSelectionLabel);
+ m_all = new TQRadioButton(i18n("&All"), m_pagebox);
+ TQWhatsThis::add(m_all, whatsThisAllPagesLabel);
+ m_current = new TQRadioButton(i18n("Cu&rrent"), m_pagebox);
+ TQWhatsThis::add(m_current, whatsThisCurrentPagesLabel);
+ m_range = new TQRadioButton(i18n("Ran&ge"), m_pagebox);
+ TQWhatsThis::add(m_range, whatsThisPageRangeLabel);
+ m_rangeedit = new TQLineEdit(m_pagebox);
+ TQWhatsThis::add(m_rangeedit, whatsThisPageRangeLabel);
+ connect(m_range, TQT_SIGNAL(clicked()), m_rangeedit, TQT_SLOT(setFocus()));
+ TQToolTip::add(m_rangeedit, i18n("<p>Enter pages or group of pages to print separated by commas (1,2-5,8).</p>"));
+// TQWhatsThis::add(m_rangeedit, i18n("<p>Enter pages or group of pages to print separated by commas (1,2-5,8).</p>"));
+ //QLabel *m_rangeexpl = new TQLabel(m_pagebox);
//m_rangeexpl->setText(i18n("<p>Enter pages or group of pages to print separated by commas (1,2-5,8).</p>"));
- QGroupBox *m_copybox = new QGroupBox(0, Qt::Vertical, i18n("Output Settings"), this);
- QWhatsThis::add(m_copybox, whatsThisCopiesLabel);
- m_collate = new QCheckBox(i18n("Co&llate"), m_copybox);
- QWhatsThis::add(m_collate, whatsThisCollateLabel);
- m_order = new QCheckBox(i18n("Re&verse"), m_copybox);
- QWhatsThis::add(m_order, whatsThisReverseLabel);
- m_collatepix = new QLabel(m_copybox);
+ QGroupBox *m_copybox = new TQGroupBox(0, Qt::Vertical, i18n("Output Settings"), this);
+ TQWhatsThis::add(m_copybox, whatsThisCopiesLabel);
+ m_collate = new TQCheckBox(i18n("Co&llate"), m_copybox);
+ TQWhatsThis::add(m_collate, whatsThisCollateLabel);
+ m_order = new TQCheckBox(i18n("Re&verse"), m_copybox);
+ TQWhatsThis::add(m_order, whatsThisReverseLabel);
+ m_collatepix = new TQLabel(m_copybox);
m_collatepix->setAlignment(Qt::AlignCenter);
m_collatepix->setMinimumHeight(70);
- QLabel *m_copieslabel = new QLabel(i18n("Cop&ies:"), m_copybox);
- m_copies = new QSpinBox(m_copybox);
+ QLabel *m_copieslabel = new TQLabel(i18n("Cop&ies:"), m_copybox);
+ m_copies = new TQSpinBox(m_copybox);
m_copies->setRange(1,999);
- QWhatsThis::add(m_copies, whatsThisNumberOfCopiesLabel);
+ TQWhatsThis::add(m_copies, whatsThisNumberOfCopiesLabel);
m_copieslabel->setBuddy(m_copies);
- QWhatsThis::add(m_copieslabel, whatsThisNumberOfCopiesLabel);
- m_pageset = new QComboBox(m_pagebox);
+ TQWhatsThis::add(m_copieslabel, whatsThisNumberOfCopiesLabel);
+ m_pageset = new TQComboBox(m_pagebox);
m_pageset->insertItem(i18n("All Pages"));
m_pageset->insertItem(i18n("Odd Pages"));
m_pageset->insertItem(i18n("Even Pages"));
- QWhatsThis::add(m_pageset, whatsThisPageSetLabel);
- QLabel *m_pagesetlabel = new QLabel(i18n("Page &set:"), m_pagebox);
+ TQWhatsThis::add(m_pageset, whatsThisPageSetLabel);
+ QLabel *m_pagesetlabel = new TQLabel(i18n("Page &set:"), m_pagebox);
m_pagesetlabel->setBuddy(m_pageset);
- QWhatsThis::add(m_pagesetlabel, whatsThisPageSetLabel);
+ TQWhatsThis::add(m_pagesetlabel, whatsThisPageSetLabel);
KSeparator *sepline = new KSeparator(Horizontal, m_pagebox);
sepline->setMinimumHeight(10);
- QWidget::setTabOrder( m_all, m_current );
- QWidget::setTabOrder( m_current, m_range );
- QWidget::setTabOrder( m_range, m_rangeedit );
- QWidget::setTabOrder( m_rangeedit, m_pageset );
- QWidget::setTabOrder( m_pageset, m_copies );
- QWidget::setTabOrder( m_copies, m_collate );
- QWidget::setTabOrder( m_collate, m_order );
+ TQWidget::setTabOrder( m_all, m_current );
+ TQWidget::setTabOrder( m_current, m_range );
+ TQWidget::setTabOrder( m_range, m_rangeedit );
+ TQWidget::setTabOrder( m_rangeedit, m_pageset );
+ TQWidget::setTabOrder( m_pageset, m_copies );
+ TQWidget::setTabOrder( m_copies, m_collate );
+ TQWidget::setTabOrder( m_collate, m_order );
// layout creation
- QGridLayout *l1 = new QGridLayout(this, 2, 2, 0, 5);
+ QGridLayout *l1 = new TQGridLayout(this, 2, 2, 0, 5);
l1->setRowStretch(1,1);
l1->setColStretch(0,1);
l1->setColStretch(1,1);
l1->addWidget(m_pagebox,0,0);
l1->addWidget(m_copybox,0,1);
- QVBoxLayout *l3 = new QVBoxLayout(m_pagebox->layout(), 5);
+ QVBoxLayout *l3 = new TQVBoxLayout(m_pagebox->layout(), 5);
l3->addWidget(m_all);
l3->addWidget(m_current);
- QHBoxLayout *l4 = new QHBoxLayout(0, 0, 5);
+ QHBoxLayout *l4 = new TQHBoxLayout(0, 0, 5);
l3->addLayout(l4);
l4->addWidget(m_range,0);
l4->addWidget(m_rangeedit,1);
//l3->addWidget(m_rangeexpl);
l3->addWidget(sepline);
- QHBoxLayout *l2 = new QHBoxLayout(0, 0, 5);
+ QHBoxLayout *l2 = new TQHBoxLayout(0, 0, 5);
l3->addLayout(l2);
l2->addWidget(m_pagesetlabel,0);
l2->addWidget(m_pageset,1);
- QGridLayout *l5 = new QGridLayout(m_copybox->layout(), 4, 2, 10);
+ QGridLayout *l5 = new TQGridLayout(m_copybox->layout(), 4, 2, 10);
l5->setRowStretch(4,1);
l5->addWidget(m_copieslabel,0,0);
l5->addWidget(m_copies,0,1);
@@ -248,9 +248,9 @@ KPCopiesPage::KPCopiesPage(KPrinter *prt, QWidget *parent, const char *name)
slotCollateClicked();
// connections
- connect(m_rangeedit,SIGNAL(textChanged(const QString&)),SLOT(slotRangeEntered()));
- connect(m_collate,SIGNAL(clicked()),SLOT(slotCollateClicked()));
- connect(m_order,SIGNAL(clicked()),SLOT(slotCollateClicked()));
+ connect(m_rangeedit,TQT_SIGNAL(textChanged(const TQString&)),TQT_SLOT(slotRangeEntered()));
+ connect(m_collate,TQT_SIGNAL(clicked()),TQT_SLOT(slotCollateClicked()));
+ connect(m_order,TQT_SIGNAL(clicked()),TQT_SLOT(slotCollateClicked()));
if (!kapp->authorize("print/copies"))
{
@@ -293,7 +293,7 @@ void KPCopiesPage::initialize(bool usePlugin)
slotCollateClicked();
}
-void KPCopiesPage::setOptions(const QMap<QString,QString>& options)
+void KPCopiesPage::setOptions(const TQMap<TQString,TQString>& options)
{
QString value;
// copies
@@ -326,7 +326,7 @@ void KPCopiesPage::setOptions(const QMap<QString,QString>& options)
m_pageset->setCurrentItem(0);
}
-void KPCopiesPage::getOptions(QMap<QString,QString>& options, bool incldef)
+void KPCopiesPage::getOptions(TQMap<TQString,TQString>& options, bool incldef)
{
// copies
options["kde-copies"] = m_copies->text();
@@ -336,9 +336,9 @@ void KPCopiesPage::getOptions(QMap<QString,QString>& options, bool incldef)
options["kde-collate"] = (m_collate->isChecked() ? "Collate" : "Uncollate");
// ranges
options["kde-current"] = (m_current->isChecked() ? "1" : "0");
- options["kde-range"] = (m_range->isChecked() ? m_rangeedit->text() : (incldef ? QString::fromLatin1("1-") : QString::fromLatin1("")));
+ options["kde-range"] = (m_range->isChecked() ? m_rangeedit->text() : (incldef ? TQString::fromLatin1("1-") : TQString::fromLatin1("")));
// page set
- options["kde-pageset"] = QString::number(m_pageset->currentItem());
+ options["kde-pageset"] = TQString::number(m_pageset->currentItem());
}
void KPCopiesPage::reload()
diff --git a/kdeprint/kpcopiespage.h b/kdeprint/kpcopiespage.h
index d20b09c73..3cca90ca8 100644
--- a/kdeprint/kpcopiespage.h
+++ b/kdeprint/kpcopiespage.h
@@ -35,11 +35,11 @@ class KDEPRINT_EXPORT KPCopiesPage : public KPrintDialogPage, public KPReloadObj
{
Q_OBJECT
public:
- KPCopiesPage(KPrinter *prt = 0, QWidget *parent = 0, const char *name = 0);
+ KPCopiesPage(KPrinter *prt = 0, TQWidget *parent = 0, const char *name = 0);
~KPCopiesPage();
- void setOptions(const QMap<QString,QString>& opts);
- void getOptions(QMap<QString,QString>& opts, bool incldef = false);
+ void setOptions(const TQMap<TQString,TQString>& opts);
+ void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false);
void initialize(bool usePlugin = true);
protected slots:
diff --git a/kdeprint/kpdriverpage.cpp b/kdeprint/kpdriverpage.cpp
index 749cf5cf2..e3d04c0a3 100644
--- a/kdeprint/kpdriverpage.cpp
+++ b/kdeprint/kpdriverpage.cpp
@@ -21,10 +21,10 @@
#include "driverview.h"
#include "driver.h"
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klocale.h>
-KPDriverPage::KPDriverPage(KMPrinter *p, DrMain *d, QWidget *parent, const char *name)
+KPDriverPage::KPDriverPage(KMPrinter *p, DrMain *d, TQWidget *parent, const char *name)
: KPrintDialogPage(p,d,parent,name)
{
setTitle(i18n("Driver Settings"));
@@ -33,7 +33,7 @@ KPDriverPage::KPDriverPage(KMPrinter *p, DrMain *d, QWidget *parent, const char
m_view->setAllowFixed(false);
if (driver()) m_view->setDriver(driver());
- QVBoxLayout *lay1 = new QVBoxLayout(this, 0, 0);
+ QVBoxLayout *lay1 = new TQVBoxLayout(this, 0, 0);
lay1->addWidget(m_view);
}
@@ -41,7 +41,7 @@ KPDriverPage::~KPDriverPage()
{
}
-bool KPDriverPage::isValid(QString& msg)
+bool KPDriverPage::isValid(TQString& msg)
{
if (m_view->hasConflict())
{
@@ -52,12 +52,12 @@ bool KPDriverPage::isValid(QString& msg)
return true;
}
-void KPDriverPage::setOptions(const QMap<QString,QString>& opts)
+void KPDriverPage::setOptions(const TQMap<TQString,TQString>& opts)
{
m_view->setOptions(opts);
}
-void KPDriverPage::getOptions(QMap<QString,QString>& opts, bool incldef)
+void KPDriverPage::getOptions(TQMap<TQString,TQString>& opts, bool incldef)
{
m_view->getOptions(opts,incldef);
}
diff --git a/kdeprint/kpdriverpage.h b/kdeprint/kpdriverpage.h
index a802e03c3..90f3ebb2d 100644
--- a/kdeprint/kpdriverpage.h
+++ b/kdeprint/kpdriverpage.h
@@ -27,12 +27,12 @@ class DriverView;
class KDEPRINT_EXPORT KPDriverPage : public KPrintDialogPage
{
public:
- KPDriverPage(KMPrinter *p, DrMain *d = 0, QWidget *parent = 0, const char *name = 0);
+ KPDriverPage(KMPrinter *p, DrMain *d = 0, TQWidget *parent = 0, const char *name = 0);
~KPDriverPage();
- bool isValid(QString& msg);
- void setOptions(const QMap<QString,QString>& opts);
- void getOptions(QMap<QString,QString>& opts, bool incldef = false);
+ bool isValid(TQString& msg);
+ void setOptions(const TQMap<TQString,TQString>& opts);
+ void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false);
protected:
DriverView *m_view;
diff --git a/kdeprint/kpfileselectpage.cpp b/kdeprint/kpfileselectpage.cpp
index da7f9e115..5292c613f 100644
--- a/kdeprint/kpfileselectpage.cpp
+++ b/kdeprint/kpfileselectpage.cpp
@@ -20,14 +20,14 @@
#include "kpfileselectpage.h"
#include "kfilelist.h"
-#include <qlayout.h>
-#include <qstringlist.h>
-#include <qregexp.h>
-#include <qheader.h>
+#include <tqlayout.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
+#include <tqheader.h>
#include <klocale.h>
#include <kiconloader.h>
-KPFileSelectPage::KPFileSelectPage(QWidget *parent, const char *name)
+KPFileSelectPage::KPFileSelectPage(TQWidget *parent, const char *name)
: KPrintDialogPage(parent, name)
{
setTitle(i18n("&Files"));
@@ -35,13 +35,13 @@ KPFileSelectPage::KPFileSelectPage(QWidget *parent, const char *name)
m_files = new KFileList(this);
- QHBoxLayout *l0 = new QHBoxLayout(this, 0, 10);
+ QHBoxLayout *l0 = new TQHBoxLayout(this, 0, 10);
l0->addWidget(m_files);
resize(100, 100);
}
-void KPFileSelectPage::getOptions(QMap<QString,QString>& opts, bool incldef)
+void KPFileSelectPage::getOptions(TQMap<TQString,TQString>& opts, bool incldef)
{
// (incldef == false) is a hint telling that it should be the last time
// and we want to do it only once
@@ -52,12 +52,12 @@ void KPFileSelectPage::getOptions(QMap<QString,QString>& opts, bool incldef)
}
}
-void KPFileSelectPage::setOptions(const QMap<QString,QString>& opts)
+void KPFileSelectPage::setOptions(const TQMap<TQString,TQString>& opts)
{
// do it only once as files will only be selected there
if (m_first)
{
- QStringList l = QStringList::split("@@", opts["kde-filelist"], false);
+ QStringList l = TQStringList::split("@@", opts["kde-filelist"], false);
m_files->setFileList(l);
m_first = false;
diff --git a/kdeprint/kpfileselectpage.h b/kdeprint/kpfileselectpage.h
index 5f3822859..518f5a106 100644
--- a/kdeprint/kpfileselectpage.h
+++ b/kdeprint/kpfileselectpage.h
@@ -27,10 +27,10 @@ class KFileList;
class KPFileSelectPage : public KPrintDialogPage
{
public:
- KPFileSelectPage(QWidget *parent = 0, const char *name = 0);
+ KPFileSelectPage(TQWidget *parent = 0, const char *name = 0);
- void getOptions(QMap<QString,QString>& opts, bool incldef = false);
- void setOptions(const QMap<QString,QString>& opts);
+ void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false);
+ void setOptions(const TQMap<TQString,TQString>& opts);
private:
KFileList *m_files;
diff --git a/kdeprint/kpfilterpage.cpp b/kdeprint/kpfilterpage.cpp
index 50aa30135..d7906a290 100644
--- a/kdeprint/kpfilterpage.cpp
+++ b/kdeprint/kpfilterpage.cpp
@@ -21,11 +21,11 @@
#include "kmfactory.h"
#include "kxmlcommand.h"
-#include <qtoolbutton.h>
-#include <qheader.h>
-#include <qtooltip.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
+#include <tqtoolbutton.h>
+#include <tqheader.h>
+#include <tqtooltip.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
#include <klistview.h>
#include <klocale.h>
#include <kiconloader.h>
@@ -35,11 +35,11 @@
#include <kapplication.h>
#include <kdialog.h>
-KPFilterPage::KPFilterPage(QWidget *parent, const char *name)
+KPFilterPage::KPFilterPage(TQWidget *parent, const char *name)
: KPrintDialogPage(parent,name)
{
//WhatsThis strings.... (added by pfeifle@kde.org)
- QString whatsThisAddFilterButton = i18n( " <qt> <b>Add Filter button</b>"
+ TQString whatsThisAddFilterButton = i18n( " <qt> <b>Add Filter button</b>"
" <p>This button calls a little dialog to let you"
" select a filter here. </p>"
" <p><b>Note 1:</b> You can chain different filters as long as you make "
@@ -51,28 +51,28 @@ KPFilterPage::KPFilterPage(QWidget *parent, const char *name)
" </ul>"
" </qt>" );
- QString whatsThisRemoveFilterButton = i18n(" <qt> <b>Remove Filter button</b>"
+ TQString whatsThisRemoveFilterButton = i18n(" <qt> <b>Remove Filter button</b>"
" <p>This button removes the highlighted filter from the"
" list of filters."
" </qt>" );
- QString whatsThisMoveFilterUpButton = i18n(" <qt> <b>Move Filter Up button</b>"
+ TQString whatsThisMoveFilterUpButton = i18n(" <qt> <b>Move Filter Up button</b>"
" <p>This button moves the highlighted filter up in the list"
" of filters, towards the front of the filtering chain. </p>"
" </qt>" );
- QString whatsThisMoveFilterDownButton = i18n(" <qt> <b>Move Filter Down button</b>"
+ TQString whatsThisMoveFilterDownButton = i18n(" <qt> <b>Move Filter Down button</b>"
" <p>This button moves the highlighted filter down in the list"
" of filters, towards the end of the filtering chain..</p>"
" </qt>" );
- QString whatsThisConfigureFilterButton = i18n( " <qt> <b>Configure Filter button</b>"
+ TQString whatsThisConfigureFilterButton = i18n( " <qt> <b>Configure Filter button</b>"
" <p>This button lets you configure the currently highlighted filter."
" It opens a separate dialog. "
" </p>"
" </qt>" );
- QString whatsThisFilterInfoPane = i18n( " <qt> <b>Filter Info Pane</b>"
+ TQString whatsThisFilterInfoPane = i18n( " <qt> <b>Filter Info Pane</b>"
" <p>This field shows some general info about the selected filter. "
" Amongst them are: "
" <ul> "
@@ -88,7 +88,7 @@ KPFilterPage::KPFilterPage(QWidget *parent, const char *name)
" </p>"
" </qt>" );
- QString whatsThisFilterchainListView = i18n( " <qt> <b>Filtering Chain</b> (if enabled, is run <em>before</em> actual "
+ TQString whatsThisFilterchainListView = i18n( " <qt> <b>Filtering Chain</b> (if enabled, is run <em>before</em> actual "
" job submission to print system)"
" <p>This field shows which filters are currently selected to act as 'pre-filters' "
" for KDEPrint. Pre-filters are processing the print files <em>before</em> they are "
@@ -127,56 +127,56 @@ KPFilterPage::KPFilterPage(QWidget *parent, const char *name)
m_valid = true;
m_view = new KListView(this);
- QWhatsThis::add(m_view, whatsThisFilterchainListView);
+ TQWhatsThis::add(m_view, whatsThisFilterchainListView);
m_view->addColumn("");
- m_view->setFrameStyle(QFrame::WinPanel|QFrame::Sunken);
+ m_view->setFrameStyle(TQFrame::WinPanel|TQFrame::Sunken);
m_view->setLineWidth(1);
m_view->setSorting(-1);
m_view->header()->hide();
- connect(m_view,SIGNAL(selectionChanged(QListViewItem*)),SLOT(slotItemSelected(QListViewItem*)));
+ connect(m_view,TQT_SIGNAL(selectionChanged(TQListViewItem*)),TQT_SLOT(slotItemSelected(TQListViewItem*)));
- m_add = new QToolButton(this);
- QWhatsThis::add(m_add, whatsThisAddFilterButton);
+ m_add = new TQToolButton(this);
+ TQWhatsThis::add(m_add, whatsThisAddFilterButton);
m_add->setIconSet(BarIconSet("filter"));
- QToolTip::add(m_add, i18n("Add filter"));
+ TQToolTip::add(m_add, i18n("Add filter"));
- m_remove = new QToolButton(this);
- QWhatsThis::add(m_remove, whatsThisRemoveFilterButton);
+ m_remove = new TQToolButton(this);
+ TQWhatsThis::add(m_remove, whatsThisRemoveFilterButton);
m_remove->setIconSet(BarIconSet("remove"));
- QToolTip::add(m_remove, i18n("Remove filter"));
+ TQToolTip::add(m_remove, i18n("Remove filter"));
- m_up = new QToolButton(this);
- QWhatsThis::add(m_up, whatsThisMoveFilterUpButton);
+ m_up = new TQToolButton(this);
+ TQWhatsThis::add(m_up, whatsThisMoveFilterUpButton);
m_up->setIconSet(BarIconSet("up"));
- QToolTip::add(m_up, i18n("Move filter up"));
+ TQToolTip::add(m_up, i18n("Move filter up"));
- m_down = new QToolButton(this);
- QWhatsThis::add(m_down, whatsThisMoveFilterDownButton);
+ m_down = new TQToolButton(this);
+ TQWhatsThis::add(m_down, whatsThisMoveFilterDownButton);
m_down->setIconSet(BarIconSet("down"));
- QToolTip::add(m_down, i18n("Move filter down"));
+ TQToolTip::add(m_down, i18n("Move filter down"));
- m_configure = new QToolButton(this);
- QWhatsThis::add(m_configure, whatsThisConfigureFilterButton);
+ m_configure = new TQToolButton(this);
+ TQWhatsThis::add(m_configure, whatsThisConfigureFilterButton);
m_configure->setIconSet(BarIconSet("configure"));
- QToolTip::add(m_configure, i18n("Configure filter"));
+ TQToolTip::add(m_configure, i18n("Configure filter"));
- connect(m_add,SIGNAL(clicked()),SLOT(slotAddClicked()));
- connect(m_remove,SIGNAL(clicked()),SLOT(slotRemoveClicked()));
- connect(m_up,SIGNAL(clicked()),SLOT(slotUpClicked()));
- connect(m_down,SIGNAL(clicked()),SLOT(slotDownClicked()));
- connect(m_configure,SIGNAL(clicked()),SLOT(slotConfigureClicked()));
- connect(m_view,SIGNAL(doubleClicked(QListViewItem*)),SLOT(slotConfigureClicked()));
+ connect(m_add,TQT_SIGNAL(clicked()),TQT_SLOT(slotAddClicked()));
+ connect(m_remove,TQT_SIGNAL(clicked()),TQT_SLOT(slotRemoveClicked()));
+ connect(m_up,TQT_SIGNAL(clicked()),TQT_SLOT(slotUpClicked()));
+ connect(m_down,TQT_SIGNAL(clicked()),TQT_SLOT(slotDownClicked()));
+ connect(m_configure,TQT_SIGNAL(clicked()),TQT_SLOT(slotConfigureClicked()));
+ connect(m_view,TQT_SIGNAL(doubleClicked(TQListViewItem*)),TQT_SLOT(slotConfigureClicked()));
m_info = new KActiveLabel(this);
- QWhatsThis::add(m_info, whatsThisFilterInfoPane);
- m_info->setVScrollBarMode( QScrollView::Auto );
- m_info->setHScrollBarMode( QScrollView::Auto );
- m_info->setFrameStyle( QFrame::Panel|QFrame::Sunken );
- m_info->setMinimumSize( QSize( 240, 100 ) );
+ TQWhatsThis::add(m_info, whatsThisFilterInfoPane);
+ m_info->setVScrollBarMode( TQScrollView::Auto );
+ m_info->setHScrollBarMode( TQScrollView::Auto );
+ m_info->setFrameStyle( TQFrame::Panel|TQFrame::Sunken );
+ m_info->setMinimumSize( TQSize( 240, 100 ) );
- QGridLayout *l1 = new QGridLayout(this, 2, 2, 0, KDialog::spacingHint());
+ QGridLayout *l1 = new TQGridLayout(this, 2, 2, 0, KDialog::spacingHint());
l1->setColStretch(0, 1);
- QVBoxLayout *l2 = new QVBoxLayout(0, 0, 1);
+ QVBoxLayout *l2 = new TQVBoxLayout(0, 0, 1);
l1->addWidget(m_view, 0, 0);
l1->addLayout(l2, 0, 1);
l2->addWidget(m_add);
@@ -210,7 +210,7 @@ void KPFilterPage::updateButton()
void KPFilterPage::slotAddClicked()
{
bool ok;
- QString choice = KXmlCommandManager::self()->selectCommand( this );
+ TQString choice = KXmlCommandManager::self()->selectCommand( this );
ok = !choice.isEmpty();
if (ok)
{
@@ -226,7 +226,7 @@ void KPFilterPage::slotAddClicked()
prev = prev->nextSibling();
}
m_activefilters.insert(cmd->name(), cmd);
- QListViewItem *item = new QListViewItem(m_view, prev, cmd->description(), cmd->name());
+ QListViewItem *item = new TQListViewItem(m_view, prev, cmd->description(), cmd->name());
item->setPixmap(0, SmallIcon("filter"));
checkFilterChain();
}
@@ -251,7 +251,7 @@ void KPFilterPage::slotUpClicked()
QListViewItem *item = m_view->selectedItem();
if (item && item->itemAbove())
{
- QListViewItem *clone = new QListViewItem(m_view,item->itemAbove()->itemAbove(),item->text(0),item->text(1));
+ QListViewItem *clone = new TQListViewItem(m_view,item->itemAbove()->itemAbove(),item->text(0),item->text(1));
clone->setPixmap(0, SmallIcon("filter"));
delete item;
m_view->setSelected(clone, true);
@@ -264,7 +264,7 @@ void KPFilterPage::slotDownClicked()
QListViewItem *item = m_view->selectedItem();
if (item && item->itemBelow())
{
- QListViewItem *clone = new QListViewItem(m_view,item->itemBelow(),item->text(0),item->text(1));
+ QListViewItem *clone = new TQListViewItem(m_view,item->itemBelow(),item->text(0),item->text(1));
clone->setPixmap(0, SmallIcon("filter"));
delete item;
m_view->setSelected(clone, true);
@@ -279,7 +279,7 @@ void KPFilterPage::slotConfigureClicked()
KMessageBox::error(this,i18n("Internal error: unable to load filter."));
}
-void KPFilterPage::slotItemSelected(QListViewItem *item)
+void KPFilterPage::slotItemSelected(TQListViewItem *item)
{
m_remove->setEnabled((item != 0));
m_up->setEnabled((item != 0 && item->itemAbove() != 0));
@@ -288,11 +288,11 @@ void KPFilterPage::slotItemSelected(QListViewItem *item)
updateInfo();
}
-void KPFilterPage::setOptions(const QMap<QString,QString>& opts)
+void KPFilterPage::setOptions(const TQMap<TQString,TQString>& opts)
{
- QStringList filters = QStringList::split(',',opts["_kde-filters"],false);
+ QStringList filters = TQStringList::split(',',opts["_kde-filters"],false);
// remove unneeded filters
- QDictIterator<KXmlCommand> dit(m_activefilters);
+ TQDictIterator<KXmlCommand> dit(m_activefilters);
for (;dit.current();)
{
if (filters.find(dit.currentKey()) == filters.end())
@@ -306,7 +306,7 @@ void KPFilterPage::setOptions(const QMap<QString,QString>& opts)
// add needed filters
m_view->clear();
QListViewItem *item(0);
- for (QStringList::ConstIterator sit=filters.begin(); sit!=filters.end(); ++sit)
+ for (TQStringList::ConstIterator sit=filters.begin(); sit!=filters.end(); ++sit)
{
KXmlCommand *f(0);
if ((f=m_activefilters.find(*sit)) == 0)
@@ -319,15 +319,15 @@ void KPFilterPage::setOptions(const QMap<QString,QString>& opts)
}
}
if (f)
- item = new QListViewItem(m_view,item,f->description(),f->name());
+ item = new TQListViewItem(m_view,item,f->description(),f->name());
}
checkFilterChain();
}
-void KPFilterPage::getOptions(QMap<QString,QString>& opts, bool incldef)
+void KPFilterPage::getOptions(TQMap<TQString,TQString>& opts, bool incldef)
{
QStringList filters = activeList();
- for (QStringList::ConstIterator it=filters.begin(); it!=filters.end(); ++it)
+ for (TQStringList::ConstIterator it=filters.begin(); it!=filters.end(); ++it)
{
KXmlCommand *f = m_activefilters.find(*it);
if (f)
@@ -339,7 +339,7 @@ void KPFilterPage::getOptions(QMap<QString,QString>& opts, bool incldef)
}
}
-QStringList KPFilterPage::activeList()
+TQStringList KPFilterPage::activeList()
{
QStringList list;
QListViewItem *item = m_view->firstChild();
@@ -387,7 +387,7 @@ void KPFilterPage::checkFilterChain()
}
}
-bool KPFilterPage::isValid(QString& msg)
+bool KPFilterPage::isValid(TQString& msg)
{
if (!m_valid)
{
diff --git a/kdeprint/kpfilterpage.h b/kdeprint/kpfilterpage.h
index f6becc6a5..c05b72e56 100644
--- a/kdeprint/kpfilterpage.h
+++ b/kdeprint/kpfilterpage.h
@@ -22,8 +22,8 @@
#include "kprintdialogpage.h"
-#include <qdict.h>
-#include <qstringlist.h>
+#include <tqdict.h>
+#include <tqstringlist.h>
class KListView;
class KXmlCommand;
@@ -35,12 +35,12 @@ class KPFilterPage : public KPrintDialogPage
{
Q_OBJECT
public:
- KPFilterPage(QWidget *parent = 0, const char *name = 0);
+ KPFilterPage(TQWidget *parent = 0, const char *name = 0);
~KPFilterPage();
- void setOptions(const QMap<QString,QString>& opts);
- void getOptions(QMap<QString,QString>& opts, bool incldef = false);
- bool isValid(QString& msg);
+ void setOptions(const TQMap<TQString,TQString>& opts);
+ void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false);
+ bool isValid(TQString& msg);
protected slots:
void slotAddClicked();
@@ -48,18 +48,18 @@ protected slots:
void slotUpClicked();
void slotDownClicked();
void slotConfigureClicked();
- void slotItemSelected(QListViewItem*);
+ void slotItemSelected(TQListViewItem*);
protected:
KXmlCommand* currentFilter();
void checkFilterChain();
void updateInfo();
- QStringList activeList();
+ TQStringList activeList();
void updateButton();
private:
KListView *m_view;
QStringList m_filters; // <idname,description> pairs
- QDict<KXmlCommand> m_activefilters;
+ TQDict<KXmlCommand> m_activefilters;
QToolButton *m_add, *m_remove, *m_up, *m_down, *m_configure;
bool m_valid;
QTextBrowser *m_info;
diff --git a/kdeprint/kpgeneralpage.cpp b/kdeprint/kpgeneralpage.cpp
index 076d64e23..73f21f4af 100644
--- a/kdeprint/kpgeneralpage.cpp
+++ b/kdeprint/kpgeneralpage.cpp
@@ -22,12 +22,12 @@
#include "kmprinter.h"
#include "kprinter.h"
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qbuttongroup.h>
-#include <qlayout.h>
-#include <qradiobutton.h>
-#include <qwhatsthis.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqbuttongroup.h>
+#include <tqlayout.h>
+#include <tqradiobutton.h>
+#include <tqwhatsthis.h>
#include <kcursor.h>
#include <kdebug.h>
@@ -49,10 +49,10 @@
#define NUP_2_ID 1
#define NUP_4_ID 2
-static void initCombo(QComboBox *cb, DrListOption *opt)
+static void initCombo(TQComboBox *cb, DrListOption *opt)
{
cb->clear();
- QPtrListIterator<DrBase> it(*(opt->choices()));
+ TQPtrListIterator<DrBase> it(*(opt->choices()));
for (;it.current();++it)
{
cb->insertItem(it.current()->get("text"));
@@ -61,7 +61,7 @@ static void initCombo(QComboBox *cb, DrListOption *opt)
}
}
-static void setComboItem(QComboBox *cb, const QString& txt)
+static void setComboItem(TQComboBox *cb, const TQString& txt)
{
for (int i=0;i<cb->count();i++)
if (cb->text(i) == txt)
@@ -71,7 +71,7 @@ static void setComboItem(QComboBox *cb, const QString& txt)
}
}
-static int findOption(const char *strs[], int n, const QString& txt)
+static int findOption(const char *strs[], int n, const TQString& txt)
{
for (int i=0;i<n;i+=2)
if (txt == strs[i]) return (i/2);
@@ -116,11 +116,11 @@ static const char* default_type[] = {
//***************************************************************************************************
-KPGeneralPage::KPGeneralPage(KMPrinter *pr, DrMain *dr, QWidget *parent, const char *name)
+KPGeneralPage::KPGeneralPage(KMPrinter *pr, DrMain *dr, TQWidget *parent, const char *name)
: KPrintDialogPage(pr,dr,parent,name)
{
//WhatsThis strings.... (added by pfeifle@kde.org)
- QString whatsThisPrintPropertiesGeneralPage = i18n( " <qt> "
+ TQString whatsThisPrintPropertiesGeneralPage = i18n( " <qt> "
" <p><b>\"General\"</b> </p> "
" <p>This dialog page contains <em>general</em> print job settings."
" General settings are applicable to most printers, most jobs "
@@ -128,7 +128,7 @@ KPGeneralPage::KPGeneralPage(KMPrinter *pr, DrMain *dr, QWidget *parent, const c
" <p>To get more specific help, enable the \"WhatsThis\" cursor and click on any of the "
" text labels or GUI elements of this dialog. "
" </qt>" );
- QString whatsThisGeneralPageSizeLabel = i18n( " <qt> "
+ TQString whatsThisGeneralPageSizeLabel = i18n( " <qt> "
" <p><b>Page size:</b> Select paper size to be printed on from "
" the drop-down menu. </p>"
" <p>The exact list of choices depends on the printer driver (\"PPD\") you have installed.</p> "
@@ -141,7 +141,7 @@ KPGeneralPage::KPGeneralPage(KMPrinter *pr, DrMain *dr, QWidget *parent, const c
" </pre>"
" </p> "
" </qt>" );
- QString whatsThisGeneralPaperTypeLabel = i18n( " <qt> "
+ TQString whatsThisGeneralPaperTypeLabel = i18n( " <qt> "
" <p><b>Paper type:</b> Select paper type to be printed on from "
" the drop-down menu. </p>"
" <p>The exact list of choices depends on the printer driver (\"PPD\") you have installed. </p>"
@@ -154,7 +154,7 @@ KPGeneralPage::KPGeneralPage(KMPrinter *pr, DrMain *dr, QWidget *parent, const c
" </pre>"
" </p> "
" </qt>" );
- QString whatsThisGeneralPaperSourceLabel = i18n( " <qt> "
+ TQString whatsThisGeneralPaperSourceLabel = i18n( " <qt> "
" <p><b>Paper source:</b> Select paper source tray for the paper"
" to be printed on from the drop-down menu. "
" <p>The exact list of choices depends on the printer driver (\"PPD\") you have installed. </p>"
@@ -167,7 +167,7 @@ KPGeneralPage::KPGeneralPage(KMPrinter *pr, DrMain *dr, QWidget *parent, const c
" </pre>"
" </p> "
" </qt>" );
- QString whatsThisGeneralOrientationLabel = i18n( " <qt> "
+ TQString whatsThisGeneralOrientationLabel = i18n( " <qt> "
" <p><b>Image Orientation:</b> Orientation of the printed "
" page image on your paper is controlled by the radio buttons. By default, "
" the orientation is <em>Portrait</em> "
@@ -188,7 +188,7 @@ KPGeneralPage::KPGeneralPage(KMPrinter *pr, DrMain *dr, QWidget *parent, const c
" </pre>"
" </p> "
" </qt>" );
- QString whatsThisGeneralDuplexLabel = i18n( " <qt> "
+ TQString whatsThisGeneralDuplexLabel = i18n( " <qt> "
" <p><b>Duplex Printing:</b> These controls may be grayed out if your printer "
" does not support <em>duplex printing</em> (i.e. printing on both sides of the sheet). "
" These controls are active if your printer supports duplex printing. "
@@ -214,7 +214,7 @@ KPGeneralPage::KPGeneralPage(KMPrinter *pr, DrMain *dr, QWidget *parent, const c
" </pre>"
" </p> "
" </qt>" );
- QString whatsThisGeneralBannersLabel = i18n( " <qt> "
+ TQString whatsThisGeneralBannersLabel = i18n( " <qt> "
" <p><b>Banner Page(s):</b> Select banner(s) to print one or two special sheets "
" of paper just before or after your main job. </p>"
" <p>Banners may contain some pieces of job information, such as user name, time of printing, job"
@@ -236,7 +236,7 @@ KPGeneralPage::KPGeneralPage(KMPrinter *pr, DrMain *dr, QWidget *parent, const c
" </pre>"
" </p> "
" </qt>" );
- QString whatsThisGeneralPagesPerSheetLabel = i18n( " <qt> "
+ TQString whatsThisGeneralPagesPerSheetLabel = i18n( " <qt> "
" <p><b>Pages per Sheet:</b> "
" You can choose to print more than one page onto each sheet of paper. "
" This is sometimes useful to save paper. </p>"
@@ -260,75 +260,75 @@ KPGeneralPage::KPGeneralPage(KMPrinter *pr, DrMain *dr, QWidget *parent, const c
setTitle(i18n("General"));
// widget creation
- QLabel *m_pagesizelabel = new QLabel(i18n("Page s&ize:"), this);
+ QLabel *m_pagesizelabel = new TQLabel(i18n("Page s&ize:"), this);
m_pagesizelabel->setAlignment(Qt::AlignVCenter|Qt::AlignRight);
- QWhatsThis::add(m_pagesizelabel, whatsThisGeneralPageSizeLabel);
+ TQWhatsThis::add(m_pagesizelabel, whatsThisGeneralPageSizeLabel);
- QLabel *m_papertypelabel = new QLabel(i18n("Paper t&ype:"), this);
+ QLabel *m_papertypelabel = new TQLabel(i18n("Paper t&ype:"), this);
m_papertypelabel->setAlignment(Qt::AlignVCenter|Qt::AlignRight);
- QWhatsThis::add(m_papertypelabel, whatsThisGeneralPaperTypeLabel);
+ TQWhatsThis::add(m_papertypelabel, whatsThisGeneralPaperTypeLabel);
- QLabel *m_inputslotlabel = new QLabel(i18n("Paper so&urce:"), this);
+ QLabel *m_inputslotlabel = new TQLabel(i18n("Paper so&urce:"), this);
m_inputslotlabel->setAlignment(Qt::AlignVCenter|Qt::AlignRight);
- QWhatsThis::add(m_inputslotlabel, whatsThisGeneralPaperSourceLabel);
+ TQWhatsThis::add(m_inputslotlabel, whatsThisGeneralPaperSourceLabel);
- m_pagesize = new QComboBox(this);
- QWhatsThis::add(m_pagesize, whatsThisGeneralPageSizeLabel);
+ m_pagesize = new TQComboBox(this);
+ TQWhatsThis::add(m_pagesize, whatsThisGeneralPageSizeLabel);
- m_papertype = new QComboBox(this);
- QWhatsThis::add(m_papertype, whatsThisGeneralPaperTypeLabel);
+ m_papertype = new TQComboBox(this);
+ TQWhatsThis::add(m_papertype, whatsThisGeneralPaperTypeLabel);
- m_inputslot = new QComboBox(this);
- QWhatsThis::add(m_inputslot, whatsThisGeneralPaperSourceLabel);
+ m_inputslot = new TQComboBox(this);
+ TQWhatsThis::add(m_inputslot, whatsThisGeneralPaperSourceLabel);
m_pagesizelabel->setBuddy(m_pagesize);
m_papertypelabel->setBuddy(m_papertype);
m_inputslotlabel->setBuddy(m_inputslot);
- m_orientbox = new QButtonGroup(0, Qt::Vertical, i18n("Orientation"), this);
- QWhatsThis::add(m_orientbox, whatsThisGeneralOrientationLabel);
+ m_orientbox = new TQButtonGroup(0, Qt::Vertical, i18n("Orientation"), this);
+ TQWhatsThis::add(m_orientbox, whatsThisGeneralOrientationLabel);
- m_duplexbox = new QButtonGroup(0, Qt::Vertical, i18n("Duplex Printing"), this);
- QWhatsThis::add(m_duplexbox, whatsThisGeneralDuplexLabel);
+ m_duplexbox = new TQButtonGroup(0, Qt::Vertical, i18n("Duplex Printing"), this);
+ TQWhatsThis::add(m_duplexbox, whatsThisGeneralDuplexLabel);
- m_nupbox = new QButtonGroup(0, Qt::Vertical, i18n("Pages per Sheet"), this);
- QWhatsThis::add(m_nupbox, whatsThisGeneralPagesPerSheetLabel);
+ m_nupbox = new TQButtonGroup(0, Qt::Vertical, i18n("Pages per Sheet"), this);
+ TQWhatsThis::add(m_nupbox, whatsThisGeneralPagesPerSheetLabel);
- m_bannerbox = new QGroupBox(0, Qt::Vertical, i18n("Banners"), this);
- QWhatsThis::add(m_bannerbox, whatsThisGeneralBannersLabel);
+ m_bannerbox = new TQGroupBox(0, Qt::Vertical, i18n("Banners"), this);
+ TQWhatsThis::add(m_bannerbox, whatsThisGeneralBannersLabel);
- QRadioButton *m_portrait = new QRadioButton(i18n("&Portrait"), m_orientbox);
- QRadioButton *m_landscape = new QRadioButton(i18n("&Landscape"), m_orientbox);
- QRadioButton *m_revland = new QRadioButton(i18n("&Reverse landscape"), m_orientbox);
- QRadioButton *m_revport = new QRadioButton(i18n("R&everse portrait"), m_orientbox);
+ QRadioButton *m_portrait = new TQRadioButton(i18n("&Portrait"), m_orientbox);
+ QRadioButton *m_landscape = new TQRadioButton(i18n("&Landscape"), m_orientbox);
+ QRadioButton *m_revland = new TQRadioButton(i18n("&Reverse landscape"), m_orientbox);
+ QRadioButton *m_revport = new TQRadioButton(i18n("R&everse portrait"), m_orientbox);
m_portrait->setChecked(true);
- m_orientpix = new QLabel(m_orientbox);
+ m_orientpix = new TQLabel(m_orientbox);
m_orientpix->setAlignment(Qt::AlignCenter);
- QRadioButton *m_dupnone = new QRadioButton(i18n("duplex orientation", "&None"), m_duplexbox);
- QRadioButton *m_duplong = new QRadioButton(i18n("duplex orientation", "Lon&g side"), m_duplexbox);
- QRadioButton *m_dupshort = new QRadioButton(i18n("duplex orientation", "S&hort side"), m_duplexbox);
+ QRadioButton *m_dupnone = new TQRadioButton(i18n("duplex orientation", "&None"), m_duplexbox);
+ QRadioButton *m_duplong = new TQRadioButton(i18n("duplex orientation", "Lon&g side"), m_duplexbox);
+ QRadioButton *m_dupshort = new TQRadioButton(i18n("duplex orientation", "S&hort side"), m_duplexbox);
m_dupnone->setChecked(true);
- m_duplexpix = new QLabel(m_duplexbox);
+ m_duplexpix = new TQLabel(m_duplexbox);
m_duplexpix->setAlignment(Qt::AlignCenter);
- QRadioButton *m_nup1 = new QRadioButton("&1", m_nupbox);
- QRadioButton *m_nup2 = new QRadioButton("&2", m_nupbox);
- QRadioButton *m_nup4 = new QRadioButton("&4", m_nupbox);
+ QRadioButton *m_nup1 = new TQRadioButton("&1", m_nupbox);
+ QRadioButton *m_nup2 = new TQRadioButton("&2", m_nupbox);
+ QRadioButton *m_nup4 = new TQRadioButton("&4", m_nupbox);
m_nup1->setChecked(true);
- m_nuppix = new QLabel(m_nupbox);
+ m_nuppix = new TQLabel(m_nupbox);
m_nuppix->setAlignment(Qt::AlignCenter);
- m_startbanner = new QComboBox(m_bannerbox);
- m_endbanner = new QComboBox(m_bannerbox);
- QLabel *m_startbannerlabel = new QLabel(i18n("S&tart:"), m_bannerbox);
- QLabel *m_endbannerlabel = new QLabel(i18n("En&d:"), m_bannerbox);
+ m_startbanner = new TQComboBox(m_bannerbox);
+ m_endbanner = new TQComboBox(m_bannerbox);
+ QLabel *m_startbannerlabel = new TQLabel(i18n("S&tart:"), m_bannerbox);
+ QLabel *m_endbannerlabel = new TQLabel(i18n("En&d:"), m_bannerbox);
m_startbannerlabel->setBuddy(m_startbanner);
m_endbannerlabel->setBuddy(m_endbanner);
// layout creation
- QVBoxLayout *lay0 = new QVBoxLayout(this, 0, KDialog::spacingHint());
- QWhatsThis::add(this, whatsThisPrintPropertiesGeneralPage);
- QGridLayout *lay1 = new QGridLayout(0, 3, 2, 0, KDialog::spacingHint());
- QGridLayout *lay2 = new QGridLayout(0, 2, 2, 0, KDialog::spacingHint());
+ QVBoxLayout *lay0 = new TQVBoxLayout(this, 0, KDialog::spacingHint());
+ TQWhatsThis::add(this, whatsThisPrintPropertiesGeneralPage);
+ QGridLayout *lay1 = new TQGridLayout(0, 3, 2, 0, KDialog::spacingHint());
+ QGridLayout *lay2 = new TQGridLayout(0, 2, 2, 0, KDialog::spacingHint());
lay0->addStretch(1);
lay0->addLayout(lay1);
lay0->addStretch(1);
@@ -346,27 +346,27 @@ KPGeneralPage::KPGeneralPage(KMPrinter *pr, DrMain *dr, QWidget *parent, const c
lay2->addWidget(m_nupbox, 1, 1);
lay2->setColStretch(0, 1);
lay2->setColStretch(1, 1);
- QGridLayout *lay3 = new QGridLayout(m_orientbox->layout(), 4, 2,
+ QGridLayout *lay3 = new TQGridLayout(m_orientbox->layout(), 4, 2,
KDialog::spacingHint());
lay3->addWidget(m_portrait, 0, 0);
lay3->addWidget(m_landscape, 1, 0);
lay3->addWidget(m_revland, 2, 0);
lay3->addWidget(m_revport, 3, 0);
lay3->addMultiCellWidget(m_orientpix, 0, 3, 1, 1);
- QGridLayout *lay4 = new QGridLayout(m_duplexbox->layout(), 3, 2,
+ QGridLayout *lay4 = new TQGridLayout(m_duplexbox->layout(), 3, 2,
KDialog::spacingHint());
lay4->addWidget(m_dupnone, 0, 0);
lay4->addWidget(m_duplong, 1, 0);
lay4->addWidget(m_dupshort, 2, 0);
lay4->addMultiCellWidget(m_duplexpix, 0, 2, 1, 1);
lay4->setRowStretch( 0, 1 );
- QGridLayout *lay5 = new QGridLayout(m_nupbox->layout(), 3, 2,
+ QGridLayout *lay5 = new TQGridLayout(m_nupbox->layout(), 3, 2,
KDialog::spacingHint());
lay5->addWidget(m_nup1, 0, 0);
lay5->addWidget(m_nup2, 1, 0);
lay5->addWidget(m_nup4, 2, 0);
lay5->addMultiCellWidget(m_nuppix, 0, 2, 1, 1);
- QGridLayout *lay6 = new QGridLayout(m_bannerbox->layout(), 2, 2,
+ QGridLayout *lay6 = new TQGridLayout(m_bannerbox->layout(), 2, 2,
KDialog::spacingHint());
lay6->addWidget(m_startbannerlabel, 0, 0);
lay6->addWidget(m_endbannerlabel, 1, 0);
@@ -375,9 +375,9 @@ KPGeneralPage::KPGeneralPage(KMPrinter *pr, DrMain *dr, QWidget *parent, const c
lay6->setColStretch(1, 1);
// connections (+ misc)
- connect(m_orientbox,SIGNAL(clicked(int)),SLOT(slotOrientationChanged(int)));
- connect(m_nupbox,SIGNAL(clicked(int)),SLOT(slotNupChanged(int)));
- connect(m_duplexbox,SIGNAL(clicked(int)),SLOT(slotDuplexChanged(int)));
+ connect(m_orientbox,TQT_SIGNAL(clicked(int)),TQT_SLOT(slotOrientationChanged(int)));
+ connect(m_nupbox,TQT_SIGNAL(clicked(int)),TQT_SLOT(slotNupChanged(int)));
+ connect(m_duplexbox,TQT_SIGNAL(clicked(int)),TQT_SLOT(slotDuplexChanged(int)));
// init
initialize();
@@ -408,7 +408,7 @@ void KPGeneralPage::initialize()
if ( opt->choices()->count() == 2 )
{
// probably a On/Off option instead of the standard PS one
- QButton *btn = m_duplexbox->find( DUPLEX_SHORT_ID );
+ TQButton *btn = m_duplexbox->find( DUPLEX_SHORT_ID );
m_duplexbox->remove( btn );
btn->hide();
//delete btn;
@@ -455,15 +455,15 @@ void KPGeneralPage::initialize()
}
// Banners
- QStringList values = QStringList::split(',',printer()->option("kde-banners-supported"),false);
+ QStringList values = TQStringList::split(',',printer()->option("kde-banners-supported"),false);
if (values.count() > 0)
{
- for (QStringList::ConstIterator it = values.begin(); it != values.end(); ++it)
+ for (TQStringList::ConstIterator it = values.begin(); it != values.end(); ++it)
{
m_startbanner->insertItem(*it);
m_endbanner->insertItem(*it);
}
- values = QStringList::split(',',printer()->option("kde-banners"),false);
+ values = TQStringList::split(',',printer()->option("kde-banners"),false);
while (values.count() < 2) values.append("none");
setComboItem(m_startbanner, values[0]);
setComboItem(m_endbanner, values[1]);
@@ -475,15 +475,15 @@ void KPGeneralPage::initialize()
slotNupChanged(NUP_1_ID);
}
-void KPGeneralPage::setOptions(const QMap<QString,QString>& opts)
+void KPGeneralPage::setOptions(const TQMap<TQString,TQString>& opts)
{
QString value;
if (driver())
{
value = opts["media"];
- QStringList l = QStringList::split(',',value,false);
- for(QStringList::ConstIterator it = l.begin(); it != l.end(); ++it)
+ QStringList l = TQStringList::split(',',value,false);
+ for(TQStringList::ConstIterator it = l.begin(); it != l.end(); ++it)
{
value = *it;
DrBase *ch;
@@ -546,8 +546,8 @@ void KPGeneralPage::setOptions(const QMap<QString,QString>& opts)
if (!value.isEmpty())
{
int index(-1);
- QStringList l = QStringList::split(',',value,false);
- for(QStringList::ConstIterator it = l.begin(); it != l.end(); ++it)
+ QStringList l = TQStringList::split(',',value,false);
+ for(TQStringList::ConstIterator it = l.begin(); it != l.end(); ++it)
{
value = *it;
@@ -575,7 +575,7 @@ void KPGeneralPage::setOptions(const QMap<QString,QString>& opts)
value = opts["job-sheets"];
if (!value.isEmpty())
{
- QStringList l = QStringList::split(',',value,false);
+ QStringList l = TQStringList::split(',',value,false);
if (l.count() > 0) setComboItem(m_startbanner,l[0]);
if (l.count() > 1) setComboItem(m_endbanner,l[1]);
}
@@ -612,7 +612,7 @@ void KPGeneralPage::setOptions(const QMap<QString,QString>& opts)
m_pagesize->setDisabled( opts[ "kde-pagesize-fixed" ] == "1" );
}
-void KPGeneralPage::getOptions(QMap<QString,QString>& opts, bool incldef)
+void KPGeneralPage::getOptions(TQMap<TQString,TQString>& opts, bool incldef)
{
QString value;
@@ -649,7 +649,7 @@ void KPGeneralPage::getOptions(QMap<QString,QString>& opts, bool incldef)
}
else
{
- value = QString("%1,%2,%3").arg(default_size[m_pagesize->currentItem()*2]).arg(default_type[m_papertype->currentItem()*2]).arg(default_source[m_inputslot->currentItem()*2]);
+ value = TQString("%1,%2,%3").arg(default_size[m_pagesize->currentItem()*2]).arg(default_type[m_papertype->currentItem()*2]).arg(default_source[m_inputslot->currentItem()*2]);
opts["media"] = value;
if (m_duplexbox->isEnabled())
@@ -664,7 +664,7 @@ void KPGeneralPage::getOptions(QMap<QString,QString>& opts, bool incldef)
}
}
- value = QString::number(m_orientbox->id(m_orientbox->selected())+3);
+ value = TQString::number(m_orientbox->id(m_orientbox->selected())+3);
if (value != "3" || incldef) opts["orientation-requested"] = value;
if (m_nupbox->isEnabled())
@@ -680,11 +680,11 @@ void KPGeneralPage::getOptions(QMap<QString,QString>& opts, bool incldef)
if (m_bannerbox->isEnabled())
{
- QStringList l = QStringList::split(',',printer()->option("kde-banners"),false);
+ QStringList l = TQStringList::split(',',printer()->option("kde-banners"),false);
if (incldef || (l.count() == 2 && (l[0] != m_startbanner->currentText() || l[1] != m_endbanner->currentText()))
|| (l.count() == 0 && (m_startbanner->currentText() != "none" || m_endbanner->currentText() != "none")))
{
- value = QString("%1,%2").arg(m_startbanner->currentText()).arg(m_endbanner->currentText());
+ value = TQString("%1,%2").arg(m_startbanner->currentText()).arg(m_endbanner->currentText());
opts["job-sheets"] = value;
}
}
diff --git a/kdeprint/kpgeneralpage.h b/kdeprint/kpgeneralpage.h
index 58296310f..9a0bd22cd 100644
--- a/kdeprint/kpgeneralpage.h
+++ b/kdeprint/kpgeneralpage.h
@@ -32,11 +32,11 @@ class KDEPRINT_EXPORT KPGeneralPage : public KPrintDialogPage
{
Q_OBJECT
public:
- KPGeneralPage(KMPrinter *pr, DrMain *dr, QWidget *parent = 0, const char *name = 0);
+ KPGeneralPage(KMPrinter *pr, DrMain *dr, TQWidget *parent = 0, const char *name = 0);
~KPGeneralPage();
- void setOptions(const QMap<QString,QString>& opts);
- void getOptions(QMap<QString,QString>& opts, bool incldef = false);
+ void setOptions(const TQMap<TQString,TQString>& opts);
+ void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false);
protected:
void initialize();
diff --git a/kdeprint/kpipeprocess.cpp b/kdeprint/kpipeprocess.cpp
index e95e3b290..a3ef560c8 100644
--- a/kdeprint/kpipeprocess.cpp
+++ b/kdeprint/kpipeprocess.cpp
@@ -19,8 +19,8 @@
#include "kpipeprocess.h"
-KPipeProcess::KPipeProcess(const QString& cmd, int mode)
-: QFile()
+KPipeProcess::KPipeProcess(const TQString& cmd, int mode)
+: TQFile()
{
m_pipe = NULL;
if (!cmd.isEmpty())
@@ -32,7 +32,7 @@ KPipeProcess::~KPipeProcess()
close();
}
-bool KPipeProcess::open(const QString& cmd, int mode)
+bool KPipeProcess::open(const TQString& cmd, int mode)
{
// close first if needed
close();
@@ -43,7 +43,7 @@ bool KPipeProcess::open(const QString& cmd, int mode)
// create the pipe
m_pipe = popen(cmd.latin1(),(mode == IO_WriteOnly ? "w" : "r"));
if (m_pipe)
- if (!QFile::open(mode,m_pipe))
+ if (!TQFile::open(mode,m_pipe))
close();
return (m_pipe != NULL);
}
@@ -52,7 +52,7 @@ void KPipeProcess::close()
{
if (m_pipe != NULL)
{
- QFile::close();
+ TQFile::close();
/* pipe must be close to be sure the process is terminated */
pclose( m_pipe );
m_pipe = NULL;
diff --git a/kdeprint/kpipeprocess.h b/kdeprint/kpipeprocess.h
index a875c13e4..966838d53 100644
--- a/kdeprint/kpipeprocess.h
+++ b/kdeprint/kpipeprocess.h
@@ -20,7 +20,7 @@
#ifndef KPIPEPROCESS_H
#define KPIPEPROCESS_H
-#include <qfile.h>
+#include <tqfile.h>
#include <stdio.h>
#include <kdelibs_export.h>
@@ -28,10 +28,10 @@
class KDEPRINT_EXPORT KPipeProcess : public QFile
{
public:
- KPipeProcess(const QString& cmd = QString::null, int mode = IO_ReadOnly);
+ KPipeProcess(const TQString& cmd = TQString::null, int mode = IO_ReadOnly);
~KPipeProcess();
- bool open(const QString& cmd, int mode = IO_ReadOnly);
+ bool open(const TQString& cmd, int mode = IO_ReadOnly);
void close();
private:
diff --git a/kdeprint/kpmarginpage.cpp b/kdeprint/kpmarginpage.cpp
index 793ad99ab..9b91ce56f 100644
--- a/kdeprint/kpmarginpage.cpp
+++ b/kdeprint/kpmarginpage.cpp
@@ -25,30 +25,30 @@
#include "driver.h"
#include "marginwidget.h"
-#include <qgroupbox.h>
-#include <qlayout.h>
-#include <qprinter.h>
-#include <qpaintdevicemetrics.h>
+#include <tqgroupbox.h>
+#include <tqlayout.h>
+#include <tqprinter.h>
+#include <tqpaintdevicemetrics.h>
#include <kiconloader.h>
#include <klocale.h>
#include <kdebug.h>
#include <kglobal.h>
-KPMarginPage::KPMarginPage(KPrinter *prt, DrMain *driver, QWidget *parent, const char *name)
+KPMarginPage::KPMarginPage(KPrinter *prt, DrMain *driver, TQWidget *parent, const char *name)
: KPrintDialogPage(0, driver, parent, name)
{
m_printer = prt;
setTitle(i18n("Margins"));
m_usedriver = true;
- QGroupBox *box = new QGroupBox(1, Qt::Vertical, i18n("Margins"), this);
+ QGroupBox *box = new TQGroupBox(1, Qt::Vertical, i18n("Margins"), this);
m_margin = new MarginWidget(box, "MarginWidget", (m_printer != 0));
//m_margin->setSymetricMargins(true);
//if (m_printer)
// m_margin->setResolution(m_printer->resolution());
- QVBoxLayout *l0 = new QVBoxLayout(this, 0, 10);
+ QVBoxLayout *l0 = new TQVBoxLayout(this, 0, 10);
l0->addWidget(box);
l0->addStretch(1);
}
@@ -57,12 +57,12 @@ KPMarginPage::~KPMarginPage()
{
}
-void KPMarginPage::initPageSize(const QString& ps, bool landscape)
+void KPMarginPage::initPageSize(const TQString& ps, bool landscape)
{
// first retrieve the Qt values for page size and margins
- QPrinter prt(QPrinter::PrinterResolution);
+ QPrinter prt(TQPrinter::PrinterResolution);
prt.setFullPage(true);
- prt.setPageSize((QPrinter::PageSize)(ps.isEmpty() ? KGlobal::locale()->pageSize() : ps.toInt()));
+ prt.setPageSize((TQPrinter::PageSize)(ps.isEmpty() ? KGlobal::locale()->pageSize() : ps.toInt()));
QPaintDeviceMetrics metrics(&prt);
float w = metrics.width();
float h = metrics.height();
@@ -103,11 +103,11 @@ void KPMarginPage::initPageSize(const QString& ps, bool landscape)
m_margin->setCustomEnabled(false);
}
-void KPMarginPage::setOptions(const QMap<QString,QString>& opts)
+void KPMarginPage::setOptions(const TQMap<TQString,TQString>& opts)
{
QString orient = opts["orientation-requested"];
bool land = (orient.isEmpty()? opts["kde-orientation"] == "Landscape" : orient == "4" || orient == "5");
- QString ps = opts[ "kde-printsize" ];
+ TQString ps = opts[ "kde-printsize" ];
if ( ps.isEmpty() )
{
m_usedriver = true;
@@ -144,14 +144,14 @@ void KPMarginPage::setOptions(const QMap<QString,QString>& opts)
m_margin->setCustomEnabled(marginset);
}
-void KPMarginPage::getOptions(QMap<QString,QString>& opts, bool /* incldef */)
+void KPMarginPage::getOptions(TQMap<TQString,TQString>& opts, bool /* incldef */)
{
if (m_margin->isCustomEnabled() /*|| incldef*/)
{
- opts["kde-margin-top"] = QString::number(m_margin->top());
- opts["kde-margin-left"] = QString::number(m_margin->left());
- opts["kde-margin-bottom"] = QString::number(m_margin->bottom());
- opts["kde-margin-right"] = QString::number(m_margin->right());
+ opts["kde-margin-top"] = TQString::number(m_margin->top());
+ opts["kde-margin-left"] = TQString::number(m_margin->left());
+ opts["kde-margin-bottom"] = TQString::number(m_margin->bottom());
+ opts["kde-margin-right"] = TQString::number(m_margin->right());
}
else
{
diff --git a/kdeprint/kpmarginpage.h b/kdeprint/kpmarginpage.h
index 061b0eff0..fd6da6920 100644
--- a/kdeprint/kpmarginpage.h
+++ b/kdeprint/kpmarginpage.h
@@ -29,14 +29,14 @@ class KPrinter;
class KPMarginPage : public KPrintDialogPage
{
public:
- KPMarginPage(KPrinter *prt, DrMain *driver, QWidget *parent = 0, const char *name = 0);
+ KPMarginPage(KPrinter *prt, DrMain *driver, TQWidget *parent = 0, const char *name = 0);
~KPMarginPage();
- void setOptions(const QMap<QString,QString>& opts);
- void getOptions(QMap<QString,QString>& opts, bool incldef = false);
+ void setOptions(const TQMap<TQString,TQString>& opts);
+ void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false);
protected:
- void initPageSize(const QString&, bool);
+ void initPageSize(const TQString&, bool);
private:
MarginWidget *m_margin;
diff --git a/kdeprint/kpposterpage.cpp b/kdeprint/kpposterpage.cpp
index 463dd9e32..fa4b1481b 100644
--- a/kdeprint/kpposterpage.cpp
+++ b/kdeprint/kpposterpage.cpp
@@ -23,27 +23,27 @@
#include "kmfactory.h"
#include "util.h"
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qlineedit.h>
-#include <qwhatsthis.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqlineedit.h>
+#include <tqwhatsthis.h>
#include <kpushbutton.h>
#include <klocale.h>
#include <knuminput.h>
#include <kiconloader.h>
-KPPosterPage::KPPosterPage( QWidget *parent, const char *name )
+KPPosterPage::KPPosterPage( TQWidget *parent, const char *name )
: KPrintDialogPage( parent, name )
{
//WhatsThis strings.... (added by pfeifle@kde.org)
- QString whatsThis5_PosterPage = i18n( " <qt> "
+ TQString whatsThis5_PosterPage = i18n( " <qt> "
" 5. "
" </qt>" );
- QString whatsThisEnablePosterPage = i18n( " <qt> "
+ TQString whatsThisEnablePosterPage = i18n( " <qt> "
" <b>Print Poster</b> (enabled or disabled). "
" <p>If you enable this option, you can print posters of different sizes "
" The printout will happen in the form <em>'tiles'</em> printed on smaller "
@@ -65,7 +65,7 @@ KPPosterPage::KPPosterPage( QWidget *parent, const char *name )
" </p> "
" </qt>" );
- QString whatsThisTileSelectionPosterPage = i18n( " <qt> "
+ TQString whatsThisTileSelectionPosterPage = i18n( " <qt> "
" <b>Tile Selection widget</b> "
" <p>This GUI element is <em>not only for viewing</em> your selections: it also "
" lets you interactively select the tile(s) you want to print. "
@@ -86,7 +86,7 @@ KPPosterPage::KPPosterPage( QWidget *parent, const char *name )
" of) your poster, you must select at least one tile. </p> "
" </qt>" );
- QString whatsThisPostersizePosterPage = i18n( " <qt> "
+ TQString whatsThisPostersizePosterPage = i18n( " <qt> "
" <b>Poster Size</b> "
" <p>Select the poster size you want from the dropdown list. </p> "
" Available sizes are all standard paper sizes up to "
@@ -105,7 +105,7 @@ KPPosterPage::KPPosterPage( QWidget *parent, const char *name )
" of) your poster, you must select at least one tile. </p> "
" </qt>" );
- QString whatsThisPrintsizePosterPage = i18n( " <qt> "
+ TQString whatsThisPrintsizePosterPage = i18n( " <qt> "
" <b>Paper Size</b> "
" <p>This field indicates the paper size the poster tiles will be printed on. "
" To select a different paper size for your poster tiles, go to the 'General' tab "
@@ -129,7 +129,7 @@ KPPosterPage::KPPosterPage( QWidget *parent, const char *name )
" of) your poster, you must select at least one tile. </p> "
" </qt>" );
- QString whatsThisCutmarginPosterPage = i18n( " <qt> "
+ TQString whatsThisCutmarginPosterPage = i18n( " <qt> "
" <b>Cut Margin selection</b> "
" <p>Slider and spinbox let you determine a <em>'cut margin'</em> which will be printed onto "
" each tile of your poster to help you cut the pieces as needed. </p>"
@@ -140,7 +140,7 @@ KPPosterPage::KPPosterPage( QWidget *parent, const char *name )
" keywords of its driver PPD file. </p> "
" </qt>" );
- QString whatsThisTileOrderSelectionPosterPage = i18n( " <qt> "
+ TQString whatsThisTileOrderSelectionPosterPage = i18n( " <qt> "
" <b>Order and number of tile pages to be printed</b> "
" <p>This field displays and sets the individual tiles to be printed, as well as the order "
" for their printout. </p> "
@@ -159,43 +159,43 @@ KPPosterPage::KPPosterPage( QWidget *parent, const char *name )
setTitle( i18n( "Poster" ) );
- m_postercheck = new QCheckBox( i18n( "&Print poster" ), this );
- QWhatsThis::add(m_postercheck, whatsThisEnablePosterPage);
- QWidget *dummy = new QWidget( this );
+ m_postercheck = new TQCheckBox( i18n( "&Print poster" ), this );
+ TQWhatsThis::add(m_postercheck, whatsThisEnablePosterPage);
+ TQWidget *dummy = new TQWidget( this );
m_preview = new PosterPreview( dummy );
- QWhatsThis::add(m_preview, whatsThisTileSelectionPosterPage);
- m_postersize = new QComboBox( dummy );
- QWhatsThis::add(m_postersize, whatsThisPostersizePosterPage);
- m_printsize = new QComboBox( dummy );
- QWhatsThis::add(m_printsize, whatsThisPrintsizePosterPage);
+ TQWhatsThis::add(m_preview, whatsThisTileSelectionPosterPage);
+ m_postersize = new TQComboBox( dummy );
+ TQWhatsThis::add(m_postersize, whatsThisPostersizePosterPage);
+ m_printsize = new TQComboBox( dummy );
+ TQWhatsThis::add(m_printsize, whatsThisPrintsizePosterPage);
m_lockbtn = new KPushButton( dummy );
- //QWhatsThis::add(m_lockbtn, whatsThis5_PosterPage); //FIXME ASK_MICHAEL: which pushbutton would that be?
- m_mediasize = new QLabel( dummy );
- QWhatsThis::add(m_mediasize, whatsThisPrintsizePosterPage);
- m_mediasize->setFrameStyle( QFrame::Panel|QFrame::Sunken );
- QLabel *posterlab = new QLabel( i18n( "Poste&r size:" ), dummy );
- QWhatsThis::add(posterlab, whatsThisPostersizePosterPage);
- QLabel *medialab = new QLabel( i18n( "Media size:" ), dummy );
- QWhatsThis::add(medialab, whatsThisPrintsizePosterPage);
- QLabel *printlab = new QLabel( i18n( "Pri&nt size:" ), dummy );
- QWhatsThis::add(printlab, whatsThisPrintsizePosterPage);
+ //TQWhatsThis::add(m_lockbtn, whatsThis5_PosterPage); //FIXME ASK_MICHAEL: which pushbutton would that be?
+ m_mediasize = new TQLabel( dummy );
+ TQWhatsThis::add(m_mediasize, whatsThisPrintsizePosterPage);
+ m_mediasize->setFrameStyle( TQFrame::Panel|TQFrame::Sunken );
+ TQLabel *posterlab = new TQLabel( i18n( "Poste&r size:" ), dummy );
+ TQWhatsThis::add(posterlab, whatsThisPostersizePosterPage);
+ TQLabel *medialab = new TQLabel( i18n( "Media size:" ), dummy );
+ TQWhatsThis::add(medialab, whatsThisPrintsizePosterPage);
+ TQLabel *printlab = new TQLabel( i18n( "Pri&nt size:" ), dummy );
+ TQWhatsThis::add(printlab, whatsThisPrintsizePosterPage);
posterlab->setBuddy( m_postersize );
printlab->setBuddy( m_printsize );
m_cutmargin = new KIntNumInput( 5, dummy );
- QWhatsThis::add(m_cutmargin, whatsThisCutmarginPosterPage);
+ TQWhatsThis::add(m_cutmargin, whatsThisCutmarginPosterPage);
// xgettext:no-c-format
m_cutmargin->setLabel( i18n( "C&ut margin (% of media):" ) );
m_cutmargin->setRange( 0, 100, 2, true ); // step width was too big, changed from 10 to 2 (-kp-)
- m_selection = new QLineEdit( dummy );
- QWhatsThis::add(m_selection, whatsThisTileOrderSelectionPosterPage);
- QLabel *selectionlab = new QLabel( i18n( "&Tile pages (to be printed):" ), dummy );
- QWhatsThis::add(selectionlab, whatsThisTileOrderSelectionPosterPage);
+ m_selection = new TQLineEdit( dummy );
+ TQWhatsThis::add(m_selection, whatsThisTileOrderSelectionPosterPage);
+ TQLabel *selectionlab = new TQLabel( i18n( "&Tile pages (to be printed):" ), dummy );
+ TQWhatsThis::add(selectionlab, whatsThisTileOrderSelectionPosterPage);
selectionlab->setBuddy( m_selection );
m_lockbtn->setToggleButton( true );
m_lockbtn->setPixmap( SmallIcon( "encrypted" ) );
m_lockbtn->setOn( true );
m_lockbtn->setFixedSize( m_lockbtn->sizeHint() );
- QToolTip::add( m_lockbtn, i18n( "Link/unlink poster and print size" ) );
+ TQToolTip::add( m_lockbtn, i18n( "Link/unlink poster and print size" ) );
for ( int i=0; i<KPrinter::NPageSize-1; i++ )
{
@@ -205,15 +205,15 @@ KPPosterPage::KPPosterPage( QWidget *parent, const char *name )
m_postersize->setCurrentItem( findIndex( KPrinter::A3 ) );
slotPosterSizeChanged( m_postersize->currentItem() );
- connect( m_postercheck, SIGNAL( toggled( bool ) ), dummy, SLOT( setEnabled( bool ) ) );
+ connect( m_postercheck, TQT_SIGNAL( toggled( bool ) ), dummy, TQT_SLOT( setEnabled( bool ) ) );
dummy->setEnabled( false );
- connect( m_postersize, SIGNAL( activated( int ) ), SLOT( slotPosterSizeChanged( int ) ) );
- connect( m_cutmargin, SIGNAL( valueChanged( int ) ), SLOT( slotMarginChanged( int ) ) );
- connect( m_lockbtn, SIGNAL( toggled( bool ) ), m_printsize, SLOT( setDisabled( bool ) ) );
+ connect( m_postersize, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotPosterSizeChanged( int ) ) );
+ connect( m_cutmargin, TQT_SIGNAL( valueChanged( int ) ), TQT_SLOT( slotMarginChanged( int ) ) );
+ connect( m_lockbtn, TQT_SIGNAL( toggled( bool ) ), m_printsize, TQT_SLOT( setDisabled( bool ) ) );
m_printsize->setEnabled( false );
- connect( m_lockbtn, SIGNAL( toggled( bool ) ), SLOT( slotLockToggled( bool ) ) );
- connect( m_selection, SIGNAL( textChanged( const QString& ) ), m_preview, SLOT( setSelectedPages( const QString& ) ) );
- connect( m_preview, SIGNAL( selectionChanged( const QString& ) ), m_selection, SLOT( setText( const QString& ) ) );
+ connect( m_lockbtn, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( slotLockToggled( bool ) ) );
+ connect( m_selection, TQT_SIGNAL( textChanged( const TQString& ) ), m_preview, TQT_SLOT( setSelectedPages( const TQString& ) ) );
+ connect( m_preview, TQT_SIGNAL( selectionChanged( const TQString& ) ), m_selection, TQT_SLOT( setText( const TQString& ) ) );
if ( KMFactory::self()->settings()->application != KPrinter::Dialog
&& KMFactory::self()->settings()->application >= 0 )
@@ -223,10 +223,10 @@ KPPosterPage::KPPosterPage( QWidget *parent, const char *name )
printlab->hide();
}
- QVBoxLayout *l0 = new QVBoxLayout( this, 0, 10 );
+ TQVBoxLayout *l0 = new TQVBoxLayout( this, 0, 10 );
l0->addWidget( m_postercheck );
l0->addWidget( dummy, 1 );
- QGridLayout *l1 = new QGridLayout( dummy, 8, 3, 0, 5 );
+ TQGridLayout *l1 = new TQGridLayout( dummy, 8, 3, 0, 5 );
l1->addWidget( posterlab, 0, 0 );
l1->addWidget( m_postersize, 0, 1 );
l1->addWidget( printlab, 1, 0 );
@@ -236,7 +236,7 @@ KPPosterPage::KPPosterPage( QWidget *parent, const char *name )
l1->addMultiCellWidget( m_preview, 4, 4, 0, 2 );
l1->addMultiCellWidget( m_cutmargin, 6, 6, 0, 2 );
l1->addMultiCellWidget( m_lockbtn, 0, 1, 2, 2 );
- QHBoxLayout *l2 = new QHBoxLayout( 0, 0, 5 );
+ TQHBoxLayout *l2 = new TQHBoxLayout( 0, 0, 5 );
l1->addMultiCellLayout( l2, 7, 7, 0, 2 );
l2->addWidget( selectionlab );
l2->addWidget( m_selection );
@@ -250,9 +250,9 @@ KPPosterPage::~KPPosterPage()
{
}
-void KPPosterPage::setOptions( const QMap<QString,QString>& opts )
+void KPPosterPage::setOptions( const TQMap<TQString,TQString>& opts )
{
- QString ps = opts[ "PageSize" ];
+ TQString ps = opts[ "PageSize" ];
if ( ps.isEmpty() && !opts[ "kde-pagesize" ].isEmpty() )
{
ps = pageSizeToPageName( ( KPrinter::PageSize )opts[ "kde-pagesize" ].toInt() );
@@ -269,7 +269,7 @@ void KPPosterPage::setOptions( const QMap<QString,QString>& opts )
{
m_postercheck->setChecked( true );
ps = opts[ "_kde-poster-size" ];
- QString prtsize = opts[ "kde-printsize" ];
+ TQString prtsize = opts[ "kde-printsize" ];
if ( !ps.isEmpty() )
{
m_postersize->setCurrentItem( findIndex( pageNameToPageSize( ps ) ) );
@@ -287,9 +287,9 @@ void KPPosterPage::setOptions( const QMap<QString,QString>& opts )
m_postercheck->setChecked( false );
}
-void KPPosterPage::getOptions( QMap<QString,QString>& opts, bool )
+void KPPosterPage::getOptions( TQMap<TQString,TQString>& opts, bool )
{
- QStringList o = QStringList::split( ",", opts[ "_kde-filters" ], false );
+ TQStringList o = TQStringList::split( ",", opts[ "_kde-filters" ], false );
if ( !m_postercheck->isChecked() )
{
o.remove( "poster" );
@@ -307,8 +307,8 @@ void KPPosterPage::getOptions( QMap<QString,QString>& opts, bool )
opts[ "_kde-filters" ] = o.join( "," );
opts[ "_kde-poster-media" ] = m_mediasize->text();
opts[ "_kde-poster-size" ] = pageSizeToPageName( ( KPrinter::PageSize )page_sizes[ m_postersize->currentItem() ].ID );
- opts[ "kde-printsize" ] = QString::number( page_sizes[ m_printsize->currentItem() ].ID );
- opts[ "_kde-poster-cut" ] = QString::number( m_cutmargin->value() );
+ opts[ "kde-printsize" ] = TQString::number( page_sizes[ m_printsize->currentItem() ].ID );
+ opts[ "_kde-poster-cut" ] = TQString::number( m_cutmargin->value() );
opts[ "_kde-poster-select" ] = m_selection->text().stripWhiteSpace();
}
}
diff --git a/kdeprint/kpposterpage.h b/kdeprint/kpposterpage.h
index 2d0f77eda..0caefe717 100644
--- a/kdeprint/kpposterpage.h
+++ b/kdeprint/kpposterpage.h
@@ -34,11 +34,11 @@ class KPPosterPage : public KPrintDialogPage
{
Q_OBJECT
public:
- KPPosterPage( QWidget *parent = 0, const char *name = 0 );
+ KPPosterPage( TQWidget *parent = 0, const char *name = 0 );
~KPPosterPage();
- void setOptions( const QMap<QString,QString>& opts );
- void getOptions( QMap<QString,QString>& opts, bool incldef = false );
+ void setOptions( const TQMap<TQString,TQString>& opts );
+ void getOptions( TQMap<TQString,TQString>& opts, bool incldef = false );
bool isValid();
protected slots:
@@ -47,14 +47,14 @@ protected slots:
void slotLockToggled( bool );
private:
- QComboBox *m_postersize;
- QComboBox *m_printsize;
+ TQComboBox *m_postersize;
+ TQComboBox *m_printsize;
PosterPreview *m_preview;
- QCheckBox *m_postercheck;
- QLabel *m_mediasize;
+ TQCheckBox *m_postercheck;
+ TQLabel *m_mediasize;
KIntNumInput *m_cutmargin;
- QPushButton *m_lockbtn;
- QLineEdit *m_selection;
+ TQPushButton *m_lockbtn;
+ TQLineEdit *m_selection;
};
#endif /* KPPOSTERPAGE_H */
diff --git a/kdeprint/kpqtpage.cpp b/kdeprint/kpqtpage.cpp
index d3148b037..c6d19a506 100644
--- a/kdeprint/kpqtpage.cpp
+++ b/kdeprint/kpqtpage.cpp
@@ -24,12 +24,12 @@
#include "driver.h"
#include "util.h"
-#include <qcombobox.h>
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
+#include <tqcombobox.h>
+#include <tqbuttongroup.h>
+#include <tqradiobutton.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
#include <kiconloader.h>
#include <klocale.h>
@@ -48,13 +48,13 @@
//*****************************************************************************************************
-KPQtPage::KPQtPage(QWidget *parent, const char *name)
+KPQtPage::KPQtPage(TQWidget *parent, const char *name)
: KPrintDialogPage(parent,name)
{
init();
}
-KPQtPage::KPQtPage(DrMain *driver, QWidget *parent, const char *name)
+KPQtPage::KPQtPage(DrMain *driver, TQWidget *parent, const char *name)
: KPrintDialogPage(0, (driver && driver->findOption("PageSize") ? driver : 0), parent, name)
{
init();
@@ -67,7 +67,7 @@ KPQtPage::~KPQtPage()
void KPQtPage::init()
{
//WhatsThis strings.... (added by pfeifle@kde.org)
- QString whatsThisColorModeOtPageLabel = i18n( " <qt> "
+ TQString whatsThisColorModeOtPageLabel = i18n( " <qt> "
" <b>Selection of color mode:</b> You can choose between 2 options: "
" <ul><li><b>Color</b> and</li> "
" <li><b>Grayscale</b></li></ul> "
@@ -76,12 +76,12 @@ void KPQtPage::init()
" enough information about your print file. In this case the embedded color- or grayscale information "
" of your printfile, and the default handling of the printer take precedence. "
" </qt>" );
- QString whatsThisPageSizeOtPageLabel = i18n( " <qt> "
+ TQString whatsThisPageSizeOtPageLabel = i18n( " <qt> "
" <b>Selection of page size:</b> Select paper size to be printed on from "
" the drop-down menu. "
" <p>The exact list of choices depends on the printer driver (\"PPD\") you have installed. "
" </qt>" );
- QString whatsThisPagesPerSheetOtPageLabel = i18n( " <qt> "
+ TQString whatsThisPagesPerSheetOtPageLabel = i18n( " <qt> "
" <b>Selection of pages per sheet:</b> "
" You can choose to print more than one page onto each sheet of paper. "
" This is sometimes useful to save paper. "
@@ -99,7 +99,7 @@ void KPQtPage::init()
" <li> and configure it (bottom-most button on the right of the \"Filters\" tab). </li>"
" </ul>"
" </qt>" );
- QString whatsThisOrientationOtPageLabel = i18n( " <qt> "
+ TQString whatsThisOrientationOtPageLabel = i18n( " <qt> "
" <b>Selection of image orientation:</b> Orientation of the printed "
" pageimage on your paper is controlled by the radio buttons. By default, "
" the orientation is <em>Portrait</em> "
@@ -113,50 +113,50 @@ void KPQtPage::init()
setTitle(i18n("Print Format"));
// widget creation
- m_pagesize = new QComboBox(this);
- QWhatsThis::add(m_pagesize, whatsThisPageSizeOtPageLabel);
- QLabel *m_pagesizelabel = new QLabel(i18n("Page s&ize:"), this);
+ m_pagesize = new TQComboBox(this);
+ TQWhatsThis::add(m_pagesize, whatsThisPageSizeOtPageLabel);
+ QLabel *m_pagesizelabel = new TQLabel(i18n("Page s&ize:"), this);
m_pagesizelabel->setAlignment(Qt::AlignVCenter|Qt::AlignRight);
m_pagesizelabel->setBuddy(m_pagesize);
- m_orientbox = new QButtonGroup(0, Qt::Vertical, i18n("Orientation"), this);
- QWhatsThis::add(m_orientbox, whatsThisOrientationOtPageLabel);
- m_colorbox = new QButtonGroup(0, Qt::Vertical, i18n("Color Mode"), this);
- QWhatsThis::add(m_colorbox, whatsThisColorModeOtPageLabel);
- QRadioButton *m_portrait = new QRadioButton(i18n("&Portrait"), m_orientbox);
- QWhatsThis::add(m_portrait, whatsThisOrientationOtPageLabel);
+ m_orientbox = new TQButtonGroup(0, Qt::Vertical, i18n("Orientation"), this);
+ TQWhatsThis::add(m_orientbox, whatsThisOrientationOtPageLabel);
+ m_colorbox = new TQButtonGroup(0, Qt::Vertical, i18n("Color Mode"), this);
+ TQWhatsThis::add(m_colorbox, whatsThisColorModeOtPageLabel);
+ QRadioButton *m_portrait = new TQRadioButton(i18n("&Portrait"), m_orientbox);
+ TQWhatsThis::add(m_portrait, whatsThisOrientationOtPageLabel);
- QRadioButton *m_landscape = new QRadioButton(i18n("&Landscape"), m_orientbox);
- QWhatsThis::add(m_landscape, whatsThisOrientationOtPageLabel);
+ QRadioButton *m_landscape = new TQRadioButton(i18n("&Landscape"), m_orientbox);
+ TQWhatsThis::add(m_landscape, whatsThisOrientationOtPageLabel);
- m_orientpix = new QLabel(m_orientbox);
+ m_orientpix = new TQLabel(m_orientbox);
m_orientpix->setAlignment(Qt::AlignCenter);
- QWhatsThis::add(m_orientpix, whatsThisOrientationOtPageLabel);
+ TQWhatsThis::add(m_orientpix, whatsThisOrientationOtPageLabel);
- QRadioButton *m_color = new QRadioButton(i18n("Colo&r"), m_colorbox);
- QWhatsThis::add(m_color, whatsThisColorModeOtPageLabel);
+ QRadioButton *m_color = new TQRadioButton(i18n("Colo&r"), m_colorbox);
+ TQWhatsThis::add(m_color, whatsThisColorModeOtPageLabel);
- QRadioButton *m_grayscale = new QRadioButton(i18n("&Grayscale"), m_colorbox);
- m_colorpix = new QLabel(m_colorbox);
+ QRadioButton *m_grayscale = new TQRadioButton(i18n("&Grayscale"), m_colorbox);
+ m_colorpix = new TQLabel(m_colorbox);
m_colorpix->setAlignment(Qt::AlignCenter);
- QWhatsThis::add(m_colorpix, whatsThisColorModeOtPageLabel);
+ TQWhatsThis::add(m_colorpix, whatsThisColorModeOtPageLabel);
- m_nupbox = new QButtonGroup(0, Qt::Vertical, i18n("Pages per Sheet"), this);
- // QWhatsThis::add(m_nupbox, whatsThisPagesPerSheetOtPageLabel);
- QRadioButton *m_nup1 = new QRadioButton("&1", m_nupbox);
- QWhatsThis::add(m_nup1, whatsThisPagesPerSheetOtPageLabel);
- QRadioButton *m_nup2 = new QRadioButton("&2", m_nupbox);
- QWhatsThis::add(m_nup2, whatsThisPagesPerSheetOtPageLabel);
- QRadioButton *m_nup4 = new QRadioButton("&4", m_nupbox);
- QWhatsThis::add(m_nup4, whatsThisPagesPerSheetOtPageLabel);
- QRadioButton *m_nupother = new QRadioButton(i18n("Ot&her"), m_nupbox);
- QWhatsThis::add(m_nupother, whatsThisPagesPerSheetOtPageLabel);
+ m_nupbox = new TQButtonGroup(0, Qt::Vertical, i18n("Pages per Sheet"), this);
+ // TQWhatsThis::add(m_nupbox, whatsThisPagesPerSheetOtPageLabel);
+ QRadioButton *m_nup1 = new TQRadioButton("&1", m_nupbox);
+ TQWhatsThis::add(m_nup1, whatsThisPagesPerSheetOtPageLabel);
+ QRadioButton *m_nup2 = new TQRadioButton("&2", m_nupbox);
+ TQWhatsThis::add(m_nup2, whatsThisPagesPerSheetOtPageLabel);
+ QRadioButton *m_nup4 = new TQRadioButton("&4", m_nupbox);
+ TQWhatsThis::add(m_nup4, whatsThisPagesPerSheetOtPageLabel);
+ QRadioButton *m_nupother = new TQRadioButton(i18n("Ot&her"), m_nupbox);
+ TQWhatsThis::add(m_nupother, whatsThisPagesPerSheetOtPageLabel);
- m_nuppix = new QLabel(m_nupbox);
+ m_nuppix = new TQLabel(m_nupbox);
m_nuppix->setAlignment(Qt::AlignCenter);
- QWhatsThis::add(m_nuppix, whatsThisPagesPerSheetOtPageLabel);
+ TQWhatsThis::add(m_nuppix, whatsThisPagesPerSheetOtPageLabel);
// layout creation
- QGridLayout *lay0 = new QGridLayout(this, 3, 2, 0, 10);
+ QGridLayout *lay0 = new TQGridLayout(this, 3, 2, 0, 10);
lay0->setRowStretch(1,1);
lay0->setRowStretch(2,1);
lay0->addWidget(m_pagesizelabel,0,0);
@@ -164,15 +164,15 @@ void KPQtPage::init()
lay0->addWidget(m_orientbox,1,0);
lay0->addWidget(m_colorbox,1,1);
lay0->addWidget(m_nupbox,2,0);
- QGridLayout *lay1 = new QGridLayout(m_orientbox->layout(), 2, 2, 10);
+ QGridLayout *lay1 = new TQGridLayout(m_orientbox->layout(), 2, 2, 10);
lay1->addWidget(m_portrait,0,0);
lay1->addWidget(m_landscape,1,0);
lay1->addMultiCellWidget(m_orientpix,0,1,1,1);
- QGridLayout *lay2 = new QGridLayout(m_colorbox->layout(), 2, 2, 10);
+ QGridLayout *lay2 = new TQGridLayout(m_colorbox->layout(), 2, 2, 10);
lay2->addWidget(m_color,0,0);
lay2->addWidget(m_grayscale,1,0);
lay2->addMultiCellWidget(m_colorpix,0,1,1,1);
- QGridLayout *lay3 = new QGridLayout(m_nupbox->layout(), 4, 2, 5);
+ QGridLayout *lay3 = new TQGridLayout(m_nupbox->layout(), 4, 2, 5);
lay3->addWidget(m_nup1,0,0);
lay3->addWidget(m_nup2,1,0);
lay3->addWidget(m_nup4,2,0);
@@ -208,7 +208,7 @@ void KPQtPage::init()
else
{
DrListOption *lopt = static_cast<DrListOption*>(driver()->findOption("PageSize"));
- QPtrListIterator<DrBase> it(*(lopt->choices()));
+ TQPtrListIterator<DrBase> it(*(lopt->choices()));
for (; it.current(); ++it)
{
m_pagesize->insertItem(it.current()->get("text"));
@@ -218,9 +218,9 @@ void KPQtPage::init()
}
// connections
- connect(m_orientbox,SIGNAL(clicked(int)),SLOT(slotOrientationChanged(int)));
- connect(m_colorbox,SIGNAL(clicked(int)),SLOT(slotColorModeChanged(int)));
- connect(m_nupbox,SIGNAL(clicked(int)),SLOT(slotNupChanged(int)));
+ connect(m_orientbox,TQT_SIGNAL(clicked(int)),TQT_SLOT(slotOrientationChanged(int)));
+ connect(m_colorbox,TQT_SIGNAL(clicked(int)),TQT_SLOT(slotColorModeChanged(int)));
+ connect(m_nupbox,TQT_SIGNAL(clicked(int)),TQT_SLOT(slotNupChanged(int)));
}
void KPQtPage::slotOrientationChanged(int ID)
@@ -246,7 +246,7 @@ void KPQtPage::slotNupChanged(int ID)
m_nuppix->setPixmap(UserIcon(pixstr));
}
-void KPQtPage::setOptions(const QMap<QString,QString>& opts)
+void KPQtPage::setOptions(const TQMap<TQString,TQString>& opts)
{
int ID = (opts["kde-orientation"] == "Landscape" ? ORIENT_LANDSCAPE_ID : ORIENT_PORTRAIT_ID);
m_orientbox->setButton(ID);
@@ -296,7 +296,7 @@ void KPQtPage::setOptions(const QMap<QString,QString>& opts)
m_pagesize->setDisabled( opts[ "kde-pagesize-fixed" ] == "1" );
}
-void KPQtPage::getOptions(QMap<QString,QString>& opts, bool incldef)
+void KPQtPage::getOptions(TQMap<TQString,TQString>& opts, bool incldef)
{
opts["kde-orientation"] = (m_orientbox->id(m_orientbox->selected()) == ORIENT_LANDSCAPE_ID ? "Landscape" : "Portrait");
opts["kde-colormode"] = (m_colorbox->id(m_colorbox->selected()) == COLORMODE_GRAYSCALE_ID ? "GrayScale" : "Color");
@@ -313,7 +313,7 @@ void KPQtPage::getOptions(QMap<QString,QString>& opts, bool incldef)
}
}
else
- opts["kde-pagesize"] = QString::number(page_sizes[m_pagesize->currentItem()].ID);
+ opts["kde-pagesize"] = TQString::number(page_sizes[m_pagesize->currentItem()].ID);
int ID = m_nupbox->id(m_nupbox->selected());
QString s = opts["_kde-filters"];
if (ID == NUP_1)
@@ -325,11 +325,11 @@ void KPQtPage::getOptions(QMap<QString,QString>& opts, bool incldef)
int nup(ID == NUP_2 ? 2 : 4);
if (s.find("psnup") == -1)
{
- QStringList fl = QStringList::split(',', s, false);
+ QStringList fl = TQStringList::split(',', s, false);
KXmlCommandManager::self()->insertCommand(fl, "psnup");
s = fl.join(",");
}
- opts["_kde-psnup-nup"] = QString::number(nup);
+ opts["_kde-psnup-nup"] = TQString::number(nup);
}
opts["_kde-filters"] = s;
}
diff --git a/kdeprint/kpqtpage.h b/kdeprint/kpqtpage.h
index f71f08461..78fe34511 100644
--- a/kdeprint/kpqtpage.h
+++ b/kdeprint/kpqtpage.h
@@ -33,12 +33,12 @@ class KDEPRINT_EXPORT KPQtPage : public KPrintDialogPage
{
Q_OBJECT
public:
- KPQtPage(QWidget *parent = 0, const char *name = 0);
- KPQtPage(DrMain *driver, QWidget *parent = 0, const char *name = 0);
+ KPQtPage(TQWidget *parent = 0, const char *name = 0);
+ KPQtPage(DrMain *driver, TQWidget *parent = 0, const char *name = 0);
~KPQtPage();
- void setOptions(const QMap<QString,QString>& opts);
- void getOptions(QMap<QString,QString>& opts, bool incldef = false);
+ void setOptions(const TQMap<TQString,TQString>& opts);
+ void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false);
protected slots:
void slotOrientationChanged(int);
diff --git a/kdeprint/kprintaction.cpp b/kdeprint/kprintaction.cpp
index ffd771da3..4e62e791b 100644
--- a/kdeprint/kprintaction.cpp
+++ b/kdeprint/kprintaction.cpp
@@ -36,24 +36,24 @@ public:
PrinterType type;
QStringList printers;
- QWidget *parentWidget;
+ TQWidget *parentWidget;
};
-KPrintAction::KPrintAction(const QString& text, PrinterType type, QWidget *parentWidget, QObject *parent, const char *name)
+KPrintAction::KPrintAction(const TQString& text, PrinterType type, TQWidget *parentWidget, TQObject *parent, const char *name)
: KActionMenu(text, parent, name)
{
d = new KPrintActionPrivate();
initialize(type, parentWidget);
}
-KPrintAction::KPrintAction(const QString& text, const QIconSet& icon, PrinterType type, QWidget *parentWidget, QObject *parent, const char *name)
+KPrintAction::KPrintAction(const TQString& text, const TQIconSet& icon, PrinterType type, TQWidget *parentWidget, TQObject *parent, const char *name)
: KActionMenu(text, icon, parent, name)
{
d = new KPrintActionPrivate();
initialize(type, parentWidget);
}
-KPrintAction::KPrintAction(const QString& text, const QString& icon, PrinterType type, QWidget *parentWidget, QObject *parent, const char *name)
+KPrintAction::KPrintAction(const TQString& text, const TQString& icon, PrinterType type, TQWidget *parentWidget, TQObject *parent, const char *name)
: KActionMenu(text, icon, parent, name)
{
d = new KPrintActionPrivate();
@@ -65,10 +65,10 @@ KPrintAction::~KPrintAction()
delete d;
}
-void KPrintAction::initialize(PrinterType type, QWidget *parentWidget)
+void KPrintAction::initialize(PrinterType type, TQWidget *parentWidget)
{
- connect(popupMenu(), SIGNAL(aboutToShow()), SLOT(slotAboutToShow()));
- connect(popupMenu(), SIGNAL(activated(int)), SLOT(slotActivated(int)));
+ connect(popupMenu(), TQT_SIGNAL(aboutToShow()), TQT_SLOT(slotAboutToShow()));
+ connect(popupMenu(), TQT_SIGNAL(activated(int)), TQT_SLOT(slotActivated(int)));
d->type = type;
d->parentWidget = parentWidget;
@@ -78,10 +78,10 @@ void KPrintAction::slotAboutToShow()
{
popupMenu()->clear();
d->printers.clear();
- QPtrList<KMPrinter> *prts = KMManager::self()->printerList();
+ TQPtrList<KMPrinter> *prts = KMManager::self()->printerList();
if (prts && !prts->isEmpty())
{
- QPtrListIterator<KMPrinter> it(*prts);
+ TQPtrListIterator<KMPrinter> it(*prts);
bool first(false);
int ID(0);
for (; it.current(); ++it)
@@ -112,17 +112,17 @@ void KPrintAction::slotActivated(int ID)
}
}
-KPrintAction* KPrintAction::exportAll(QWidget *parentWidget, QObject *parent, const char *name)
+KPrintAction* KPrintAction::exportAll(TQWidget *parentWidget, TQObject *parent, const char *name)
{
return new KPrintAction(i18n("&Export..."), All, parentWidget, parent, (name ? name : "export_all"));
}
-KPrintAction* KPrintAction::exportRegular(QWidget *parentWidget, QObject *parent, const char *name)
+KPrintAction* KPrintAction::exportRegular(TQWidget *parentWidget, TQObject *parent, const char *name)
{
return new KPrintAction(i18n("&Export..."), Regular, parentWidget, parent, (name ? name : "export_regular"));
}
-KPrintAction* KPrintAction::exportSpecial(QWidget *parentWidget, QObject *parent, const char *name)
+KPrintAction* KPrintAction::exportSpecial(TQWidget *parentWidget, TQObject *parent, const char *name)
{
return new KPrintAction(i18n("&Export..."), Specials, parentWidget, parent, (name ? name : "export_special"));
}
diff --git a/kdeprint/kprintaction.h b/kdeprint/kprintaction.h
index a8408f181..eb23d6e31 100644
--- a/kdeprint/kprintaction.h
+++ b/kdeprint/kprintaction.h
@@ -30,14 +30,14 @@ class KDEPRINT_EXPORT KPrintAction : public KActionMenu
public:
enum PrinterType { All, Regular, Specials };
- KPrintAction(const QString& text, PrinterType type = All, QWidget *parentWidget = 0, QObject *parent = 0, const char *name = 0);
- KPrintAction(const QString& text, const QIconSet& icon, PrinterType type = All, QWidget *parentWidget = 0, QObject *parent = 0, const char *name = 0);
- KPrintAction(const QString& text, const QString& icon, PrinterType type = All, QWidget *parentWidget = 0, QObject *parent = 0, const char *name = 0);
+ KPrintAction(const TQString& text, PrinterType type = All, TQWidget *parentWidget = 0, TQObject *parent = 0, const char *name = 0);
+ KPrintAction(const TQString& text, const TQIconSet& icon, PrinterType type = All, TQWidget *parentWidget = 0, TQObject *parent = 0, const char *name = 0);
+ KPrintAction(const TQString& text, const TQString& icon, PrinterType type = All, TQWidget *parentWidget = 0, TQObject *parent = 0, const char *name = 0);
virtual ~KPrintAction();
- static KPrintAction* exportAll(QWidget *parentWidget = 0, QObject *parent = 0, const char *name = 0);
- static KPrintAction* exportRegular(QWidget *parentWidget = 0, QObject *parent = 0, const char *name = 0);
- static KPrintAction* exportSpecial(QWidget *parentWidget = 0, QObject *parent = 0, const char *name = 0);
+ static KPrintAction* exportAll(TQWidget *parentWidget = 0, TQObject *parent = 0, const char *name = 0);
+ static KPrintAction* exportRegular(TQWidget *parentWidget = 0, TQObject *parent = 0, const char *name = 0);
+ static KPrintAction* exportSpecial(TQWidget *parentWidget = 0, TQObject *parent = 0, const char *name = 0);
signals:
void print(KPrinter*);
@@ -47,7 +47,7 @@ protected slots:
void slotActivated(int);
protected:
- void initialize(PrinterType type, QWidget *parentWidget);
+ void initialize(PrinterType type, TQWidget *parentWidget);
private:
class KPrintActionPrivate;
diff --git a/kdeprint/kprintdialog.cpp b/kdeprint/kprintdialog.cpp
index 3570393bb..c84472677 100644
--- a/kdeprint/kprintdialog.cpp
+++ b/kdeprint/kprintdialog.cpp
@@ -37,19 +37,19 @@
#include "treecombobox.h"
#include "messagewindow.h"
-#include <qgroupbox.h>
-#include <qcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqcheckbox.h>
#include <kpushbutton.h>
-#include <qlabel.h>
-#include <qcombobox.h>
-#include <qtabwidget.h>
-#include <qvbox.h>
-#include <qlayout.h>
-#include <qregexp.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
+#include <tqtabwidget.h>
+#include <tqvbox.h>
+#include <tqlayout.h>
+#include <tqregexp.h>
#include <kmessagebox.h>
-#include <qdir.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <tqdir.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
#include <kiconloader.h>
@@ -83,33 +83,33 @@ public:
QCheckBox *m_persistent;
bool m_reduced;
- QPtrList<KPrintDialogPage> m_pages;
+ TQPtrList<KPrintDialogPage> m_pages;
KPrinter *m_printer;
bool b_optionsEnabled;
bool b_propertiesEnabled;
bool b_systemEnabled;
};
-KPrintDialog::KPrintDialog(QWidget *parent, const char *name)
+KPrintDialog::KPrintDialog(TQWidget *parent, const char *name)
: KDialog(parent,name,true)
{
//WhatsThis strings.... (added by pfeifle@kde.org)
- QString whatsThisLocationLabel = i18n( " <qt><b>Printer Location:</b> The <em>Location</em> may describe where the"
+ TQString whatsThisLocationLabel = i18n( " <qt><b>Printer Location:</b> The <em>Location</em> may describe where the"
" selected printer is located. The Location description is created"
" by the administrator of the print system (or may be"
" left empty)."
" </qt>" );
- QString whatsThisPrinterType = i18n( " <qt><b>Printer Type:</b> The <em>Type</em> indicates your printer type."
+ TQString whatsThisPrinterType = i18n( " <qt><b>Printer Type:</b> The <em>Type</em> indicates your printer type."
" </qt>" );
- QString whatsThisPrinterState = i18n( " <qt><b>Printer State:</b> The <em>State</em> indicates the state of the"
+ TQString whatsThisPrinterState = i18n( " <qt><b>Printer State:</b> The <em>State</em> indicates the state of the"
" print queue on the print server (which could be your localhost). The"
" state may be 'Idle', 'Processing', 'Stopped', 'Paused' or similar."
" </qt>" );
- QString whatsThisPrinterComment = i18n( " <qt><b>Printer Comment:</b> The <em>Comment</em> may describe the selected"
+ TQString whatsThisPrinterComment = i18n( " <qt><b>Printer Comment:</b> The <em>Comment</em> may describe the selected"
" printer. This comment is created by the administrator"
" of the print system (or may be left empty)."
" </qt>" );
- QString whatsThisPrinterSelect = i18n( " <qt><b>Printer Selection Menu:</b> "
+ TQString whatsThisPrinterSelect = i18n( " <qt><b>Printer Selection Menu:</b> "
" <p>Use this combo box to select the printer to which you want to print."
" Initially (if you run KDEPrint for the first time), you may only find the "
" <em>KDE special printers</em> (which save"
@@ -134,11 +134,11 @@ KPrintDialog::KPrintDialog(QWidget *parent, const char *name)
" can be made through a selection in the drop-down menu at bottom of this dialog when "
" fully expanded). </p> "
" </qt>" );
- QString whatsThisPrintJobProperties = i18n( " <qt><b>Print Job Properties:</b> "
+ TQString whatsThisPrintJobProperties = i18n( " <qt><b>Print Job Properties:</b> "
" <p>This button opens a dialog where you can make decisions"
" regarding all supported print job options."
" </qt>" );
- QString whatsThisPrinterFilter = i18n( " <qt><b>Selective View on List of Printers:</b>"
+ TQString whatsThisPrinterFilter = i18n( " <qt><b>Selective View on List of Printers:</b>"
" <p> This button reduces the list of visible printers"
" to a shorter, more convenient, pre-defined list.</p>"
" <p>This is particularly useful in enterprise environments"
@@ -151,7 +151,7 @@ KPrintDialog::KPrintDialog(QWidget *parent, const char *name)
" <em>'selective view list'</em> will make all printers dissappear from the "
" view. (To re-enable all printers, just click this button again.) </p> "
" </qt>" );
- QString whatsThisAddPrinterWizard = i18n( "<qt><b>KDE Add Printer Wizard</b>"
+ TQString whatsThisAddPrinterWizard = i18n( "<qt><b>KDE Add Printer Wizard</b>"
" <p>This button starts the <em>KDE Add Printer Wizard</em>.</p>"
" <p>Use the Wizard (with <em>\"CUPS\"</em> or <em>\"RLPR\"</em>) to add locally"
" defined printers to your system. </p>"
@@ -160,14 +160,14 @@ KPrintDialog::KPrintDialog(QWidget *parent, const char *name)
" <em>\"Generic LPD</em>\", <em>\"LPRng\"</em>, or <em>\"Print Through "
" an External Program</em>\".) </p> "
" </qt>" );
- QString whatsThisExternalPrintCommand = i18n( " <qt><b>External Print Command</b>"
+ TQString whatsThisExternalPrintCommand = i18n( " <qt><b>External Print Command</b>"
" <p>Here you can enter any command that would also print for you in "
" a <em>konsole</em> window. </p>"
" <b>Example:</b> <pre>a2ps -P &lt;printername&gt; --medium=A3</pre>."
" </qt>" );
- QString whatsThisOptions = i18n( " <qt><b>Additional Print Job Options</b>"
+ TQString whatsThisOptions = i18n( " <qt><b>Additional Print Job Options</b>"
" <p>This button shows or hides additional printing options.</qt>" );
- QString whatsThisSystemOptions = i18n( " <qt><b>System Options:</b> "
+ TQString whatsThisSystemOptions = i18n( " <qt><b>System Options:</b> "
" <p>This button starts a new dialog where you can adjust various"
" settings of your printing system. Amongst them:"
" <ul><li> Should KDE"
@@ -179,21 +179,21 @@ KPrintDialog::KPrintDialog(QWidget *parent, const char *name)
" </ul> and many more.... "
" </qt>" );
- QString whatsThisHelpButton = i18n( " <qt><b>Help:</b> This button takes you to the complete <em>KDEPrint"
+ TQString whatsThisHelpButton = i18n( " <qt><b>Help:</b> This button takes you to the complete <em>KDEPrint"
" Manual</em>."
" </qt>" );
- QString whatsThisCancelButton = i18n( " <qt><b>Cancel:</b> This button cancels your print job and quits the"
+ TQString whatsThisCancelButton = i18n( " <qt><b>Cancel:</b> This button cancels your print job and quits the"
" kprinter dialog."
" </qt>" );
- QString whatsThisPrintButton = i18n( " <qt><b>Print:</b> This button sends the job to the printing process."
+ TQString whatsThisPrintButton = i18n( " <qt><b>Print:</b> This button sends the job to the printing process."
" If you are sending non-PostScript files, you may be"
" asked if you want KDE to convert the files into PostScript,"
" or if you want your print subsystem (like CUPS) to do this."
" </qt>" );
- QString whatsThisKeepDialogOpenCheckbox = i18n( " <qt><b>Keep Printing Dialog Open</b>"
+ TQString whatsThisKeepDialogOpenCheckbox = i18n( " <qt><b>Keep Printing Dialog Open</b>"
"<p>If you enable this checkbox, the printing dialog"
" stays open after you hit the <em>Print</em> button.</p>"
" <p> This is"
@@ -203,7 +203,7 @@ KPrintDialog::KPrintDialog(QWidget *parent, const char *name)
" the other) to have it finished more quickly.</p>"
" </qt>" );
- QString whatsThisOutputFileLabel = i18n(" <qt><b>Output File Name and Path:</b> The \"Output file:\" shows "
+ TQString whatsThisOutputFileLabel = i18n(" <qt><b>Output File Name and Path:</b> The \"Output file:\" shows "
" you where your file will be"
" saved if you decide to \"Print to File\" your job, using one of the"
" KDE <em>Special Printers</em> named \"Print to File (PostScript)\""
@@ -211,18 +211,18 @@ KPrintDialog::KPrintDialog(QWidget *parent, const char *name)
" your need by using the button and/or editing the line on the right."
" </qt>" );
- QString whatsThisOutputFileLineedit = i18n(" <qt><b>Output File Name and Path:</b> Edit this line to create a "
+ TQString whatsThisOutputFileLineedit = i18n(" <qt><b>Output File Name and Path:</b> Edit this line to create a "
" path and filename that suits your needs."
" (Button and Lineedit field are only available if you \"Print to File\")"
" </qt>" );
- QString whatsThisOutputFileButton = i18n(" <qt><b>Browse Directories button:<b> This button calls "
+ TQString whatsThisOutputFileButton = i18n(" <qt><b>Browse Directories button:<b> This button calls "
" the \"File Open / Browsed Directories\" dialog to let you"
" choose a directory and file name where your \"Print-to-File\""
" job should be saved."
" </qt>" );
- QString whatsThisAddFileButton = i18n( " <qt><b>Add File to Job</b>"
+ TQString whatsThisAddFileButton = i18n( " <qt><b>Add File to Job</b>"
" <p>This button calls the \"File Open / Browse Directories\" dialog to allow you"
" to select a file for printing. Note, that "
" <ul><li>you can select ASCII or International Text, PDF,"
@@ -234,7 +234,7 @@ KPrintDialog::KPrintDialog(QWidget *parent, const char *name)
" </ul>"
" </qt>" );
- QString whatsThisPreviewCheckBox = i18n(" <qt><b>Print Preview</b>"
+ TQString whatsThisPreviewCheckBox = i18n(" <qt><b>Print Preview</b>"
" Enable this checkbox if you want to see a preview of"
" your printout. A preview lets you check if, for instance,"
" your intended \"poster\" or \"pamphlet\" layout"
@@ -247,7 +247,7 @@ KPrintDialog::KPrintDialog(QWidget *parent, const char *name)
" Firefox or OpenOffice), print preview is not available here. "
" </qt>" );
- QString whatsThisSetDefaultPrinter = i18n(" <qt><b>Set as Default Printer</b>"
+ TQString whatsThisSetDefaultPrinter = i18n(" <qt><b>Set as Default Printer</b>"
" This button sets the current printer as the user's"
" default. "
" <p><b>Note:</b> (Button is only visible if the checkbox for "
@@ -262,98 +262,98 @@ KPrintDialog::KPrintDialog(QWidget *parent, const char *name)
setCaption(i18n("Print"));
// widget creation
- QGroupBox *m_pbox = new QGroupBox(0,Qt::Vertical,i18n("Printer"), this);
- d->m_type = new QLabel(m_pbox);
- QWhatsThis::add(d->m_type, whatsThisPrinterType);
- d->m_state = new QLabel(m_pbox);
- QWhatsThis::add(d->m_state, whatsThisPrinterState);
- d->m_comment = new QLabel(m_pbox);
- QWhatsThis::add(d->m_comment, whatsThisPrinterComment);
- d->m_location = new QLabel(m_pbox);
- QWhatsThis::add(d->m_location, whatsThisLocationLabel);
+ QGroupBox *m_pbox = new TQGroupBox(0,Qt::Vertical,i18n("Printer"), this);
+ d->m_type = new TQLabel(m_pbox);
+ TQWhatsThis::add(d->m_type, whatsThisPrinterType);
+ d->m_state = new TQLabel(m_pbox);
+ TQWhatsThis::add(d->m_state, whatsThisPrinterState);
+ d->m_comment = new TQLabel(m_pbox);
+ TQWhatsThis::add(d->m_comment, whatsThisPrinterComment);
+ d->m_location = new TQLabel(m_pbox);
+ TQWhatsThis::add(d->m_location, whatsThisLocationLabel);
d->m_printers = new TreeComboBox(m_pbox);
- QWhatsThis::add(d->m_printers, whatsThisPrinterSelect);
+ TQWhatsThis::add(d->m_printers, whatsThisPrinterSelect);
d->m_printers->setMinimumHeight(25);
- QLabel *m_printerlabel = new QLabel(i18n("&Name:"), m_pbox);
- QWhatsThis::add(m_printerlabel, whatsThisPrinterSelect);
- QLabel *m_statelabel = new QLabel(i18n("Status", "State:"), m_pbox);
- QWhatsThis::add(m_statelabel, whatsThisPrinterState);
- QLabel *m_typelabel = new QLabel(i18n("Type:"), m_pbox);
- QWhatsThis::add(m_typelabel, whatsThisPrinterType);
- QLabel *m_locationlabel = new QLabel(i18n("Location:"), m_pbox);
- QWhatsThis::add(m_locationlabel, whatsThisLocationLabel);
- QLabel *m_commentlabel = new QLabel(i18n("Comment:"), m_pbox);
- QWhatsThis::add(m_commentlabel, whatsThisPrinterComment);
+ QLabel *m_printerlabel = new TQLabel(i18n("&Name:"), m_pbox);
+ TQWhatsThis::add(m_printerlabel, whatsThisPrinterSelect);
+ QLabel *m_statelabel = new TQLabel(i18n("Status", "State:"), m_pbox);
+ TQWhatsThis::add(m_statelabel, whatsThisPrinterState);
+ QLabel *m_typelabel = new TQLabel(i18n("Type:"), m_pbox);
+ TQWhatsThis::add(m_typelabel, whatsThisPrinterType);
+ QLabel *m_locationlabel = new TQLabel(i18n("Location:"), m_pbox);
+ TQWhatsThis::add(m_locationlabel, whatsThisLocationLabel);
+ QLabel *m_commentlabel = new TQLabel(i18n("Comment:"), m_pbox);
+ TQWhatsThis::add(m_commentlabel, whatsThisPrinterComment);
m_printerlabel->setBuddy(d->m_printers);
d->m_properties = new KPushButton(KGuiItem(i18n("P&roperties"), "edit"), m_pbox);
- QWhatsThis::add( d->m_properties, whatsThisPrintJobProperties);
+ TQWhatsThis::add( d->m_properties, whatsThisPrintJobProperties);
d->m_options = new KPushButton(KGuiItem(i18n("System Op&tions"), "kdeprint_configmgr"), this);
- QWhatsThis::add(d->m_options,whatsThisSystemOptions);
+ TQWhatsThis::add(d->m_options,whatsThisSystemOptions);
d->m_default = new KPushButton(KGuiItem(i18n("Set as &Default"), "kdeprint_defaultsoft"), m_pbox);
- QWhatsThis::add(d->m_default,whatsThisSetDefaultPrinter);
- d->m_filter = new QPushButton(m_pbox);
+ TQWhatsThis::add(d->m_default,whatsThisSetDefaultPrinter);
+ d->m_filter = new TQPushButton(m_pbox);
d->m_filter->setPixmap(SmallIcon("filter"));
- d->m_filter->setMinimumSize(QSize(d->m_printers->minimumHeight(),d->m_printers->minimumHeight()));
+ d->m_filter->setMinimumSize(TQSize(d->m_printers->minimumHeight(),d->m_printers->minimumHeight()));
d->m_filter->setToggleButton(true);
d->m_filter->setOn(KMManager::self()->isFilterEnabled());
- QToolTip::add(d->m_filter, i18n("Toggle selective view on printer list"));
- QWhatsThis::add(d->m_filter, whatsThisPrinterFilter);
- d->m_wizard = new QPushButton(m_pbox);
+ TQToolTip::add(d->m_filter, i18n("Toggle selective view on printer list"));
+ TQWhatsThis::add(d->m_filter, whatsThisPrinterFilter);
+ d->m_wizard = new TQPushButton(m_pbox);
d->m_wizard->setPixmap(SmallIcon("wizard"));
- d->m_wizard->setMinimumSize(QSize(d->m_printers->minimumHeight(),d->m_printers->minimumHeight()));
- QToolTip::add(d->m_wizard, i18n("Add printer..."));
- QWhatsThis::add(d->m_wizard, whatsThisAddPrinterWizard);
+ d->m_wizard->setMinimumSize(TQSize(d->m_printers->minimumHeight(),d->m_printers->minimumHeight()));
+ TQToolTip::add(d->m_wizard, i18n("Add printer..."));
+ TQWhatsThis::add(d->m_wizard, whatsThisAddPrinterWizard);
d->m_ok = new KPushButton(KGuiItem(i18n("&Print"), "fileprint"), this);
- QWhatsThis::add( d->m_ok, whatsThisPrintButton);
+ TQWhatsThis::add( d->m_ok, whatsThisPrintButton);
d->m_ok->setDefault(true);
d->m_ok->setEnabled( false );
QPushButton *m_cancel = new KPushButton(KStdGuiItem::cancel(), this);
- QWhatsThis::add(m_cancel, whatsThisCancelButton);
- d->m_preview = new QCheckBox(i18n("Previe&w"), m_pbox);
- QWhatsThis::add(d->m_preview, whatsThisPreviewCheckBox);
- d->m_filelabel = new QLabel(i18n("O&utput file:"), m_pbox);
- QWhatsThis::add(d->m_filelabel,whatsThisOutputFileLabel);
- d->m_file = new KURLRequester(QDir::homeDirPath()+"/print.ps", m_pbox);
- QWhatsThis::add(d->m_file,whatsThisOutputFileLineedit);
+ TQWhatsThis::add(m_cancel, whatsThisCancelButton);
+ d->m_preview = new TQCheckBox(i18n("Previe&w"), m_pbox);
+ TQWhatsThis::add(d->m_preview, whatsThisPreviewCheckBox);
+ d->m_filelabel = new TQLabel(i18n("O&utput file:"), m_pbox);
+ TQWhatsThis::add(d->m_filelabel,whatsThisOutputFileLabel);
+ d->m_file = new KURLRequester(TQDir::homeDirPath()+"/print.ps", m_pbox);
+ TQWhatsThis::add(d->m_file,whatsThisOutputFileLineedit);
d->m_file->setEnabled(false);
d->m_filelabel->setBuddy(d->m_file);
- d->m_cmdlabel = new QLabel(i18n("Print co&mmand:"), m_pbox);
- QWhatsThis::add( d->m_cmdlabel, whatsThisExternalPrintCommand);
+ d->m_cmdlabel = new TQLabel(i18n("Print co&mmand:"), m_pbox);
+ TQWhatsThis::add( d->m_cmdlabel, whatsThisExternalPrintCommand);
- d->m_cmd = new QLineEdit(m_pbox);
- QWhatsThis::add( d->m_cmd, whatsThisExternalPrintCommand);
+ d->m_cmd = new TQLineEdit(m_pbox);
+ TQWhatsThis::add( d->m_cmd, whatsThisExternalPrintCommand);
d->m_cmdlabel->setBuddy(d->m_cmd);
- d->m_dummy = new QVBox(this);
+ d->m_dummy = new TQVBox(this);
d->m_plugin = new PluginComboBox(this);
d->m_extbtn = new KPushButton(this);
- QToolTip::add(d->m_extbtn, i18n("Show/hide advanced options"));
- QWhatsThis::add(d->m_extbtn, whatsThisOptions);
- d->m_persistent = new QCheckBox(i18n("&Keep this dialog open after printing"), this);
- QWhatsThis::add( d->m_persistent, whatsThisKeepDialogOpenCheckbox);
+ TQToolTip::add(d->m_extbtn, i18n("Show/hide advanced options"));
+ TQWhatsThis::add(d->m_extbtn, whatsThisOptions);
+ d->m_persistent = new TQCheckBox(i18n("&Keep this dialog open after printing"), this);
+ TQWhatsThis::add( d->m_persistent, whatsThisKeepDialogOpenCheckbox);
QPushButton *m_help = new KPushButton(KStdGuiItem::help(), this);
- QWhatsThis::add( m_help, whatsThisHelpButton);
-
- QWidget::setTabOrder( d->m_printers, d->m_filter );
- QWidget::setTabOrder( d->m_filter, d->m_wizard );
- QWidget::setTabOrder( d->m_wizard, d->m_properties );
- QWidget::setTabOrder( d->m_properties, d->m_preview );
- QWidget::setTabOrder( d->m_preview, d->m_file );
- QWidget::setTabOrder( d->m_file, d->m_cmd );
- QWidget::setTabOrder( d->m_plugin, d->m_persistent );
- QWidget::setTabOrder( d->m_persistent, d->m_extbtn );
- QWidget::setTabOrder( d->m_extbtn, d->m_options );
- QWidget::setTabOrder( d->m_options, m_help );
- QWidget::setTabOrder( m_help, d->m_ok );
- QWidget::setTabOrder( d->m_ok, m_cancel );
+ TQWhatsThis::add( m_help, whatsThisHelpButton);
+
+ TQWidget::setTabOrder( d->m_printers, d->m_filter );
+ TQWidget::setTabOrder( d->m_filter, d->m_wizard );
+ TQWidget::setTabOrder( d->m_wizard, d->m_properties );
+ TQWidget::setTabOrder( d->m_properties, d->m_preview );
+ TQWidget::setTabOrder( d->m_preview, d->m_file );
+ TQWidget::setTabOrder( d->m_file, d->m_cmd );
+ TQWidget::setTabOrder( d->m_plugin, d->m_persistent );
+ TQWidget::setTabOrder( d->m_persistent, d->m_extbtn );
+ TQWidget::setTabOrder( d->m_extbtn, d->m_options );
+ TQWidget::setTabOrder( d->m_options, m_help );
+ TQWidget::setTabOrder( m_help, d->m_ok );
+ TQWidget::setTabOrder( d->m_ok, m_cancel );
// layout creation
- QVBoxLayout *l1 = new QVBoxLayout(this, 10, 10);
+ QVBoxLayout *l1 = new TQVBoxLayout(this, 10, 10);
l1->addWidget(m_pbox,0);
l1->addWidget(d->m_dummy,1);
l1->addWidget(d->m_plugin,0);
l1->addWidget(d->m_persistent);
- QHBoxLayout *l2 = new QHBoxLayout(0, 0, 10);
+ QHBoxLayout *l2 = new TQHBoxLayout(0, 0, 10);
l1->addLayout(l2);
l2->addWidget(d->m_extbtn,0);
l2->addWidget(d->m_options,0);
@@ -361,17 +361,17 @@ KPrintDialog::KPrintDialog(QWidget *parent, const char *name)
l2->addStretch(1);
l2->addWidget(d->m_ok,0);
l2->addWidget(m_cancel,0);
- QGridLayout *l3 = new QGridLayout(m_pbox->layout(),3,3,7);
+ QGridLayout *l3 = new TQGridLayout(m_pbox->layout(),3,3,7);
l3->setColStretch(1,1);
l3->setRowStretch(0,1);
- QGridLayout *l4 = new QGridLayout(0, 5, 2, 0, 5);
+ QGridLayout *l4 = new TQGridLayout(0, 5, 2, 0, 5);
l3->addMultiCellLayout(l4,0,0,0,1);
l4->addWidget(m_printerlabel,0,0);
l4->addWidget(m_statelabel,1,0);
l4->addWidget(m_typelabel,2,0);
l4->addWidget(m_locationlabel,3,0);
l4->addWidget(m_commentlabel,4,0);
- QHBoxLayout *ll4 = new QHBoxLayout(0, 0, 3);
+ QHBoxLayout *ll4 = new TQHBoxLayout(0, 0, 3);
l4->addLayout(ll4,0,1);
ll4->addWidget(d->m_printers,1);
ll4->addWidget(d->m_filter,0);
@@ -382,7 +382,7 @@ KPrintDialog::KPrintDialog(QWidget *parent, const char *name)
l4->addWidget(d->m_location,3,1);
l4->addWidget(d->m_comment,4,1);
l4->setColStretch(1,1);
- QVBoxLayout *l5 = new QVBoxLayout(0, 0, 10);
+ QVBoxLayout *l5 = new TQVBoxLayout(0, 0, 10);
l3->addLayout(l5,0,2);
l5->addWidget(d->m_properties,0);
l5->addWidget(d->m_default,0);
@@ -396,19 +396,19 @@ KPrintDialog::KPrintDialog(QWidget *parent, const char *name)
l3->addMultiCellWidget(d->m_cmd,2,2,1,2);
// connections
- connect(d->m_ok,SIGNAL(clicked()),SLOT(accept()));
- connect(m_cancel,SIGNAL(clicked()),SLOT(reject()));
- connect(d->m_properties,SIGNAL(clicked()),SLOT(slotProperties()));
- connect(d->m_default,SIGNAL(clicked()),SLOT(slotSetDefault()));
- connect(d->m_printers,SIGNAL(activated(int)),SLOT(slotPrinterSelected(int)));
- connect(d->m_options,SIGNAL(clicked()),SLOT(slotOptions()));
- connect(d->m_wizard,SIGNAL(clicked()),SLOT(slotWizard()));
- connect(d->m_extbtn, SIGNAL(clicked()), SLOT(slotExtensionClicked()));
- connect(d->m_filter, SIGNAL(toggled(bool)), SLOT(slotToggleFilter(bool)));
- connect(m_help, SIGNAL(clicked()), SLOT(slotHelp()));
- connect(d->m_file, SIGNAL(urlSelected(const QString&)), SLOT(slotOutputFileSelected(const QString&)));
- connect( d->m_file, SIGNAL( openFileDialog( KURLRequester* ) ), SLOT( slotOpenFileDialog() ) );
- connect( KMFactory::self()->manager(), SIGNAL( updatePossible( bool ) ), SLOT( slotUpdatePossible( bool ) ) );
+ connect(d->m_ok,TQT_SIGNAL(clicked()),TQT_SLOT(accept()));
+ connect(m_cancel,TQT_SIGNAL(clicked()),TQT_SLOT(reject()));
+ connect(d->m_properties,TQT_SIGNAL(clicked()),TQT_SLOT(slotProperties()));
+ connect(d->m_default,TQT_SIGNAL(clicked()),TQT_SLOT(slotSetDefault()));
+ connect(d->m_printers,TQT_SIGNAL(activated(int)),TQT_SLOT(slotPrinterSelected(int)));
+ connect(d->m_options,TQT_SIGNAL(clicked()),TQT_SLOT(slotOptions()));
+ connect(d->m_wizard,TQT_SIGNAL(clicked()),TQT_SLOT(slotWizard()));
+ connect(d->m_extbtn, TQT_SIGNAL(clicked()), TQT_SLOT(slotExtensionClicked()));
+ connect(d->m_filter, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotToggleFilter(bool)));
+ connect(m_help, TQT_SIGNAL(clicked()), TQT_SLOT(slotHelp()));
+ connect(d->m_file, TQT_SIGNAL(urlSelected(const TQString&)), TQT_SLOT(slotOutputFileSelected(const TQString&)));
+ connect( d->m_file, TQT_SIGNAL( openFileDialog( KURLRequester* ) ), TQT_SLOT( slotOpenFileDialog() ) );
+ connect( KMFactory::self()->manager(), TQT_SIGNAL( updatePossible( bool ) ), TQT_SLOT( slotUpdatePossible( bool ) ) );
d->b_optionsEnabled = kapp->authorize("print/options") && kapp->authorize("print/selection");
d->b_propertiesEnabled = kapp->authorize("print/properties") && kapp->authorize("print/selection");
@@ -473,28 +473,28 @@ void KPrintDialog::setFlags(int f)
d->m_wizard->setEnabled((mgr->hasManagement() && (mgr->printerOperationMask() & KMManager::PrinterCreation)));
}
-void KPrintDialog::setDialogPages(QPtrList<KPrintDialogPage> *pages)
+void KPrintDialog::setDialogPages(TQPtrList<KPrintDialogPage> *pages)
{
if (!pages) return;
if (pages->count() + d->m_pages.count() == 1)
{
// only one page, reparent the page to d->m_dummy and remove any
- // QTabWidget child if any.
+ // TQTabWidget child if any.
if (pages->count() > 0)
d->m_pages.append(pages->take(0));
- d->m_pages.first()->reparent(d->m_dummy, QPoint(0,0));
+ d->m_pages.first()->reparent(d->m_dummy, TQPoint(0,0));
d->m_pages.first()->show();
- delete d->m_dummy->child("TabWidget", "QTabWidget");
+ delete d->m_dummy->child("TabWidget", "TQTabWidget");
}
else
{
// more than one page.
- QTabWidget *tabs = static_cast<QTabWidget*>(d->m_dummy->child("TabWidget", "QTabWidget"));
+ QTabWidget *tabs = static_cast<TQTabWidget*>(d->m_dummy->child("TabWidget", "TQTabWidget"));
if (!tabs)
{
- // QTabWidget doesn't exist. Create it and reparent all
+ // TQTabWidget doesn't exist. Create it and reparent all
// already existing pages.
- tabs = new QTabWidget(d->m_dummy, "TabWidget");
+ tabs = new TQTabWidget(d->m_dummy, "TabWidget");
tabs->setMargin(10);
for (d->m_pages.first(); d->m_pages.current(); d->m_pages.next())
{
@@ -512,7 +512,7 @@ void KPrintDialog::setDialogPages(QPtrList<KPrintDialogPage> *pages)
d->m_extbtn->setEnabled(d->m_pages.count() > 0);
}
-KPrintDialog* KPrintDialog::printerDialog(KPrinter *printer, QWidget *parent, const QString& caption, bool forceExpand)
+KPrintDialog* KPrintDialog::printerDialog(KPrinter *printer, TQWidget *parent, const TQString& caption, bool forceExpand)
{
if (printer)
{
@@ -543,7 +543,7 @@ void KPrintDialog::initialize(KPrinter *printer)
d->m_printer = printer;
// first retrieve printer list and update combo box (get default or last used printer also)
- QPtrList<KMPrinter> *plist = KMFactory::self()->manager()->printerList();
+ TQPtrList<KMPrinter> *plist = KMFactory::self()->manager()->printerList();
if (!KMManager::self()->errorMsg().isEmpty())
{
KMessageBox::error(parentWidget(),
@@ -556,7 +556,7 @@ void KPrintDialog::initialize(KPrinter *printer)
{
QString oldP = d->m_printers->currentText();
d->m_printers->clear();
- QPtrListIterator<KMPrinter> it(*plist);
+ TQPtrListIterator<KMPrinter> it(*plist);
int defsoft(-1), defhard(-1), defsearch(-1);
bool sep(false);
for (;it.current();++it)
@@ -568,7 +568,7 @@ void KPrintDialog::initialize(KPrinter *printer)
if (!sep && it.current()->isSpecial())
{
sep = true;
- d->m_printers->insertItem(QPixmap(), QString::fromLatin1("--------"));
+ d->m_printers->insertItem(TQPixmap(), TQString::fromLatin1("--------"));
}
d->m_printers->insertItem(SmallIcon(it.current()->pixmap(),0,(it.current()->isValid() ? (int)KIcon::DefaultState : (int)KIcon::LockOverlay)),it.current()->name(),false/*sep*/);
if (it.current()->isSoftDefault())
@@ -599,7 +599,7 @@ void KPrintDialog::initialize(KPrinter *printer)
d->m_preview->setChecked(true);
d->m_preview->setEnabled(!d->m_printer->previewOnly());
d->m_cmd->setText(d->m_printer->option("kde-printcommand"));
- QPtrListIterator<KPrintDialogPage> it(d->m_pages);
+ TQPtrListIterator<KPrintDialogPage> it(d->m_pages);
for (;it.current();++it)
it.current()->setOptions(d->m_printer->options());
}
@@ -607,10 +607,10 @@ void KPrintDialog::initialize(KPrinter *printer)
void KPrintDialog::slotPrinterSelected(int index)
{
bool ok(false);
- d->m_location->setText(QString::null);
- d->m_state->setText(QString::null);
- d->m_comment->setText(QString::null);
- d->m_type->setText(QString::null);
+ d->m_location->setText(TQString::null);
+ d->m_state->setText(TQString::null);
+ d->m_comment->setText(TQString::null);
+ d->m_type->setText(TQString::null);
if (index >= 0 && index < d->m_printers->count())
{
KMManager *mgr = KMFactory::self()->manager();
@@ -654,12 +654,12 @@ void KPrintDialog::done(int result)
{
if (result == Accepted && d->m_printer)
{
- QMap<QString,QString> opts;
+ TQMap<TQString,TQString> opts;
KMPrinter *prt(0);
// get options from global pages
QString msg;
- QPtrListIterator<KPrintDialogPage> it(d->m_pages);
+ TQPtrListIterator<KPrintDialogPage> it(d->m_pages);
for (;it.current();++it)
if (it.current()->isEnabled())
{
@@ -692,8 +692,8 @@ void KPrintDialog::done(int result)
opts["kde-special-command"] = prt->option("kde-special-command");
// merge options with KMPrinter object options
- QMap<QString,QString> popts = (prt->isEdited() ? prt->editedOptions() : prt->defaultOptions());
- for (QMap<QString,QString>::ConstIterator it=popts.begin(); it!=popts.end(); ++it)
+ TQMap<TQString,TQString> popts = (prt->isEdited() ? prt->editedOptions() : prt->defaultOptions());
+ for (TQMap<TQString,TQString>::ConstIterator it=popts.begin(); it!=popts.end(); ++it)
opts[it.key()] = it.data();
// update KPrinter object
@@ -730,7 +730,7 @@ bool KPrintDialog::checkOutputFile()
{
//value = (KMessageBox::warningYesNo(this,i18n("File \"%1\" already exists. Overwrite?").arg(f.absFilePath())) == KMessageBox::Yes);
time_t mtimeDest = f.lastModified().toTime_t();
- KIO::RenameDlg dlg( this, i18n( "Print" ), QString::null, d->m_file->url(),
+ KIO::RenameDlg dlg( this, i18n( "Print" ), TQString::null, d->m_file->url(),
KIO::M_OVERWRITE, ( time_t ) -1, f.size(), ( time_t ) -1, f.created().toTime_t() , mtimeDest+1, mtimeDest, true );
int result = dlg.exec();
switch ( result )
@@ -755,7 +755,7 @@ bool KPrintDialog::checkOutputFile()
}
else
{
- QFileInfo d( f.dirPath( true ) );
+ TQFileInfo d( f.dirPath( true ) );
if ( !d.exists() )
KMessageBox::error( this, i18n( "The output directory does not exist." ) );
else if ( !d.isWritable() )
@@ -794,12 +794,12 @@ void KPrintDialog::enableSpecial(bool on)
d->m_pages.current()->setEnabled(!on);
}
-void KPrintDialog::setOutputFileExtension(const QString& ext)
+void KPrintDialog::setOutputFileExtension(const TQString& ext)
{
if (!ext.isEmpty())
{
KURL url( d->m_file->url() );
- QString f( url.fileName() );
+ TQString f( url.fileName() );
int p = f.findRev( '.' );
// change "file.ext"; don't change "file", "file." or ".file" but do change ".file.ext"
if ( p > 0 && p != int (f.length () - 1) )
@@ -822,7 +822,7 @@ void KPrintDialog::slotWizard()
void KPrintDialog::reload()
{
// remove printer dependent pages (usually from plugin)
- QTabWidget *tabs = static_cast<QTabWidget*>(d->m_dummy->child("TabWidget", "QTabWidget"));
+ QTabWidget *tabs = static_cast<TQTabWidget*>(d->m_dummy->child("TabWidget", "TQTabWidget"));
for (uint i=0; i<d->m_pages.count(); i++)
if (d->m_pages.at(i)->onlyRealPrinters())
{
@@ -832,7 +832,7 @@ void KPrintDialog::reload()
delete page;
}
// reload printer dependent pages from plugin
- QPtrList<KPrintDialogPage> pages;
+ TQPtrList<KPrintDialogPage> pages;
pages.setAutoDelete(false);
KMFactory::self()->uiManager()->setupPrintDialogPages(&pages);
// add those pages to the dialog
@@ -841,7 +841,7 @@ void KPrintDialog::reload()
d->m_dummy->show();
// other initializations
setFlags(KMFactory::self()->uiManager()->dialogFlags());
- connect( KMFactory::self()->manager(), SIGNAL( updatePossible( bool ) ), SLOT( slotUpdatePossible( bool ) ) );
+ connect( KMFactory::self()->manager(), TQT_SIGNAL( updatePossible( bool ) ), TQT_SLOT( slotUpdatePossible( bool ) ) );
init();
}
@@ -914,10 +914,10 @@ void KPrintDialog::slotToggleFilter(bool on)
void KPrintDialog::slotHelp()
{
- kapp->invokeHelp(QString::null, "kdeprint");
+ kapp->invokeHelp(TQString::null, "kdeprint");
}
-void KPrintDialog::slotOutputFileSelected(const QString& txt)
+void KPrintDialog::slotOutputFileSelected(const TQString& txt)
{
d->m_file->setURL( txt );
}
@@ -951,7 +951,7 @@ void KPrintDialog::enableDialogPage( int index, bool flag )
if ( d->m_pages.count() > 1 )
{
- QTabWidget *tabs = static_cast<QTabWidget*>(d->m_dummy->child("TabWidget", "QTabWidget"));
+ QTabWidget *tabs = static_cast<TQTabWidget*>(d->m_dummy->child("TabWidget", "TQTabWidget"));
tabs->setTabEnabled( d->m_pages.at( index ), flag );
}
else
@@ -974,7 +974,7 @@ void KPrintDialog::slotOpenFileDialog()
if (!mimetype.isEmpty())
{
- QStringList filter;
+ TQStringList filter;
filter << mimetype;
filter << "all/allfiles";
dialog->setMimeFilter (filter, mimetype);
diff --git a/kdeprint/kprintdialog.h b/kdeprint/kprintdialog.h
index 4182ebb82..0e4adfd64 100644
--- a/kdeprint/kprintdialog.h
+++ b/kdeprint/kprintdialog.h
@@ -25,7 +25,7 @@
#endif
#include <kdialog.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <kdeprint/kpreloadobject.h>
class KPrinter;
@@ -42,15 +42,15 @@ class KDEPRINT_EXPORT KPrintDialog : public KDialog, public KPReloadObject
{
Q_OBJECT
public:
- KPrintDialog(QWidget *parent = 0, const char *name = 0);
+ KPrintDialog(TQWidget *parent = 0, const char *name = 0);
~KPrintDialog();
void setFlags(int f);
- void setDialogPages(QPtrList<KPrintDialogPage> *pages);
+ void setDialogPages(TQPtrList<KPrintDialogPage> *pages);
void enableDialogPage( int index, bool flag = true );
KPrinter* printer() const;
- static KPrintDialog* printerDialog(KPrinter*, QWidget*, const QString& caption = QString::null, bool forceExpand = false);
+ static KPrintDialog* printerDialog(KPrinter*, TQWidget*, const TQString& caption = TQString::null, bool forceExpand = false);
signals:
void printRequested(KPrinter*);
@@ -65,7 +65,7 @@ protected slots:
void slotExtensionClicked();
void slotToggleFilter(bool);
void slotHelp();
- void slotOutputFileSelected(const QString&);
+ void slotOutputFileSelected(const TQString&);
void slotUpdatePossible( bool );
void slotOpenFileDialog();
@@ -73,7 +73,7 @@ protected:
bool checkOutputFile();
void enableSpecial(bool on);
void enableOutputFile(bool on);
- void setOutputFileExtension(const QString&);
+ void setOutputFileExtension(const TQString&);
void reload();
void configChanged();
void expandDialog(bool on = true);
diff --git a/kdeprint/kprintdialogpage.cpp b/kdeprint/kprintdialogpage.cpp
index b49011487..0bd860623 100644
--- a/kdeprint/kprintdialogpage.cpp
+++ b/kdeprint/kprintdialogpage.cpp
@@ -20,13 +20,13 @@
#include "kprintdialogpage.h"
-KPrintDialogPage::KPrintDialogPage(QWidget *parent, const char *name)
-: QWidget(parent,name), m_printer(0), m_driver(0), m_ID(0), m_onlyreal(false)
+KPrintDialogPage::KPrintDialogPage(TQWidget *parent, const char *name)
+: TQWidget(parent,name), m_printer(0), m_driver(0), m_ID(0), m_onlyreal(false)
{
}
-KPrintDialogPage::KPrintDialogPage(KMPrinter *pr, DrMain *dr, QWidget *parent, const char *name)
-: QWidget(parent,name), m_printer(pr), m_driver(dr), m_ID(0), m_onlyreal(false)
+KPrintDialogPage::KPrintDialogPage(KMPrinter *pr, DrMain *dr, TQWidget *parent, const char *name)
+: TQWidget(parent,name), m_printer(pr), m_driver(dr), m_ID(0), m_onlyreal(false)
{
}
@@ -34,15 +34,15 @@ KPrintDialogPage::~KPrintDialogPage()
{
}
-void KPrintDialogPage::setOptions(const QMap<QString,QString>&)
+void KPrintDialogPage::setOptions(const TQMap<TQString,TQString>&)
{
}
-void KPrintDialogPage::getOptions(QMap<QString,QString>&, bool)
+void KPrintDialogPage::getOptions(TQMap<TQString,TQString>&, bool)
{
}
-bool KPrintDialogPage::isValid(QString&)
+bool KPrintDialogPage::isValid(TQString&)
{
return true;
}
diff --git a/kdeprint/kprintdialogpage.h b/kdeprint/kprintdialogpage.h
index 125cfa36d..70416d18f 100644
--- a/kdeprint/kprintdialogpage.h
+++ b/kdeprint/kprintdialogpage.h
@@ -21,8 +21,8 @@
#ifndef KPRINTDIALOGPAGE_H
#define KPRINTDIALOGPAGE_H
-#include <qwidget.h>
-#include <qmap.h>
+#include <tqwidget.h>
+#include <tqmap.h>
#include <kdelibs_export.h>
@@ -44,36 +44,36 @@ class DrMain;
* class MyDialogPage : public KPrintDialogPage
* {
* public:
- * MyDialogPage( QWidget *parent = 0, const char *name = 0 );
+ * MyDialogPage( TQWidget *parent = 0, const char *name = 0 );
*
* //reimplement virtual functions
- * void getOptions( QMap<QString,QString>& opts, bool incldef = false );
- * void setOptions( const QMap<QString,QString>& opts );
- * bool isValid( QString& msg );
+ * void getOptions( TQMap<TQString,TQString>& opts, bool incldef = false );
+ * void setOptions( const TQMap<TQString,TQString>& opts );
+ * bool isValid( TQString& msg );
*
* private:
- * QComboBox *m_fontcombo;
+ * TQComboBox *m_fontcombo;
* };
*
- * MyDialogPage::MyDialogPage( QWidget *parent, const char *name )
+ * MyDialogPage::MyDialogPage( TQWidget *parent, const char *name )
* : KPrintDialogPage( parent, name )
* {
* setTitle( i18n( "My Page" ) );
* }
*
- * void MyDialogPage::getOptions( QMap<QString,QString>& opts, bool incldef )
+ * void MyDialogPage::getOptions( TQMap<TQString,TQString>& opts, bool incldef )
* {
* if ( incldef || m_fontcombo->currentText() != mydefaultvalue )
* opts[ "kde-myapp-fontname" ] = m_fontcombo->currentText();
* }
*
- * void MyDialogPage::setOptions( const QMap<QString,QString>& opts )
+ * void MyDialogPage::setOptions( const TQMap<TQString,TQString>& opts )
* {
- * QString fntname = opts[ "kde-myapp-fontname" ];
+ * TQString fntname = opts[ "kde-myapp-fontname" ];
* m_fontcombo->setEditText( fntname );
* }
*
- * bool MyDialogPage::isValid( QString& msg)
+ * bool MyDialogPage::isValid( TQString& msg)
* {
* if ( m_fontcombo->currentText().isEmpty() )
* {
@@ -94,11 +94,11 @@ public:
/**
* Standard constructor.
*/
- KPrintDialogPage(QWidget *parent = 0, const char *name = 0);
+ KPrintDialogPage(TQWidget *parent = 0, const char *name = 0);
/**
* Modified constructor. For internal use only.
*/
- KPrintDialogPage(KMPrinter *pr, DrMain *dr = 0, QWidget *parent = 0, const char *name = 0);
+ KPrintDialogPage(KMPrinter *pr, DrMain *dr = 0, TQWidget *parent = 0, const char *name = 0);
/**
* Destructor
*/
@@ -112,13 +112,13 @@ public:
* @param incldef if true, include also options with default values
* @see setOptions()
*/
- virtual void getOptions(QMap<QString,QString>& opts, bool incldef = false);
+ virtual void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false);
/**
* This function is called to update the current page with the options contained in @p opts.
* Reimplement it in subclasses.
* @param opts the structure containing the options to update the page
*/
- virtual void setOptions(const QMap<QString,QString>& opts);
+ virtual void setOptions(const TQMap<TQString,TQString>& opts);
/**
* Returns true if options selected in the page are valid (no conflict), false otherwise.
* When returning false, @p msg should contain an error message explaining what is wrong
@@ -126,7 +126,7 @@ public:
* @param msg should contain an error message when returning false
* @returns valid status
*/
- virtual bool isValid(QString& msg);
+ virtual bool isValid(TQString& msg);
/**
* Get the ID of the page. Not used yet.
* @returns the page ID
@@ -151,7 +151,7 @@ public:
* @param txt the page title
* @see title()
*/
- void setTitle(const QString& txt) { m_title = txt; }
+ void setTitle(const TQString& txt) { m_title = txt; }
/**
* Tell wether or not the page should be disable if a non real printer (special
* printer) is selected in the print dialog. Returns false by default. Application
diff --git a/kdeprint/kprinter.cpp b/kdeprint/kprinter.cpp
index bba70e62d..c96db7a8d 100644
--- a/kdeprint/kprinter.cpp
+++ b/kdeprint/kprinter.cpp
@@ -28,11 +28,11 @@
#include "kmmanager.h"
#include "driver.h"
-#include <qpaintdevicemetrics.h>
-#include <qfile.h>
-#include <qtl.h>
-#include <qdir.h>
-#include <qguardedptr.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqfile.h>
+#include <tqtl.h>
+#include <tqdir.h>
+#include <tqguardedptr.h>
#include <kapplication.h>
#include <kstandarddirs.h>
#include <kglobal.h>
@@ -45,7 +45,7 @@
#include <klibloader.h>
#include <kmessagebox.h>
-static void dumpOptions(const QMap<QString,QString>& opts);
+static void dumpOptions(const TQMap<TQString,TQString>& opts);
static void reportError(KPrinter*);
//**************************************************************************************
@@ -59,15 +59,15 @@ public:
KPrinterWrapper(KPrinter*, PrinterMode m = ScreenResolution);
~KPrinterWrapper();
protected:
- virtual bool cmd(int, QPainter*, QPDevCmdParam*);
+ virtual bool cmd(int, TQPainter*, QPDevCmdParam*);
virtual int metric(int) const;
int qprinterMetric(int) const;
private:
KPrinter *m_printer;
};
-KPrinterWrapper::KPrinterWrapper(KPrinter *prt, QPrinter::PrinterMode m)
-: QPrinter(m), m_printer(prt)
+KPrinterWrapper::KPrinterWrapper(KPrinter *prt, TQPrinter::PrinterMode m)
+: TQPrinter(m), m_printer(prt)
{
}
@@ -75,9 +75,9 @@ KPrinterWrapper::~KPrinterWrapper()
{
}
-bool KPrinterWrapper::cmd(int c, QPainter *painter, QPDevCmdParam *p)
+bool KPrinterWrapper::cmd(int c, TQPainter *painter, QPDevCmdParam *p)
{
- return QPrinter::cmd(c,painter,p);
+ return TQPrinter::cmd(c,painter,p);
}
int KPrinterWrapper::metric(int m) const
@@ -87,7 +87,7 @@ int KPrinterWrapper::metric(int m) const
int KPrinterWrapper::qprinterMetric(int m) const
{
- return QPrinter::metric(m);
+ return TQPrinter::metric(m);
}
//**************************************************************************************
@@ -97,14 +97,14 @@ int KPrinterWrapper::qprinterMetric(int m) const
class KPrinterPrivate
{
public:
- QGuardedPtr<KPrinterImpl> m_impl;
+ TQGuardedPtr<KPrinterImpl> m_impl;
bool m_restore;
bool m_previewonly;
WId m_parentId;
QString m_docfilename;
- QString m_docdirectory;
+ TQString m_docdirectory;
KPrinterWrapper *m_wrapper;
- QMap<QString,QString> m_options;
+ TQMap<TQString,TQString> m_options;
QString m_tmpbuffer;
QString m_printername;
QString m_searchname;
@@ -120,8 +120,8 @@ public:
// KPrinter class
//**************************************************************************************
-KPrinter::KPrinter(bool restore, QPrinter::PrinterMode m)
-: QPaintDevice(QInternal::Printer|QInternal::ExternalDevice)
+KPrinter::KPrinter(bool restore, TQPrinter::PrinterMode m)
+: TQPaintDevice(TQInternal::Printer|TQInternal::ExternalDevice)
{
init(restore, m);
}
@@ -140,7 +140,7 @@ KPrinter::~KPrinter()
delete d;
}
-void KPrinter::init(bool restore, QPrinter::PrinterMode m)
+void KPrinter::init(bool restore, TQPrinter::PrinterMode m)
{
// Private data initialization
d = new KPrinterPrivate;
@@ -150,7 +150,7 @@ void KPrinter::init(bool restore, QPrinter::PrinterMode m)
d->m_parentId = 0;
d->m_pagesize = 0;
- // initialize QPrinter wrapper
+ // initialize TQPrinter wrapper
d->m_wrapper = new KPrinterWrapper(this, m);
// other initialization
@@ -216,11 +216,11 @@ void KPrinter::saveSettings()
conf->writePathEntry( "DocDirectory", d->m_docdirectory );
}
-bool KPrinter::setup(QWidget *parent, const QString& caption, bool forceExpand)
+bool KPrinter::setup(TQWidget *parent, const TQString& caption, bool forceExpand)
{
if (!kapp->authorize("print/dialog"))
{
- autoConfigure(QString::null, parent);
+ autoConfigure(TQString::null, parent);
return true; // Just print it
}
@@ -272,10 +272,10 @@ KPrinter::ApplicationType KPrinter::applicationType()
return (ApplicationType)KMFactory::self()->settings()->application;
}
-bool KPrinter::cmd(int c, QPainter *painter, QPDevCmdParam *p)
+bool KPrinter::cmd(int c, TQPainter *painter, QPDevCmdParam *p)
{
bool value(true);
- if (c == QPaintDevice::PdcBegin)
+ if (c == TQPaintDevice::PdcBegin)
{
d->m_impl->statusMessage(i18n("Initialization..."), this);
d->m_pagenumber = 1;
@@ -283,10 +283,10 @@ bool KPrinter::cmd(int c, QPainter *painter, QPDevCmdParam *p)
d->m_impl->statusMessage(i18n("Generating print data: page %1").arg(d->m_pagenumber), this);
}
value = d->m_wrapper->cmd(c,painter,p);
- if (c == QPaintDevice::PdcEnd)
+ if (c == TQPaintDevice::PdcEnd)
{
// this call should take care of everything (preview, output-to-file, filtering, ...)
- value = value && printFiles(QStringList(d->m_wrapper->outputFileName()),true);
+ value = value && printFiles(TQStringList(d->m_wrapper->outputFileName()),true);
// reset "ready" state
finishPrinting();
}
@@ -298,12 +298,12 @@ void KPrinter::translateQtOptions()
d->m_wrapper->setCreator(creator());
d->m_wrapper->setDocName(docName());
d->m_wrapper->setFullPage(fullPage());
- d->m_wrapper->setColorMode((QPrinter::ColorMode)colorMode());
- d->m_wrapper->setOrientation((QPrinter::Orientation)orientation());
+ d->m_wrapper->setColorMode((TQPrinter::ColorMode)colorMode());
+ d->m_wrapper->setOrientation((TQPrinter::Orientation)orientation());
if ( !option( "kde-printsize" ).isEmpty() )
- d->m_wrapper->setPageSize( ( QPrinter::PageSize )option( "kde-printsize" ).toInt() );
+ d->m_wrapper->setPageSize( ( TQPrinter::PageSize )option( "kde-printsize" ).toInt() );
else
- d->m_wrapper->setPageSize((QPrinter::PageSize)pageSize());
+ d->m_wrapper->setPageSize((TQPrinter::PageSize)pageSize());
d->m_wrapper->setOutputToFile(true);
d->m_wrapper->setOutputFileName(d->m_tmpbuffer);
d->m_wrapper->setNumCopies(option("kde-qtcopies").isEmpty() ? 1 : option("kde-qtcopies").toInt());
@@ -355,7 +355,7 @@ void KPrinter::translateQtOptions()
d->m_wrapper->setNumCopies(numCopies());
}
-bool KPrinter::printFiles(const QStringList& l, bool flag, bool startviewer)
+bool KPrinter::printFiles(const TQStringList& l, bool flag, bool startviewer)
{
QStringList files(l);
bool status(true);
@@ -393,7 +393,7 @@ bool KPrinter::printFiles(const QStringList& l, bool flag, bool startviewer)
if (((files.count() != 1 || option("kde-preview") != "1") && !d->m_previewonly) || doPreview(files[0]))
{
// check if printing has been prepared (it may be not prepared if the KPrinter object is not
- // use as a QPaintDevice object)
+ // use as a TQPaintDevice object)
preparePrinting();
if (!d->m_impl->printFiles(this, files, flag))
@@ -403,9 +403,9 @@ bool KPrinter::printFiles(const QStringList& l, bool flag, bool startviewer)
}
else
{
- if (/* !outputToFile() && */ startviewer && !QFile::exists("/etc/xdg/autostart/system-config-printer-applet-kde.desktop") )
+ if (/* !outputToFile() && */ startviewer && !TQFile::exists("/etc/xdg/autostart/system-config-printer-applet-kde.desktop") )
{
- QStringList args;
+ TQStringList args;
args << "-d";
args << printerName();
args << "--noshow";
@@ -417,17 +417,17 @@ bool KPrinter::printFiles(const QStringList& l, bool flag, bool startviewer)
// situation: only one file, it has been previewed and printing has been canceled, then
// we should remove the file ourself
{
- QFile::remove(files[0]);
+ TQFile::remove(files[0]);
}
}
finishPrinting();
return status;
}
-bool KPrinter::doPreview(const QString& file)
+bool KPrinter::doPreview(const TQString& file)
{
d->m_impl->statusMessage(i18n("Previewing..."), this);
- d->m_impl->statusMessage(QString::null, this);
+ d->m_impl->statusMessage(TQString::null, this);
return KPrintPreview::preview(file, d->m_previewonly, d->m_parentId);
}
@@ -437,7 +437,7 @@ void KPrinter::preparePrinting()
if (d->m_ready) return;
// re-initialize error
- setErrorMessage(QString::null);
+ setErrorMessage(TQString::null);
// re-initialize margins and page size (by default, use Qt mechanism)
setRealPageSize(NULL);
@@ -464,12 +464,12 @@ void KPrinter::finishPrinting()
{
d->m_ready = false;
// close the status window
- d->m_impl->statusMessage(QString::null, this);
+ d->m_impl->statusMessage(TQString::null, this);
}
-QValueList<int> KPrinter::pageList() const
+TQValueList<int> KPrinter::pageList() const
{
- QValueList<int> list;
+ TQValueList<int> list;
int mp(minPage()), MP(maxPage());
if (mp > 0 && MP > 0 && MP >= mp)
{ // do something only if bounds specified
@@ -483,8 +483,8 @@ QValueList<int> KPrinter::pageList() const
// process range specification
if (!option("kde-range").isEmpty())
{
- QStringList ranges = QStringList::split(',',option("kde-range"),false);
- for (QStringList::ConstIterator it=ranges.begin();it!=ranges.end();++it)
+ QStringList ranges = TQStringList::split(',',option("kde-range"),false);
+ for (TQStringList::ConstIterator it=ranges.begin();it!=ranges.end();++it)
{
int p = (*it).find('-');
bool ok;
@@ -526,7 +526,7 @@ QValueList<int> KPrinter::pageList() const
if (pageSet() != AllPages)
{
bool keepEven = (pageSet() == EvenPages);
- for (QValueList<int>::Iterator it=list.begin();it!=list.end();)
+ for (TQValueList<int>::Iterator it=list.begin();it!=list.end();)
if ((((*it) % 2) != 0 && keepEven) ||
(((*it) % 2) == 0 && !keepEven)) it = list.remove(it);
else ++it;
@@ -537,7 +537,7 @@ QValueList<int> KPrinter::pageList() const
}
//**************************************************************************************
-// QPrinter interface
+// TQPrinter interface
//**************************************************************************************
int KPrinter::numCopies() const
@@ -547,7 +547,7 @@ int KPrinter::numCopies() const
return (ok ? p : 1);
}
-QSize KPrinter::margins() const
+TQSize KPrinter::margins() const
{
return d->m_wrapper->margins();
}
@@ -568,26 +568,26 @@ int KPrinter::metric(int m) const
margins( &top, &left, &bottom, &right );
switch ( m )
{
- case QPaintDeviceMetrics::PdmWidth:
+ case TQPaintDeviceMetrics::PdmWidth:
val = (land ? ( int )d->m_pagesize->pageHeight() : ( int )d->m_pagesize->pageWidth());
if ( res != 72 )
val = (val * res + 36) / 72;
if ( !fullPage() )
val -= ( left + right );
break;
- case QPaintDeviceMetrics::PdmHeight:
+ case TQPaintDeviceMetrics::PdmHeight:
val = (land ? ( int )d->m_pagesize->pageWidth() : ( int )d->m_pagesize->pageHeight());
if ( res != 72 )
val = (val * res + 36) / 72;
if ( !fullPage() )
val -= ( top + bottom );
break;
- case QPaintDeviceMetrics::PdmWidthMM:
- val = metric( QPaintDeviceMetrics::PdmWidth );
+ case TQPaintDeviceMetrics::PdmWidthMM:
+ val = metric( TQPaintDeviceMetrics::PdmWidth );
val = (val * 254 + 5*res) / (10*res); // +360 to get the right rounding
break;
- case QPaintDeviceMetrics::PdmHeightMM:
- val = metric( QPaintDeviceMetrics::PdmHeight );
+ case TQPaintDeviceMetrics::PdmHeightMM:
+ val = metric( TQPaintDeviceMetrics::PdmHeight );
val = (val * 254 + 5*res) / (10*res);
break;
default:
@@ -605,7 +605,7 @@ void KPrinter::setOrientation(Orientation o)
d->m_impl->broadcastOption( "kde-orientation-fixed", "1" );
}
-void KPrinter::setOption( const QString& key, const QString& value, bool broadcast )
+void KPrinter::setOption( const TQString& key, const TQString& value, bool broadcast )
{
setOption( key, value );
if ( broadcast )
@@ -615,15 +615,15 @@ void KPrinter::setOption( const QString& key, const QString& value, bool broadca
void KPrinter::setPageSize(PageSize s)
{
KMFactory::self()->settings()->pageSize = s;
- setOption("kde-pagesize",QString::number((int)s),true);
+ setOption("kde-pagesize",TQString::number((int)s),true);
d->m_impl->broadcastOption( "kde-pagesize-fixed", "1" );
}
-void KPrinter::setOptions(const QMap<QString,QString>& opts)
+void KPrinter::setOptions(const TQMap<TQString,TQString>& opts)
{ // This functions remove all options except those with "kde-..."
// which correspond to externally-sets options (use the value
// from "opts" if specified
- QMap<QString,QString> tmpset = d->m_options;
+ TQMap<TQString,TQString> tmpset = d->m_options;
d->m_options = opts;
// remove some problematic options that may not be overwritten (ugly hack).
// Default values will be used instead, except if the dialog has set new ones.
@@ -637,16 +637,16 @@ void KPrinter::setOptions(const QMap<QString,QString>& opts)
tmpset.remove("kde-margin-right");
tmpset.remove( "kde-resolution" );
tmpset.remove( "kde-fonts" );
- for (QMap<QString,QString>::ConstIterator it=tmpset.begin();it!=tmpset.end();++it)
+ for (TQMap<TQString,TQString>::ConstIterator it=tmpset.begin();it!=tmpset.end();++it)
if (it.key().left(4) == "kde-" && !(d->m_options.contains(it.key())))
d->m_options[it.key()] = it.data();
}
-void KPrinter::initOptions(const QMap<QString,QString>& opts)
+void KPrinter::initOptions(const TQMap<TQString,TQString>& opts)
{ // This function can be used to initialize the KPrinter object just after
// creation to set some options. Non global options will be propagated to
// all listed printers (non-global => start with "kde-...")
- for (QMap<QString,QString>::ConstIterator it=opts.begin(); it!=opts.end(); ++it)
+ for (TQMap<TQString,TQString>::ConstIterator it=opts.begin(); it!=opts.end(); ++it)
{
setOption(it.key(), it.data());
if (it.key().left(4) != "kde-")
@@ -664,7 +664,7 @@ void KPrinter::reload()
//initOptions(d->m_options);
}
-bool KPrinter::autoConfigure(const QString& prname, QWidget *parent)
+bool KPrinter::autoConfigure(const TQString& prname, TQWidget *parent)
{
KMManager *mgr = KMManager::self();
KMPrinter *mprt(0);
@@ -691,9 +691,9 @@ void reportError(KPrinter *p)
kdDebug(500) << "could not send notify event" << endl;
}
-KPrinter::PageSize pageNameToPageSize(const QString& _name)
+KPrinter::PageSize pageNameToPageSize(const TQString& _name)
{
- QString name = _name.upper();
+ TQString name = _name.upper();
if (name == "LETTER") return KPrinter::Letter;
else if (name == "LEGAL") return KPrinter::Legal;
else if (name == "A4") return KPrinter::A4;
@@ -766,38 +766,38 @@ const char* pageSizeToPageName(KPrinter::PageSize s)
}
// FIXME: remove for 4.0
-QSize rangeToSize( const QString& )
+TQSize rangeToSize( const TQString& )
{
- kdWarning( 500 ) << "rangeToSize(QString) is obsolete, do not use (no effect)" << endl;
- return QSize();
+ kdWarning( 500 ) << "rangeToSize(TQString) is obsolete, do not use (no effect)" << endl;
+ return TQSize();
}
-static void dumpOptions(const QMap<QString,QString>& opts)
+static void dumpOptions(const TQMap<TQString,TQString>& opts)
{
kdDebug(500) << "********************" << endl;
- for (QMap<QString,QString>::ConstIterator it=opts.begin(); it!=opts.end(); ++it)
+ for (TQMap<TQString,TQString>::ConstIterator it=opts.begin(); it!=opts.end(); ++it)
kdDebug(500) << it.key() << " = " << it.data() << endl;
}
KPrinterImpl* KPrinter::implementation() const
{ return d->m_impl; }
-const QString& KPrinter::option(const QString& key) const
+const TQString& KPrinter::option(const TQString& key) const
{ return ((const KPrinterPrivate*)(d))->m_options[key]; }
-void KPrinter::setOption(const QString& key, const QString& value)
+void KPrinter::setOption(const TQString& key, const TQString& value)
{ d->m_options[key] = value; }
-QString KPrinter::docName() const
+TQString KPrinter::docName() const
{ return option("kde-docname"); }
-void KPrinter::setDocName(const QString& d)
+void KPrinter::setDocName(const TQString& d)
{ setOption("kde-docname",d); }
-QString KPrinter::creator() const
+TQString KPrinter::creator() const
{ return option("kde-creator"); }
-void KPrinter::setCreator(const QString& d)
+void KPrinter::setCreator(const TQString& d)
{ setOption("kde-creator",d); }
bool KPrinter::fullPage() const
@@ -813,7 +813,7 @@ void KPrinter::setColorMode(ColorMode m)
{ setOption("kde-colormode",(m == Color ? "Color" : "GrayScale")); }
void KPrinter::setNumCopies(int n)
-{ setOption("kde-copies",QString::number(n)); }
+{ setOption("kde-copies",TQString::number(n)); }
KPrinter::Orientation KPrinter::orientation() const
{ return (option("kde-orientation") == "Landscape" ? Landscape : Portrait); }
@@ -837,7 +837,7 @@ int KPrinter::maxPage() const
{ return (option("kde-maxpage").isEmpty() ? 0 : option("kde-maxpage").toInt()); }
void KPrinter::setMinMax(int m, int M)
-{ setOption("kde-minpage",QString::number(m)); setOption("kde-maxpage",QString::number(M)); }
+{ setOption("kde-minpage",TQString::number(m)); setOption("kde-maxpage",TQString::number(M)); }
int KPrinter::fromPage() const
{ return (option("kde-frompage").isEmpty() ? 0 : option("kde-frompage").toInt()); }
@@ -846,7 +846,7 @@ int KPrinter::toPage() const
{ return (option("kde-topage").isEmpty() ? 0 : option("kde-topage").toInt()); }
void KPrinter::setFromTo(int m, int M)
-{ setOption("kde-frompage",QString::number(m)); setOption("kde-topage",QString::number(M)); setOption("kde-range",(m>0 && M>0 ? QString("%1-%2").arg(m).arg(M) : QString::fromLatin1(""))); }
+{ setOption("kde-frompage",TQString::number(m)); setOption("kde-topage",TQString::number(M)); setOption("kde-range",(m>0 && M>0 ? TQString("%1-%2").arg(m).arg(M) : TQString::fromLatin1(""))); }
// if no page size defined, use the localized one
KPrinter::PageSize KPrinter::pageSize() const
@@ -859,18 +859,18 @@ int KPrinter::currentPage() const
{ return (option("kde-currentpage").isEmpty() ? 0 : option("kde-currentpage").toInt()); }
void KPrinter::setCurrentPage(int p)
-{ setOption("kde-currentpage",QString::number(p)); }
+{ setOption("kde-currentpage",TQString::number(p)); }
-QString KPrinter::printerName() const
+TQString KPrinter::printerName() const
{ return d->m_printername; }
-void KPrinter::setPrinterName(const QString& s)
+void KPrinter::setPrinterName(const TQString& s)
{ d->m_printername = s; }
-QString KPrinter::printProgram() const
-{ return (option("kde-isspecial") == "1" ? option("kde-special-command") : QString::null); }
+TQString KPrinter::printProgram() const
+{ return (option("kde-isspecial") == "1" ? option("kde-special-command") : TQString::null); }
-void KPrinter::setPrintProgram(const QString& prg)
+void KPrinter::setPrintProgram(const TQString& prg)
{
if (prg.isNull())
{
@@ -888,19 +888,19 @@ void KPrinter::setPrintProgram(const QString& prg)
}
}
-QString KPrinter::printerSelectionOption() const
-{ return QString::fromLatin1(""); }
+TQString KPrinter::printerSelectionOption() const
+{ return TQString::fromLatin1(""); }
-void KPrinter::setPrinterSelectionOption(const QString&)
+void KPrinter::setPrinterSelectionOption(const TQString&)
{}
-const QMap<QString,QString>& KPrinter::options() const
+const TQMap<TQString,TQString>& KPrinter::options() const
{ return d->m_options; }
-QString KPrinter::searchName() const
+TQString KPrinter::searchName() const
{ return d->m_searchname; }
-void KPrinter::setSearchName(const QString& s)
+void KPrinter::setSearchName(const TQString& s)
{ d->m_searchname = s; }
bool KPrinter::newPage()
@@ -910,10 +910,10 @@ bool KPrinter::newPage()
return d->m_wrapper->newPage();
}
-QString KPrinter::outputFileName() const
+TQString KPrinter::outputFileName() const
{ return option("kde-outputfilename"); }
-void KPrinter::setOutputFileName(const QString& f)
+void KPrinter::setOutputFileName(const TQString& f)
{ setOption("kde-outputfilename",f); setOutputToFile(!f.isEmpty()); }
bool KPrinter::outputToFile() const
@@ -924,7 +924,7 @@ void KPrinter::setOutputToFile(bool on)
setOption("kde-outputtofile",(on ? "1" : "0"));
if (on)
{
- setOption("kde-special-command",QString::null);
+ setOption("kde-special-command",TQString::null);
setOption("kde-isspecial","1");
}
}
@@ -935,7 +935,7 @@ bool KPrinter::abort()
bool KPrinter::aborted() const
{ return d->m_wrapper->aborted(); }
-void KPrinter::setMargins(QSize m)
+void KPrinter::setMargins(TQSize m)
{
setMargins( m.height(), m.width(), m.height(), m.width() );
}
@@ -943,20 +943,20 @@ void KPrinter::setMargins(QSize m)
void KPrinter::setMargins( uint top, uint left, uint bottom, uint right )
{
d->m_wrapper->setMargins( top, left, bottom, right );
- setOption( "kde-margin-top", QString::number( top ), true );
- setOption( "kde-margin-left", QString::number( left ), true );
- setOption( "kde-margin-bottom", QString::number( bottom ), true );
- setOption( "kde-margin-right", QString::number( right ), true );
+ setOption( "kde-margin-top", TQString::number( top ), true );
+ setOption( "kde-margin-left", TQString::number( left ), true );
+ setOption( "kde-margin-bottom", TQString::number( bottom ), true );
+ setOption( "kde-margin-right", TQString::number( right ), true );
}
// FIXME: remove for 4.0
-QSize KPrinter::realPageSize() const
+TQSize KPrinter::realPageSize() const
{
kdWarning( 500 ) << "KPrinter::realPageSize() is obsolete, do not use" << endl;
if ( d->m_pagesize )
return d->m_pagesize->pageSize();
else
- return QSize();
+ return TQSize();
}
void KPrinter::setRealPageSize(DrPageSize *p)
@@ -983,36 +983,36 @@ void KPrinter::setRealPageSize(DrPageSize *p)
}
// FIXME: remove for 4.0
-void KPrinter::setRealPageSize( QSize )
+void KPrinter::setRealPageSize( TQSize )
{
- kdWarning( 500 ) << "KPrinter::setRealPageSize(QSize) is obsolete, do not use (no effect)" << endl;
+ kdWarning( 500 ) << "KPrinter::setRealPageSize(TQSize) is obsolete, do not use (no effect)" << endl;
}
// FIXME: remove for 4.0
-void KPrinter::setRealDrawableArea( const QRect& )
+void KPrinter::setRealDrawableArea( const TQRect& )
{
- kdWarning( 500 ) << "KPrinter::setRealDrawableArea(QRect) is obsolete, do not use (no effect)" << endl;
+ kdWarning( 500 ) << "KPrinter::setRealDrawableArea(TQRect) is obsolete, do not use (no effect)" << endl;
}
// FIXME: remove for 4.0
-QRect KPrinter::realDrawableArea() const
+TQRect KPrinter::realDrawableArea() const
{
kdWarning( 500 ) << "KPrinter::realDrawableArea() is obsolete, do not use" << endl;
if ( d->m_pagesize )
return d->m_pagesize->pageRect();
else
- return QRect();
+ return TQRect();
}
-QString KPrinter::errorMessage() const
+TQString KPrinter::errorMessage() const
{ return d->m_errormsg; }
-void KPrinter::setErrorMessage(const QString& msg)
+void KPrinter::setErrorMessage(const TQString& msg)
{ d->m_errormsg = msg; }
/* we're using a builtin member to store this state because we don't
* want to keep it from object to object. So there's no need to use
- * the QMap structure to store this
+ * the TQMap structure to store this
*/
void KPrinter::setPreviewOnly(bool on)
{ d->m_previewonly = on; }
@@ -1020,17 +1020,17 @@ void KPrinter::setPreviewOnly(bool on)
bool KPrinter::previewOnly() const
{ return d->m_previewonly; }
-void KPrinter::setDocFileName(const QString& s)
+void KPrinter::setDocFileName(const TQString& s)
{ d->m_docfilename = s; }
-QString KPrinter::docFileName() const
+TQString KPrinter::docFileName() const
{ return d->m_docfilename; }
-void KPrinter::setDocDirectory( const QString& s )
+void KPrinter::setDocDirectory( const TQString& s )
{ d->m_docdirectory = s; }
-QString KPrinter::docDirectory() const
-{ return ( d->m_docdirectory.isEmpty() ? QDir::homeDirPath() : d->m_docdirectory ); }
+TQString KPrinter::docDirectory() const
+{ return ( d->m_docdirectory.isEmpty() ? TQDir::homeDirPath() : d->m_docdirectory ); }
void KPrinter::setResolution(int dpi)
{
diff --git a/kdeprint/kprinter.h b/kdeprint/kprinter.h
index 7682c89f9..286fdc029 100644
--- a/kdeprint/kprinter.h
+++ b/kdeprint/kprinter.h
@@ -21,12 +21,12 @@
#ifndef KPRINTER_H
#define KPRINTER_H
-#include <qpaintdevice.h>
-#include <qprinter.h>
-#include <qmap.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
+#include <tqpaintdevice.h>
+#include <tqprinter.h>
+#include <tqmap.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
#include <kdemacros.h>
#include <kdelibs_export.h>
@@ -40,17 +40,17 @@ class DrPageSize;
/**
* This class is the main interface to access the KDE print framework. It allows KDE
* applications to easily access the print system, through an interface that is compatible
- * with QPrinter. So that the porting of an existing application should be as easy as
- * replacing any occurrence of QPrinter by KPrinter. However applications that explicitly
- * used the QPrintDialog class must be changed to the standard KPrinter way of accessing
+ * with TQPrinter. So that the porting of an existing application should be as easy as
+ * replacing any occurrence of TQPrinter by KPrinter. However applications that explicitly
+ * used the TQPrintDialog class must be changed to the standard KPrinter way of accessing
* the print dialog.
*
* Basically, a KDE application will use the KPrinter object as a paint device, and will draw
- * on it using QPainter. In a standard application, the use of the KPrinter class will
+ * on it using TQPainter. In a standard application, the use of the KPrinter class will
* look like this:
* \code
* #include <kprinter.h>
- * #include <qpainter.h>
+ * #include <tqpainter.h>
*
* void MyClass::doPrint()
* {
@@ -63,7 +63,7 @@ class DrPageSize;
* if ( printer.setup( this ) )
* {
* // create a painter to paint on the printer object
- * QPainter painter;
+ * TQPainter painter;
*
* // start painting
* painter.begin( &printer );
@@ -83,9 +83,9 @@ class DrPageSize;
*
* @short The central interface class to access the KDE print system.
* @author Michael Goffioul
- * @see QPrinter, KPrintDialogPage
+ * @see TQPrinter, KPrintDialogPage
*/
-class KDEPRINT_EXPORT KPrinter : public QPaintDevice, public KPReloadObject
+class KDEPRINT_EXPORT KPrinter : public TQPaintDevice, public KPReloadObject
{
friend class KPrinterWrapper;
friend class KPrinterImpl;
@@ -125,7 +125,7 @@ public:
*/
enum ApplicationType { Dialog = 0x00, StandAlone = 0x01, StandAlonePersistent = 0x02 };
- // QPrinter extension
+ // TQPrinter extension
/**
* Defines the page set to print:
* @li @p AllPages: all pages
@@ -144,59 +144,59 @@ public:
*/
enum CollateType { Collate = 0x00, Uncollate = 0x01 };
- // from QPrinter class
+ // from TQPrinter class
/**
* Defines the color mode of the printer
- * @see QPrinter::ColorMode
+ * @see TQPrinter::ColorMode
*/
- enum ColorMode { GrayScale = QPrinter::GrayScale, Color = QPrinter::Color };
+ enum ColorMode { GrayScale = TQPrinter::GrayScale, Color = TQPrinter::Color };
/**
* Defines the orientation of the paper
- * @see QPrinter::Orientation
+ * @see TQPrinter::Orientation
*/
- enum Orientation { Portrait = QPrinter::Portrait, Landscape = QPrinter::Landscape };
+ enum Orientation { Portrait = TQPrinter::Portrait, Landscape = TQPrinter::Landscape };
/**
* Defines the page order of the print job
- * @see QPrinter::PageOrder
+ * @see TQPrinter::PageOrder
*/
- enum PageOrder { FirstPageFirst = QPrinter::FirstPageFirst, LastPageFirst = QPrinter::LastPageFirst };
+ enum PageOrder { FirstPageFirst = TQPrinter::FirstPageFirst, LastPageFirst = TQPrinter::LastPageFirst };
/**
* Defines the paper size to use
- * @see QPrinter::PageSize
+ * @see TQPrinter::PageSize
*/
enum PageSize
{
- A4 = QPrinter::A4,
- B5 = QPrinter::B5,
- Letter = QPrinter::Letter,
- Legal = QPrinter::Legal,
- Executive = QPrinter::Executive,
- A0 = QPrinter::A0,
- A1 = QPrinter::A1,
- A2 = QPrinter::A2,
- A3 = QPrinter::A3,
- A5 = QPrinter::A5,
- A6 = QPrinter::A6,
- A7 = QPrinter::A7,
- A8 = QPrinter::A8,
- A9 = QPrinter::A9,
- B0 = QPrinter::B0,
- B1 = QPrinter::B1,
- B10 = QPrinter::B10,
- B2 = QPrinter::B2,
- B3 = QPrinter::B3,
- B4 = QPrinter::B4,
- B6 = QPrinter::B6,
- B7 = QPrinter::B7,
- B8 = QPrinter::B8,
- B9 = QPrinter::B9,
- C5E = QPrinter::C5E,
- Comm10E = QPrinter::Comm10E,
- DLE = QPrinter::DLE,
- Folio = QPrinter::Folio,
- Ledger = QPrinter::Ledger,
- Tabloid = QPrinter::Tabloid,
- NPageSize = QPrinter::NPageSize
+ A4 = TQPrinter::A4,
+ B5 = TQPrinter::B5,
+ Letter = TQPrinter::Letter,
+ Legal = TQPrinter::Legal,
+ Executive = TQPrinter::Executive,
+ A0 = TQPrinter::A0,
+ A1 = TQPrinter::A1,
+ A2 = TQPrinter::A2,
+ A3 = TQPrinter::A3,
+ A5 = TQPrinter::A5,
+ A6 = TQPrinter::A6,
+ A7 = TQPrinter::A7,
+ A8 = TQPrinter::A8,
+ A9 = TQPrinter::A9,
+ B0 = TQPrinter::B0,
+ B1 = TQPrinter::B1,
+ B10 = TQPrinter::B10,
+ B2 = TQPrinter::B2,
+ B3 = TQPrinter::B3,
+ B4 = TQPrinter::B4,
+ B6 = TQPrinter::B6,
+ B7 = TQPrinter::B7,
+ B8 = TQPrinter::B8,
+ B9 = TQPrinter::B9,
+ C5E = TQPrinter::C5E,
+ Comm10E = TQPrinter::Comm10E,
+ DLE = TQPrinter::DLE,
+ Folio = TQPrinter::Folio,
+ Ledger = TQPrinter::Ledger,
+ Tabloid = TQPrinter::Tabloid,
+ NPageSize = TQPrinter::NPageSize
};
// constructors / destructor
@@ -205,97 +205,97 @@ public:
* the same application run, if @p restore is true. Setting @p restore to false may
* be useful if you want an independent/clean KPrinter object.
* @param restore if true, options will be restored/saved between successive KPrinter objects
- * @param m the mode to establish the KPrinter in (see QPrinter::PrinterMode)
+ * @param m the mode to establish the KPrinter in (see TQPrinter::PrinterMode)
*/
- KPrinter(bool restore = true, QPrinter::PrinterMode m = QPrinter::ScreenResolution );
+ KPrinter(bool restore = true, TQPrinter::PrinterMode m = TQPrinter::ScreenResolution );
/**
* Destructor. This also saves the current KPrinter state for future printing.
*/
~KPrinter();
- // QPrinter interface (+ some extensions)
+ // TQPrinter interface (+ some extensions)
/**
- * See QPrinter::newPage().
+ * See TQPrinter::newPage().
*/
bool newPage();
/**
- * See QPrinter::abort().
+ * See TQPrinter::abort().
*/
bool abort();
/**
- * See QPrinter::aborted(.)
+ * See TQPrinter::aborted(.)
*/
bool aborted() const;
/**
- * See QPrinter::outputToFile().
+ * See TQPrinter::outputToFile().
*/
bool outputToFile() const;
/**
- * See QPrinter::setOutputToFile().
+ * See TQPrinter::setOutputToFile().
*/
void setOutputToFile(bool);
/**
- * See QPrinter::outputFileName().
+ * See TQPrinter::outputFileName().
*/
- QString outputFileName() const;
+ TQString outputFileName() const;
/**
- * See QPrinter::setOutputFileName().
+ * See TQPrinter::setOutputFileName().
*/
- void setOutputFileName(const QString&);
+ void setOutputFileName(const TQString&);
/**
- * See QPrinter::docName().
+ * See TQPrinter::docName().
*/
- QString docName() const;
+ TQString docName() const;
/**
- * See QPrinter::setDocName().
+ * See TQPrinter::setDocName().
*/
- void setDocName(const QString&);
+ void setDocName(const TQString&);
/**
- * See QPrinter::creator().
+ * See TQPrinter::creator().
*/
- QString creator() const;
+ TQString creator() const;
/**
- * See QPrinter::setCreator().
+ * See TQPrinter::setCreator().
*/
- void setCreator(const QString&);
+ void setCreator(const TQString&);
/**
- * See QPrinter::fullPage().
+ * See TQPrinter::fullPage().
*/
bool fullPage() const;
/**
- * See QPrinter::setFullPage().
+ * See TQPrinter::setFullPage().
*/
void setFullPage(bool);
/**
- * See QPrinter::colorMode().
+ * See TQPrinter::colorMode().
*/
ColorMode colorMode() const;
/**
- * See QPrinter::setColorMode().
+ * See TQPrinter::setColorMode().
*/
void setColorMode(ColorMode);
/**
- * See QPrinter::numCopies().
+ * See TQPrinter::numCopies().
*/
int numCopies() const;
/**
- * See QPrinter::setNumCopies().
+ * See TQPrinter::setNumCopies().
*/
void setNumCopies(int n);
/**
- * See QPrinter::orientation().
+ * See TQPrinter::orientation().
*/
Orientation orientation() const;
/**
- * See QPrinter::setOrientation().
+ * See TQPrinter::setOrientation().
*/
void setOrientation(Orientation);
/**
- * See QPrinter::pageOrder().
+ * See TQPrinter::pageOrder().
*/
PageOrder pageOrder() const;
/**
- * See QPrinter::setPageOrder().
+ * See TQPrinter::setPageOrder().
*/
void setPageOrder(PageOrder);
/**
@@ -307,15 +307,15 @@ public:
*/
void setCollate(CollateType type);
/**
- * See QPrinter::minPage().
+ * See TQPrinter::minPage().
*/
int minPage() const;
/**
- * See QPrinter::maxPage().
+ * See TQPrinter::maxPage().
*/
int maxPage() const;
/**
- * See QPrinter::setMinMax().
+ * See TQPrinter::setMinMax().
*/
void setMinMax(int, int);
/**
@@ -337,32 +337,32 @@ public:
*/
int toPage() const;
/**
- * Sets the first and last page to be printed. See QPrinter::setFromTo().
+ * Sets the first and last page to be printed. See TQPrinter::setFromTo().
*/
void setFromTo(int, int);
/**
- * See QPrinter::pageSize().
+ * See TQPrinter::pageSize().
*/
PageSize pageSize() const;
/**
- * See QPrinter::setPageSize().
+ * See TQPrinter::setPageSize().
*/
void setPageSize(PageSize);
/**
- * See QPrinter::printerName().
+ * See TQPrinter::printerName().
*/
- QString printerName() const;
+ TQString printerName() const;
/**
- * See QPrinter::setPrinterName().
+ * See TQPrinter::setPrinterName().
*/
- void setPrinterName(const QString&);
+ void setPrinterName(const TQString&);
/**
* Returns the print program as set by setPrintProgram() or by the print dialog
* if a special printer has been selected.
* @return the print command line
* @see setPrintProgram()
*/
- QString printProgram() const;
+ TQString printProgram() const;
/**
* Sets the command line to use when printing. This function is useful
* when using a KPrinter object without the print dialog, to control what
@@ -375,7 +375,7 @@ public:
* @li %psl : the page size in lower case. This may be useful with some
* programs like gs.
* \code
- * void createPNGOutputFile(const QString& filename)
+ * void createPNGOutputFile(const TQString& filename)
* {
* // use a clean KPrinter object
* KPrinter prt(false);
@@ -384,22 +384,22 @@ public:
* prt.setOutputFileName( filename );
* prt.setPrintProgram( "gs -sDEVICE=png256 -sPAPERSIZE=%psl -sOutputFile=%out %in" );
*
- * QPainter painter( &prt );
+ * TQPainter painter( &prt );
* doPaint( &painter );
* }
* \endcode
* @param cmd the print command line (containing at least the @p %in tag)
* @see printProgram()
*/
- void setPrintProgram(const QString& cmd);
+ void setPrintProgram(const TQString& cmd);
/**
- * See QPrinter::printerSelectionOption(). Unused.
+ * See TQPrinter::printerSelectionOption(). Unused.
*/
- QString printerSelectionOption() const;
+ TQString printerSelectionOption() const;
/**
- * See QPrinter::setPrinterSelectionOption(). Unused
+ * See TQPrinter::setPrinterSelectionOption(). Unused
*/
- void setPrinterSelectionOption(const QString&);
+ void setPrinterSelectionOption(const TQString&);
/**
* Returns the current page number.
* @see setCurrentPage()
@@ -424,7 +424,7 @@ public:
* printer.setCurrentPage( mycurrentpage );
* if ( printer.setup( this ) )
* {
- * QValueList<int> pages = printer.pageList();
+ * TQValueList<int> pages = printer.pageList();
* // print the pages
* ...
* }
@@ -444,40 +444,40 @@ public:
* @param forceExpand force the expansion of the dialog (the show/hide button will be hidden)
* @returns boolean value corresponding to the button clicked by the user
*/
- bool setup(QWidget *parent = 0, const QString& caption = QString::null, bool forceExpand = false);
+ bool setup(TQWidget *parent = 0, const TQString& caption = TQString::null, bool forceExpand = false);
/**
- * See QPrinter::margins().
+ * See TQPrinter::margins().
*/
- QSize margins() const;
+ TQSize margins() const;
/**
* Not used yet.
*/
- void setMargins(QSize m);
+ void setMargins(TQSize m);
/**
* Returns the page size in dot unit ( 1 dot = 1/72th in ). This method is intended for
- * internal use, if you want to access actual page size, use a QPaintDeviceMetrics object
+ * internal use, if you want to access actual page size, use a TQPaintDeviceMetrics object
* instead. Note that the size returned by this method does not take resolution into
* account, and that it can returns invalid size if no page metric was found in the printer
* driver. DO NOT USE, WILL BE REMOVED.
* @see setRealPageSize
* @obsolete
*/
- QSize realPageSize() const;
+ TQSize realPageSize() const;
/**
* DO NOT USE, WILL BE REMOVED.
* @obsolete
*/
- void setRealPageSize( QSize p );
+ void setRealPageSize( TQSize p );
/**
* DO NOT USE, WILL BE REMOVED.
* @obsolete
*/
- void setRealDrawableArea( const QRect& r );
+ void setRealDrawableArea( const TQRect& r );
/**
* DO NOT USE, WILL BE REMOVED.
* @obsolete
*/
- QRect realDrawableArea() const;
+ TQRect realDrawableArea() const;
void margins( uint *top, uint *left, uint *bottom, uint *right ) const;
void setMargins( uint top, uint left, uint bottom, uint right );
@@ -488,7 +488,7 @@ public:
* application does page selection itself.
* @see setCurrentPage()
*/
- QValueList<int> pageList() const;
+ TQValueList<int> pageList() const;
/**
* Sets the KPrinter object to preview mode if @p on is true. In this mode, nothing will be
* printed but only a preview dialog will be popped up with the single "Close" action. Using
@@ -501,7 +501,7 @@ public:
* KPrinter prt( false );
* prt.setPreviewOnly( true );
*
- * QPainter painter( &prt );
+ * TQPainter painter( &prt );
* doPrint( &painter );
* }
* \endcode
@@ -550,10 +550,10 @@ public:
* Prints the files given in argument. This will first filter the files accorsing to the filtering
* options selected by the user in the print dialog, then send the filtered files to the printer
* with the print options selected. This function is called automatically when calling
- * QPainter::end() for a painter object constructed on KPrinter. In normal use, you don't need
+ * TQPainter::end() for a painter object constructed on KPrinter. In normal use, you don't need
* this use this function explicitly.
*/
- bool printFiles(const QStringList& files, bool removeafter = false, bool startviewer = true);
+ bool printFiles(const TQStringList& files, bool removeafter = false, bool startviewer = true);
/**
* Adds a customized page to the print dialog. The pages will appear in a tab widget in the
@@ -612,14 +612,14 @@ public:
* @param parent the parent widget for the wizard
* @returns 1: success, 0: cancel, -1: error
*/
- //static int addPrinterWizard(QWidget *parent = 0);
+ //static int addPrinterWizard(TQWidget *parent = 0);
/**
- * The KPrinter object stores all its settings in an internal QMap structure on
- * QString. This allows to store any property. This method allows an application to access
+ * The KPrinter object stores all its settings in an internal TQMap structure on
+ * TQString. This allows to store any property. This method allows an application to access
* any print option from the KPrinter object, using the option name. For example if your
* application add a customized page to the print dialog, this page will saves its settings
- * into the KPrinter object using this QMap<QString,QString> structure. After showing the
+ * into the KPrinter object using this TQMap<TQString,TQString> structure. After showing the
* print dialog, your application can then access these options using this method. The
* custom option name should follow the form "kde-appname-optionname".
* \code
@@ -633,7 +633,7 @@ public:
* // open print dialog
* if ( prt.setup( this ) )
* {
- * QString fntname = prt.option( "kde-myapp-fontname" );
+ * TQString fntname = prt.option( "kde-myapp-fontname" );
* ...
* do_something;
* ...
@@ -641,10 +641,10 @@ public:
* }
* \endcode
* @param key the option name (key)
- * @returns the option value correponding to the key, or QString::null
+ * @returns the option value correponding to the key, or TQString::null
* @see KPrintDialogPage, setOption, options(), setOptions()
*/
- const QString& option(const QString& key) const;
+ const TQString& option(const TQString& key) const;
/**
* Adds or modifies an option in the KPrinter object. You probably don't need to use this function
* explicitly. This will be done implicitely for example when reimplementing
@@ -653,26 +653,26 @@ public:
* @param value the option value
* @see option(), KPrintDialogPage
*/
- void setOption(const QString& key, const QString& value);
+ void setOption(const TQString& key, const TQString& value);
/**
* Returns the complete set of print options from the KPrinter object. For internal use.
- * @returns the option set as a QMap object
+ * @returns the option set as a TQMap object
*/
- const QMap<QString,QString>& options() const;
+ const TQMap<TQString,TQString>& options() const;
/**
* Sets the option set in one operation. This method has some side effects like merging
* the internal map with the one given in argument, but only for option in the form
* "kde-...". For internal use only.
* @param opts the option set to be merged in the KPrinter object
*/
- void setOptions(const QMap<QString,QString>& opts);
+ void setOptions(const TQMap<TQString,TQString>& opts);
/**
* For internal use only. Does a similar job as setOption(), except that all possible
* internal printers are initialized with the option if it has the form "kde-...".
* @param opts the option set
* @see setOptions()
*/
- void initOptions(const QMap<QString,QString>& opts);
+ void initOptions(const TQMap<TQString,TQString>& opts);
/**
* Returns the search name of the printer selected by the user. Each printer is identified by
@@ -680,23 +680,23 @@ public:
* @returns the unique printer search name
* @see setSearchName
*/
- QString searchName() const;
+ TQString searchName() const;
/**
* Sets the search name of the KPrinter object. For internal use.
* @param n the unique printer search name
* @see searchName()
*/
- void setSearchName(const QString& n);
+ void setSearchName(const TQString& n);
/**
* Returns the last error message issued by the print system. Unimplemented yet.
* @returns the last error message
*/
- QString errorMessage() const;
+ TQString errorMessage() const;
/**
* Sets the last error message. For internal use.
* @param msg the error message
*/
- void setErrorMessage(const QString& msg);
+ void setErrorMessage(const TQString& msg);
/**
* Configure the KPrinter object to be used with the printer named
* @p prname. After the call, the KPrinter object can be used without
@@ -714,7 +714,7 @@ public:
* user clicked "Cancel" in the file dialog.
* @see setup()
*/
- bool autoConfigure(const QString& prname = QString::null, QWidget *parent = 0);
+ bool autoConfigure(const TQString& prname = TQString::null, TQWidget *parent = 0);
/**
* Set the default document filename. This filename will be used as the
* default basename for the output file, instead of the default "print".
@@ -723,14 +723,14 @@ public:
* @param filename the default document basename to use
* @see docFileName()
*/
- void setDocFileName(const QString& filename);
+ void setDocFileName(const TQString& filename);
/**
* Get the default document filename, that is the default basename used for
* the output file.
* @returns the default document basename
* @see setDocFileName()
*/
- QString docFileName() const;
+ TQString docFileName() const;
/**
* Set the default document directory. This directory will be used as
* the default location for any output file. If not set, $HOME directory
@@ -738,17 +738,17 @@ public:
* @param dir the new default output directory
* @see docDirectory()
*/
- void setDocDirectory( const QString& dir );
+ void setDocDirectory( const TQString& dir );
/**
* Get the default document directory, that is the directory used for
* any output file. By default, it is the $HOME directory.
* @returns the default output directory
* @see setDocDirectory
*/
- QString docDirectory() const;
+ TQString docDirectory() const;
protected:
- virtual bool cmd(int, QPainter*, QPDevCmdParam*);
+ virtual bool cmd(int, TQPainter*, QPDevCmdParam*);
virtual int metric(int) const;
void translateQtOptions();
void loadSettings();
@@ -756,10 +756,10 @@ protected:
void preparePrinting();
void finishPrinting();
void reload();
- void init(bool restore = true, QPrinter::PrinterMode m = QPrinter::ScreenResolution);
- bool doPreview(const QString& file);
+ void init(bool restore = true, TQPrinter::PrinterMode m = TQPrinter::ScreenResolution);
+ bool doPreview(const TQString& file);
void setRealPageSize(DrPageSize* p);
- void setOption( const QString& key, const QString& value, bool broadcast );
+ void setOption( const TQString& key, const TQString& value, bool broadcast );
protected:
KPrinterPrivate *d;
@@ -769,12 +769,12 @@ protected:
// Utility functions
-KDEPRINT_EXPORT KPrinter::PageSize pageNameToPageSize(const QString& name);
+KDEPRINT_EXPORT KPrinter::PageSize pageNameToPageSize(const TQString& name);
KDEPRINT_EXPORT const char* pageSizeToPageName(KPrinter::PageSize s);
/**
* DO NOT USE, WILL BE REMOVED.
* @obsolete
*/
-QSize rangeToSize( const QString& );
+TQSize rangeToSize( const TQString& );
#endif
diff --git a/kdeprint/kprinterimpl.cpp b/kdeprint/kprinterimpl.cpp
index 15c5bea7b..94750b607 100644
--- a/kdeprint/kprinterimpl.cpp
+++ b/kdeprint/kprinterimpl.cpp
@@ -29,8 +29,8 @@
#include "kmprinter.h"
#include "driver.h"
-#include <qfile.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqregexp.h>
#include <kinputdialog.h>
#include <klocale.h>
#include <dcopclient.h>
@@ -45,7 +45,7 @@
#include <stdlib.h>
-void dumpOptions(const QMap<QString,QString>&);
+void dumpOptions(const TQMap<TQString,TQString>&);
void initEditPrinter(KMPrinter *p)
{
if (!p->isEdited())
@@ -57,8 +57,8 @@ void initEditPrinter(KMPrinter *p)
//****************************************************************************************
-KPrinterImpl::KPrinterImpl(QObject *parent, const char *name)
-: QObject(parent,name)
+KPrinterImpl::KPrinterImpl(TQObject *parent, const char *name)
+: TQObject(parent,name)
{
loadAppOptions();
}
@@ -87,7 +87,7 @@ void KPrinterImpl::preparePrinting(KPrinter *printer)
}
if (!psname.isEmpty())
{
- printer->setOption("kde-pagesize",QString::number((int)pageNameToPageSize(psname)));
+ printer->setOption("kde-pagesize",TQString::number((int)pageNameToPageSize(psname)));
DrPageSize *ps = driver->findPageSize(psname);
if (ps)
{
@@ -101,7 +101,7 @@ void KPrinterImpl::preparePrinting(KPrinter *printer)
// 3) default printer resolution
// The resolution must have the format: XXXdpi or XXXxYYYdpi. In the second
// case the YYY value is used as resolution.
- QString res = printer->option( "Resolution" );
+ TQString res = printer->option( "Resolution" );
if ( res.isEmpty() )
{
DrBase *opt = driver->findOption( "Resolution" );
@@ -112,7 +112,7 @@ void KPrinterImpl::preparePrinting(KPrinter *printer)
}
if ( !res.isEmpty() )
{
- QRegExp re( "(\\d+)(?:x(\\d+))?dpi" );
+ TQRegExp re( "(\\d+)(?:x(\\d+))?dpi" );
if ( re.search( res ) != -1 )
{
if ( !re.cap( 2 ).isEmpty() )
@@ -123,7 +123,7 @@ void KPrinterImpl::preparePrinting(KPrinter *printer)
}
// Find the supported fonts
- QString fonts = driver->get( "fonts" );
+ TQString fonts = driver->get( "fonts" );
if ( !fonts.isEmpty() )
printer->setOption( "kde-fonts", fonts );
@@ -132,12 +132,12 @@ void KPrinterImpl::preparePrinting(KPrinter *printer)
}
-bool KPrinterImpl::setupCommand(QString&, KPrinter*)
+bool KPrinterImpl::setupCommand(TQString&, KPrinter*)
{
return false;
}
-bool KPrinterImpl::printFiles(KPrinter *p, const QStringList& f, bool flag)
+bool KPrinterImpl::printFiles(KPrinter *p, const TQStringList& f, bool flag)
{
QString cmd;
if (p->option("kde-isspecial") == "1")
@@ -177,13 +177,13 @@ bool KPrinterImpl::printFiles(KPrinter *p, const QStringList& f, bool flag)
return startPrinting(cmd,p,f,flag);
}
-void KPrinterImpl::broadcastOption(const QString& key, const QString& value)
+void KPrinterImpl::broadcastOption(const TQString& key, const TQString& value)
{
// force printer listing if not done yet (or reload needed)
- QPtrList<KMPrinter> *printers = KMFactory::self()->manager()->printerListComplete(false);
+ TQPtrList<KMPrinter> *printers = KMFactory::self()->manager()->printerListComplete(false);
if (printers)
{
- QPtrListIterator<KMPrinter> it(*printers);
+ TQPtrListIterator<KMPrinter> it(*printers);
for (;it.current();++it)
{
initEditPrinter(it.current());
@@ -192,7 +192,7 @@ void KPrinterImpl::broadcastOption(const QString& key, const QString& value)
}
}
-int KPrinterImpl::dcopPrint(const QString& cmd, const QStringList& files, bool removeflag)
+int KPrinterImpl::dcopPrint(const TQString& cmd, const TQStringList& files, bool removeflag)
{
kdDebug(500) << "kdeprint: print command: " << cmd << endl;
@@ -203,24 +203,24 @@ int KPrinterImpl::dcopPrint(const QString& cmd, const QStringList& files, bool r
return result;
}
- QByteArray data, replyData;
- QCString replyType;
- QDataStream arg( data, IO_WriteOnly );
+ TQByteArray data, replyData;
+ TQCString replyType;
+ TQDataStream arg( data, IO_WriteOnly );
arg << cmd;
arg << files;
arg << removeflag;
- if (dclient->call( "kded", "kdeprintd", "print(QString,QStringList,bool)", data, replyType, replyData ))
+ if (dclient->call( "kded", "kdeprintd", "print(TQString,TQStringList,bool)", data, replyType, replyData ))
{
if (replyType == "int")
{
- QDataStream _reply_stream( replyData, IO_ReadOnly );
+ TQDataStream _reply_stream( replyData, IO_ReadOnly );
_reply_stream >> result;
}
}
return result;
}
-void KPrinterImpl::statusMessage(const QString& msg, KPrinter *printer)
+void KPrinterImpl::statusMessage(const TQString& msg, KPrinter *printer)
{
kdDebug(500) << "kdeprint: status message: " << msg << endl;
KConfig *conf = KMFactory::self()->printConfig();
@@ -238,15 +238,15 @@ void KPrinterImpl::statusMessage(const QString& msg, KPrinter *printer)
return;
}
- QByteArray data;
- QDataStream arg( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream arg( data, IO_WriteOnly );
arg << message;
arg << (int)getpid();
arg << kapp->caption();
- dclient->send( "kded", "kdeprintd", "statusMessage(QString,int,QString)", data );
+ dclient->send( "kded", "kdeprintd", "statusMessage(TQString,int,TQString)", data );
}
-bool KPrinterImpl::startPrinting(const QString& cmd, KPrinter *printer, const QStringList& files, bool flag)
+bool KPrinterImpl::startPrinting(const TQString& cmd, KPrinter *printer, const TQStringList& files, bool flag)
{
statusMessage(i18n("Sending print data to printer: %1").arg(printer->printerName()), printer);
@@ -254,8 +254,8 @@ bool KPrinterImpl::startPrinting(const QString& cmd, KPrinter *printer, const QS
QStringList printfiles;
if (command.find("%in") == -1) command.append(" %in");
- for (QStringList::ConstIterator it=files.begin(); it!=files.end(); ++it)
- if (QFile::exists(*it))
+ for (TQStringList::ConstIterator it=files.begin(); it!=files.end(); ++it)
+ if (TQFile::exists(*it))
{
// quote filenames
filestr.append(quote(*it)).append(" ");
@@ -292,18 +292,18 @@ bool KPrinterImpl::startPrinting(const QString& cmd, KPrinter *printer, const QS
//}
}
-QString KPrinterImpl::tempFile()
+TQString KPrinterImpl::tempFile()
{
QString f;
// be sure the file doesn't exist
- do f = locateLocal("tmp","kdeprint_") + KApplication::randomString(8); while (QFile::exists(f));
+ do f = locateLocal("tmp","kdeprint_") + KApplication::randomString(8); while (TQFile::exists(f));
return f;
}
-int KPrinterImpl::filterFiles(KPrinter *printer, QStringList& files, bool flag)
+int KPrinterImpl::filterFiles(KPrinter *printer, TQStringList& files, bool flag)
{
- QStringList flist = QStringList::split(',',printer->option("_kde-filters"),false);
- QMap<QString,QString> opts = printer->options();
+ QStringList flist = TQStringList::split(',',printer->option("_kde-filters"),false);
+ TQMap<TQString,TQString> opts = printer->options();
// generic page selection mechanism (using psselect filter)
// do it only if:
@@ -339,7 +339,7 @@ int KPrinterImpl::filterFiles(KPrinter *printer, QStringList& files, bool flag)
return doFilterFiles(printer, files, flist, opts, flag);
}
-int KPrinterImpl::doFilterFiles(KPrinter *printer, QStringList& files, const QStringList& flist, const QMap<QString,QString>& opts, bool flag)
+int KPrinterImpl::doFilterFiles(KPrinter *printer, TQStringList& files, const TQStringList& flist, const TQMap<TQString,TQString>& opts, bool flag)
{
// nothing to do
if (flist.count() == 0)
@@ -376,7 +376,7 @@ int KPrinterImpl::doFilterFiles(KPrinter *printer, QStringList& files, const QSt
QString rin("%in"), rout("%out"), rpsl("%psl"), rpsu("%psu");
QString ps = pageSizeToPageName( printer->option( "kde-printsize" ).isEmpty() ? printer->pageSize() : ( KPrinter::PageSize )printer->option( "kde-printsize" ).toInt() );
- for (QStringList::Iterator it=files.begin(); it!=files.end(); ++it)
+ for (TQStringList::Iterator it=files.begin(); it!=files.end(); ++it)
{
QString mime = KMimeMagic::self()->findFileType(*it)->mimeType();
if (inputMimeTypes.find(mime) == inputMimeTypes.end())
@@ -386,7 +386,7 @@ int KPrinterImpl::doFilterFiles(KPrinter *printer, QStringList& files, const QSt
"(this may happen with non-CUPS spoolers when performing page selection "
"on a non-PostScript file). Do you want KDE to convert the file to a supported "
"format?</p>").arg(mime),
- QString::null, i18n("Convert")) == KMessageBox::Continue)
+ TQString::null, i18n("Convert")) == KMessageBox::Continue)
{
QStringList ff;
int done(0);
@@ -411,7 +411,7 @@ int KPrinterImpl::doFilterFiles(KPrinter *printer, QStringList& files, const QSt
}
else
{
- int result = doFilterFiles(printer, ff, filters, QMap<QString,QString>(), flag);
+ int result = doFilterFiles(printer, ff, filters, TQMap<TQString,TQString>(), flag);
if (result == 1)
{
*it = ff[0];
@@ -439,22 +439,22 @@ int KPrinterImpl::doFilterFiles(KPrinter *printer, QStringList& files, const QSt
cmd.replace(rpsu,ps);
cmd.replace(rin,quote(*it)); // Replace as last, filename could contain "%psl"
statusMessage(i18n("Filtering print data"), printer);
- int status = system(QFile::encodeName(cmd));
+ int status = system(TQFile::encodeName(cmd));
if (status < 0 || WEXITSTATUS(status) == 127)
{
printer->setErrorMessage(i18n("Error while filtering. Command was: <b>%1</b>.").arg(filtercmd));
return -1;
}
- if (flag) QFile::remove(*it);
+ if (flag) TQFile::remove(*it);
*it = tmpfile;
}
return 1;
}
-int KPrinterImpl::autoConvertFiles(KPrinter *printer, QStringList& files, bool flag)
+int KPrinterImpl::autoConvertFiles(KPrinter *printer, TQStringList& files, bool flag)
{
- QString primaryMimeType = "application/postscript";
- QStringList mimeTypes( primaryMimeType );
+ TQString primaryMimeType = "application/postscript";
+ TQStringList mimeTypes( primaryMimeType );
if ( printer->option( "kde-isspecial" ) == "1" )
{
if ( !printer->option( "kde-special-command" ).isEmpty() )
@@ -477,7 +477,7 @@ int KPrinterImpl::autoConvertFiles(KPrinter *printer, QStringList& files, bool f
}
KMFactory::PluginInfo info = KMFactory::self()->pluginInfo(KMFactory::self()->printSystem());
int status(0), result;
- for (QStringList::Iterator it=files.begin(); it!=files.end(); )
+ for (TQStringList::Iterator it=files.begin(); it!=files.end(); )
{
QString mime = KMimeMagic::self()->findFileType(*it)->mimeType();
if ( mime == "application/x-zerosize" )
@@ -485,9 +485,9 @@ int KPrinterImpl::autoConvertFiles(KPrinter *printer, QStringList& files, bool f
// special case of empty file
KMessageBox::information( NULL,
i18n( "<qt>The print file is empty and will be ignored:<p>%1</p></qt>" ).arg( *it ),
- QString::null, "emptyFileNotPrinted" );
+ TQString::null, "emptyFileNotPrinted" );
if ( flag )
- QFile::remove( *it );
+ TQFile::remove( *it );
it = files.remove( it );
continue;
}
@@ -505,10 +505,10 @@ int KPrinterImpl::autoConvertFiles(KPrinter *printer, QStringList& files, bool f
"(Select <em>Cancel</em>) </li>"
"</ul> "
"Do you want KDE to attempt and convert this file to %2?</qt>").arg(mime).arg(primaryMimeType),
- QString::null,
+ TQString::null,
i18n("Convert"),
i18n("Keep"),
- QString::fromLatin1("kdeprintAutoConvert"))) == KMessageBox::Yes)
+ TQString::fromLatin1("kdeprintAutoConvert"))) == KMessageBox::Yes)
{
// find the filter chain
QStringList flist = KXmlCommandManager::self()->autoConvert(mime, primaryMimeType);
@@ -525,12 +525,12 @@ int KPrinterImpl::autoConvertFiles(KPrinter *printer, QStringList& files, bool f
"</qt>").arg(mime).arg(primaryMimeType),
i18n("Print"));
if (flag)
- QFile::remove(*it);
+ TQFile::remove(*it);
it = files.remove(it);
continue;
}
QStringList l(*it);
- switch (doFilterFiles(printer, l, flist, QMap<QString,QString>(), flag))
+ switch (doFilterFiles(printer, l, flist, TQMap<TQString,TQString>(), flag))
{
case -1:
return -1;
@@ -553,7 +553,7 @@ int KPrinterImpl::autoConvertFiles(KPrinter *printer, QStringList& files, bool f
return status;
}
-bool KPrinterImpl::setupSpecialCommand(QString& cmd, KPrinter *p, const QStringList&)
+bool KPrinterImpl::setupSpecialCommand(TQString& cmd, KPrinter *p, const TQStringList&)
{
QString s(p->option("kde-special-command"));
if (s.isEmpty())
@@ -572,10 +572,10 @@ bool KPrinterImpl::setupSpecialCommand(QString& cmd, KPrinter *p, const QStringL
return true;
}
-QString KPrinterImpl::quote(const QString& s)
+TQString KPrinterImpl::quote(const TQString& s)
{ return KProcess::quote(s); }
-void KPrinterImpl::saveOptions(const QMap<QString,QString>& opts)
+void KPrinterImpl::saveOptions(const TQMap<TQString,TQString>& opts)
{
m_options = opts;
saveAppOptions();
@@ -594,7 +594,7 @@ void KPrinterImpl::loadAppOptions()
void KPrinterImpl::saveAppOptions()
{
QStringList optlist;
- for (QMap<QString,QString>::ConstIterator it=m_options.begin(); it!=m_options.end(); ++it)
+ for (TQMap<TQString,TQString>::ConstIterator it=m_options.begin(); it!=m_options.end(); ++it)
if (it.key().startsWith("app-"))
optlist << it.key() << it.data();
diff --git a/kdeprint/kprinterimpl.h b/kdeprint/kprinterimpl.h
index 94096e20a..ae6b8b75d 100644
--- a/kdeprint/kprinterimpl.h
+++ b/kdeprint/kprinterimpl.h
@@ -21,10 +21,10 @@
#ifndef KPRINTERIMPL_H
#define KPRINTERIMPL_H
-#include <qobject.h>
-#include <qstringlist.h>
-#include <qmap.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
+#include <tqmap.h>
+#include <tqptrlist.h>
#include <kdelibs_export.h>
@@ -35,36 +35,36 @@ class KDEPRINT_EXPORT KPrinterImpl : public QObject
{
Q_OBJECT
public:
- KPrinterImpl(QObject *parent = 0, const char *name = 0);
+ KPrinterImpl(TQObject *parent = 0, const char *name = 0);
virtual ~KPrinterImpl();
- virtual bool setupCommand(QString& cmd, KPrinter*);
+ virtual bool setupCommand(TQString& cmd, KPrinter*);
virtual void preparePrinting(KPrinter*);
- virtual void broadcastOption(const QString& key, const QString& value);
+ virtual void broadcastOption(const TQString& key, const TQString& value);
- bool printFiles(KPrinter*, const QStringList&, bool removeflag = false);
+ bool printFiles(KPrinter*, const TQStringList&, bool removeflag = false);
// result:
// -1 -> error
// 0 -> nothing happened
// 1 -> files filterd
- int filterFiles(KPrinter*, QStringList&, bool removeflag = false);
- int autoConvertFiles(KPrinter*, QStringList&, bool removeflag = false);
- void saveOptions(const QMap<QString,QString>& opts);
- const QMap<QString,QString>& loadOptions() const { return m_options; }
- QString tempFile();
- QString quote(const QString&);
- void statusMessage(const QString&, KPrinter* = 0);
+ int filterFiles(KPrinter*, TQStringList&, bool removeflag = false);
+ int autoConvertFiles(KPrinter*, TQStringList&, bool removeflag = false);
+ void saveOptions(const TQMap<TQString,TQString>& opts);
+ const TQMap<TQString,TQString>& loadOptions() const { return m_options; }
+ TQString tempFile();
+ TQString quote(const TQString&);
+ void statusMessage(const TQString&, KPrinter* = 0);
protected:
- bool startPrinting(const QString& cmd, KPrinter *printer, const QStringList& files, bool removeflag = false);
- int dcopPrint(const QString& cmd, const QStringList& files, bool removeflag = false);
- bool setupSpecialCommand(QString&, KPrinter*, const QStringList&);
- int doFilterFiles(KPrinter* pr, QStringList& files, const QStringList& flist, const QMap<QString,QString>& opts, bool removeflag = false);
+ bool startPrinting(const TQString& cmd, KPrinter *printer, const TQStringList& files, bool removeflag = false);
+ int dcopPrint(const TQString& cmd, const TQStringList& files, bool removeflag = false);
+ bool setupSpecialCommand(TQString&, KPrinter*, const TQStringList&);
+ int doFilterFiles(KPrinter* pr, TQStringList& files, const TQStringList& flist, const TQMap<TQString,TQString>& opts, bool removeflag = false);
void loadAppOptions();
void saveAppOptions();
protected:
- QMap<QString,QString> m_options; // use to save current options
+ TQMap<TQString,TQString> m_options; // use to save current options
};
#endif
diff --git a/kdeprint/kprinterpropertydialog.cpp b/kdeprint/kprinterpropertydialog.cpp
index 8bafeb171..ab3b44f05 100644
--- a/kdeprint/kprinterpropertydialog.cpp
+++ b/kdeprint/kprinterpropertydialog.cpp
@@ -26,21 +26,21 @@
#include "driver.h"
#include <kmessagebox.h>
-#include <qtabwidget.h>
+#include <tqtabwidget.h>
#include <klocale.h>
#include <kpushbutton.h>
#include <kguiitem.h>
-KPrinterPropertyDialog::KPrinterPropertyDialog(KMPrinter *p, QWidget *parent, const char *name)
-: KDialogBase(parent, name, true, QString::null, KDialogBase::Ok|KDialogBase::Cancel|KDialogBase::User1, KDialogBase::Ok, false, KStdGuiItem::save()),
+KPrinterPropertyDialog::KPrinterPropertyDialog(KMPrinter *p, TQWidget *parent, const char *name)
+: KDialogBase(parent, name, true, TQString::null, KDialogBase::Ok|KDialogBase::Cancel|KDialogBase::User1, KDialogBase::Ok, false, KStdGuiItem::save()),
m_printer(p), m_driver(0), m_current(0)
{
m_pages.setAutoDelete(false);
// set a margin
- m_tw = new QTabWidget(this);
+ m_tw = new TQTabWidget(this);
m_tw->setMargin(10);
- connect(m_tw,SIGNAL(currentChanged(QWidget*)),SLOT(slotCurrentChanged(QWidget*)));
+ connect(m_tw,TQT_SIGNAL(currentChanged(TQWidget*)),TQT_SLOT(slotCurrentChanged(TQWidget*)));
setMainWidget(m_tw);
if (m_printer)
@@ -52,7 +52,7 @@ KPrinterPropertyDialog::~KPrinterPropertyDialog()
delete m_driver;
}
-void KPrinterPropertyDialog::slotCurrentChanged(QWidget *w)
+void KPrinterPropertyDialog::slotCurrentChanged(TQWidget *w)
{
if (m_current) m_current->getOptions(m_options,true);
m_current = (KPrintDialogPage*)w;
@@ -69,7 +69,7 @@ bool KPrinterPropertyDialog::synchronize()
{
if (m_current) m_current->getOptions(m_options,true);
QString msg;
- QPtrListIterator<KPrintDialogPage> it(m_pages);
+ TQPtrListIterator<KPrintDialogPage> it(m_pages);
for (;it.current();++it)
{
it.current()->setOptions(m_options);
@@ -82,25 +82,25 @@ bool KPrinterPropertyDialog::synchronize()
return true;
}
-void KPrinterPropertyDialog::setOptions(const QMap<QString,QString>& opts)
+void KPrinterPropertyDialog::setOptions(const TQMap<TQString,TQString>& opts)
{
// merge the 2 options sets
- for (QMap<QString,QString>::ConstIterator it=opts.begin(); it!=opts.end(); ++it)
+ for (TQMap<TQString,TQString>::ConstIterator it=opts.begin(); it!=opts.end(); ++it)
m_options[it.key()] = it.data();
// update all existing pages
- QPtrListIterator<KPrintDialogPage> it(m_pages);
+ TQPtrListIterator<KPrintDialogPage> it(m_pages);
for (; it.current(); ++it)
it.current()->setOptions(m_options);
}
-void KPrinterPropertyDialog::getOptions(QMap<QString,QString>& opts, bool incldef)
+void KPrinterPropertyDialog::getOptions(TQMap<TQString,TQString>& opts, bool incldef)
{
collectOptions(opts, incldef);
}
-void KPrinterPropertyDialog::collectOptions(QMap<QString,QString>& opts, bool incldef)
+void KPrinterPropertyDialog::collectOptions(TQMap<TQString,TQString>& opts, bool incldef)
{
- QPtrListIterator<KPrintDialogPage> it(m_pages);
+ TQPtrListIterator<KPrintDialogPage> it(m_pages);
for (;it.current();++it)
it.current()->getOptions(opts,incldef);
}
@@ -116,10 +116,10 @@ void KPrinterPropertyDialog::slotUser1()
{
if (m_printer && synchronize())
{
- QMap<QString,QString> opts;
+ TQMap<TQString,TQString> opts;
collectOptions(opts, false);
m_printer->setDefaultOptions(opts);
- m_printer->setEditedOptions(QMap<QString,QString>());
+ m_printer->setEditedOptions(TQMap<TQString,TQString>());
m_printer->setEdited(false);
KMFactory::self()->virtualManager()->triggerSave();
}
@@ -130,7 +130,7 @@ void KPrinterPropertyDialog::enableSaveButton(bool state)
showButton(KDialogBase::User1, state);
}
-void KPrinterPropertyDialog::setupPrinter(KMPrinter *pr, QWidget *parent)
+void KPrinterPropertyDialog::setupPrinter(KMPrinter *pr, TQWidget *parent)
{
KPrinterPropertyDialog dlg(pr,parent,"PropertyDialog");
KMFactory::self()->uiManager()->setupPropertyDialog(&dlg);
@@ -138,7 +138,7 @@ void KPrinterPropertyDialog::setupPrinter(KMPrinter *pr, QWidget *parent)
KMessageBox::information(parent,i18n("No configurable options for that printer."),i18n("Printer Configuration"));
else if (dlg.exec())
{
- QMap<QString,QString> opts;
+ TQMap<TQString,TQString> opts;
dlg.collectOptions(opts, false);
pr->setEditedOptions(opts);
pr->setEdited(true);
diff --git a/kdeprint/kprinterpropertydialog.h b/kdeprint/kprinterpropertydialog.h
index 5f6830b21..de99e0bfd 100644
--- a/kdeprint/kprinterpropertydialog.h
+++ b/kdeprint/kprinterpropertydialog.h
@@ -22,8 +22,8 @@
#define KPRINTERPROPERTYDIALOG_H
#include <kdialogbase.h>
-#include <qptrlist.h>
-#include <qmap.h>
+#include <tqptrlist.h>
+#include <tqmap.h>
class KMPrinter;
class KPrintDialogPage;
@@ -34,34 +34,34 @@ class KDEPRINT_EXPORT KPrinterPropertyDialog : public KDialogBase
{
Q_OBJECT
public:
- KPrinterPropertyDialog(KMPrinter *printer, QWidget *parent = 0, const char *name = 0);
+ KPrinterPropertyDialog(KMPrinter *printer, TQWidget *parent = 0, const char *name = 0);
~KPrinterPropertyDialog();
KMPrinter* printer() { return m_printer; }
DrMain* driver() { return m_driver; }
void setDriver(DrMain* d) { if (!m_driver) m_driver = d; }
void addPage(KPrintDialogPage*);
- void setOptions(const QMap<QString,QString>&);
- void getOptions(QMap<QString,QString>&, bool = false);
+ void setOptions(const TQMap<TQString,TQString>&);
+ void getOptions(TQMap<TQString,TQString>&, bool = false);
void enableSaveButton(bool);
- static void setupPrinter(KMPrinter *printer, QWidget *parent);
+ static void setupPrinter(KMPrinter *printer, TQWidget *parent);
protected:
bool synchronize();
- void collectOptions(QMap<QString,QString>& opts, bool incldef = false);
+ void collectOptions(TQMap<TQString,TQString>& opts, bool incldef = false);
protected slots:
- void slotCurrentChanged(QWidget*);
+ void slotCurrentChanged(TQWidget*);
void slotUser1();
void slotOk();
protected:
KMPrinter *m_printer;
DrMain *m_driver;
- QPtrList<KPrintDialogPage> m_pages;
+ TQPtrList<KPrintDialogPage> m_pages;
KPrintDialogPage *m_current;
- QMap<QString,QString> m_options;
+ TQMap<TQString,TQString> m_options;
QTabWidget *m_tw;
QPushButton *m_save;
};
diff --git a/kdeprint/kprintpreview.cpp b/kdeprint/kprintpreview.cpp
index 6118f19b8..ab669ea6e 100644
--- a/kdeprint/kprintpreview.cpp
+++ b/kdeprint/kprintpreview.cpp
@@ -21,9 +21,9 @@
#include "kprintpreview.h"
#include "kmfactory.h"
-#include <qfile.h>
-#include <qlayout.h>
-#include <qvbox.h>
+#include <tqfile.h>
+#include <tqlayout.h>
+#include <tqvbox.h>
#include <kparts/part.h>
#include <kaccel.h>
@@ -45,7 +45,7 @@ KPreviewProc::KPreviewProc()
: KProcess()
{
m_bOk = false;
- connect(this, SIGNAL(processExited(KProcess*)), SLOT(slotProcessExited(KProcess*)));
+ connect(this, TQT_SIGNAL(processExited(KProcess*)), TQT_SLOT(slotProcessExited(KProcess*)));
}
KPreviewProc::~KPreviewProc()
@@ -80,7 +80,7 @@ class KPrintPreview::KPrintPreviewPrivate
public:
KPrintPreviewPrivate(KPrintPreview *dlg) : gvpart_(0)
{
- mainwidget_ = new QWidget(dlg, "MainWidget");
+ mainwidget_ = new TQWidget(dlg, "MainWidget");
toolbar_ = new KToolBar(mainwidget_, "PreviewToolBar", true);
actions_ = new KActionCollection(dlg);
accel_ = new KAccel(dlg);
@@ -108,11 +108,11 @@ static KLibFactory* componentFactory()
{
kdDebug(500) << "kdeprint: querying trader for 'application/postscript' service" << endl;
KLibFactory *factory(0);
- KTrader::OfferList offers = KTrader::self()->query(QString::fromLatin1("application/postscript"), QString::fromLatin1("KParts/ReadOnlyPart"), QString::null, QString::null);
+ KTrader::OfferList offers = KTrader::self()->query(TQString::fromLatin1("application/postscript"), TQString::fromLatin1("KParts/ReadOnlyPart"), TQString::null, TQString::null);
for (KTrader::OfferList::ConstIterator it = offers.begin(); it != offers.end(); ++it)
{
KService::Ptr service = *it;
- factory = KLibLoader::self()->factory(QFile::encodeName(service->library()));
+ factory = KLibLoader::self()->factory(TQFile::encodeName(service->library()));
if (factory)
break;
}
@@ -124,7 +124,7 @@ static KLibFactory* componentFactory()
return factory;
}
-static bool continuePrint(const QString& msg_, QWidget *parent, bool previewOnly)
+static bool continuePrint(const TQString& msg_, TQWidget *parent, bool previewOnly)
{
QString msg(msg_);
if (previewOnly)
@@ -135,13 +135,13 @@ static bool continuePrint(const QString& msg_, QWidget *parent, bool previewOnly
else
{
msg.append(" ").append(i18n("Do you want to continue printing anyway?"));
- return (KMessageBox::warningContinueCancel(parent, msg, QString::null, KGuiItem(i18n("Print"),"fileprint")) == KMessageBox::Continue);
+ return (KMessageBox::warningContinueCancel(parent, msg, TQString::null, KGuiItem(i18n("Print"),"fileprint")) == KMessageBox::Continue);
}
}
//*******************************************************************************************
-KPrintPreview::KPrintPreview(QWidget *parent, bool previewOnly)
+KPrintPreview::KPrintPreview(TQWidget *parent, bool previewOnly)
: KDialogBase(parent, "PreviewDlg", true, i18n("Print Preview"), 0)
{
kdDebug(500) << "kdeprint: creating preview dialog" << endl;
@@ -151,11 +151,11 @@ KPrintPreview::KPrintPreview(QWidget *parent, bool previewOnly)
// create main view and actions
setMainWidget(d->mainwidget_);
if (previewOnly)
- KStdAction::close(this, SLOT(reject()), d->actions_, "close_print");
+ KStdAction::close(this, TQT_SLOT(reject()), d->actions_, "close_print");
else
{
- new KAction(i18n("Print"), "fileprint", Qt::Key_Return, this, SLOT(accept()), d->actions_, "continue_print");
- new KAction(i18n("Cancel"), "stop", Qt::Key_Escape, this, SLOT(reject()), d->actions_, "stop_print");
+ new KAction(i18n("Print"), "fileprint", Qt::Key_Return, this, TQT_SLOT(accept()), d->actions_, "continue_print");
+ new KAction(i18n("Cancel"), "stop", Qt::Key_Escape, this, TQT_SLOT(reject()), d->actions_, "stop_print");
}
}
@@ -180,14 +180,14 @@ void KPrintPreview::initView(KLibFactory *factory)
}
if (d->gvpart_)
{
- QDomNodeList l = d->gvpart_->domDocument().elementsByTagName( "ToolBar" );
+ TQDomNodeList l = d->gvpart_->domDocument().elementsByTagName( "ToolBar" );
if ( l.length() > 0 )
{
d->toolbar_->insertLineSeparator();
- QDomNodeList acts = l.item( 0 ).toElement().elementsByTagName( "Action" );
+ TQDomNodeList acts = l.item( 0 ).toElement().elementsByTagName( "Action" );
for ( uint i=0; i<acts.length(); i++ )
{
- QDomElement a = acts.item( i ).toElement();
+ TQDomElement a = acts.item( i ).toElement();
if ( a.attribute( "name" ) == "goToPage" )
continue;
KAction *act = d->gvpart_->action( a );
@@ -215,7 +215,7 @@ void KPrintPreview::initView(KLibFactory *factory)
//d->adjustSize();
// construct the layout
- QVBoxLayout *l0 = new QVBoxLayout(d->mainwidget_, 0, 0);
+ QVBoxLayout *l0 = new TQVBoxLayout(d->mainwidget_, 0, 0);
l0->addWidget(d->toolbar_, AlignTop);
if (d->gvpart_)
l0->addWidget(d->gvpart_->widget());
@@ -224,7 +224,7 @@ void KPrintPreview::initView(KLibFactory *factory)
setCaption(i18n("Print Preview"));
}
-void KPrintPreview::openFile(const QString& file)
+void KPrintPreview::openFile(const TQString& file)
{
d->gvpart_->openURL(KURL(file));
}
@@ -234,7 +234,7 @@ bool KPrintPreview::isValid() const
return (d->gvpart_ != 0);
}
-bool KPrintPreview::preview(const QString& file, bool previewOnly, WId parentId)
+bool KPrintPreview::preview(const TQString& file, bool previewOnly, WId parentId)
{
KMimeType::Ptr mime = KMimeType::findByPath( file );
bool isPS = ( mime->name() == "application/postscript" );
@@ -245,7 +245,7 @@ bool KPrintPreview::preview(const QString& file, bool previewOnly, WId parentId)
conf->setGroup("General");
KLibFactory *factory(0);
bool externalPreview = conf->readBoolEntry("ExternalPreview", false);
- QWidget *parentW = QWidget::find(parentId);
+ QWidget *parentW = TQWidget::find(parentId);
QString exe;
if (!externalPreview && isPS && (factory = componentFactory()) != 0)
{
@@ -282,12 +282,12 @@ bool KPrintPreview::preview(const QString& file, bool previewOnly, WId parentId)
}
else
{
- KService::Ptr serv = KServiceTypeProfile::preferredService( mime->name(), QString::null );
+ KService::Ptr serv = KServiceTypeProfile::preferredService( mime->name(), TQString::null );
if ( serv )
{
KURL url;
url.setPath( file );
- QStringList args = KRun::processDesktopExec( *serv, url, false );
+ TQStringList args = KRun::processDesktopExec( *serv, url, false );
proc << args;
exe = serv->name();
}
@@ -295,7 +295,7 @@ bool KPrintPreview::preview(const QString& file, bool previewOnly, WId parentId)
{
// in that case, the PS viewer component could not be loaded and no service
// could be found to view PS
- QString msg;
+ TQString msg;
if ( isPS )
msg = i18n("Preview failed: neither the internal KDE PostScript "
"viewer (KGhostView) nor any other external PostScript "
@@ -316,7 +316,7 @@ bool KPrintPreview::preview(const QString& file, bool previewOnly, WId parentId)
}
else if (!previewOnly)
{
- return (KMessageBox::questionYesNo(parentW, i18n("Do you want to continue printing?"), QString::null, KGuiItem(i18n("Print"),"fileprint"), KStdGuiItem::cancel(), "continuePrinting") == KMessageBox::Yes);
+ return (KMessageBox::questionYesNo(parentW, i18n("Do you want to continue printing?"), TQString::null, KGuiItem(i18n("Print"),"fileprint"), KStdGuiItem::cancel(), "continuePrinting") == KMessageBox::Yes);
}
else
return false;
diff --git a/kdeprint/kprintpreview.h b/kdeprint/kprintpreview.h
index 05e2b3ed3..9193bad3e 100644
--- a/kdeprint/kprintpreview.h
+++ b/kdeprint/kprintpreview.h
@@ -22,7 +22,7 @@
#define KPRINTPREVIEW_H
#include <kdialogbase.h>
-#include <qstring.h>
+#include <tqstring.h>
#include <kprocess.h>
class KLibFactory;
@@ -31,13 +31,13 @@ class KPrintPreview : public KDialogBase
{
Q_OBJECT
public:
- KPrintPreview(QWidget *parent = 0, bool previewOnly = false);
+ KPrintPreview(TQWidget *parent = 0, bool previewOnly = false);
~KPrintPreview();
- void openFile(const QString& file);
+ void openFile(const TQString& file);
bool isValid() const;
- static bool preview(const QString& file, bool previewOnly = false, WId parentId = 0);
+ static bool preview(const TQString& file, bool previewOnly = false, WId parentId = 0);
private:
void initView(KLibFactory*);
diff --git a/kdeprint/kprintprocess.cpp b/kdeprint/kprintprocess.cpp
index 830f8c885..65ae44eb5 100644
--- a/kdeprint/kprintprocess.cpp
+++ b/kdeprint/kprintprocess.cpp
@@ -20,35 +20,35 @@
#include "kprintprocess.h"
#include <kapplication.h>
#include <klocale.h>
-#include <qfile.h>
+#include <tqfile.h>
KPrintProcess::KPrintProcess()
: KShellProcess()
{
// redirect everything to a single buffer
- connect(this,SIGNAL(receivedStdout(KProcess*,char*,int)),SLOT(slotReceivedStderr(KProcess*,char*,int)));
- connect(this,SIGNAL(receivedStderr(KProcess*,char*,int)),SLOT(slotReceivedStderr(KProcess*,char*,int)));
- connect( this, SIGNAL( processExited( KProcess* ) ), SLOT( slotExited( KProcess* ) ) );
+ connect(this,TQT_SIGNAL(receivedStdout(KProcess*,char*,int)),TQT_SLOT(slotReceivedStderr(KProcess*,char*,int)));
+ connect(this,TQT_SIGNAL(receivedStderr(KProcess*,char*,int)),TQT_SLOT(slotReceivedStderr(KProcess*,char*,int)));
+ connect( this, TQT_SIGNAL( processExited( KProcess* ) ), TQT_SLOT( slotExited( KProcess* ) ) );
m_state = None;
}
KPrintProcess::~KPrintProcess()
{
if ( !m_tempoutput.isEmpty() )
- QFile::remove( m_tempoutput );
+ TQFile::remove( m_tempoutput );
if ( m_tempfiles.size() > 0 )
- for ( QStringList::ConstIterator it=m_tempfiles.begin(); it!=m_tempfiles.end(); ++it )
- QFile::remove( *it );
+ for ( TQStringList::ConstIterator it=m_tempfiles.begin(); it!=m_tempfiles.end(); ++it )
+ TQFile::remove( *it );
}
-QString KPrintProcess::errorMessage() const
+TQString KPrintProcess::errorMessage() const
{
return m_buffer;
}
bool KPrintProcess::print()
{
- m_buffer = QString::null;
+ m_buffer = TQString::null;
m_state = Printing;
return start(NotifyOnExit,All);
}
@@ -57,7 +57,7 @@ void KPrintProcess::slotReceivedStderr(KProcess *proc, char *buf, int len)
{
if (proc == this)
{
- QCString str = QCString(buf,len).stripWhiteSpace();
+ QCString str = TQCString(buf,len).stripWhiteSpace();
m_buffer.append(str.append("\n"));
}
}
diff --git a/kdeprint/kprintprocess.h b/kdeprint/kprintprocess.h
index 5669d6a4c..13943d05d 100644
--- a/kdeprint/kprintprocess.h
+++ b/kdeprint/kprintprocess.h
@@ -21,7 +21,7 @@
#define KPRINTPROCESS_H
#include <kprocess.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
class KPrintProcess : public KShellProcess
{
@@ -31,23 +31,23 @@ public:
~KPrintProcess();
bool print();
- QString errorMessage() const;
+ TQString errorMessage() const;
- void setOutput( const QString& output );
- const QString& output() const;
- void setTempOutput( const QString& output );
- const QString& tempOutput() const;
- void setTempFiles( const QStringList& files );
- const QStringList& tempFiles() const;
- void setCommand( const QString& cmd );
- const QString& command() const;
+ void setOutput( const TQString& output );
+ const TQString& output() const;
+ void setTempOutput( const TQString& output );
+ const TQString& tempOutput() const;
+ void setTempFiles( const TQStringList& files );
+ const TQStringList& tempFiles() const;
+ void setCommand( const TQString& cmd );
+ const TQString& command() const;
enum State { None = 0, Printing, Finishing };
int state() const;
signals:
void printTerminated( KPrintProcess* );
- void printError( KPrintProcess*, const QString& );
+ void printError( KPrintProcess*, const TQString& );
protected slots:
void slotReceivedStderr(KProcess*, char*, int);
@@ -55,33 +55,33 @@ protected slots:
private:
QString m_buffer;
- QStringList m_tempfiles;
- QString m_output, m_tempoutput, m_command;
+ TQStringList m_tempfiles;
+ TQString m_output, m_tempoutput, m_command;
int m_state;
};
-inline const QString& KPrintProcess::output() const
+inline const TQString& KPrintProcess::output() const
{ return m_output; }
-inline const QString& KPrintProcess::tempOutput() const
+inline const TQString& KPrintProcess::tempOutput() const
{ return m_tempoutput; }
-inline const QStringList& KPrintProcess::tempFiles() const
+inline const TQStringList& KPrintProcess::tempFiles() const
{ return m_tempfiles; }
-inline const QString& KPrintProcess::command() const
+inline const TQString& KPrintProcess::command() const
{ return m_command; }
-inline void KPrintProcess::setOutput( const QString& s )
+inline void KPrintProcess::setOutput( const TQString& s )
{ m_output = s; }
-inline void KPrintProcess::setTempOutput( const QString& s )
+inline void KPrintProcess::setTempOutput( const TQString& s )
{ m_tempoutput = s; }
-inline void KPrintProcess::setTempFiles( const QStringList& l )
+inline void KPrintProcess::setTempFiles( const TQStringList& l )
{ m_tempfiles = l; }
-inline void KPrintProcess::setCommand( const QString& c )
+inline void KPrintProcess::setCommand( const TQString& c )
{ m_command = c; }
inline int KPrintProcess::state() const
diff --git a/kdeprint/kxmlcommand.cpp b/kdeprint/kxmlcommand.cpp
index c937e3443..27f8c6642 100644
--- a/kdeprint/kxmlcommand.cpp
+++ b/kdeprint/kxmlcommand.cpp
@@ -23,12 +23,12 @@
#include "kdeprintcheck.h"
#include "driverview.h"
-#include <qfile.h>
-#include <qregexp.h>
-#include <qdir.h>
-#include <qinputdialog.h>
-#include <qmap.h>
-#include <qvaluelist.h>
+#include <tqfile.h>
+#include <tqregexp.h>
+#include <tqdir.h>
+#include <tqinputdialog.h>
+#include <tqmap.h>
+#include <tqvaluelist.h>
#include <kstandarddirs.h>
#include <klocale.h>
#include <ksimpleconfig.h>
@@ -38,7 +38,7 @@
#include <klibloader.h>
#include <kmessagebox.h>
-static void setOptionText(DrBase *opt, const QString& s)
+static void setOptionText(DrBase *opt, const TQString& s)
{
if (s.isEmpty())
opt->set("text", opt->name());
@@ -61,11 +61,11 @@ public:
QStringList m_inputMime;
QStringList m_requirements;
bool m_loaded[2]; // 0 -> Desktop, 1 -> XML
- QString m_comment;
+ TQString m_comment;
};
-KXmlCommand::KXmlCommand(const QString& xmlId)
-: QObject(KXmlCommandManager::self(), "XmlCommand")
+KXmlCommand::KXmlCommand(const TQString& xmlId)
+: TQObject(KXmlCommandManager::self(), "XmlCommand")
{
init();
d->m_name = xmlId;
@@ -87,19 +87,19 @@ void KXmlCommand::init()
d->m_loaded[0] = d->m_loaded[1] = false;
}
-QString KXmlCommand::name() const
+TQString KXmlCommand::name() const
{ return d->m_name; }
-void KXmlCommand::setName(const QString& s)
+void KXmlCommand::setName(const TQString& s)
{ d->m_name = s; }
-QString KXmlCommand::command()
+TQString KXmlCommand::command()
{
check(true);
return d->m_command;
}
-void KXmlCommand::setCommand(const QString& s)
+void KXmlCommand::setCommand(const TQString& s)
{
d->m_command = s;
}
@@ -125,74 +125,74 @@ void KXmlCommand::setDriver(DrMain *driver)
d->m_driver = driver;
}
-QString KXmlCommand::io(bool io_input, bool io_pipe)
+TQString KXmlCommand::io(bool io_input, bool io_pipe)
{
check(true);
return d->m_io[(io_input?0:1)].m_format[(io_pipe?1:0)];
}
-void KXmlCommand::setIo(const QString& s, bool io_input, bool io_pipe)
+void KXmlCommand::setIo(const TQString& s, bool io_input, bool io_pipe)
{
d->m_io[(io_input?0:1)].m_format[(io_pipe?1:0)] = s;
}
-QString KXmlCommand::description()
+TQString KXmlCommand::description()
{
check();
return d->m_description;
}
-void KXmlCommand::setDescription(const QString& s)
+void KXmlCommand::setDescription(const TQString& s)
{
d->m_description = s;
}
-QString KXmlCommand::mimeType()
+TQString KXmlCommand::mimeType()
{
check();
return d->m_outputMime;
}
-void KXmlCommand::setMimeType(const QString& s)
+void KXmlCommand::setMimeType(const TQString& s)
{
d->m_outputMime = s;
}
-bool KXmlCommand::acceptMimeType(const QString& s)
+bool KXmlCommand::acceptMimeType(const TQString& s)
{
check();
return (d->m_inputMime.find(s) != d->m_inputMime.end());
}
-QStringList KXmlCommand::inputMimeTypes()
+TQStringList KXmlCommand::inputMimeTypes()
{
check();
return d->m_inputMime;
}
-void KXmlCommand::setInputMimeTypes(const QStringList& l)
+void KXmlCommand::setInputMimeTypes(const TQStringList& l)
{
d->m_inputMime = l;
}
-QStringList KXmlCommand::requirements()
+TQStringList KXmlCommand::requirements()
{
check();
return d->m_requirements;
}
-void KXmlCommand::setRequirements(const QStringList& l)
+void KXmlCommand::setRequirements(const TQStringList& l)
{
d->m_requirements = l;
}
-QString KXmlCommand::comment()
+TQString KXmlCommand::comment()
{
check();
return d->m_comment;
}
-void KXmlCommand::setComment( const QString& s )
+void KXmlCommand::setComment( const TQString& s )
{
d->m_comment = s;
}
@@ -272,7 +272,7 @@ void KXmlCommand::loadXml()
}
}
-void KXmlCommand::parseIO(const QDomElement& e, int n)
+void KXmlCommand::parseIO(const TQDomElement& e, int n)
{
QDomElement elem = e.firstChild().toElement();
while (!elem.isNull())
@@ -286,7 +286,7 @@ void KXmlCommand::parseIO(const QDomElement& e, int n)
}
}
-DrGroup* KXmlCommand::parseGroup(const QDomElement& e, DrGroup *grp)
+DrGroup* KXmlCommand::parseGroup(const TQDomElement& e, DrGroup *grp)
{
if (!grp)
grp = new DrGroup;
@@ -314,7 +314,7 @@ DrGroup* KXmlCommand::parseGroup(const QDomElement& e, DrGroup *grp)
return grp;
}
-DrBase* KXmlCommand::parseArgument(const QDomElement& e)
+DrBase* KXmlCommand::parseArgument(const TQDomElement& e)
{
DrBase *opt(0);
QString type = e.attribute("type");
@@ -363,26 +363,26 @@ DrBase* KXmlCommand::parseArgument(const QDomElement& e)
return opt;
}
-QString KXmlCommand::buildCommand(const QMap<QString,QString>& opts, bool pipein, bool pipeout)
+TQString KXmlCommand::buildCommand(const TQMap<TQString,TQString>& opts, bool pipein, bool pipeout)
{
check(true);
QString str, cmd = d->m_command;
- QString re( "%value" ), quotedRe( "'%value'" );
+ TQString re( "%value" ), quotedRe( "'%value'" );
if (d->m_driver)
{
- QMap<QString,QString> fopts;
+ TQMap<TQString,TQString> fopts;
d->m_driver->setOptions(opts);
d->m_driver->getOptions(fopts, false);
- for (QMap<QString,QString>::ConstIterator it=fopts.begin(); it!=fopts.end(); ++it)
+ for (TQMap<TQString,TQString>::ConstIterator it=fopts.begin(); it!=fopts.end(); ++it)
{
DrBase *dopt = d->m_driver->findOption(it.key());
if (dopt)
{
QString format = dopt->get("format");
- QString value = dopt->valueText();
+ TQString value = dopt->valueText();
if ( format.find( quotedRe ) != -1 )
{
if ( ( value.right( 1 ) == "'" && value.left( 1 ) == "'" ) ||
@@ -407,7 +407,7 @@ QString KXmlCommand::buildCommand(const QMap<QString,QString>& opts, bool pipein
return cmd;
}
-void KXmlCommand::setOptions(const QMap<QString,QString>& opts)
+void KXmlCommand::setOptions(const TQMap<TQString,TQString>& opts)
{
if (opts.count() == 0)
return;
@@ -416,7 +416,7 @@ void KXmlCommand::setOptions(const QMap<QString,QString>& opts)
d->m_driver->setOptions(opts);
}
-void KXmlCommand::getOptions(QMap<QString,QString>& opts, bool incldef)
+void KXmlCommand::getOptions(TQMap<TQString,TQString>& opts, bool incldef)
{
// force loading the driver
if (driver())
@@ -460,7 +460,7 @@ void KXmlCommand::saveXml()
f.close();
}
-QDomElement KXmlCommand::createIO(QDomDocument& doc, int n, const QString& tag)
+TQDomElement KXmlCommand::createIO(TQDomDocument& doc, int n, const TQString& tag)
{
QDomElement elem = doc.createElement(tag);
if (d->m_command.find("%"+tag) != -1)
@@ -477,24 +477,24 @@ QDomElement KXmlCommand::createIO(QDomDocument& doc, int n, const QString& tag)
return elem;
}
-QDomElement KXmlCommand::createGroup(QDomDocument& doc, DrGroup *group)
+TQDomElement KXmlCommand::createGroup(TQDomDocument& doc, DrGroup *group)
{
QDomElement elem = doc.createElement("filtergroup");
elem.setAttribute("name", group->name());
elem.setAttribute("description", group->get("text"));
- QPtrListIterator<DrGroup> git(group->groups());
+ TQPtrListIterator<DrGroup> git(group->groups());
for (; git.current(); ++git)
elem.appendChild(createGroup(doc, git.current()));
- QPtrListIterator<DrBase> oit(group->options());
+ TQPtrListIterator<DrBase> oit(group->options());
for (; oit.current(); ++oit)
elem.appendChild(createElement(doc, oit.current()));
return elem;
}
-QDomElement KXmlCommand::createElement(QDomDocument& doc, DrBase *opt)
+TQDomElement KXmlCommand::createElement(TQDomDocument& doc, DrBase *opt)
{
QDomElement elem = doc.createElement("filterarg");
QString elemName = opt->name();
@@ -521,7 +521,7 @@ QDomElement KXmlCommand::createElement(QDomDocument& doc, DrBase *opt)
case DrBase::List:
elem.setAttribute("type", (opt->type() == DrBase::List ? "list" : "bool"));
{
- QPtrListIterator<DrBase> it(*(static_cast<DrListOption*>(opt)->choices()));
+ TQPtrListIterator<DrBase> it(*(static_cast<DrListOption*>(opt)->choices()));
for (; it.current(); ++it)
{
QDomElement chElem = doc.createElement("value");
@@ -544,8 +544,8 @@ class KXmlCommandManager::KXmlCommandManagerPrivate
{
public:
QStringList m_cmdlist;
- QMap<QString, QValueList<KXmlCommand*> > m_mimemap;
- QMap<QString, KXmlCommand*> m_cmdmap;
+ TQMap<TQString, TQValueList<KXmlCommand*> > m_mimemap;
+ TQMap<TQString, KXmlCommand*> m_cmdmap;
};
KXmlCommandManager* KXmlCommandManager::m_self = 0;
@@ -561,7 +561,7 @@ KXmlCommandManager* KXmlCommandManager::self()
}
KXmlCommandManager::KXmlCommandManager()
-: QObject(KMFactory::self(), "XmlCommandManager")
+: TQObject(KMFactory::self(), "XmlCommandManager")
{
d = new KXmlCommandManagerPrivate;
}
@@ -572,7 +572,7 @@ KXmlCommandManager::~KXmlCommandManager()
delete d;
}
-KXmlCommand* KXmlCommandManager::loadCommand(const QString& xmlId, bool check)
+KXmlCommand* KXmlCommandManager::loadCommand(const TQString& xmlId, bool check)
{
if (check)
{
@@ -593,7 +593,7 @@ void KXmlCommandManager::saveCommand(KXmlCommand *xmlCmd)
void KXmlCommandManager::cleanUp()
{
- for (QMap<QString, KXmlCommand*>::ConstIterator it=d->m_cmdmap.begin(); it!=d->m_cmdmap.end(); ++it)
+ for (TQMap<TQString, KXmlCommand*>::ConstIterator it=d->m_cmdmap.begin(); it!=d->m_cmdmap.end(); ++it)
delete (*it);
d->m_cmdmap.clear();
d->m_mimemap.clear();
@@ -605,13 +605,13 @@ void KXmlCommandManager::preload()
if (d->m_cmdmap.count() == 0)
{
commandList();
- for (QStringList::Iterator it=d->m_cmdlist.begin(); it!=d->m_cmdlist.end(); ++it)
+ for (TQStringList::Iterator it=d->m_cmdlist.begin(); it!=d->m_cmdlist.end(); ++it)
{
KXmlCommand *xmlCmd = loadCommand(*it);
if (!xmlCmd) continue; // Error!
QStringList inputMime = xmlCmd->inputMimeTypes();
- for (QStringList::ConstIterator mime=inputMime.begin(); mime!=inputMime.end(); ++mime)
+ for (TQStringList::ConstIterator mime=inputMime.begin(); mime!=inputMime.end(); ++mime)
{
d->m_mimemap[*mime].append(xmlCmd);
d->m_cmdmap[*it] = xmlCmd;
@@ -620,16 +620,16 @@ void KXmlCommandManager::preload()
}
}
-QStringList KXmlCommandManager::commandList()
+TQStringList KXmlCommandManager::commandList()
{
if (d->m_cmdlist.isEmpty())
{
QStringList dirs = KGlobal::dirs()->findDirs("data", "kdeprint/filters/");
- for (QStringList::ConstIterator it=dirs.begin(); it!=dirs.end(); ++it)
+ for (TQStringList::ConstIterator it=dirs.begin(); it!=dirs.end(); ++it)
{
- QStringList list = QDir(*it).entryList("*.desktop", QDir::Files, QDir::Unsorted);
- for (QStringList::ConstIterator it2=list.begin(); it2!=list.end(); ++it2)
+ QStringList list = TQDir(*it).entryList("*.desktop", TQDir::Files, TQDir::Unsorted);
+ for (TQStringList::ConstIterator it2=list.begin(); it2!=list.end(); ++it2)
{
QString cmdName = (*it2).left((*it2).length()-8);
if (d->m_cmdlist.find(cmdName) == d->m_cmdlist.end())
@@ -643,43 +643,43 @@ QStringList KXmlCommandManager::commandList()
return d->m_cmdlist;
}
-QStringList KXmlCommandManager::commandListWithDescription()
+TQStringList KXmlCommandManager::commandListWithDescription()
{
preload();
QStringList l;
- for (QMap<QString,KXmlCommand*>::ConstIterator it=d->m_cmdmap.begin(); it!=d->m_cmdmap.end(); ++it)
+ for (TQMap<TQString,KXmlCommand*>::ConstIterator it=d->m_cmdmap.begin(); it!=d->m_cmdmap.end(); ++it)
l << (*it)->name() << (*it)->description();
return l;
}
-QString KXmlCommandManager::selectCommand(QWidget *parent)
+TQString KXmlCommandManager::selectCommand(TQWidget *parent)
{
KLibrary *lib = KLibLoader::self()->library( "libkdeprint_management_module" );
if ( !lib )
{
KMessageBox::error( parent, i18n( "Unable to load KDE print management library: %1" ).arg( KLibLoader::self()->lastErrorMessage() ) );
- return QString::null;
+ return TQString::null;
}
else
{
- QString ( *func )( QWidget* ) = ( QString( * )( QWidget* ) )lib->symbol( "select_command" );
+ TQString ( *func )( TQWidget* ) = ( TQString( * )( TQWidget* ) )lib->symbol( "select_command" );
if ( !func )
{
KMessageBox::error( parent, i18n( "Unable to find wizard object in management library." ) );
- return QString::null;
+ return TQString::null;
}
else
return func( parent );
}
}
-KXmlCommand* KXmlCommandManager::command(const QString& xmlId) const
+KXmlCommand* KXmlCommandManager::command(const TQString& xmlId) const
{
return (d->m_cmdmap.contains(xmlId) ? d->m_cmdmap[xmlId] : 0);
}
-int KXmlCommandManager::insertCommand(QStringList& list, const QString& filtername, bool defaultToStart)
+int KXmlCommandManager::insertCommand(TQStringList& list, const TQString& filtername, bool defaultToStart)
{
preload();
@@ -688,7 +688,7 @@ int KXmlCommandManager::insertCommand(QStringList& list, const QString& filterna
if (f1 && f1->inputMimeTypes().count() > 0)
{
QString mimetype = f1->inputMimeTypes()[0];
- for (QStringList::Iterator it=list.begin(); it!=list.end(); ++it, pos++)
+ for (TQStringList::Iterator it=list.begin(); it!=list.end(); ++it, pos++)
{
f2 = command(*it);
if (!f2)
@@ -721,7 +721,7 @@ int KXmlCommandManager::insertCommand(QStringList& list, const QString& filterna
return pos;
}
-QStringList KXmlCommandManager::autoConvert(const QString& mimesrc, const QString& mimedest)
+TQStringList KXmlCommandManager::autoConvert(const TQString& mimesrc, const TQString& mimedest)
{
QStringList chain;
uint score(0);
@@ -730,8 +730,8 @@ QStringList KXmlCommandManager::autoConvert(const QString& mimesrc, const QStrin
if (d->m_mimemap.contains(mimesrc))
{
- const QValueList<KXmlCommand*> l = d->m_mimemap[mimesrc];
- for (QValueList<KXmlCommand*>::ConstIterator it=l.begin(); it!=l.end(); ++it)
+ const TQValueList<KXmlCommand*> l = d->m_mimemap[mimesrc];
+ for (TQValueList<KXmlCommand*>::ConstIterator it=l.begin(); it!=l.end(); ++it)
{
// check filter availability
if (!KdeprintChecker::check((*it)->requirements()))
@@ -740,7 +740,7 @@ QStringList KXmlCommandManager::autoConvert(const QString& mimesrc, const QStrin
// direct filter: shortest path => return immediately
if ((*it)->mimeType() == mimedest)
{
- chain = QStringList((*it)->name());
+ chain = TQStringList((*it)->name());
break;
}
// non direct filter: find the shortest way between
@@ -769,7 +769,7 @@ QStringList KXmlCommandManager::autoConvert(const QString& mimesrc, const QStrin
return chain;
}
-bool KXmlCommandManager::checkCommand(const QString& xmlId, int inputCheck, int outputCheck, QString *msg)
+bool KXmlCommandManager::checkCommand(const TQString& xmlId, int inputCheck, int outputCheck, TQString *msg)
{
KXmlCommand *xmlCmd = command(xmlId);
QString errmsg;
@@ -812,7 +812,7 @@ bool KXmlCommandManager::checkCommand(const QString& xmlId, int inputCheck, int
return status;
}
-bool KXmlCommandManager::configure(KXmlCommand *xmlCmd, QWidget *parent)
+bool KXmlCommandManager::configure(KXmlCommand *xmlCmd, TQWidget *parent)
{
if (xmlCmd->driver())
{
diff --git a/kdeprint/kxmlcommand.h b/kdeprint/kxmlcommand.h
index 66a3a14c3..c6e4c25fc 100644
--- a/kdeprint/kxmlcommand.h
+++ b/kdeprint/kxmlcommand.h
@@ -20,9 +20,9 @@
#ifndef KXMLCOMMAND_H
#define KXMLCOMMAND_H
-#include <qdom.h>
-#include <qmap.h>
-#include <qobject.h>
+#include <tqdom.h>
+#include <tqmap.h>
+#include <tqobject.h>
#include <kdelibs_export.h>
@@ -37,31 +37,31 @@ class KDEPRINT_EXPORT KXmlCommand : public QObject
public:
~KXmlCommand();
- QString name() const;
- void setName(const QString&);
- QString command();
- void setCommand(const QString&);
+ TQString name() const;
+ void setName(const TQString&);
+ TQString command();
+ void setCommand(const TQString&);
DrMain* driver();
DrMain* takeDriver();
void setDriver(DrMain*);
- QString io(bool io_input = true, bool io_pipe = false);
- void setIo(const QString&, bool io_input = true, bool io_pipe = false);
- QString description();
- void setDescription(const QString&);
- QString mimeType();
- void setMimeType(const QString&);
- bool acceptMimeType(const QString&);
- QStringList inputMimeTypes();
- void setInputMimeTypes(const QStringList&);
- QStringList requirements();
- void setRequirements(const QStringList&);
- QString comment();
- void setComment( const QString& );
+ TQString io(bool io_input = true, bool io_pipe = false);
+ void setIo(const TQString&, bool io_input = true, bool io_pipe = false);
+ TQString description();
+ void setDescription(const TQString&);
+ TQString mimeType();
+ void setMimeType(const TQString&);
+ bool acceptMimeType(const TQString&);
+ TQStringList inputMimeTypes();
+ void setInputMimeTypes(const TQStringList&);
+ TQStringList requirements();
+ void setRequirements(const TQStringList&);
+ TQString comment();
+ void setComment( const TQString& );
bool isValid();
- QString buildCommand(const QMap<QString,QString>& opts, bool pipein = true, bool pipeout = true);
- void setOptions(const QMap<QString,QString>& opts);
- void getOptions(QMap<QString,QString>& opts, bool incldef = false);
+ TQString buildCommand(const TQMap<TQString,TQString>& opts, bool pipein = true, bool pipeout = true);
+ void setOptions(const TQMap<TQString,TQString>& opts);
+ void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false);
protected:
void init();
@@ -70,16 +70,16 @@ protected:
void loadDesktop();
void saveDesktop();
void check(bool use_xml = false);
- DrGroup* parseGroup(const QDomElement& e, DrGroup *grp = 0);
- DrBase* parseArgument(const QDomElement& e);
- void parseIO(const QDomElement& e, int n);
- QDomElement createIO(QDomDocument&, int, const QString&);
- QDomElement createGroup(QDomDocument&, DrGroup*);
- QDomElement createElement(QDomDocument&, DrBase*);
+ DrGroup* parseGroup(const TQDomElement& e, DrGroup *grp = 0);
+ DrBase* parseArgument(const TQDomElement& e);
+ void parseIO(const TQDomElement& e, int n);
+ TQDomElement createIO(TQDomDocument&, int, const TQString&);
+ TQDomElement createGroup(TQDomDocument&, DrGroup*);
+ TQDomElement createElement(TQDomDocument&, DrBase*);
// use protected constructor to only allow the manager to
// create KXmlCommand object.
- KXmlCommand(const QString& xmlId = QString::null);
+ KXmlCommand(const TQString& xmlId = TQString::null);
private:
class KXmlCommandPrivate;
@@ -94,23 +94,23 @@ public:
KXmlCommandManager();
~KXmlCommandManager();
- KXmlCommand* loadCommand(const QString& xmlId, bool check = false);
+ KXmlCommand* loadCommand(const TQString& xmlId, bool check = false);
void saveCommand(KXmlCommand *xmlCmd);
- QStringList commandList();
- QStringList commandListWithDescription();
- QString selectCommand(QWidget *parent = 0);
-
- QStringList autoConvert(const QString& mimesrc, const QString& mimedest);
- int insertCommand(QStringList& list, const QString& filtername, bool defaultToStart = true);
- bool checkCommand(const QString&, int inputCheck = Advanced, int outputCheck = Advanced, QString *msg = 0);
- bool configure(KXmlCommand*, QWidget *parent = 0);
+ TQStringList commandList();
+ TQStringList commandListWithDescription();
+ TQString selectCommand(TQWidget *parent = 0);
+
+ TQStringList autoConvert(const TQString& mimesrc, const TQString& mimedest);
+ int insertCommand(TQStringList& list, const TQString& filtername, bool defaultToStart = true);
+ bool checkCommand(const TQString&, int inputCheck = Advanced, int outputCheck = Advanced, TQString *msg = 0);
+ bool configure(KXmlCommand*, TQWidget *parent = 0);
void cleanUp();
static KXmlCommandManager* self();
protected:
void preload();
- KXmlCommand* command(const QString&) const;
+ KXmlCommand* command(const TQString&) const;
private:
class KXmlCommandManagerPrivate;
diff --git a/kdeprint/lpd/gschecker.cpp b/kdeprint/lpd/gschecker.cpp
index a4142abbb..8f23fcc32 100644
--- a/kdeprint/lpd/gschecker.cpp
+++ b/kdeprint/lpd/gschecker.cpp
@@ -20,15 +20,15 @@
#include "gschecker.h"
#include "kpipeprocess.h"
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
-GsChecker::GsChecker(QObject *parent, const char *name)
-: QObject(parent,name)
+GsChecker::GsChecker(TQObject *parent, const char *name)
+: TQObject(parent,name)
{
}
-bool GsChecker::checkGsDriver(const QString& name)
+bool GsChecker::checkGsDriver(const TQString& name)
{
if (m_driverlist.count() == 0)
loadDriverList();
@@ -53,9 +53,9 @@ void GsChecker::loadDriverList()
else
buffer.append(line).append(" ");
}
- else if (line.startsWith(QString::fromLatin1("Available devices:")))
+ else if (line.startsWith(TQString::fromLatin1("Available devices:")))
ok = true;
}
- m_driverlist = QStringList::split(' ',buffer,false);
+ m_driverlist = TQStringList::split(' ',buffer,false);
}
}
diff --git a/kdeprint/lpd/gschecker.h b/kdeprint/lpd/gschecker.h
index d7c040315..65f247380 100644
--- a/kdeprint/lpd/gschecker.h
+++ b/kdeprint/lpd/gschecker.h
@@ -20,15 +20,15 @@
#ifndef GSCHECKER_H
#define GSCHECKER_H
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qobject.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqobject.h>
class GsChecker : public QObject
{
public:
- GsChecker(QObject *parent = 0, const char *name = 0);
- bool checkGsDriver(const QString& name);
+ GsChecker(TQObject *parent = 0, const char *name = 0);
+ bool checkGsDriver(const TQString& name);
protected:
void loadDriverList();
diff --git a/kdeprint/lpd/klpdprinterimpl.cpp b/kdeprint/lpd/klpdprinterimpl.cpp
index ad8912c47..8a04927e6 100644
--- a/kdeprint/lpd/klpdprinterimpl.cpp
+++ b/kdeprint/lpd/klpdprinterimpl.cpp
@@ -20,11 +20,11 @@
#include "klpdprinterimpl.h"
#include "kprinter.h"
-#include <qfile.h>
+#include <tqfile.h>
#include <kstandarddirs.h>
#include <klocale.h>
-KLpdPrinterImpl::KLpdPrinterImpl(QObject *parent, const char *name)
+KLpdPrinterImpl::KLpdPrinterImpl(TQObject *parent, const char *name)
: KPrinterImpl(parent,name)
{
}
@@ -33,12 +33,12 @@ KLpdPrinterImpl::~KLpdPrinterImpl()
{
}
-QString KLpdPrinterImpl::executable()
+TQString KLpdPrinterImpl::executable()
{
return KStandardDirs::findExe("lpr");
}
-bool KLpdPrinterImpl::setupCommand(QString& cmd, KPrinter *printer)
+bool KLpdPrinterImpl::setupCommand(TQString& cmd, KPrinter *printer)
{
QString exestr = executable();
if (exestr.isEmpty())
@@ -46,6 +46,6 @@ bool KLpdPrinterImpl::setupCommand(QString& cmd, KPrinter *printer)
printer->setErrorMessage(i18n("The <b>%1</b> executable could not be found in your path. Check your installation.").arg("lpr"));
return false;
}
- cmd = QString::fromLatin1("%1 -P %2 '-#%3'").arg(exestr).arg(quote(printer->printerName())).arg(printer->numCopies());
+ cmd = TQString::fromLatin1("%1 -P %2 '-#%3'").arg(exestr).arg(quote(printer->printerName())).arg(printer->numCopies());
return true;
}
diff --git a/kdeprint/lpd/klpdprinterimpl.h b/kdeprint/lpd/klpdprinterimpl.h
index ea88c1138..654c2606e 100644
--- a/kdeprint/lpd/klpdprinterimpl.h
+++ b/kdeprint/lpd/klpdprinterimpl.h
@@ -25,13 +25,13 @@
class KLpdPrinterImpl : public KPrinterImpl
{
public:
- KLpdPrinterImpl(QObject *parent = 0, const char *name = 0);
+ KLpdPrinterImpl(TQObject *parent = 0, const char *name = 0);
~KLpdPrinterImpl();
- bool setupCommand(QString&, KPrinter*);
+ bool setupCommand(TQString&, KPrinter*);
protected:
- QString executable();
+ TQString executable();
};
#endif
diff --git a/kdeprint/lpd/kmlpdfactory.cpp b/kdeprint/lpd/kmlpdfactory.cpp
index 3285a32a2..a1882c3ca 100644
--- a/kdeprint/lpd/kmlpdfactory.cpp
+++ b/kdeprint/lpd/kmlpdfactory.cpp
@@ -30,7 +30,7 @@ extern "C"
}
};
-KLpdFactory::KLpdFactory(QObject *parent, const char *name)
+KLpdFactory::KLpdFactory(TQObject *parent, const char *name)
: KLibFactory(parent,name)
{
}
@@ -39,7 +39,7 @@ KLpdFactory::~KLpdFactory()
{
}
-QObject* KLpdFactory::createObject(QObject *parent, const char *name, const char *classname, const QStringList&)
+TQObject* KLpdFactory::createObject(TQObject *parent, const char *name, const char *classname, const TQStringList&)
{
if (strcmp(classname,"KMManager") == 0)
return new KMLpdManager(parent,name);
diff --git a/kdeprint/lpd/kmlpdfactory.h b/kdeprint/lpd/kmlpdfactory.h
index 2d4dc7efb..6e6c2fda8 100644
--- a/kdeprint/lpd/kmlpdfactory.h
+++ b/kdeprint/lpd/kmlpdfactory.h
@@ -25,11 +25,11 @@
class KLpdFactory : public KLibFactory
{
public:
- KLpdFactory(QObject *parent = 0, const char *name = 0);
+ KLpdFactory(TQObject *parent = 0, const char *name = 0);
virtual ~KLpdFactory();
protected:
- QObject* createObject(QObject *parent = 0, const char *name = 0, const char *className = "QObject", const QStringList& args = QStringList());
+ TQObject* createObject(TQObject *parent = 0, const char *name = 0, const char *className = "TQObject", const TQStringList& args = TQStringList());
};
#endif
diff --git a/kdeprint/lpd/kmlpdmanager.cpp b/kdeprint/lpd/kmlpdmanager.cpp
index a19cd3f5f..95623a56f 100644
--- a/kdeprint/lpd/kmlpdmanager.cpp
+++ b/kdeprint/lpd/kmlpdmanager.cpp
@@ -26,11 +26,11 @@
#include "gschecker.h"
#include "kpipeprocess.h"
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qtextstream.h>
-#include <qmap.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqtextstream.h>
+#include <tqmap.h>
+#include <tqregexp.h>
#include <klocale.h>
#include <kstandarddirs.h>
@@ -45,11 +45,11 @@
// only there to allow testing on my system. Should be removed
// when everything has proven to be working and stable
QString lpdprefix = "";
-QString ptPrinterType(KMPrinter*);
+TQString ptPrinterType(KMPrinter*);
//************************************************************************************************
-KMLpdManager::KMLpdManager(QObject *parent, const char *name)
+KMLpdManager::KMLpdManager(TQObject *parent, const char *name)
: KMManager(parent,name)
{
m_entries.setAutoDelete(true);
@@ -63,14 +63,14 @@ KMLpdManager::~KMLpdManager()
{
}
-QString KMLpdManager::driverDbCreationProgram()
+TQString KMLpdManager::driverDbCreationProgram()
{
- return QString::fromLatin1("make_driver_db_lpd");
+ return TQString::fromLatin1("make_driver_db_lpd");
}
-QString KMLpdManager::driverDirectory()
+TQString KMLpdManager::driverDirectory()
{
- return QString::fromLatin1("/usr/lib/rhs/rhs-printfilters");
+ return TQString::fromLatin1("/usr/lib/rhs/rhs-printfilters");
}
bool KMLpdManager::completePrinter(KMPrinter *printer)
@@ -91,29 +91,29 @@ bool KMLpdManager::completePrinterShort(KMPrinter *printer)
KURL url;
if (!entry->arg("rm").isEmpty())
{
- url = QString::fromLatin1("lpd://%1/%2").arg(entry->arg("rm")).arg(entry->arg("rp"));
+ url = TQString::fromLatin1("lpd://%1/%2").arg(entry->arg("rm")).arg(entry->arg("rp"));
printer->setDescription(i18n("Remote LPD queue %1@%2").arg(entry->arg("rp")).arg(entry->arg("rm")));
}
else if (!lp.isEmpty() && lp != "/dev/null")
- url = QString::fromLatin1("parallel:%1").arg(lp);
- else if (QFile::exists(entry->arg("sd")+"/.config"))
+ url = TQString::fromLatin1("parallel:%1").arg(lp);
+ else if (TQFile::exists(entry->arg("sd")+"/.config"))
{
- QMap<QString,QString> map = loadPrinttoolCfgFile(entry->arg("sd")+"/.config");
+ TQMap<TQString,TQString> map = loadPrinttoolCfgFile(entry->arg("sd")+"/.config");
if (type == "SMB")
{
- QStringList l = QStringList::split('\\',map["share"],false);
+ QStringList l = TQStringList::split('\\',map["share"],false);
if (map["workgroup"].isEmpty())
- url = QString::fromLatin1("smb://%1/%2").arg(l[0]).arg(l[1]);
+ url = TQString::fromLatin1("smb://%1/%2").arg(l[0]).arg(l[1]);
else
- url = QString::fromLatin1("smb://%1/%2/%3").arg(map["workgroup"]).arg(l[0]).arg(l[1]);
+ url = TQString::fromLatin1("smb://%1/%2/%3").arg(map["workgroup"]).arg(l[0]).arg(l[1]);
url.setUser(map["user"]);
url.setPass(map["password"]);
}
else if (type == "DIRECT")
- url = QString::fromLatin1("socket://%1:%2").arg(map["printer_ip"]).arg(map["port"]);
+ url = TQString::fromLatin1("socket://%1:%2").arg(map["printer_ip"]).arg(map["port"]);
else if (type == "NCP")
{
- url = QString::fromLatin1("ncp://%1/%2").arg(map["server"]).arg(map["queue"]);
+ url = TQString::fromLatin1("ncp://%1/%2").arg(map["server"]).arg(map["queue"]);
url.setUser(map["user"]);
url.setPass(map["password"]);
}
@@ -146,12 +146,12 @@ bool KMLpdManager::createPrinter(KMPrinter *printer)
{
// remote lpd queue
ent->m_args["rm"] = printer->device().host();
- ent->m_args["rp"] = printer->device().path().replace("/",QString::fromLatin1(""));
+ ent->m_args["rp"] = printer->device().path().replace("/",TQString::fromLatin1(""));
ent->m_args["lpd_bounce"] = "true";
- ent->m_comment = QString::fromLatin1("##PRINTTOOL3## REMOTE");
+ ent->m_comment = TQString::fromLatin1("##PRINTTOOL3## REMOTE");
}
ent->m_args["mx"] = (printer->option("mx").isEmpty() ? "#0" : printer->option("mx"));
- ent->m_args["sh"] = QString::null;
+ ent->m_args["sh"] = TQString::null;
// create spool directory (if necessary) and update PrintcapEntry object
if (!createSpooldir(ent))
{
@@ -184,10 +184,10 @@ bool KMLpdManager::createPrinter(KMPrinter *printer)
}
// 4) change permissions of spool directory
- QCString cmd = "chmod -R o-rwx,g+rwX ";
- cmd += QFile::encodeName(KProcess::quote(ent->arg("sd")));
+ TQCString cmd = "chmod -R o-rwx,g+rwX ";
+ cmd += TQFile::encodeName(KProcess::quote(ent->arg("sd")));
cmd += "&& chown -R lp.lp ";
- cmd += QFile::encodeName(KProcess::quote(ent->arg("sd")));
+ cmd += TQFile::encodeName(KProcess::quote(ent->arg("sd")));
if (system(cmd.data()) != 0)
{
setErrorMsg(i18n("Unable to set correct permissions on spool directory %1 for printer <b>%2</b>.").arg(ent->arg("sd")).arg(ent->m_name));
@@ -208,8 +208,8 @@ bool KMLpdManager::removePrinter(KMPrinter *printer)
m_entries.insert(ent->m_name,ent);
return false;
}
- QCString cmd = "rm -rf ";
- cmd += QFile::encodeName(KProcess::quote(ent->arg("sd")));
+ TQCString cmd = "rm -rf ";
+ cmd += TQFile::encodeName(KProcess::quote(ent->arg("sd")));
system(cmd.data());
delete ent;
return true;
@@ -259,9 +259,9 @@ bool KMLpdManager::disablePrinter(KMPrinter *printer)
void KMLpdManager::listPrinters()
{
m_entries.clear();
- loadPrintcapFile(QString::fromLatin1("%1/etc/printcap").arg(lpdprefix));
+ loadPrintcapFile(TQString::fromLatin1("%1/etc/printcap").arg(lpdprefix));
- QDictIterator<PrintcapEntry> it(m_entries);
+ TQDictIterator<PrintcapEntry> it(m_entries);
for (;it.current();++it)
{
KMPrinter *printer = it.current()->createPrinter();
@@ -271,7 +271,7 @@ void KMLpdManager::listPrinters()
checkStatus();
}
-QString KMLpdManager::programName(int f)
+TQString KMLpdManager::programName(int f)
{
KConfig *conf = KMFactory::self()->printConfig();
conf->setGroup("LPD");
@@ -281,7 +281,7 @@ QString KMLpdManager::programName(int f)
case 1: return conf->readPathEntry("LpdQueue","lpq");
case 2: return conf->readPathEntry("LpdRemove","lprm");
}
- return QString::null;
+ return TQString::null;
}
void KMLpdManager::checkStatus()
@@ -312,7 +312,7 @@ void KMLpdManager::checkStatus()
bool KMLpdManager::writePrinters()
{
- if (!writePrintcapFile(QString::fromLatin1("%1/etc/printcap").arg(lpdprefix)))
+ if (!writePrintcapFile(TQString::fromLatin1("%1/etc/printcap").arg(lpdprefix)))
{
setErrorMsg(i18n("Unable to write printcap file."));
return false;
@@ -320,7 +320,7 @@ bool KMLpdManager::writePrinters()
return true;
}
-void KMLpdManager::loadPrintcapFile(const QString& filename)
+void KMLpdManager::loadPrintcapFile(const TQString& filename)
{
QFile f(filename);
if (f.exists() && f.open(IO_ReadOnly))
@@ -348,14 +348,14 @@ void KMLpdManager::loadPrintcapFile(const QString& filename)
}
}
-bool KMLpdManager::writePrintcapFile(const QString& filename)
+bool KMLpdManager::writePrintcapFile(const TQString& filename)
{
QFile f(filename);
if (f.open(IO_WriteOnly))
{
QTextStream t(&f);
t << "# File generated by KDE print (LPD plugin).\n#Don't edit by hand." << endl << endl;
- QDictIterator<PrintcapEntry> it(m_entries);
+ TQDictIterator<PrintcapEntry> it(m_entries);
for (;it.current();++it)
it.current()->writeEntry(t);
return true;
@@ -363,7 +363,7 @@ bool KMLpdManager::writePrintcapFile(const QString& filename)
return false;
}
-PrinttoolEntry* KMLpdManager::findPrinttoolEntry(const QString& name)
+PrinttoolEntry* KMLpdManager::findPrinttoolEntry(const TQString& name)
{
if (m_ptentries.count() == 0)
loadPrinttoolDb(driverDirectory()+"/printerdb");
@@ -373,7 +373,7 @@ PrinttoolEntry* KMLpdManager::findPrinttoolEntry(const QString& name)
return ent;
}
-void KMLpdManager::loadPrinttoolDb(const QString& filename)
+void KMLpdManager::loadPrinttoolDb(const TQString& filename)
{
QFile f(filename);
if (f.exists() && f.open(IO_ReadOnly))
@@ -404,7 +404,7 @@ DrMain* KMLpdManager::loadDbDriver(KMDBEntry *entry)
return NULL;
}
-PrintcapEntry* KMLpdManager::findPrintcapEntry(const QString& name)
+PrintcapEntry* KMLpdManager::findPrintcapEntry(const TQString& name)
{
PrintcapEntry *ent = m_entries.find(name);
if (!ent)
@@ -420,9 +420,9 @@ DrMain* KMLpdManager::loadPrinterDriver(KMPrinter *printer, bool config)
// check for printtool driver (only for configuration)
QString sd = entry->arg("sd"), dr(entry->comment(7));
- if (QFile::exists(sd+"/postscript.cfg") && config && !dr.isEmpty())
+ if (TQFile::exists(sd+"/postscript.cfg") && config && !dr.isEmpty())
{
- QMap<QString,QString> map = loadPrinttoolCfgFile(sd+"/postscript.cfg");
+ TQMap<TQString,TQString> map = loadPrinttoolCfgFile(sd+"/postscript.cfg");
PrinttoolEntry *ptentry = findPrinttoolEntry(dr);
if (!ptentry)
return NULL;
@@ -443,7 +443,7 @@ DrMain* KMLpdManager::loadPrinterDriver(KMPrinter *printer, bool config)
return NULL;
}
-bool KMLpdManager::checkGsDriver(const QString& gsdriver)
+bool KMLpdManager::checkGsDriver(const TQString& gsdriver)
{
if (gsdriver == "ppa" || gsdriver == "POSTSCRIPT" || gsdriver == "TEXT")
return true;
@@ -455,10 +455,10 @@ bool KMLpdManager::checkGsDriver(const QString& gsdriver)
return true;
}
-QMap<QString,QString> KMLpdManager::loadPrinttoolCfgFile(const QString& filename)
+TQMap<TQString,TQString> KMLpdManager::loadPrinttoolCfgFile(const TQString& filename)
{
QFile f(filename);
- QMap<QString,QString> map;
+ TQMap<TQString,TQString> map;
if (f.exists() && f.open(IO_ReadOnly))
{
QTextStream t(&f);
@@ -485,11 +485,11 @@ QMap<QString,QString> KMLpdManager::loadPrinttoolCfgFile(const QString& filename
return map;
}
-bool KMLpdManager::savePrinttoolCfgFile(const QString& templatefile, const QString& dirname, const QMap<QString,QString>& options)
+bool KMLpdManager::savePrinttoolCfgFile(const TQString& templatefile, const TQString& dirname, const TQMap<TQString,TQString>& options)
{
// defines input and output file
- QString fname = QFileInfo(templatefile).fileName();
- fname.replace(QRegExp("\\.in$"),QString::fromLatin1(""));
+ QString fname = TQFileInfo(templatefile).fileName();
+ fname.replace(TQRegExp("\\.in$"),TQString::fromLatin1(""));
QFile fin(templatefile);
QFile fout(dirname + "/" + fname);
if (fin.exists() && fin.open(IO_ReadOnly) && fout.open(IO_WriteOnly))
@@ -508,7 +508,7 @@ bool KMLpdManager::savePrinttoolCfgFile(const QString& templatefile, const QStri
if (line.startsWith("export "))
{
tout << "export ";
- line.replace(0,7,QString::fromLatin1(""));
+ line.replace(0,7,TQString::fromLatin1(""));
}
if ((p=line.find('=')) != -1)
{
@@ -533,7 +533,7 @@ bool KMLpdManager::savePrinterDriver(KMPrinter *printer, DrMain *driver)
if (driver->get("drtype") == "printtool" && !spooldir.isEmpty())
{
- QMap<QString,QString> options;
+ TQMap<TQString,TQString> options;
driver->getOptions(options,true);
// add some standard options
options["DESIRED_TO"] = "ps";
@@ -543,15 +543,15 @@ bool KMLpdManager::savePrinterDriver(KMPrinter *printer, DrMain *driver)
return false;
QString resol(options["RESOLUTION"]), color(options["COLOR"]);
// update entry comment to make printtool happy and save printcap file
- ent->m_comment = QString::fromLatin1("##PRINTTOOL3## %1 %2 %3 %4 {} {%5} %6 {}").arg(options["PRINTER_TYPE"]).arg(options["GSDEVICE"]).arg((resol.isEmpty() ? QString::fromLatin1("NAxNA") : resol)).arg(options["PAPERSIZE"]).arg(driver->name()).arg((color.isEmpty() ? QString::fromLatin1("Default") : color.right(color.length()-15)));
- ent->m_args["if"] = spooldir+QString::fromLatin1("/filter");
+ ent->m_comment = TQString::fromLatin1("##PRINTTOOL3## %1 %2 %3 %4 {} {%5} %6 {}").arg(options["PRINTER_TYPE"]).arg(options["GSDEVICE"]).arg((resol.isEmpty() ? TQString::fromLatin1("NAxNA") : resol)).arg(options["PAPERSIZE"]).arg(driver->name()).arg((color.isEmpty() ? TQString::fromLatin1("Default") : color.right(color.length()-15)));
+ ent->m_args["if"] = spooldir+TQString::fromLatin1("/filter");
if (!writePrinters())
return false;
// write various driver files using templates
- QCString cmd = "cp ";
- cmd += QFile::encodeName(KProcess::quote(driverDirectory()+"/master-filter"));
+ TQCString cmd = "cp ";
+ cmd += TQFile::encodeName(KProcess::quote(driverDirectory()+"/master-filter"));
cmd += " ";
- cmd += QFile::encodeName(KProcess::quote(spooldir + "/filter"));
+ cmd += TQFile::encodeName(KProcess::quote(spooldir + "/filter"));
if (system(cmd.data()) == 0 &&
savePrinttoolCfgFile(driverDirectory()+"/general.cfg.in",spooldir,options) &&
savePrinttoolCfgFile(driverDirectory()+"/postscript.cfg.in",spooldir,options) &&
@@ -566,11 +566,11 @@ bool KMLpdManager::createPrinttoolEntry(KMPrinter *printer, PrintcapEntry *entry
{
KURL dev(printer->device());
QString prot = dev.protocol(), sd(entry->arg("sd"));
- entry->m_comment = QString::fromLatin1("##PRINTTOOL3## %1").arg(ptPrinterType(printer));
+ entry->m_comment = TQString::fromLatin1("##PRINTTOOL3## %1").arg(ptPrinterType(printer));
if (prot == "smb" || prot == "ncp" || prot == "socket")
{
- entry->m_args["af"] = sd+QString::fromLatin1("/acct");
- QFile f(sd+QString::fromLatin1("/.config"));
+ entry->m_args["af"] = sd+TQString::fromLatin1("/acct");
+ QFile f(sd+TQString::fromLatin1("/.config"));
if (f.open(IO_WriteOnly))
{
QTextStream t(&f);
@@ -578,11 +578,11 @@ bool KMLpdManager::createPrinttoolEntry(KMPrinter *printer, PrintcapEntry *entry
{
t << "printer_ip=" << dev.host() << endl;
t << "port=" << dev.port() << endl;
- entry->m_args["if"] = driverDirectory()+QString::fromLatin1("/directprint");
+ entry->m_args["if"] = driverDirectory()+TQString::fromLatin1("/directprint");
}
else if (prot == "smb")
{
- QStringList l = QStringList::split('/',dev.path(),false);
+ QStringList l = TQStringList::split('/',dev.path(),false);
if (l.count() == 2)
{
t << "share='\\\\" << l[0] << '\\' << l[1] << '\'' << endl;
@@ -594,20 +594,20 @@ bool KMLpdManager::createPrinttoolEntry(KMPrinter *printer, PrintcapEntry *entry
t << "hostip=" << endl;
t << "user='" << dev.user() << '\'' << endl;
t << "password='" << dev.pass() << '\'' << endl;
- t << "workgroup='" << (l.count() == 2 ? dev.host() : QString::fromLatin1("")) << '\'' << endl;
- entry->m_args["if"] = driverDirectory()+QString::fromLatin1("/smbprint");
+ t << "workgroup='" << (l.count() == 2 ? dev.host() : TQString::fromLatin1("")) << '\'' << endl;
+ entry->m_args["if"] = driverDirectory()+TQString::fromLatin1("/smbprint");
}
else if (prot == "ncp")
{
t << "server=" << dev.host() << endl;
- t << "queue=" << dev.path().replace("/",QString::fromLatin1("")) << endl;
+ t << "queue=" << dev.path().replace("/",TQString::fromLatin1("")) << endl;
t << "user=" << dev.user() << endl;
t << "password=" << dev.pass() << endl;
- entry->m_args["if"] = driverDirectory()+QString::fromLatin1("/ncpprint");
+ entry->m_args["if"] = driverDirectory()+TQString::fromLatin1("/ncpprint");
}
}
else return false;
- entry->m_args["lp"] = QString::fromLatin1("/dev/null");
+ entry->m_args["lp"] = TQString::fromLatin1("/dev/null");
}
else if (prot != "lpd")
entry->m_args["lp"] = dev.path();
@@ -618,14 +618,14 @@ bool KMLpdManager::createSpooldir(PrintcapEntry *entry)
{
// first check if it has a "sd" defined
if (entry->arg("sd").isEmpty())
- entry->m_args["sd"] = QString::fromLatin1("/var/spool/lpd/")+entry->m_name;
+ entry->m_args["sd"] = TQString::fromLatin1("/var/spool/lpd/")+entry->m_name;
QString sd = entry->arg("sd");
if (!KStandardDirs::exists(sd))
{
if (!KStandardDirs::makeDir(sd,0750))
return false;
struct passwd *lp_pw = getpwnam("lp");
- if (lp_pw && chown(QFile::encodeName(sd),lp_pw->pw_uid,lp_pw->pw_gid) != 0)
+ if (lp_pw && chown(TQFile::encodeName(sd),lp_pw->pw_uid,lp_pw->pw_gid) != 0)
return false;
}
return true;
@@ -639,7 +639,7 @@ bool KMLpdManager::validateDbDriver(KMDBEntry *entry)
//************************************************************************************************
-QString ptPrinterType(KMPrinter *p)
+TQString ptPrinterType(KMPrinter *p)
{
QString type, prot = p->device().protocol();
if (prot == "lpd") type = "REMOTE";
diff --git a/kdeprint/lpd/kmlpdmanager.h b/kdeprint/lpd/kmlpdmanager.h
index e38fdb6aa..0af2d1e15 100644
--- a/kdeprint/lpd/kmlpdmanager.h
+++ b/kdeprint/lpd/kmlpdmanager.h
@@ -21,7 +21,7 @@
#define KMLPDMANAGER_H
#include "kmmanager.h"
-#include <qdict.h>
+#include <tqdict.h>
class PrintcapEntry;
class PrinttoolEntry;
@@ -30,7 +30,7 @@ class GsChecker;
class KMLpdManager : public KMManager
{
public:
- KMLpdManager(QObject *parent = 0, const char *name = 0);
+ KMLpdManager(TQObject *parent = 0, const char *name = 0);
~KMLpdManager();
bool completePrinterShort(KMPrinter*);
@@ -41,8 +41,8 @@ public:
bool disablePrinter(KMPrinter*);
// Driver DB functions
- QString driverDbCreationProgram();
- QString driverDirectory();
+ TQString driverDbCreationProgram();
+ TQString driverDirectory();
// Driver loading functions
DrMain* loadDbDriver(KMDBEntry*);
@@ -53,23 +53,23 @@ public:
protected:
void listPrinters();
bool writePrinters();
- void loadPrintcapFile(const QString& filename);
- bool writePrintcapFile(const QString& filename);
- void loadPrinttoolDb(const QString& filename);
- QMap<QString,QString> loadPrinttoolCfgFile(const QString& filename);
- bool savePrinttoolCfgFile(const QString& templatefile, const QString& dirname, const QMap<QString,QString>& options);
- bool checkGsDriver(const QString& gsdriver);
+ void loadPrintcapFile(const TQString& filename);
+ bool writePrintcapFile(const TQString& filename);
+ void loadPrinttoolDb(const TQString& filename);
+ TQMap<TQString,TQString> loadPrinttoolCfgFile(const TQString& filename);
+ bool savePrinttoolCfgFile(const TQString& templatefile, const TQString& dirname, const TQMap<TQString,TQString>& options);
+ bool checkGsDriver(const TQString& gsdriver);
bool createSpooldir(PrintcapEntry*);
bool createPrinttoolEntry(KMPrinter*, PrintcapEntry*);
- PrintcapEntry* findPrintcapEntry(const QString& name);
- PrinttoolEntry* findPrinttoolEntry(const QString& name);
- QString programName(int);
+ PrintcapEntry* findPrintcapEntry(const TQString& name);
+ PrinttoolEntry* findPrinttoolEntry(const TQString& name);
+ TQString programName(int);
void checkStatus();
bool enablePrinter(KMPrinter*, bool);
private:
- QDict<PrintcapEntry> m_entries;
- QDict<PrinttoolEntry> m_ptentries;
+ TQDict<PrintcapEntry> m_entries;
+ TQDict<PrinttoolEntry> m_ptentries;
GsChecker *m_gschecker;
};
diff --git a/kdeprint/lpd/kmlpduimanager.cpp b/kdeprint/lpd/kmlpduimanager.cpp
index 911f96b12..be243c688 100644
--- a/kdeprint/lpd/kmlpduimanager.cpp
+++ b/kdeprint/lpd/kmlpduimanager.cpp
@@ -26,10 +26,10 @@
#include "kmpropbackend.h"
#include "kmpropdriver.h"
-#include <qfile.h>
+#include <tqfile.h>
#include <klocale.h>
-KMLpdUiManager::KMLpdUiManager(QObject *parent, const char *name)
+KMLpdUiManager::KMLpdUiManager(TQObject *parent, const char *name)
: KMUiManager(parent,name)
{
}
@@ -48,9 +48,9 @@ void KMLpdUiManager::setupWizard(KMWizard *wizard)
backend->addBackend(KMWizard::File,i18n("File printer (print to file)"),true);
KMManager *mgr = KMFactory::self()->manager();
- if (QFile::exists(mgr->driverDirectory()+"/smbprint")) backend->enableBackend(KMWizard::SMB,true);
- if (QFile::exists(mgr->driverDirectory()+"/directprint")) backend->enableBackend(KMWizard::TCP,true);
- if (QFile::exists(mgr->driverDirectory()+"/ncpprint")) backend->enableBackend(KMWizard::Custom+1,true);
+ if (TQFile::exists(mgr->driverDirectory()+"/smbprint")) backend->enableBackend(KMWizard::SMB,true);
+ if (TQFile::exists(mgr->driverDirectory()+"/directprint")) backend->enableBackend(KMWizard::TCP,true);
+ if (TQFile::exists(mgr->driverDirectory()+"/ncpprint")) backend->enableBackend(KMWizard::Custom+1,true);
}
void KMLpdUiManager::setupPropertyPages(KMPropertyPage *p)
diff --git a/kdeprint/lpd/kmlpduimanager.h b/kdeprint/lpd/kmlpduimanager.h
index df3fb4561..0483df181 100644
--- a/kdeprint/lpd/kmlpduimanager.h
+++ b/kdeprint/lpd/kmlpduimanager.h
@@ -25,7 +25,7 @@
class KMLpdUiManager : public KMUiManager
{
public:
- KMLpdUiManager(QObject *parent = 0, const char *name = 0);
+ KMLpdUiManager(TQObject *parent = 0, const char *name = 0);
~KMLpdUiManager();
void setupWizard(KMWizard*);
diff --git a/kdeprint/lpd/lpdtools.cpp b/kdeprint/lpd/lpdtools.cpp
index bba934e61..3b1651337 100644
--- a/kdeprint/lpd/lpdtools.cpp
+++ b/kdeprint/lpd/lpdtools.cpp
@@ -21,7 +21,7 @@
#include "driver.h"
#include "kmprinter.h"
-#include <qfile.h>
+#include <tqfile.h>
#include <klocale.h>
static const char *pt_pagesize[] = {
@@ -53,7 +53,7 @@ void setupBooleanOption(DrBooleanOption *opt)
}
}
-QString nextWord(const QString& s, int& pos)
+TQString nextWord(const TQString& s, int& pos)
{
int p1(pos), p2(0);
while (s[p1].isSpace() && p1 < (int)s.length()) p1++;
@@ -73,9 +73,9 @@ QString nextWord(const QString& s, int& pos)
//************************************************************************************************
-bool PrintcapEntry::readLine(const QString& line)
+bool PrintcapEntry::readLine(const TQString& line)
{
- QStringList l = QStringList::split(':',line,false);
+ QStringList l = TQStringList::split(':',line,false);
if (l.count() > 0)
{
m_name = l[0];
@@ -97,12 +97,12 @@ bool PrintcapEntry::readLine(const QString& line)
return false;
}
-void PrintcapEntry::writeEntry(QTextStream& t)
+void PrintcapEntry::writeEntry(TQTextStream& t)
{
if (m_comment.isEmpty()) t << "# Entry for printer " << m_name << endl;
else t << m_comment << endl;
t << m_name << ":";
- for (QMap<QString,QString>::ConstIterator it=m_args.begin(); it!=m_args.end(); ++it)
+ for (TQMap<TQString,TQString>::ConstIterator it=m_args.begin(); it!=m_args.end(); ++it)
{
t << "\\\n\t:" << it.key();
if (!it.data().isEmpty())
@@ -112,7 +112,7 @@ void PrintcapEntry::writeEntry(QTextStream& t)
t << endl << endl;
}
-QString PrintcapEntry::comment(int index)
+TQString PrintcapEntry::comment(int index)
{
QString w;
if (m_comment.startsWith("##PRINTTOOL3##"))
@@ -129,7 +129,7 @@ KMPrinter* PrintcapEntry::createPrinter()
KMPrinter *printer = new KMPrinter();
printer->setName(m_name);
printer->setPrinterName(m_name);
- printer->setInstanceName(QString::null);
+ printer->setInstanceName(TQString::null);
printer->setState(KMPrinter::Idle);
printer->setType(KMPrinter::Printer);
return printer;
@@ -137,7 +137,7 @@ KMPrinter* PrintcapEntry::createPrinter()
//************************************************************************************************
-QStringList splitPrinttoolLine(const QString& line)
+TQStringList splitPrinttoolLine(const TQString& line)
{
QStringList l;
int p = line.find(':');
@@ -164,7 +164,7 @@ QStringList splitPrinttoolLine(const QString& line)
return l;
}
-bool PrinttoolEntry::readEntry(QTextStream& t)
+bool PrinttoolEntry::readEntry(TQTextStream& t)
{
QString line;
QStringList args;
@@ -253,15 +253,15 @@ DrMain* PrinttoolEntry::createDriver()
lopt->setName("RESOLUTION");
lopt->set("text",i18n("Resolution"));
gr->addOption(lopt);
- QPtrListIterator<Resolution> it(m_resolutions);
+ TQPtrListIterator<Resolution> it(m_resolutions);
for (int i=0;it.current();++it,i++)
{
ch = new DrBase;
- ch->setName(QString::fromLatin1("%1x%2").arg(it.current()->xdpi).arg(it.current()->ydpi));
+ ch->setName(TQString::fromLatin1("%1x%2").arg(it.current()->xdpi).arg(it.current()->ydpi));
if (it.current()->comment.isEmpty())
- ch->set("text",QString::fromLatin1("%1x%2 DPI").arg(it.current()->xdpi).arg(it.current()->ydpi));
+ ch->set("text",TQString::fromLatin1("%1x%2 DPI").arg(it.current()->xdpi).arg(it.current()->ydpi));
else
- ch->set("text",QString::fromLatin1("%2x%3 DPI (%1)").arg(it.current()->comment).arg(it.current()->xdpi).arg(it.current()->ydpi));
+ ch->set("text",TQString::fromLatin1("%2x%3 DPI (%1)").arg(it.current()->comment).arg(it.current()->xdpi).arg(it.current()->ydpi));
lopt->addChoice(ch);
}
QString defval = lopt->choices()->first()->name();
@@ -276,18 +276,18 @@ DrMain* PrinttoolEntry::createDriver()
lopt->setName("COLOR");
lopt->set("text",i18n("Color depth"));
gr->addOption(lopt);
- QPtrListIterator<BitsPerPixel> it(m_depths);
+ TQPtrListIterator<BitsPerPixel> it(m_depths);
for (int i=0;it.current();++it,i++)
{
ch = new DrBase;
if (m_gsdriver != "uniprint")
- ch->setName(QString::fromLatin1("-dBitsPerPixel=%1").arg(it.current()->bpp));
+ ch->setName(TQString::fromLatin1("-dBitsPerPixel=%1").arg(it.current()->bpp));
else
ch->setName(it.current()->bpp);
if (it.current()->comment.isEmpty())
ch->set("text",it.current()->bpp);
else
- ch->set("text",QString::fromLatin1("%1 - %2").arg(it.current()->bpp).arg(it.current()->comment));
+ ch->set("text",TQString::fromLatin1("%1 - %2").arg(it.current()->bpp).arg(it.current()->comment));
lopt->addChoice(ch);
}
QString defval = lopt->choices()->first()->name();
@@ -333,7 +333,7 @@ DrMain* PrinttoolEntry::createDriver()
while (pt_nup[i] != -1)
{
ch = new DrBase();
- ch->setName(QString::number(pt_nup[i++]));
+ ch->setName(TQString::number(pt_nup[i++]));
ch->set("text",ch->name());
lopt->addChoice(ch);
}
@@ -392,7 +392,7 @@ DrMain* PrinttoolEntry::createDriver()
//************************************************************************************************
-QString getPrintcapLine(QTextStream& t, QString *lastcomment)
+TQString getPrintcapLine(TQTextStream& t, TQString *lastcomment)
{
QString line, buffer, comm;
while (!t.eof())
diff --git a/kdeprint/lpd/lpdtools.h b/kdeprint/lpd/lpdtools.h
index 2f8b8c975..3592437e6 100644
--- a/kdeprint/lpd/lpdtools.h
+++ b/kdeprint/lpd/lpdtools.h
@@ -19,10 +19,10 @@
#ifndef LPDTOOLS_H
#define LPDTOOLS_H
-#include <qstring.h>
-#include <qmap.h>
-#include <qptrlist.h>
-#include <qtextstream.h>
+#include <tqstring.h>
+#include <tqmap.h>
+#include <tqptrlist.h>
+#include <tqtextstream.h>
class KMLpdManager;
class DrMain;
@@ -32,15 +32,15 @@ class PrintcapEntry
{
friend class KMLpdManager;
public:
- bool readLine(const QString& line);
- void writeEntry(QTextStream&);
+ bool readLine(const TQString& line);
+ void writeEntry(TQTextStream&);
KMPrinter* createPrinter();
- QString arg(const QString& key) const { return m_args[key]; }
- QString comment(int i);
+ TQString arg(const TQString& key) const { return m_args[key]; }
+ TQString comment(int i);
private:
QString m_name;
QString m_comment;
- QMap<QString,QString> m_args;
+ TQMap<TQString,TQString> m_args;
};
//*****************************************************************************************************
@@ -61,16 +61,16 @@ class PrinttoolEntry
{
friend class KMLpdManager;
public:
- bool readEntry(QTextStream& t);
+ bool readEntry(TQTextStream& t);
DrMain* createDriver();
private:
QString m_name, m_gsdriver, m_description, m_about;
- QPtrList<Resolution> m_resolutions;
- QPtrList<BitsPerPixel> m_depths;
+ TQPtrList<Resolution> m_resolutions;
+ TQPtrList<BitsPerPixel> m_depths;
};
//*****************************************************************************************************
-QString getPrintcapLine(QTextStream& t, QString *lastcomment = NULL);
+TQString getPrintcapLine(TQTextStream& t, TQString *lastcomment = NULL);
#endif // LPDTOOLS_H
diff --git a/kdeprint/lpdunix/klpdunixprinterimpl.cpp b/kdeprint/lpdunix/klpdunixprinterimpl.cpp
index 51cc5145d..7a9a3ad81 100644
--- a/kdeprint/lpdunix/klpdunixprinterimpl.cpp
+++ b/kdeprint/lpdunix/klpdunixprinterimpl.cpp
@@ -20,12 +20,12 @@
#include "klpdunixprinterimpl.h"
#include "kprinter.h"
-#include <qfile.h>
+#include <tqfile.h>
#include <kstandarddirs.h>
#include <klocale.h>
#include <kmacroexpander.h>
-KLpdUnixPrinterImpl::KLpdUnixPrinterImpl(QObject *parent, const char *name, const QStringList & /*args*/)
+KLpdUnixPrinterImpl::KLpdUnixPrinterImpl(TQObject *parent, const char *name, const TQStringList & /*args*/)
: KPrinterImpl(parent,name)
{
}
@@ -34,18 +34,18 @@ KLpdUnixPrinterImpl::~KLpdUnixPrinterImpl()
{
}
-void KLpdUnixPrinterImpl::initLpPrint(QString& cmd, KPrinter *printer)
+void KLpdUnixPrinterImpl::initLpPrint(TQString& cmd, KPrinter *printer)
{
- cmd += QString::fromLatin1(" -d %1 -n%2").arg(quote(printer->printerName())).arg(printer->numCopies());
+ cmd += TQString::fromLatin1(" -d %1 -n%2").arg(quote(printer->printerName())).arg(printer->numCopies());
}
-void KLpdUnixPrinterImpl::initLprPrint(QString& cmd, KPrinter *printer)
+void KLpdUnixPrinterImpl::initLprPrint(TQString& cmd, KPrinter *printer)
{
- cmd += QString::fromLatin1(" -P %1 '-#%2'").arg(quote(printer->printerName())).arg(printer->numCopies());
+ cmd += TQString::fromLatin1(" -P %1 '-#%2'").arg(quote(printer->printerName())).arg(printer->numCopies());
}
// look for executable, starting with "lpr"
-QString KLpdUnixPrinterImpl::executable()
+TQString KLpdUnixPrinterImpl::executable()
{
QString exe = KStandardDirs::findExe("lpr");
if (exe.isEmpty())
@@ -53,9 +53,9 @@ QString KLpdUnixPrinterImpl::executable()
return exe;
}
-bool KLpdUnixPrinterImpl::setupCommand(QString& cmd, KPrinter *printer)
+bool KLpdUnixPrinterImpl::setupCommand(TQString& cmd, KPrinter *printer)
{
- QString exe = printer->option( "kde-printcommand" );
+ TQString exe = printer->option( "kde-printcommand" );
if ( exe.isEmpty() || exe == "<automatic>" )
{
exe = executable();
@@ -74,9 +74,9 @@ bool KLpdUnixPrinterImpl::setupCommand(QString& cmd, KPrinter *printer)
}
else
{
- QMap<QString,QString> map;
+ TQMap<TQString,TQString> map;
map.insert( "printer", printer->printerName() );
- map.insert( "copies", QString::number( printer->numCopies() ) );
+ map.insert( "copies", TQString::number( printer->numCopies() ) );
cmd = KMacroExpander::expandMacrosShellQuote( exe, map );
return true;
}
diff --git a/kdeprint/lpdunix/klpdunixprinterimpl.h b/kdeprint/lpdunix/klpdunixprinterimpl.h
index e3fba97a2..cc16f10f2 100644
--- a/kdeprint/lpdunix/klpdunixprinterimpl.h
+++ b/kdeprint/lpdunix/klpdunixprinterimpl.h
@@ -27,15 +27,15 @@ class KProcess;
class KLpdUnixPrinterImpl : public KPrinterImpl
{
public:
- KLpdUnixPrinterImpl(QObject *parent, const char *name, const QStringList & /*args*/);
+ KLpdUnixPrinterImpl(TQObject *parent, const char *name, const TQStringList & /*args*/);
~KLpdUnixPrinterImpl();
- bool setupCommand(QString&, KPrinter*);
+ bool setupCommand(TQString&, KPrinter*);
protected:
- void initLpPrint(QString&, KPrinter*);
- void initLprPrint(QString&, KPrinter*);
- QString executable();
+ void initLpPrint(TQString&, KPrinter*);
+ void initLprPrint(TQString&, KPrinter*);
+ TQString executable();
};
#endif
diff --git a/kdeprint/lpdunix/kmlpdunixmanager.cpp b/kdeprint/lpdunix/kmlpdunixmanager.cpp
index f19e76f8f..f288702eb 100644
--- a/kdeprint/lpdunix/kmlpdunixmanager.cpp
+++ b/kdeprint/lpdunix/kmlpdunixmanager.cpp
@@ -21,11 +21,11 @@
#include "kmfactory.h"
#include "kmprinter.h"
-#include <qfile.h>
-#include <qdir.h>
-#include <qfileinfo.h>
-#include <qtextstream.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
#include <klocale.h>
#include <kstandarddirs.h>
#include <kdebug.h>
@@ -38,22 +38,22 @@
class KTextBuffer
{
public:
- KTextBuffer(QIODevice *dev) : m_stream(dev) {}
+ KTextBuffer(TQIODevice *dev) : m_stream(dev) {}
bool eof() const { return (m_stream.eof() && m_linebuf.isEmpty()); }
- QString readLine();
- void unreadLine(const QString& l) { m_linebuf = l; }
+ TQString readLine();
+ void unreadLine(const TQString& l) { m_linebuf = l; }
private:
QTextStream m_stream;
QString m_linebuf;
};
-QString KTextBuffer::readLine()
+TQString KTextBuffer::readLine()
{
QString line;
if (!m_linebuf.isEmpty())
{
line = m_linebuf;
- m_linebuf = QString::null;
+ m_linebuf = TQString::null;
}
else
line = m_stream.readLine();
@@ -71,7 +71,7 @@ QString KTextBuffer::readLine()
//
// New entry is detected by a line which have first character different from
// '#', '|', ':'. The line is then put back in the IODevice.
-QString readLine(KTextBuffer& t)
+TQString readLine(KTextBuffer& t)
{
QString line, buffer;
bool lineContinue(false);
@@ -103,14 +103,14 @@ QString readLine(KTextBuffer& t)
}
// extact an entry (printcap-like)
-QMap<QString,QString> readEntry(KTextBuffer& t)
+TQMap<TQString,TQString> readEntry(KTextBuffer& t)
{
QString line = readLine(t);
- QMap<QString,QString> entry;
+ TQMap<TQString,TQString> entry;
if (!line.isEmpty())
{
- QStringList l = QStringList::split(':',line,false);
+ QStringList l = TQStringList::split(':',line,false);
if (l.count() > 0)
{
int p(-1);
@@ -122,14 +122,14 @@ QMap<QString,QString> readEntry(KTextBuffer& t)
if ((p=l[i].find('=')) != -1)
entry[l[i].left(p).stripWhiteSpace()] = l[i].right(l[i].length()-p-1).stripWhiteSpace();
else
- entry[l[i].stripWhiteSpace()] = QString::null;
+ entry[l[i].stripWhiteSpace()] = TQString::null;
}
}
return entry;
}
// create basic printer from entry
-KMPrinter* createPrinter(const QMap<QString,QString>& entry)
+KMPrinter* createPrinter(const TQMap<TQString,TQString>& entry)
{
KMPrinter *printer = new KMPrinter();
printer->setName(entry["printer-name"]);
@@ -138,16 +138,16 @@ KMPrinter* createPrinter(const QMap<QString,QString>& entry)
printer->setState(KMPrinter::Idle);
return printer;
}
-KMPrinter* createPrinter(const QString& prname)
+KMPrinter* createPrinter(const TQString& prname)
{
- QMap<QString,QString> map;
+ TQMap<TQString,TQString> map;
map["printer-name"] = prname;
return createPrinter(map);
}
// this function support LPRng piping feature, it defaults to
// /etc/printcap in any other cases (basic support)
-QString getPrintcapFileName()
+TQString getPrintcapFileName()
{
// check if LPRng system
QString printcap("/etc/printcap");
@@ -168,7 +168,7 @@ QString getPrintcapFileName()
if (pcentry[0] == '|')
{ // printcap through pipe
printcap = locateLocal("tmp","printcap");
- QString cmd = QString::fromLatin1("echo \"all\" | %1 > %2").arg(pcentry.mid(1)).arg(printcap);
+ QString cmd = TQString::fromLatin1("echo \"all\" | %1 > %2").arg(pcentry.mid(1)).arg(printcap);
kdDebug() << "printcap obtained through pipe" << endl << "executing: " << cmd << endl;
::system(cmd.local8Bit());
}
@@ -187,7 +187,7 @@ void KMLpdUnixManager::parseEtcPrintcap()
if (f.exists() && f.open(IO_ReadOnly))
{
KTextBuffer t(&f);
- QMap<QString,QString> entry;
+ TQMap<TQString,TQString> entry;
while (!t.eof())
{
@@ -199,12 +199,12 @@ void KMLpdUnixManager::parseEtcPrintcap()
if (entry.contains("all"))
{
// find separator
- int p = entry["all"].find(QRegExp("[^a-zA-Z0-9_\\s-]"));
+ int p = entry["all"].find(TQRegExp("[^a-zA-Z0-9_\\s-]"));
if (p != -1)
{
QChar c = entry["all"][p];
- QStringList prs = QStringList::split(c,entry["all"],false);
- for (QStringList::ConstIterator it=prs.begin(); it!=prs.end(); ++it)
+ QStringList prs = TQStringList::split(c,entry["all"],false);
+ for (TQStringList::ConstIterator it=prs.begin(); it!=prs.end(); ++it)
{
KMPrinter *printer = ::createPrinter(*it);
printer->setDescription(i18n("Description unavailable"));
@@ -227,16 +227,16 @@ void KMLpdUnixManager::parseEtcPrintcap()
}
// helper function for NIS support in Solaris-2.6 (use "ypcat printers.conf.byname")
-QString getEtcPrintersConfName()
+TQString getEtcPrintersConfName()
{
QString printersconf("/etc/printers.conf");
- if (!QFile::exists(printersconf) && !KStandardDirs::findExe( "ypcat" ).isEmpty())
+ if (!TQFile::exists(printersconf) && !KStandardDirs::findExe( "ypcat" ).isEmpty())
{
// standard file not found, try NIS
printersconf = locateLocal("tmp","printers.conf");
- QString cmd = QString::fromLatin1("ypcat printers.conf.byname > %1").arg(printersconf);
+ QString cmd = TQString::fromLatin1("ypcat printers.conf.byname > %1").arg(printersconf);
kdDebug() << "printers.conf obtained from NIS server: " << cmd << endl;
- ::system(QFile::encodeName(cmd));
+ ::system(TQFile::encodeName(cmd));
}
return printersconf;
}
@@ -248,7 +248,7 @@ void KMLpdUnixManager::parseEtcPrintersConf()
if (f.exists() && f.open(IO_ReadOnly))
{
KTextBuffer t(&f);
- QMap<QString,QString> entry;
+ TQMap<TQString,TQString> entry;
QString default_printer;
while (!t.eof())
@@ -267,7 +267,7 @@ void KMLpdUnixManager::parseEtcPrintersConf()
KMPrinter *printer = ::createPrinter(entry);
if (entry.contains("bsdaddr"))
{
- QStringList l = QStringList::split(',',entry["bsdaddr"],false);
+ QStringList l = TQStringList::split(',',entry["bsdaddr"],false);
printer->setDescription(i18n("Remote printer queue on %1").arg(l[0]));
}
else
@@ -285,7 +285,7 @@ void KMLpdUnixManager::parseEtcPrintersConf()
void KMLpdUnixManager::parseEtcLpPrinters()
{
QDir d("/etc/lp/printers");
- const QFileInfoList *prlist = d.entryInfoList(QDir::Dirs);
+ const QFileInfoList *prlist = d.entryInfoList(TQDir::Dirs);
if (!prlist)
return;
@@ -305,7 +305,7 @@ void KMLpdUnixManager::parseEtcLpPrinters()
if (line.isEmpty()) continue;
if (line.startsWith("Remote:"))
{
- QStringList l = QStringList::split(':',line,false);
+ QStringList l = TQStringList::split(':',line,false);
if (l.count() > 1) remote = l[1];
}
}
@@ -327,7 +327,7 @@ void KMLpdUnixManager::parseEtcLpPrinters()
void KMLpdUnixManager::parseEtcLpMember()
{
QDir d("/etc/lp/member");
- const QFileInfoList *prlist = d.entryInfoList(QDir::Files);
+ const QFileInfoList *prlist = d.entryInfoList(TQDir::Files);
if (!prlist)
return;
@@ -348,7 +348,7 @@ void KMLpdUnixManager::parseEtcLpMember()
void KMLpdUnixManager::parseSpoolInterface()
{
QDir d("/usr/spool/interfaces/lp");
- const QFileInfoList *prlist = d.entryInfoList(QDir::Files);
+ const QFileInfoList *prlist = d.entryInfoList(TQDir::Files);
if (!prlist)
return;
@@ -366,7 +366,7 @@ void KMLpdUnixManager::parseSpoolInterface()
line = t.readLine().stripWhiteSpace();
if (line.startsWith("HOSTNAME"))
{
- QStringList l = QStringList::split('=',line,false);
+ QStringList l = TQStringList::split('=',line,false);
if (l.count() > 1) remote = l[1];
}
}
@@ -387,7 +387,7 @@ void KMLpdUnixManager::parseSpoolInterface()
//*********************************************************************************************************
-KMLpdUnixManager::KMLpdUnixManager(QObject *parent, const char *name, const QStringList & /*args*/)
+KMLpdUnixManager::KMLpdUnixManager(TQObject *parent, const char *name, const TQStringList & /*args*/)
: KMManager(parent,name)
{
m_loaded = false;
diff --git a/kdeprint/lpdunix/kmlpdunixmanager.h b/kdeprint/lpdunix/kmlpdunixmanager.h
index 29c536a21..7abc91752 100644
--- a/kdeprint/lpdunix/kmlpdunixmanager.h
+++ b/kdeprint/lpdunix/kmlpdunixmanager.h
@@ -25,7 +25,7 @@
class KMLpdUnixManager : public KMManager
{
public:
- KMLpdUnixManager(QObject *parent, const char *name, const QStringList & /*args*/);
+ KMLpdUnixManager(TQObject *parent, const char *name, const TQStringList & /*args*/);
protected:
void listPrinters();
diff --git a/kdeprint/lpdunix/kmlpdunixuimanager.cpp b/kdeprint/lpdunix/kmlpdunixuimanager.cpp
index 20c62c845..5dc281c85 100644
--- a/kdeprint/lpdunix/kmlpdunixuimanager.cpp
+++ b/kdeprint/lpdunix/kmlpdunixuimanager.cpp
@@ -23,7 +23,7 @@
#include <klocale.h>
-KMLpdUnixUiManager::KMLpdUnixUiManager(QObject *parent, const char *name, const QStringList & /*args*/)
+KMLpdUnixUiManager::KMLpdUnixUiManager(TQObject *parent, const char *name, const TQStringList & /*args*/)
: KMUiManager(parent,name)
{
m_printdialogflags |= KMUiManager::PrintCommand;
diff --git a/kdeprint/lpdunix/kmlpdunixuimanager.h b/kdeprint/lpdunix/kmlpdunixuimanager.h
index 4882399e9..23616e511 100644
--- a/kdeprint/lpdunix/kmlpdunixuimanager.h
+++ b/kdeprint/lpdunix/kmlpdunixuimanager.h
@@ -25,7 +25,7 @@
class KMLpdUnixUiManager : public KMUiManager
{
public:
- KMLpdUnixUiManager(QObject *parent, const char *name, const QStringList & /*args*/);
+ KMLpdUnixUiManager(TQObject *parent, const char *name, const TQStringList & /*args*/);
~KMLpdUnixUiManager();
int pluginPageCap();
diff --git a/kdeprint/lpr/apshandler.cpp b/kdeprint/lpr/apshandler.cpp
index 5b7bef943..fc6ade276 100644
--- a/kdeprint/lpr/apshandler.cpp
+++ b/kdeprint/lpr/apshandler.cpp
@@ -26,10 +26,10 @@
#include "util.h"
#include "kprinter.h"
-#include <qfile.h>
-#include <qdir.h>
-#include <qtextstream.h>
-#include <qvaluestack.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqtextstream.h>
+#include <tqvaluestack.h>
#include <kstandarddirs.h>
#include <klocale.h>
#include <kdebug.h>
@@ -50,8 +50,8 @@ bool ApsHandler::validate(PrintcapEntry *entry)
KMPrinter* ApsHandler::createPrinter(PrintcapEntry *entry)
{
- entry->comment = QString::fromLatin1("# APS%1_BEGIN:printer%2").arg(m_counter).arg(m_counter);
- entry->postcomment = QString::fromLatin1("# APS%1_END - don't delete this").arg(m_counter);
+ entry->comment = TQString::fromLatin1("# APS%1_BEGIN:printer%2").arg(m_counter).arg(m_counter);
+ entry->postcomment = TQString::fromLatin1("# APS%1_END - don't delete this").arg(m_counter);
m_counter++;
return LprHandler::createPrinter(entry);
}
@@ -62,7 +62,7 @@ bool ApsHandler::completePrinter(KMPrinter *prt, PrintcapEntry *entry, bool shor
{
if (!shortmode)
{
- QMap<QString,QString> opts = loadResources(entry);
+ TQMap<TQString,TQString> opts = loadResources(entry);
if (opts.contains("PRINTER"))
{
prt->setDescription(i18n("APS Driver (%1)").arg(opts["PRINTER"]));
@@ -71,12 +71,12 @@ bool ApsHandler::completePrinter(KMPrinter *prt, PrintcapEntry *entry, bool shor
}
if (prt->device().isEmpty())
{
- QString prot;
+ TQString prot;
QString smbname(sysconfDir() + "/" + prt->printerName() + "/smbclient.conf");
QString ncpname(sysconfDir() + "/" + prt->printerName() + "/netware.conf");
- if (QFile::exists(smbname))
+ if (TQFile::exists(smbname))
{
- QMap<QString,QString> opts = loadVarFile(smbname);
+ TQMap<TQString,TQString> opts = loadVarFile(smbname);
if (opts.count() == 0)
prt->setDevice("smb://<unknown>/<unknown>");
else
@@ -90,15 +90,15 @@ bool ApsHandler::completePrinter(KMPrinter *prt, PrintcapEntry *entry, bool shor
}
prot = "smb";
}
- else if (QFile::exists(ncpname))
+ else if (TQFile::exists(ncpname))
{
- QMap<QString,QString> opts = loadVarFile(ncpname);
+ TQMap<TQString,TQString> opts = loadVarFile(ncpname);
if (opts.count() == 0)
prt->setDevice("ncp://<unknown>/<unknown>");
else
{
- QString uri = buildSmbURI(
- QString::null,
+ TQString uri = buildSmbURI(
+ TQString::null,
opts[ "NCP_SERVER" ],
opts[ "NCP_PRINTER" ],
opts[ "NCP_USER" ],
@@ -116,29 +116,29 @@ bool ApsHandler::completePrinter(KMPrinter *prt, PrintcapEntry *entry, bool shor
return false;
}
-QString ApsHandler::sysconfDir()
+TQString ApsHandler::sysconfDir()
{
- return QFile::encodeName("/etc/apsfilter");
+ return TQFile::encodeName("/etc/apsfilter");
}
-QString ApsHandler::shareDir()
+TQString ApsHandler::shareDir()
{
return driverDirectory();
}
-QString ApsHandler::driverDirInternal()
+TQString ApsHandler::driverDirInternal()
{
return locateDir("apsfilter/setup", "/usr/share:/usr/local/share:/opt/share");
}
-QMap<QString,QString> ApsHandler::loadResources(PrintcapEntry *entry)
+TQMap<TQString,TQString> ApsHandler::loadResources(PrintcapEntry *entry)
{
- return loadVarFile(sysconfDir() + "/" + (entry ? entry->name : QString::null) + "/apsfilterrc");
+ return loadVarFile(sysconfDir() + "/" + (entry ? entry->name : TQString::null) + "/apsfilterrc");
}
-QMap<QString,QString> ApsHandler::loadVarFile(const QString& filename)
+TQMap<TQString,TQString> ApsHandler::loadVarFile(const TQString& filename)
{
- QMap<QString,QString> opts;
+ TQMap<TQString,TQString> opts;
QFile f(filename);
if (f.open(IO_ReadOnly))
{
@@ -165,7 +165,7 @@ DrMain* ApsHandler::loadDriver(KMPrinter *prt, PrintcapEntry *entry, bool config
DrMain *driver = loadApsDriver(config);
if (driver /* && config */ ) // Load resources in all case, to get the correct page size
{
- QMap<QString,QString> opts = loadResources(entry);
+ TQMap<TQString,TQString> opts = loadResources(entry);
if ( !config && opts.contains( "PAPERSIZE" ) )
{
// this is needed to keep applications informed
@@ -185,7 +185,7 @@ DrMain* ApsHandler::loadDriver(KMPrinter *prt, PrintcapEntry *entry, bool config
return driver;
}
-DrMain* ApsHandler::loadDbDriver(const QString& s)
+DrMain* ApsHandler::loadDbDriver(const TQString& s)
{
int p = s.find('/');
DrMain *driver = loadApsDriver(true);
@@ -224,8 +224,8 @@ PrintcapEntry* ApsHandler::createEntry(KMPrinter *prt)
if (prot == "smb" || prot == "ncp")
{
// either "smb" or "ncp"
- QFile::remove(path + "/smbclient.conf");
- QFile::remove(path + "/netware.conf");
+ TQFile::remove(path + "/smbclient.conf");
+ TQFile::remove(path + "/netware.conf");
QFile f;
if (prot == "smb")
{
@@ -233,7 +233,7 @@ PrintcapEntry* ApsHandler::createEntry(KMPrinter *prt)
if (f.open(IO_WriteOnly))
{
QTextStream t(&f);
- QString work, server, printer, user, passwd;
+ TQString work, server, printer, user, passwd;
if ( splitSmbURI( prt->device(), work, server, printer, user, passwd ) )
{
if (work.isEmpty())
@@ -270,8 +270,8 @@ PrintcapEntry* ApsHandler::createEntry(KMPrinter *prt)
f.setName(path + "/netware.conf");
if (f.open(IO_WriteOnly))
{
- QString work, server, printer, user, passwd;
- QString uri = prt->device();
+ TQString work, server, printer, user, passwd;
+ TQString uri = prt->device();
uri.replace( 0, 3, "smb" );
if ( splitSmbURI( uri, work, server, printer, user, passwd ) )
{
@@ -297,7 +297,7 @@ PrintcapEntry* ApsHandler::createEntry(KMPrinter *prt)
}
}
// change file permissions
- ::chmod(QFile::encodeName(f.name()).data(), S_IRUSR|S_IWUSR);
+ ::chmod(TQFile::encodeName(f.name()).data(), S_IRUSR|S_IWUSR);
}
PrintcapEntry *entry = LprHandler::createEntry(prt);
if (!entry)
@@ -309,8 +309,8 @@ PrintcapEntry* ApsHandler::createEntry(KMPrinter *prt)
entry->addField("af", Field::String, sd + "/acct");
entry->addField("lf", Field::String, sd + "/log");
entry->addField("if", Field::String, sysconfDir() + "/basedir/bin/apsfilter");
- entry->comment = QString::fromLatin1("# APS%1_BEGIN:printer%2").arg(m_counter).arg(m_counter);
- entry->postcomment = QString::fromLatin1("# APS%1_END").arg(m_counter);
+ entry->comment = TQString::fromLatin1("# APS%1_BEGIN:printer%2").arg(m_counter).arg(m_counter);
+ entry->postcomment = TQString::fromLatin1("# APS%1_END").arg(m_counter);
m_counter++;
return entry;
}
@@ -328,15 +328,15 @@ bool ApsHandler::savePrinterDriver(KMPrinter *prt, PrintcapEntry *entry, DrMain
QTextStream t(&f);
t << "# File generated by KDEPrint" << endl;
t << "PRINTER='" << driver->get("gsdriver") << "'" << endl;
- QValueStack<DrGroup*> stack;
+ TQValueStack<DrGroup*> stack;
stack.push(driver);
while (stack.count() > 0)
{
DrGroup *grp = stack.pop();
- QPtrListIterator<DrGroup> git(grp->groups());
+ TQPtrListIterator<DrGroup> git(grp->groups());
for (; git.current(); ++git)
stack.push(git.current());
- QPtrListIterator<DrBase> oit(grp->options());
+ TQPtrListIterator<DrBase> oit(grp->options());
QString value;
for (; oit.current(); ++oit)
{
@@ -372,10 +372,10 @@ bool ApsHandler::savePrinterDriver(KMPrinter *prt, PrintcapEntry *entry, DrMain
bool ApsHandler::removePrinter(KMPrinter*, PrintcapEntry *entry)
{
QString path(sysconfDir() + "/" + entry->name);
- QFile::remove(path + "/smbclient.conf");
- QFile::remove(path + "/netware.conf");
- QFile::remove(path + "/apsfilterrc");
- if (!QDir(path).rmdir(path))
+ TQFile::remove(path + "/smbclient.conf");
+ TQFile::remove(path + "/netware.conf");
+ TQFile::remove(path + "/apsfilterrc");
+ if (!TQDir(path).rmdir(path))
{
manager()->setErrorMsg(i18n("Unable to remove directory %1.").arg(path));
return false;
@@ -383,11 +383,11 @@ bool ApsHandler::removePrinter(KMPrinter*, PrintcapEntry *entry)
return true;
}
-QString ApsHandler::printOptions(KPrinter *printer)
+TQString ApsHandler::printOptions(KPrinter *printer)
{
QString optstr;
- QMap<QString,QString> opts = printer->options();
- for (QMap<QString,QString>::ConstIterator it=opts.begin(); it!=opts.end(); ++it)
+ TQMap<TQString,TQString> opts = printer->options();
+ for (TQMap<TQString,TQString>::ConstIterator it=opts.begin(); it!=opts.end(); ++it)
{
if (it.key().startsWith("kde-") || it.key().startsWith("_kde-") || it.key().startsWith( "app-" ))
continue;
diff --git a/kdeprint/lpr/apshandler.h b/kdeprint/lpr/apshandler.h
index 58e6b8878..02ee79c92 100644
--- a/kdeprint/lpr/apshandler.h
+++ b/kdeprint/lpr/apshandler.h
@@ -22,7 +22,7 @@
#include "lprhandler.h"
-#include <qmap.h>
+#include <tqmap.h>
class ApsHandler : public LprHandler
{
@@ -33,21 +33,21 @@ public:
KMPrinter* createPrinter(PrintcapEntry*);
bool completePrinter(KMPrinter*, PrintcapEntry*, bool = true);
DrMain* loadDriver(KMPrinter*, PrintcapEntry*, bool = false);
- DrMain* loadDbDriver(const QString&);
+ DrMain* loadDbDriver(const TQString&);
void reset();
PrintcapEntry* createEntry(KMPrinter*);
bool savePrinterDriver(KMPrinter*, PrintcapEntry*, DrMain*, bool* = 0);
bool removePrinter(KMPrinter*, PrintcapEntry*);
- QString printOptions(KPrinter*);
+ TQString printOptions(KPrinter*);
protected:
- QString driverDirInternal();
+ TQString driverDirInternal();
private:
- QMap<QString,QString> loadResources(PrintcapEntry*);
- QMap<QString,QString> loadVarFile(const QString&);
- QString sysconfDir();
- QString shareDir();
+ TQMap<TQString,TQString> loadResources(PrintcapEntry*);
+ TQMap<TQString,TQString> loadVarFile(const TQString&);
+ TQString sysconfDir();
+ TQString shareDir();
DrMain* loadApsDriver(bool = false);
private:
diff --git a/kdeprint/lpr/editentrydialog.cpp b/kdeprint/lpr/editentrydialog.cpp
index 270b58235..6b0fb63f7 100644
--- a/kdeprint/lpr/editentrydialog.cpp
+++ b/kdeprint/lpr/editentrydialog.cpp
@@ -19,45 +19,45 @@
#include "editentrydialog.h"
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qspinbox.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qheader.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
+#include <tqspinbox.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqheader.h>
#include <klistview.h>
-#include <qlayout.h>
-#include <qwidgetstack.h>
+#include <tqlayout.h>
+#include <tqwidgetstack.h>
#include <klocale.h>
#include <kiconloader.h>
-EditEntryDialog::EditEntryDialog(PrintcapEntry *entry, QWidget *parent, const char *name)
-: KDialogBase(parent, name, true, QString::null, Ok|Cancel)
+EditEntryDialog::EditEntryDialog(PrintcapEntry *entry, TQWidget *parent, const char *name)
+: KDialogBase(parent, name, true, TQString::null, Ok|Cancel)
{
- QWidget *w = new QWidget(this);
+ QWidget *w = new TQWidget(this);
setMainWidget(w);
- QLabel *lab0 = new QLabel(i18n("Aliases:"), w);
- m_aliases = new QLineEdit(w);
+ QLabel *lab0 = new TQLabel(i18n("Aliases:"), w);
+ m_aliases = new TQLineEdit(w);
m_view = new KListView(w);
m_view->addColumn("");
m_view->header()->hide();
- m_type = new QComboBox(w);
+ m_type = new TQComboBox(w);
m_type->insertItem(i18n("String"));
m_type->insertItem(i18n("Number"));
m_type->insertItem(i18n("Boolean"));
- m_stack = new QWidgetStack(w);
- m_boolean = new QCheckBox(i18n("Enabled"), m_stack);
- m_string = new QLineEdit(m_stack);
- m_number = new QSpinBox(0, 9999, 1, m_stack);
+ m_stack = new TQWidgetStack(w);
+ m_boolean = new TQCheckBox(i18n("Enabled"), m_stack);
+ m_string = new TQLineEdit(m_stack);
+ m_number = new TQSpinBox(0, 9999, 1, m_stack);
m_stack->addWidget(m_string, 0);
m_stack->addWidget(m_boolean, 2);
m_stack->addWidget(m_number, 1);
- m_name = new QLineEdit(w);
+ m_name = new TQLineEdit(w);
- QVBoxLayout *l0 = new QVBoxLayout(w, 0, 10);
- QHBoxLayout *l1 = new QHBoxLayout(0, 0, 10);
- QHBoxLayout *l2 = new QHBoxLayout(0, 0, 5);
+ QVBoxLayout *l0 = new TQVBoxLayout(w, 0, 10);
+ QHBoxLayout *l1 = new TQHBoxLayout(0, 0, 10);
+ QHBoxLayout *l2 = new TQHBoxLayout(0, 0, 5);
l0->addLayout(l1);
l1->addWidget(lab0);
l1->addWidget(m_aliases);
@@ -72,12 +72,12 @@ EditEntryDialog::EditEntryDialog(PrintcapEntry *entry, QWidget *parent, const ch
setCaption(i18n("Printcap Entry: %1").arg(entry->name));
m_fields = entry->fields;
m_aliases->setText(entry->aliases.join("|"));
- QListViewItem *root = new QListViewItem(m_view, entry->name), *item = 0;
+ QListViewItem *root = new TQListViewItem(m_view, entry->name), *item = 0;
root->setSelectable(false);
root->setOpen(true);
root->setPixmap(0, SmallIcon("fileprint"));
- for (QMap<QString,Field>::ConstIterator it=m_fields.begin(); it!=m_fields.end(); ++it)
- item = new QListViewItem(root, item, (*it).toString(), it.key());
+ for (TQMap<TQString,Field>::ConstIterator it=m_fields.begin(); it!=m_fields.end(); ++it)
+ item = new TQListViewItem(root, item, (*it).toString(), it.key());
}
m_block = true;
@@ -86,12 +86,12 @@ EditEntryDialog::EditEntryDialog(PrintcapEntry *entry, QWidget *parent, const ch
slotTypeChanged(0);
m_block = false;
- connect(m_view, SIGNAL(selectionChanged(QListViewItem*)), SLOT(slotItemSelected(QListViewItem*)));
- connect(m_string, SIGNAL(textChanged(const QString&)), SLOT(slotChanged()));
- connect(m_boolean, SIGNAL(toggled(bool)), SLOT(slotChanged()));
- connect(m_number, SIGNAL(valueChanged(int)), SLOT(slotChanged()));
- connect(m_type, SIGNAL(activated(int)), SLOT(slotTypeChanged(int)));
- connect(m_name, SIGNAL(textChanged(const QString&)), SLOT(slotChanged()));
+ connect(m_view, TQT_SIGNAL(selectionChanged(TQListViewItem*)), TQT_SLOT(slotItemSelected(TQListViewItem*)));
+ connect(m_string, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotChanged()));
+ connect(m_boolean, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChanged()));
+ connect(m_number, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotChanged()));
+ connect(m_type, TQT_SIGNAL(activated(int)), TQT_SLOT(slotTypeChanged(int)));
+ connect(m_name, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotChanged()));
resize(500,400);
}
@@ -122,7 +122,7 @@ void EditEntryDialog::slotChanged()
}
}
-void EditEntryDialog::slotItemSelected(QListViewItem *item)
+void EditEntryDialog::slotItemSelected(TQListViewItem *item)
{
m_stack->setEnabled(item);
m_name->setEnabled(item);
@@ -144,7 +144,7 @@ void EditEntryDialog::slotItemSelected(QListViewItem *item)
void EditEntryDialog::fillEntry(PrintcapEntry *entry)
{
- entry->aliases = QStringList::split('|', m_aliases->text(), false);
+ entry->aliases = TQStringList::split('|', m_aliases->text(), false);
entry->fields = m_fields;
}
diff --git a/kdeprint/lpr/editentrydialog.h b/kdeprint/lpr/editentrydialog.h
index 906bc45db..eb861ccd7 100644
--- a/kdeprint/lpr/editentrydialog.h
+++ b/kdeprint/lpr/editentrydialog.h
@@ -35,12 +35,12 @@ class EditEntryDialog : public KDialogBase
{
Q_OBJECT
public:
- EditEntryDialog(PrintcapEntry *entry, QWidget *parent = 0, const char *name = 0);
+ EditEntryDialog(PrintcapEntry *entry, TQWidget *parent = 0, const char *name = 0);
void fillEntry(PrintcapEntry *entry);
protected slots:
- void slotItemSelected(QListViewItem*);
+ void slotItemSelected(TQListViewItem*);
void slotChanged();
void slotTypeChanged(int);
@@ -48,7 +48,7 @@ protected:
Field createField();
private:
- QMap<QString,Field> m_fields;
+ TQMap<TQString,Field> m_fields;
QLineEdit *m_name, *m_string, *m_aliases;
QCheckBox *m_boolean;
QComboBox *m_type;
diff --git a/kdeprint/lpr/klprprinterimpl.cpp b/kdeprint/lpr/klprprinterimpl.cpp
index f6f416376..1d77b166c 100644
--- a/kdeprint/lpr/klprprinterimpl.cpp
+++ b/kdeprint/lpr/klprprinterimpl.cpp
@@ -22,10 +22,10 @@
#include "kmlprmanager.h"
#include <kstandarddirs.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <stdlib.h>
-KLprPrinterImpl::KLprPrinterImpl(QObject *parent, const char *name, const QStringList & /*args*/)
+KLprPrinterImpl::KLprPrinterImpl(TQObject *parent, const char *name, const TQStringList & /*args*/)
: KPrinterImpl(parent,name)
{
m_exepath = KStandardDirs::findExe("lpr");
@@ -35,25 +35,25 @@ KLprPrinterImpl::~KLprPrinterImpl()
{
}
-bool KLprPrinterImpl::setupCommand(QString& cmd, KPrinter *printer)
+bool KLprPrinterImpl::setupCommand(TQString& cmd, KPrinter *printer)
{
// check printer object
if (!printer || m_exepath.isEmpty())
return false;
- cmd = QString::fromLatin1("%1 -P %1 '-#%1'").arg(m_exepath).arg(quote(printer->printerName())).arg( printer->numCopies() );
+ cmd = TQString::fromLatin1("%1 -P %1 '-#%1'").arg(m_exepath).arg(quote(printer->printerName())).arg( printer->numCopies() );
QString opts = static_cast<KMLprManager*>(KMManager::self())->printOptions(printer);
if (!opts.isEmpty())
cmd += (" " + opts);
return true;
}
-void KLprPrinterImpl::broadcastOption(const QString& key, const QString& value)
+void KLprPrinterImpl::broadcastOption(const TQString& key, const TQString& value)
{
KPrinterImpl::broadcastOption(key,value);
if (key == "kde-pagesize")
{
- QString pagename = QString::fromLatin1(pageSizeToPageName((KPrinter::PageSize)value.toInt()));
+ QString pagename = TQString::fromLatin1(pageSizeToPageName((KPrinter::PageSize)value.toInt()));
KPrinterImpl::broadcastOption("PageSize",pagename);
}
}
diff --git a/kdeprint/lpr/klprprinterimpl.h b/kdeprint/lpr/klprprinterimpl.h
index e603e9396..ca346ab8a 100644
--- a/kdeprint/lpr/klprprinterimpl.h
+++ b/kdeprint/lpr/klprprinterimpl.h
@@ -25,11 +25,11 @@
class KLprPrinterImpl : public KPrinterImpl
{
public:
- KLprPrinterImpl(QObject *parent, const char *name, const QStringList & /*args*/);
+ KLprPrinterImpl(TQObject *parent, const char *name, const TQStringList & /*args*/);
~KLprPrinterImpl();
- bool setupCommand(QString&, KPrinter*);
- void broadcastOption(const QString& key, const QString& value);
+ bool setupCommand(TQString&, KPrinter*);
+ void broadcastOption(const TQString& key, const TQString& value);
private:
QString m_exepath;
diff --git a/kdeprint/lpr/kmconfiglpr.cpp b/kdeprint/lpr/kmconfiglpr.cpp
index ccf6a71a1..95a2e02d4 100644
--- a/kdeprint/lpr/kmconfiglpr.cpp
+++ b/kdeprint/lpr/kmconfiglpr.cpp
@@ -20,27 +20,27 @@
#include "kmconfiglpr.h"
#include "lprsettings.h"
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qgroupbox.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqgroupbox.h>
#include <klocale.h>
#include <kconfig.h>
-KMConfigLpr::KMConfigLpr(QWidget *parent, const char *name)
+KMConfigLpr::KMConfigLpr(TQWidget *parent, const char *name)
: KMConfigPage(parent, name)
{
setPageName(i18n("Spooler"));
setPageHeader(i18n("Spooler Settings"));
setPagePixmap("gear");
- QGroupBox *m_modebox = new QGroupBox(1, Qt::Vertical, i18n("Spooler"), this);
+ QGroupBox *m_modebox = new TQGroupBox(1, Qt::Vertical, i18n("Spooler"), this);
- m_mode = new QComboBox(m_modebox);
+ m_mode = new TQComboBox(m_modebox);
m_mode->insertItem("LPR (BSD compatible)");
m_mode->insertItem("LPRng");
- QVBoxLayout *l0 = new QVBoxLayout(this, 5, 10);
+ QVBoxLayout *l0 = new TQVBoxLayout(this, 5, 10);
l0->addWidget(m_modebox);
l0->addStretch(1);
}
diff --git a/kdeprint/lpr/kmconfiglpr.h b/kdeprint/lpr/kmconfiglpr.h
index 26538eb8f..13e52fb42 100644
--- a/kdeprint/lpr/kmconfiglpr.h
+++ b/kdeprint/lpr/kmconfiglpr.h
@@ -27,7 +27,7 @@ class QComboBox;
class KMConfigLpr : public KMConfigPage
{
public:
- KMConfigLpr(QWidget *parent = 0, const char *name = 0);
+ KMConfigLpr(TQWidget *parent = 0, const char *name = 0);
void loadConfig(KConfig*);
void saveConfig(KConfig*);
diff --git a/kdeprint/lpr/kmlprjobmanager.cpp b/kdeprint/lpr/kmlprjobmanager.cpp
index d60a41020..f002043d5 100644
--- a/kdeprint/lpr/kmlprjobmanager.cpp
+++ b/kdeprint/lpr/kmlprjobmanager.cpp
@@ -24,21 +24,21 @@
#include "kmjob.h"
#include "lprsettings.h"
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <klocale.h>
-KMLprJobManager::KMLprJobManager(QObject *parent, const char *name, const QStringList & /*args*/)
+KMLprJobManager::KMLprJobManager(TQObject *parent, const char *name, const TQStringList & /*args*/)
: KMJobManager(parent, name)
{
m_lpqhelper = new LpqHelper(this, "LpqHelper");
}
-bool KMLprJobManager::listJobs(const QString& prname, JobType, int limit)
+bool KMLprJobManager::listJobs(const TQString& prname, JobType, int limit)
{
- QPtrList<KMJob> jobList;
+ TQPtrList<KMJob> jobList;
jobList.setAutoDelete(false);
m_lpqhelper->listJobs(jobList, prname, limit);
- QPtrListIterator<KMJob> it(jobList);
+ TQPtrListIterator<KMJob> it(jobList);
for (; it.current(); ++it)
addJob(it.current());
return false;
@@ -58,10 +58,10 @@ int KMLprJobManager::actions()
return (KMJob::Remove | KMJob::Hold | KMJob::Resume);
}
-bool KMLprJobManager::sendCommandSystemJob(const QPtrList<KMJob>& jobs, int action, const QString& arg)
+bool KMLprJobManager::sendCommandSystemJob(const TQPtrList<KMJob>& jobs, int action, const TQString& arg)
{
QString msg;
- QPtrListIterator<KMJob> it(jobs);
+ TQPtrListIterator<KMJob> it(jobs);
bool status(true);
LpcHelper *helper = lpcHelper();
diff --git a/kdeprint/lpr/kmlprjobmanager.h b/kdeprint/lpr/kmlprjobmanager.h
index 555b5e75b..83d65a296 100644
--- a/kdeprint/lpr/kmlprjobmanager.h
+++ b/kdeprint/lpr/kmlprjobmanager.h
@@ -28,14 +28,14 @@ class LpcHelper;
class KMLprJobManager : public KMJobManager
{
public:
- KMLprJobManager(QObject *parent, const char *name, const QStringList & /*args*/);
+ KMLprJobManager(TQObject *parent, const char *name, const TQStringList & /*args*/);
int actions();
protected:
- bool listJobs(const QString&, JobType, int = 0);
+ bool listJobs(const TQString&, JobType, int = 0);
LpcHelper* lpcHelper();
- bool sendCommandSystemJob(const QPtrList<KMJob>&, int, const QString& = QString::null);
+ bool sendCommandSystemJob(const TQPtrList<KMJob>&, int, const TQString& = TQString::null);
private:
LpqHelper *m_lpqhelper;
diff --git a/kdeprint/lpr/kmlprmanager.cpp b/kdeprint/lpr/kmlprmanager.cpp
index e383bca2f..65b08eb67 100644
--- a/kdeprint/lpr/kmlprmanager.cpp
+++ b/kdeprint/lpr/kmlprmanager.cpp
@@ -28,8 +28,8 @@
#include "driver.h"
#include "editentrydialog.h"
-#include <qfileinfo.h>
-#include <qptrlist.h>
+#include <tqfileinfo.h>
+#include <tqptrlist.h>
#include <klocale.h>
#include <kstandarddirs.h>
#include <kdebug.h>
@@ -42,7 +42,7 @@
#include <stdlib.h>
#include <unistd.h>
-KMLprManager::KMLprManager(QObject *parent, const char *name, const QStringList & /*args*/)
+KMLprManager::KMLprManager(TQObject *parent, const char *name, const TQStringList & /*args*/)
: KMManager(parent,name)
{
m_handlers.setAutoDelete(true);
@@ -78,7 +78,7 @@ void KMLprManager::listPrinters()
// cleanup previous entries
m_entries.clear();
// notify handlers
- QPtrListIterator<LprHandler> hit(m_handlerlist);
+ TQPtrListIterator<LprHandler> hit(m_handlerlist);
for (; hit.current(); ++hit)
hit.current()->reset();
@@ -91,7 +91,7 @@ void KMLprManager::listPrinters()
reader.setPrintcapFile(&f);
while ((entry = reader.nextEntry()) != NULL)
{
- QPtrListIterator<LprHandler> it(m_handlerlist);
+ TQPtrListIterator<LprHandler> it(m_handlerlist);
for (; it.current(); ++it)
if (it.current()->validate(entry))
{
@@ -110,7 +110,7 @@ void KMLprManager::listPrinters()
}
else
{
- QPtrListIterator<KMPrinter> it(m_printers);
+ TQPtrListIterator<KMPrinter> it(m_printers);
for (; it.current(); ++it)
if (!it.current()->isSpecial())
{
@@ -138,9 +138,9 @@ void KMLprManager::initHandlers()
// now load external handlers
QStringList l = KGlobal::dirs()->findAllResources("data", "kdeprint/lpr/*.la");
- for (QStringList::ConstIterator it=l.begin(); it!=l.end(); ++it)
+ for (TQStringList::ConstIterator it=l.begin(); it!=l.end(); ++it)
{
- KLibrary *library = KLibLoader::self()->library(QFile::encodeName(*it));
+ KLibrary *library = KLibLoader::self()->library(TQFile::encodeName(*it));
if (library)
{
kdDebug() << "loading external handler from " << *it << endl;
@@ -228,10 +228,10 @@ DrMain* KMLprManager::loadPrinterDriver(KMPrinter *prt, bool config)
return NULL;
}
-DrMain* KMLprManager::loadFileDriver(const QString& filename)
+DrMain* KMLprManager::loadFileDriver(const TQString& filename)
{
int p = filename.find('/');
- QString handler_str = (p != -1 ? filename.left(p) : QString::fromLatin1("default"));
+ QString handler_str = (p != -1 ? filename.left(p) : TQString::fromLatin1("default"));
LprHandler *handler = m_handlers.find(handler_str);
if (handler)
{
@@ -293,7 +293,7 @@ bool KMLprManager::savePrintcapFile()
if (f.open(IO_WriteOnly))
{
QTextStream t(&f);
- QDictIterator<PrintcapEntry> it(m_entries);
+ TQDictIterator<PrintcapEntry> it(m_entries);
for (; it.current(); ++it)
{
it.current()->writeEntry(t);
@@ -361,7 +361,7 @@ bool KMLprManager::createPrinter(KMPrinter *prt)
entry->addField("mx", Field::Integer, "0");
entry->addField("sd", Field::String, sd);
if (!prt->option("kde-aliases").isEmpty())
- entry->aliases += QStringList::split("|", prt->option("kde-aliases"), false);
+ entry->aliases += TQStringList::split("|", prt->option("kde-aliases"), false);
// insert the new entry and save printcap file
m_entries.insert(prt->printerName(), entry);
@@ -405,7 +405,7 @@ bool KMLprManager::removePrinter(KMPrinter *prt)
{
// printcap file saved, entry can be deleted now
delete entry;
- status = (::system(QFile::encodeName("rm -rf " + KProcess::quote(sd))) == 0);
+ status = (::system(TQFile::encodeName("rm -rf " + KProcess::quote(sd))) == 0);
if (!status)
setErrorMsg(i18n("Unable to remove spool directory %1. "
"Check that you have write permissions "
@@ -420,14 +420,14 @@ bool KMLprManager::removePrinter(KMPrinter *prt)
return false;
}
-QString KMLprManager::driverDbCreationProgram()
+TQString KMLprManager::driverDbCreationProgram()
{
- return QString::fromLatin1("make_driver_db_lpr");
+ return TQString::fromLatin1("make_driver_db_lpr");
}
-QString KMLprManager::driverDirectory()
+TQString KMLprManager::driverDirectory()
{
- QPtrListIterator<LprHandler> it(m_handlerlist);
+ TQPtrListIterator<LprHandler> it(m_handlerlist);
QString dbDirs;
for (; it.current(); ++it)
{
@@ -440,7 +440,7 @@ QString KMLprManager::driverDirectory()
return dbDirs;
}
-QString KMLprManager::printOptions(KPrinter *prt)
+TQString KMLprManager::printOptions(KPrinter *prt)
{
KMPrinter *mprt = findPrinter(prt->printerName());
QString opts;
@@ -450,12 +450,12 @@ QString KMLprManager::printOptions(KPrinter *prt)
if (handler)
return handler->printOptions(prt);
}
- return QString::null;
+ return TQString::null;
}
void KMLprManager::createPluginActions(KActionCollection *coll)
{
- KAction *act = new KAction(i18n("&Edit printcap Entry..."), "kdeprint_report", 0, this, SLOT(slotEditPrintcap()), coll, "plugin_editprintcap");
+ KAction *act = new KAction(i18n("&Edit printcap Entry..."), "kdeprint_report", 0, this, TQT_SLOT(slotEditPrintcap()), coll, "plugin_editprintcap");
act->setGroup("plugin");
}
@@ -473,7 +473,7 @@ void KMLprManager::slotEditPrintcap()
i18n("Editing a printcap entry manually should only be "
"done by confirmed system administrator. This may "
"prevent your printer from working. Do you want to "
- "continue?"), QString::null, KStdGuiItem::cont(),
+ "continue?"), TQString::null, KStdGuiItem::cont(),
"editPrintcap") == KMessageBox::Cancel)
return;
@@ -484,7 +484,7 @@ void KMLprManager::slotEditPrintcap()
}
}
-QString KMLprManager::stateInformation()
+TQString KMLprManager::stateInformation()
{
return i18n("Spooler type: %1").arg(LprSettings::self()->mode() == LprSettings::LPR ? "LPR (BSD compatible)" : "LPRng");
}
diff --git a/kdeprint/lpr/kmlprmanager.h b/kdeprint/lpr/kmlprmanager.h
index 5a7612e38..516494f95 100644
--- a/kdeprint/lpr/kmlprmanager.h
+++ b/kdeprint/lpr/kmlprmanager.h
@@ -22,9 +22,9 @@
#include "kmmanager.h"
-#include <qdict.h>
-#include <qptrlist.h>
-#include <qdatetime.h>
+#include <tqdict.h>
+#include <tqptrlist.h>
+#include <tqdatetime.h>
#include <kurl.h>
class LprHandler;
@@ -36,7 +36,7 @@ class KMLprManager : public KMManager
{
Q_OBJECT
public:
- KMLprManager(QObject *parent, const char *name, const QStringList & /*args*/);
+ KMLprManager(TQObject *parent, const char *name, const TQStringList & /*args*/);
bool completePrinter(KMPrinter*);
bool completePrinterShort(KMPrinter*);
@@ -44,19 +44,19 @@ public:
bool startPrinter(KMPrinter*, bool);
bool savePrinterDriver(KMPrinter*, DrMain*);
DrMain* loadPrinterDriver(KMPrinter*, bool = false);
- DrMain* loadFileDriver(const QString&);
+ DrMain* loadFileDriver(const TQString&);
bool createPrinter(KMPrinter*);
bool removePrinter(KMPrinter*);
- QString driverDbCreationProgram();
- QString driverDirectory();
+ TQString driverDbCreationProgram();
+ TQString driverDirectory();
LpcHelper* lpcHelper() { return m_lpchelper; }
- QString printOptions(KPrinter*);
+ TQString printOptions(KPrinter*);
void createPluginActions(KActionCollection*);
void validatePluginActions(KActionCollection*, KMPrinter*);
- QString stateInformation();
+ TQString stateInformation();
protected slots:
void slotEditPrintcap();
@@ -71,9 +71,9 @@ protected:
bool savePrintcapFile();
private:
- QDict<LprHandler> m_handlers;
- QPtrList<LprHandler> m_handlerlist;
- QDict<PrintcapEntry> m_entries;
+ TQDict<LprHandler> m_handlers;
+ TQPtrList<LprHandler> m_handlerlist;
+ TQDict<PrintcapEntry> m_entries;
QDateTime m_updtime;
LpcHelper *m_lpchelper;
KMPrinter *m_currentprinter;
diff --git a/kdeprint/lpr/kmlpruimanager.cpp b/kdeprint/lpr/kmlpruimanager.cpp
index 7b621d66f..ea48c9bf9 100644
--- a/kdeprint/lpr/kmlpruimanager.cpp
+++ b/kdeprint/lpr/kmlpruimanager.cpp
@@ -31,7 +31,7 @@
#include <klocale.h>
-KMLprUiManager::KMLprUiManager(QObject *parent, const char *name, const QStringList & /*args*/)
+KMLprUiManager::KMLprUiManager(TQObject *parent, const char *name, const TQStringList & /*args*/)
: KMUiManager(parent,name)
{
}
diff --git a/kdeprint/lpr/kmlpruimanager.h b/kdeprint/lpr/kmlpruimanager.h
index 46eedb189..e7e015e2a 100644
--- a/kdeprint/lpr/kmlpruimanager.h
+++ b/kdeprint/lpr/kmlpruimanager.h
@@ -25,7 +25,7 @@
class KMLprUiManager : public KMUiManager
{
public:
- KMLprUiManager(QObject *parent, const char *name, const QStringList & /*args*/);
+ KMLprUiManager(TQObject *parent, const char *name, const TQStringList & /*args*/);
~KMLprUiManager();
void setupPropertyPages(KMPropertyPage*);
diff --git a/kdeprint/lpr/lpchelper.cpp b/kdeprint/lpr/lpchelper.cpp
index b4cd6f9e1..516e85af3 100644
--- a/kdeprint/lpr/lpchelper.cpp
+++ b/kdeprint/lpr/lpchelper.cpp
@@ -23,14 +23,14 @@
#include "lprsettings.h"
#include <kstandarddirs.h>
-#include <qtextstream.h>
-#include <qregexp.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <klocale.h>
#include <kprocess.h>
#include <stdlib.h>
-static QString execute(const QString& cmd)
+static TQString execute(const TQString& cmd)
{
KPipeProcess proc;
QString output;
@@ -44,8 +44,8 @@ static QString execute(const QString& cmd)
return output;
}
-LpcHelper::LpcHelper(QObject *parent, const char *name)
-: QObject(parent, name)
+LpcHelper::LpcHelper(TQObject *parent, const char *name)
+: TQObject(parent, name)
{
// look for the "lpc" executable. Use the PATH variable and
// add some specific dirs.
@@ -60,7 +60,7 @@ LpcHelper::~LpcHelper()
{
}
-KMPrinter::PrinterState LpcHelper::state(const QString& prname) const
+KMPrinter::PrinterState LpcHelper::state(const TQString& prname) const
{
if (m_state.contains(prname))
return m_state[prname];
@@ -72,7 +72,7 @@ KMPrinter::PrinterState LpcHelper::state(KMPrinter *prt) const
return state(prt->printerName());
}
-void LpcHelper::parseStatusLPR(QTextStream &t)
+void LpcHelper::parseStatusLPR(TQTextStream &t)
{
QString printer, line;
int p(-1);
@@ -107,7 +107,7 @@ void LpcHelper::parseStatusLPR(QTextStream &t)
}
}
-void LpcHelper::parseStatusLPRng(QTextStream& t)
+void LpcHelper::parseStatusLPRng(TQTextStream& t)
{
QStringList l;
int p(-1);
@@ -118,7 +118,7 @@ void LpcHelper::parseStatusLPRng(QTextStream& t)
break;
while (!t.atEnd())
{
- l = QStringList::split(QRegExp("\\s"), t.readLine(), false);
+ l = TQStringList::split(TQRegExp("\\s"), t.readLine(), false);
if (l.count() < 4)
continue;
p = l[0].find('@');
@@ -163,7 +163,7 @@ void LpcHelper::updateStates()
}
-bool LpcHelper::enable(KMPrinter *prt, bool state, QString& msg)
+bool LpcHelper::enable(KMPrinter *prt, bool state, TQString& msg)
{
int st = m_state[prt->printerName()] & KMPrinter::StateMask;
if (changeState(prt->printerName(), (state ? "enable" : "disable"), msg))
@@ -174,7 +174,7 @@ bool LpcHelper::enable(KMPrinter *prt, bool state, QString& msg)
return false;
}
-bool LpcHelper::start(KMPrinter *prt, bool state, QString& msg)
+bool LpcHelper::start(KMPrinter *prt, bool state, TQString& msg)
{
int rej = m_state[prt->printerName()] & ~KMPrinter::StateMask;
if (changeState(prt->printerName(), (state ? "start" : "stop"), msg))
@@ -190,7 +190,7 @@ bool LpcHelper::start(KMPrinter *prt, bool state, QString& msg)
// -1 : permission denied
// -2 : unknown printer
// 1 : unknown error
-int LpcHelper::parseStateChangeLPR(const QString& result, const QString& printer)
+int LpcHelper::parseStateChangeLPR(const TQString& result, const TQString& printer)
{
if (result.startsWith(printer + ":"))
return 0;
@@ -202,7 +202,7 @@ int LpcHelper::parseStateChangeLPR(const QString& result, const QString& printer
return 1;
}
-static QString lprngAnswer(const QString& result, const QString& printer)
+static TQString lprngAnswer(const TQString& result, const TQString& printer)
{
int p, q;
@@ -214,10 +214,10 @@ static QString lprngAnswer(const QString& result, const QString& printer)
QString answer = result.mid(q, p-q).stripWhiteSpace();
return answer;
}
- return QString::null;
+ return TQString::null;
}
-int LpcHelper::parseStateChangeLPRng(const QString& result, const QString& printer)
+int LpcHelper::parseStateChangeLPRng(const TQString& result, const TQString& printer)
{
QString answer = lprngAnswer(result, printer);
if (answer == "no")
@@ -228,7 +228,7 @@ int LpcHelper::parseStateChangeLPRng(const QString& result, const QString& print
return 1;
}
-bool LpcHelper::changeState(const QString& printer, const QString& op, QString& msg)
+bool LpcHelper::changeState(const TQString& printer, const TQString& op, TQString& msg)
{
if (m_exepath.isEmpty())
{
@@ -260,20 +260,20 @@ bool LpcHelper::changeState(const QString& printer, const QString& op, QString&
break;
default:
case 1:
- msg = i18n("Unknown error: %1").arg(result.replace(QRegExp("\\n"), " "));
+ msg = i18n("Unknown error: %1").arg(result.replace(TQRegExp("\\n"), " "));
break;
}
return (status == 0);
}
-bool LpcHelper::removeJob(KMJob *job, QString& msg)
+bool LpcHelper::removeJob(KMJob *job, TQString& msg)
{
if (m_lprmpath.isEmpty())
{
msg = i18n("The executable %1 couldn't be found in your PATH.").arg("lprm");
return false;
}
- QString result = execute(m_lprmpath + " -P " + KProcess::quote(job->printer()) + " " + QString::number(job->id()));
+ QString result = execute(m_lprmpath + " -P " + KProcess::quote(job->printer()) + " " + TQString::number(job->id()));
if (result.find("dequeued") != -1)
return true;
else if (result.find("Permission denied") != -1 || result.find("no permissions") != -1)
@@ -284,14 +284,14 @@ bool LpcHelper::removeJob(KMJob *job, QString& msg)
}
// LPRng only
-bool LpcHelper::changeJobState(KMJob *job, int state, QString& msg)
+bool LpcHelper::changeJobState(KMJob *job, int state, TQString& msg)
{
if (m_lprmpath.isEmpty())
{
msg = i18n("The executable %1 couldn't be found in your PATH.").arg("lpc");
return false;
}
- QString result = execute(m_exepath + (state == KMJob::Held ? " hold " : " release ") + KProcess::quote(job->printer()) + " " + QString::number(job->id()));
+ QString result = execute(m_exepath + (state == KMJob::Held ? " hold " : " release ") + KProcess::quote(job->printer()) + " " + TQString::number(job->id()));
QString answer = lprngAnswer(result, job->printer());
if (answer == "no")
{
@@ -302,7 +302,7 @@ bool LpcHelper::changeJobState(KMJob *job, int state, QString& msg)
return true;
}
-bool LpcHelper::restart(QString& msg)
+bool LpcHelper::restart(TQString& msg)
{
QString s;
if (m_exepath.isEmpty())
@@ -314,7 +314,7 @@ bool LpcHelper::restart(QString& msg)
msg = i18n("The executable %1 couldn't be found in your PATH.").arg(s);
return false;
}
- ::system(QFile::encodeName(m_exepath + " reread"));
- ::system(QFile::encodeName(m_checkpcpath + " -f"));
+ ::system(TQFile::encodeName(m_exepath + " reread"));
+ ::system(TQFile::encodeName(m_checkpcpath + " -f"));
return true;
}
diff --git a/kdeprint/lpr/lpchelper.h b/kdeprint/lpr/lpchelper.h
index a4474354d..d7e6c7897 100644
--- a/kdeprint/lpr/lpchelper.h
+++ b/kdeprint/lpr/lpchelper.h
@@ -20,9 +20,9 @@
#ifndef LPCHELPER_H
#define LPCHELPER_H
-#include <qobject.h>
-#include <qmap.h>
-#include <qtextstream.h>
+#include <tqobject.h>
+#include <tqmap.h>
+#include <tqtextstream.h>
#include "kmprinter.h"
class KMJob;
@@ -30,29 +30,29 @@ class KMJob;
class LpcHelper : public QObject
{
public:
- LpcHelper(QObject *parent = 0, const char *name = 0);
+ LpcHelper(TQObject *parent = 0, const char *name = 0);
~LpcHelper();
- KMPrinter::PrinterState state(const QString&) const;
+ KMPrinter::PrinterState state(const TQString&) const;
KMPrinter::PrinterState state(KMPrinter*) const;
void updateStates();
- bool enable(KMPrinter*, bool, QString&);
- bool start(KMPrinter*, bool, QString&);
- bool removeJob(KMJob*, QString&);
- bool changeJobState(KMJob*, int, QString&);
+ bool enable(KMPrinter*, bool, TQString&);
+ bool start(KMPrinter*, bool, TQString&);
+ bool removeJob(KMJob*, TQString&);
+ bool changeJobState(KMJob*, int, TQString&);
- bool restart(QString&);
+ bool restart(TQString&);
protected:
- bool changeState(const QString&, const QString&, QString&);
- void parseStatusLPR(QTextStream&);
- void parseStatusLPRng(QTextStream&);
- int parseStateChangeLPR(const QString&, const QString&);
- int parseStateChangeLPRng(const QString&, const QString&);
+ bool changeState(const TQString&, const TQString&, TQString&);
+ void parseStatusLPR(TQTextStream&);
+ void parseStatusLPRng(TQTextStream&);
+ int parseStateChangeLPR(const TQString&, const TQString&);
+ int parseStateChangeLPRng(const TQString&, const TQString&);
private:
- QMap<QString, KMPrinter::PrinterState> m_state;
+ TQMap<TQString, KMPrinter::PrinterState> m_state;
QString m_exepath, m_lprmpath, m_checkpcpath;
};
diff --git a/kdeprint/lpr/lpqhelper.cpp b/kdeprint/lpr/lpqhelper.cpp
index c9f26174b..2675c9d41 100644
--- a/kdeprint/lpr/lpqhelper.cpp
+++ b/kdeprint/lpr/lpqhelper.cpp
@@ -26,8 +26,8 @@
#include <kprocess.h>
#include <kdebug.h>
-LpqHelper::LpqHelper(QObject *parent, const char *name)
-: QObject(parent, name)
+LpqHelper::LpqHelper(TQObject *parent, const char *name)
+: TQObject(parent, name)
{
m_exepath = KStandardDirs::findExe("lpq");
}
@@ -36,7 +36,7 @@ LpqHelper::~LpqHelper()
{
}
-KMJob* LpqHelper::parseLineLpr(const QString& line)
+KMJob* LpqHelper::parseLineLpr(const TQString& line)
{
QString rank = line.left(7);
if (!rank[0].isDigit() && rank != "active")
@@ -54,7 +54,7 @@ KMJob* LpqHelper::parseLineLpr(const QString& line)
return job;
}
-KMJob* LpqHelper::parseLineLPRng(const QString& line)
+KMJob* LpqHelper::parseLineLPRng(const TQString& line)
{
QString rank = line.left(7).stripWhiteSpace();
if (!rank[0].isDigit() && rank != "active" && rank != "hold")
@@ -80,7 +80,7 @@ KMJob* LpqHelper::parseLineLPRng(const QString& line)
return job;
}
-void LpqHelper::listJobs(QPtrList<KMJob>& jobs, const QString& prname, int limit)
+void LpqHelper::listJobs(TQPtrList<KMJob>& jobs, const TQString& prname, int limit)
{
KPipeProcess proc;
if (!m_exepath.isEmpty() && proc.open(m_exepath + " -P " + KProcess::quote(prname)))
@@ -105,7 +105,7 @@ void LpqHelper::listJobs(QPtrList<KMJob>& jobs, const QString& prname, int limit
if (job)
{
job->setPrinter(prname);
- job->setUri("lpd://"+prname+"/"+QString::number(job->id()));
+ job->setUri("lpd://"+prname+"/"+TQString::number(job->id()));
jobs.append(job);
count++;
}
diff --git a/kdeprint/lpr/lpqhelper.h b/kdeprint/lpr/lpqhelper.h
index 1c9af35a6..b41521f66 100644
--- a/kdeprint/lpr/lpqhelper.h
+++ b/kdeprint/lpr/lpqhelper.h
@@ -20,22 +20,22 @@
#ifndef LPQHELPER_H
#define LPQHELPER_H
-#include <qobject.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
class KMJob;
class LpqHelper : public QObject
{
public:
- LpqHelper(QObject *parent = 0, const char *name = 0);
+ LpqHelper(TQObject *parent = 0, const char *name = 0);
~LpqHelper();
- void listJobs(QPtrList<KMJob>& jobs, const QString& prname, int limit = 0);
+ void listJobs(TQPtrList<KMJob>& jobs, const TQString& prname, int limit = 0);
protected:
- KMJob* parseLineLpr(const QString&);
- KMJob* parseLineLPRng(const QString&);
+ KMJob* parseLineLpr(const TQString&);
+ KMJob* parseLineLPRng(const TQString&);
private:
QString m_exepath;
diff --git a/kdeprint/lpr/lprhandler.cpp b/kdeprint/lpr/lprhandler.cpp
index 396562691..600df4796 100644
--- a/kdeprint/lpr/lprhandler.cpp
+++ b/kdeprint/lpr/lprhandler.cpp
@@ -24,14 +24,14 @@
#include "lprsettings.h"
#include "driver.h"
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qvaluestack.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqvaluestack.h>
#include <klocale.h>
#include <unistd.h>
-LprHandler::LprHandler(const QString& name, KMManager *mgr)
+LprHandler::LprHandler(const TQString& name, KMManager *mgr)
: m_name(name), m_manager(mgr)
{
}
@@ -57,7 +57,7 @@ KMPrinter* LprHandler::createPrinter(PrintcapEntry *entry)
bool LprHandler::completePrinter(KMPrinter *prt, PrintcapEntry *entry, bool)
{
prt->setDescription(i18n("Unknown (unrecognized entry)"));
- QString val = entry->field("lp");
+ TQString val = entry->field("lp");
KURL uri;
if (!val.isEmpty() && val != "/dev/null")
{
@@ -85,7 +85,7 @@ bool LprHandler::completePrinter(KMPrinter *prt, PrintcapEntry *entry, bool)
}
else if (!(val = entry->field("rp")).isEmpty())
{
- QString rm = entry->has("rm") ?
+ TQString rm = entry->has("rm") ?
entry->field("rm") :
LprSettings::self()->defaultRemoteHost();
prt->setLocation(i18n("Remote queue (%1) on %2").arg(val).arg(rm));
@@ -111,7 +111,7 @@ bool LprHandler::savePrinterDriver(KMPrinter*, PrintcapEntry*, DrMain*, bool*)
return false;
}
-DrMain* LprHandler::loadDbDriver(const QString&)
+DrMain* LprHandler::loadDbDriver(const TQString&)
{
manager()->setErrorMsg(i18n("Unrecognized entry."));
return NULL;
@@ -138,15 +138,15 @@ PrintcapEntry* LprHandler::createEntry(KMPrinter *prt)
entry->addField("rp", Field::String, rp);
// force this entry to null (otherwise it seems it's redirected
// to /dev/lp0 by default)
- entry->addField("lp", Field::String, QString::null);
+ entry->addField("lp", Field::String, TQString::null);
}
else if ( prot == "socket" )
{
- QString lp = uri.host();
+ TQString lp = uri.host();
if ( uri.port() == 0 )
lp.append( "%9100" );
else
- lp.append( "%" ).append( QString::number( uri.port() ) );
+ lp.append( "%" ).append( TQString::number( uri.port() ) );
entry->addField("lp", Field::String, lp);
}
else
@@ -161,22 +161,22 @@ bool LprHandler::removePrinter(KMPrinter*, PrintcapEntry*)
return true;
}
-QString LprHandler::printOptions(KPrinter*)
+TQString LprHandler::printOptions(KPrinter*)
{
- return QString::null;
+ return TQString::null;
}
void LprHandler::reset()
{
}
-DrMain* LprHandler::loadToolDriver(const QString& filename)
+DrMain* LprHandler::loadToolDriver(const TQString& filename)
{
QFile f(filename);
if (f.open(IO_ReadOnly))
{
DrMain *driver = new DrMain;
- QValueStack<DrGroup*> groups;
+ TQValueStack<DrGroup*> groups;
QTextStream t(&f);
QStringList l;
DrListOption *lopt(0);
@@ -186,7 +186,7 @@ DrMain* LprHandler::loadToolDriver(const QString& filename)
driver->set("text", "Tool Driver");
while (!t.atEnd())
{
- l = QStringList::split('|', t.readLine().stripWhiteSpace(), false);
+ l = TQStringList::split('|', t.readLine().stripWhiteSpace(), false);
if (l.count() == 0)
continue;
if (l[0] == "GROUP")
@@ -245,26 +245,26 @@ DrMain* LprHandler::loadToolDriver(const QString& filename)
return NULL;
}
-QString LprHandler::driverDirectory()
+TQString LprHandler::driverDirectory()
{
if (m_cacheddriverdir.isEmpty())
m_cacheddriverdir = driverDirInternal();
return m_cacheddriverdir;
}
-QString LprHandler::driverDirInternal()
+TQString LprHandler::driverDirInternal()
{
- return QString::null;
+ return TQString::null;
}
-QString LprHandler::locateDir(const QString& dirname, const QString& paths)
+TQString LprHandler::locateDir(const TQString& dirname, const TQString& paths)
{
- QStringList pathlist = QStringList::split(':', paths, false);
- for (QStringList::ConstIterator it=pathlist.begin(); it!=pathlist.end(); ++it)
+ QStringList pathlist = TQStringList::split(':', paths, false);
+ for (TQStringList::ConstIterator it=pathlist.begin(); it!=pathlist.end(); ++it)
{
QString testpath = *it + "/" + dirname;
- if (::access(QFile::encodeName(testpath), F_OK) == 0)
+ if (::access(TQFile::encodeName(testpath), F_OK) == 0)
return testpath;
}
- return QString::null;
+ return TQString::null;
}
diff --git a/kdeprint/lpr/lprhandler.h b/kdeprint/lpr/lprhandler.h
index 49b9c6236..98b9c3819 100644
--- a/kdeprint/lpr/lprhandler.h
+++ b/kdeprint/lpr/lprhandler.h
@@ -24,7 +24,7 @@
#warning internal header, do not use except if you are a KDEPrint developer
#endif
-#include <qstring.h>
+#include <tqstring.h>
class PrintcapEntry;
class KMPrinter;
@@ -42,30 +42,30 @@ class KPrinter;
class LprHandler
{
public:
- LprHandler(const QString& name, KMManager *mgr = 0);
+ LprHandler(const TQString& name, KMManager *mgr = 0);
virtual ~LprHandler();
virtual bool validate(PrintcapEntry*);
virtual KMPrinter* createPrinter(PrintcapEntry*);
virtual bool completePrinter(KMPrinter*, PrintcapEntry*, bool shortmode = true);
virtual DrMain* loadDriver(KMPrinter*, PrintcapEntry*, bool = false);
- virtual DrMain* loadDbDriver(const QString&);
+ virtual DrMain* loadDbDriver(const TQString&);
virtual bool savePrinterDriver(KMPrinter*, PrintcapEntry*, DrMain*, bool* = 0);
virtual PrintcapEntry* createEntry(KMPrinter*);
virtual bool removePrinter(KMPrinter*, PrintcapEntry*);
- virtual QString printOptions(KPrinter*);
+ virtual TQString printOptions(KPrinter*);
virtual void reset();
- QString name() const;
+ TQString name() const;
KMManager* manager() const;
- QString driverDirectory();
+ TQString driverDirectory();
protected:
- DrMain* loadToolDriver(const QString&);
- QString locateDir(const QString& dirname, const QString& paths);
- QString cachedDriverDir() const;
- void setCachedDriverDir(const QString&);
- virtual QString driverDirInternal();
+ DrMain* loadToolDriver(const TQString&);
+ TQString locateDir(const TQString& dirname, const TQString& paths);
+ TQString cachedDriverDir() const;
+ void setCachedDriverDir(const TQString&);
+ virtual TQString driverDirInternal();
protected:
QString m_name;
@@ -73,16 +73,16 @@ protected:
QString m_cacheddriverdir;
};
-inline QString LprHandler::name() const
+inline TQString LprHandler::name() const
{ return m_name; }
inline KMManager* LprHandler::manager() const
{ return m_manager; }
-inline QString LprHandler::cachedDriverDir() const
+inline TQString LprHandler::cachedDriverDir() const
{ return m_cacheddriverdir; }
-inline void LprHandler::setCachedDriverDir(const QString& s)
+inline void LprHandler::setCachedDriverDir(const TQString& s)
{ m_cacheddriverdir = s; }
#endif
diff --git a/kdeprint/lpr/lprngtoolhandler.cpp b/kdeprint/lpr/lprngtoolhandler.cpp
index 1b08d70b9..3710496a9 100644
--- a/kdeprint/lpr/lprngtoolhandler.cpp
+++ b/kdeprint/lpr/lprngtoolhandler.cpp
@@ -26,8 +26,8 @@
#include "kmmanager.h"
#include "kprinter.h"
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
#include <klocale.h>
#include <kdebug.h>
#include <kstandarddirs.h>
@@ -50,7 +50,7 @@ bool LPRngToolHandler::completePrinter(KMPrinter *prt, PrintcapEntry *entry, boo
QString str, lp;
// look for type in comment
- QStringList l = QStringList::split(' ', entry->comment, false);
+ QStringList l = TQStringList::split(' ', entry->comment, false);
lp = entry->field("lp");
if (l.count() < 1)
return false;
@@ -59,10 +59,10 @@ bool LPRngToolHandler::completePrinter(KMPrinter *prt, PrintcapEntry *entry, boo
LprHandler::completePrinter(prt, entry, shortmode);
else if (l[1] == "SMB")
{
- QMap<QString,QString> opts = parseXferOptions(entry->field("xfer_options"));
+ TQMap<TQString,TQString> opts = parseXferOptions(entry->field("xfer_options"));
QString user, pass;
loadAuthFile(LprSettings::self()->baseSpoolDir() + "/" + entry->name + "/" + opts["authfile"], user, pass);
- QString uri = buildSmbURI(
+ TQString uri = buildSmbURI(
opts[ "workgroup" ],
opts[ "host" ],
opts[ "printer" ],
@@ -103,15 +103,15 @@ bool LPRngToolHandler::completePrinter(KMPrinter *prt, PrintcapEntry *entry, boo
return true;
}
-QMap<QString,QString> LPRngToolHandler::parseXferOptions(const QString& str)
+TQMap<TQString,TQString> LPRngToolHandler::parseXferOptions(const TQString& str)
{
uint p(0), q;
- QMap<QString,QString> opts;
+ TQMap<TQString,TQString> opts;
QString key, val;
while (p < str.length())
{
- key = val = QString::null;
+ key = val = TQString::null;
// skip spaces
while (p < str.length() && str[p].isSpace())
p++;
@@ -130,7 +130,7 @@ QMap<QString,QString> LPRngToolHandler::parseXferOptions(const QString& str)
return opts;
}
-void LPRngToolHandler::loadAuthFile(const QString& filename, QString& user, QString& pass)
+void LPRngToolHandler::loadAuthFile(const TQString& filename, TQString& user, TQString& pass)
{
QFile f(filename);
if (f.open(IO_ReadOnly))
@@ -170,7 +170,7 @@ DrMain* LPRngToolHandler::loadDriver(KMPrinter *prt, PrintcapEntry *entry, bool
driver->set("text", i18n("LPRngTool Common Driver (%1)").arg((model.isEmpty() ? i18n("unknown") : model)));
if (!model.isEmpty())
driver->set("driverID", model);
- QMap<QString,QString> opts = parseZOptions(entry->field("prefix_z"));
+ TQMap<TQString,TQString> opts = parseZOptions(entry->field("prefix_z"));
opts["lpr"] = entry->field("lpr");
driver->setOptions(opts);
// if not configuring, don't show the "lpr" options
@@ -180,7 +180,7 @@ DrMain* LPRngToolHandler::loadDriver(KMPrinter *prt, PrintcapEntry *entry, bool
return driver;
}
-DrMain* LPRngToolHandler::loadDbDriver(const QString& s)
+DrMain* LPRngToolHandler::loadDbDriver(const TQString& s)
{
int p = s.find('/');
DrMain* driver = loadToolDriver(locate("data", "kdeprint/lprngtooldriver1"));
@@ -189,10 +189,10 @@ DrMain* LPRngToolHandler::loadDbDriver(const QString& s)
return driver;
}
-QValueList< QPair<QString,QStringList> > LPRngToolHandler::loadChoiceDict(const QString& filename)
+TQValueList< QPair<TQString,TQStringList> > LPRngToolHandler::loadChoiceDict(const TQString& filename)
{
QFile f(filename);
- QValueList< QPair<QString,QStringList> > dict;
+ TQValueList< QPair<TQString,TQStringList> > dict;
if (f.open(IO_ReadOnly))
{
QTextStream t(&f);
@@ -204,9 +204,9 @@ QValueList< QPair<QString,QStringList> > LPRngToolHandler::loadChoiceDict(const
if (line.startsWith("OPTION"))
{
if (l.count() > 0 && !key.isEmpty())
- dict << QPair<QString,QStringList>(key, l);
+ dict << QPair<TQString,TQStringList>(key, l);
l.clear();
- key = QString::null;
+ key = TQString::null;
if (line.contains('|') == 2 || line.right(7) == "BOOLEAN")
{
int p = line.find('|', 7);
@@ -223,10 +223,10 @@ QValueList< QPair<QString,QStringList> > LPRngToolHandler::loadChoiceDict(const
return dict;
}
-QMap<QString,QString> LPRngToolHandler::parseZOptions(const QString& optstr)
+TQMap<TQString,TQString> LPRngToolHandler::parseZOptions(const TQString& optstr)
{
- QMap<QString,QString> opts;
- QStringList l = QStringList::split(',', optstr, false);
+ TQMap<TQString,TQString> opts;
+ QStringList l = TQStringList::split(',', optstr, false);
if (l.count() == 0)
return opts;
@@ -234,10 +234,10 @@ QMap<QString,QString> LPRngToolHandler::parseZOptions(const QString& optstr)
m_dict = loadChoiceDict(locate("data", "kdeprint/lprngtooldriver1"));
QString unknown;
- for (QStringList::ConstIterator it=l.begin(); it!=l.end(); ++it)
+ for (TQStringList::ConstIterator it=l.begin(); it!=l.end(); ++it)
{
bool found(false);
- for (QValueList< QPair<QString,QStringList> >::ConstIterator p=m_dict.begin(); p!=m_dict.end() && !found; ++p)
+ for (TQValueList< QPair<TQString,TQStringList> >::ConstIterator p=m_dict.begin(); p!=m_dict.end() && !found; ++p)
{
if ((*p).second.find(*it) != (*p).second.end())
{
@@ -258,12 +258,12 @@ QMap<QString,QString> LPRngToolHandler::parseZOptions(const QString& optstr)
return opts;
}
-QString LPRngToolHandler::filterDir()
+TQString LPRngToolHandler::filterDir()
{
return driverDirectory();
}
-QString LPRngToolHandler::driverDirInternal()
+TQString LPRngToolHandler::driverDirInternal()
{
return locateDir("filters", "/usr/lib:/usr/local/lib:/opt/lib:/usr/libexec:/usr/local/libexec:/opt/libexec");
}
@@ -293,7 +293,7 @@ PrintcapEntry* LPRngToolHandler::createEntry(KMPrinter *prt)
if (url.port() == 0)
lp.append("%9100");
else
- lp.append("%").append(QString::number(url.port()));
+ lp.append("%").append(TQString::number(url.port()));
}
else if (prot == "lpd")
{
@@ -308,7 +308,7 @@ PrintcapEntry* LPRngToolHandler::createEntry(KMPrinter *prt)
QString work, server, printer, user, passwd;
if ( splitSmbURI( prt->device(), work, server, printer, user, passwd ) )
{
- entry->addField("xfer_options", Field::String, QString::fromLatin1("authfile=\"auth\" crlf=\"0\" hostip=\"\" host=\"%1\" printer=\"%2\" remote_mode=\"SMB\" share=\"//%3/%4\" workgroup=\"%5\"").arg(server).arg(printer).arg(server).arg(printer).arg(work));
+ entry->addField("xfer_options", Field::String, TQString::fromLatin1("authfile=\"auth\" crlf=\"0\" hostip=\"\" host=\"%1\" printer=\"%2\" remote_mode=\"SMB\" share=\"//%3/%4\" workgroup=\"%5\"").arg(server).arg(printer).arg(server).arg(printer).arg(work));
QFile authfile(LprSettings::self()->baseSpoolDir() + "/" + prt->printerName() + "/auth");
if (authfile.open(IO_WriteOnly))
{
@@ -331,12 +331,12 @@ PrintcapEntry* LPRngToolHandler::createEntry(KMPrinter *prt)
DrMain *driver = prt->driver();
comment.append("filtertype=IFHP ifhp_options=status@,sync@,pagecount@,waitend@ printerdb_entry=");
comment.append(driver->get("driverID"));
- entry->addField("ifhp", Field::String, QString::fromLatin1("model=%1,status@,sync@,pagecount@,waitend@").arg(driver->get("driverID")));
- entry->addField("lprngtooloptions", Field::String, QString::fromLatin1("FILTERTYPE=\"IFHP\" IFHP_OPTIONS=\"status@,sync@,pagecount@,waitend@\" PRINTERDB_ENTRY=\"%1\"").arg(driver->get("driverID")));
- QMap<QString,QString> opts;
+ entry->addField("ifhp", Field::String, TQString::fromLatin1("model=%1,status@,sync@,pagecount@,waitend@").arg(driver->get("driverID")));
+ entry->addField("lprngtooloptions", Field::String, TQString::fromLatin1("FILTERTYPE=\"IFHP\" IFHP_OPTIONS=\"status@,sync@,pagecount@,waitend@\" PRINTERDB_ENTRY=\"%1\"").arg(driver->get("driverID")));
+ TQMap<TQString,TQString> opts;
QString optstr;
driver->getOptions(opts, false);
- for (QMap<QString,QString>::ConstIterator it=opts.begin(); it!=opts.end(); ++it)
+ for (TQMap<TQString,TQString>::ConstIterator it=opts.begin(); it!=opts.end(); ++it)
if (it.key() != "lpr")
optstr.append(*it).append(",");
if (!optstr.isEmpty())
@@ -357,10 +357,10 @@ PrintcapEntry* LPRngToolHandler::createEntry(KMPrinter *prt)
bool LPRngToolHandler::savePrinterDriver(KMPrinter*, PrintcapEntry *entry, DrMain *driver, bool *mustSave)
{
// save options in the "prefix_z" field and tell the manager to save the printcap file
- QMap<QString,QString> opts;
+ TQMap<TQString,TQString> opts;
QString optstr;
driver->getOptions(opts, false);
- for (QMap<QString,QString>::ConstIterator it=opts.begin(); it!=opts.end(); ++it)
+ for (TQMap<TQString,TQString>::ConstIterator it=opts.begin(); it!=opts.end(); ++it)
if (it.key() != "lpr")
optstr.append(*it).append(",");
if (!optstr.isEmpty())
@@ -374,11 +374,11 @@ bool LPRngToolHandler::savePrinterDriver(KMPrinter*, PrintcapEntry *entry, DrMai
return true;
}
-QString LPRngToolHandler::printOptions(KPrinter *printer)
+TQString LPRngToolHandler::printOptions(KPrinter *printer)
{
QString optstr;
- QMap<QString,QString> opts = printer->options();
- for (QMap<QString,QString>::ConstIterator it=opts.begin(); it!=opts.end(); ++it)
+ TQMap<TQString,TQString> opts = printer->options();
+ for (TQMap<TQString,TQString>::ConstIterator it=opts.begin(); it!=opts.end(); ++it)
{
if (it.key().startsWith("kde-") || it.key().startsWith("_kde-") || it.key() == "lpr" || it.key().startsWith( "app-" ))
continue;
diff --git a/kdeprint/lpr/lprngtoolhandler.h b/kdeprint/lpr/lprngtoolhandler.h
index ceff82393..6d7ec299f 100644
--- a/kdeprint/lpr/lprngtoolhandler.h
+++ b/kdeprint/lpr/lprngtoolhandler.h
@@ -21,9 +21,9 @@
#define LPRNGTOOLHANDLER_H
#include "lprhandler.h"
-#include <qmap.h>
-#include <qstringlist.h>
-#include <qpair.h>
+#include <tqmap.h>
+#include <tqstringlist.h>
+#include <tqpair.h>
class LPRngToolHandler : public LprHandler
{
@@ -33,22 +33,22 @@ public:
bool validate(PrintcapEntry*);
bool completePrinter(KMPrinter*, PrintcapEntry*, bool = true);
DrMain* loadDriver(KMPrinter*, PrintcapEntry*, bool = false);
- DrMain* loadDbDriver(const QString&);
+ DrMain* loadDbDriver(const TQString&);
PrintcapEntry* createEntry(KMPrinter*);
bool savePrinterDriver(KMPrinter*, PrintcapEntry*, DrMain*, bool* = 0);
- QString printOptions(KPrinter*);
+ TQString printOptions(KPrinter*);
protected:
- QMap<QString,QString> parseXferOptions(const QString&);
- void loadAuthFile(const QString&, QString&, QString&);
- QValueList< QPair<QString,QStringList> > loadChoiceDict(const QString&);
- QMap<QString,QString> parseZOptions(const QString&);
- QString filterDir();
- QString driverDirInternal();
+ TQMap<TQString,TQString> parseXferOptions(const TQString&);
+ void loadAuthFile(const TQString&, TQString&, TQString&);
+ TQValueList< QPair<TQString,TQStringList> > loadChoiceDict(const TQString&);
+ TQMap<TQString,TQString> parseZOptions(const TQString&);
+ TQString filterDir();
+ TQString driverDirInternal();
private:
- QValueList< QPair<QString,QStringList> > m_dict;
+ TQValueList< QPair<TQString,TQStringList> > m_dict;
};
#endif
diff --git a/kdeprint/lpr/lprsettings.cpp b/kdeprint/lpr/lprsettings.cpp
index 90662a94c..15eef4126 100644
--- a/kdeprint/lpr/lprsettings.cpp
+++ b/kdeprint/lpr/lprsettings.cpp
@@ -22,16 +22,16 @@
#include "kmfactory.h"
#include <kconfig.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
#define LPDCONF "/etc/lpd.conf"
#define PRINTCAP "/etc/printcap"
LprSettings* LprSettings::m_self = 0;
-LprSettings::LprSettings(QObject *parent, const char *name)
-: QObject(parent, name), KPReloadObject(true)
+LprSettings::LprSettings(TQObject *parent, const char *name)
+: TQObject(parent, name), KPReloadObject(true)
{
init();
}
@@ -63,21 +63,21 @@ void LprSettings::init()
else
{
// try to guess
- if (QFile::exists(LPDCONF))
+ if (TQFile::exists(LPDCONF))
m_mode = LPRng;
else
m_mode = LPR;
}
// Printcap file
- m_printcapfile = QString::null;
+ m_printcapfile = TQString::null;
m_local = true;
// Spool directory
m_spooldir = "/var/spool/lpd";
}
-QString LprSettings::printcapFile()
+TQString LprSettings::printcapFile()
{
if (m_printcapfile.isEmpty())
{
@@ -86,7 +86,7 @@ QString LprSettings::printcapFile()
if (m_mode == LPRng)
{
// look into /etc/lpd/conf file
- QFile cf(LPDCONF);
+ TQFile cf(LPDCONF);
if (cf.open(IO_ReadOnly))
{
QTextStream t(&cf);
@@ -112,12 +112,12 @@ QString LprSettings::printcapFile()
return m_printcapfile;
}
-QString LprSettings::defaultRemoteHost()
+TQString LprSettings::defaultRemoteHost()
{
if (m_defaultremotehost.isEmpty())
{
m_defaultremotehost = "localhost";
- QFile cf(LPDCONF);
+ TQFile cf(LPDCONF);
if (cf.open(IO_ReadOnly))
{
QTextStream t(&cf);
diff --git a/kdeprint/lpr/lprsettings.h b/kdeprint/lpr/lprsettings.h
index c6d6fe64f..419ec46d1 100644
--- a/kdeprint/lpr/lprsettings.h
+++ b/kdeprint/lpr/lprsettings.h
@@ -24,7 +24,7 @@
#warning internal header, do not use except if you are a KDEPrint developer
#endif
-#include <qobject.h>
+#include <tqobject.h>
#include <kdeprint/kpreloadobject.h>
/**
@@ -34,10 +34,10 @@
* if you're a KDEPrint developer. The API might change in the
* future and binary compatibility might be broken.
*/
-class LprSettings : public QObject, public KPReloadObject
+class LprSettings : public TQObject, public KPReloadObject
{
public:
- LprSettings(QObject *parent = 0, const char *name = 0);
+ LprSettings(TQObject *parent = 0, const char *name = 0);
~LprSettings();
static LprSettings* self();
@@ -45,10 +45,10 @@ public:
enum Mode { LPR, LPRng };
Mode mode() const { return m_mode; }
void setMode(Mode m) { m_mode = m; }
- QString printcapFile();
- QString defaultRemoteHost();
+ TQString printcapFile();
+ TQString defaultRemoteHost();
bool isLocalPrintcap() { return m_local; }
- QString baseSpoolDir() { return m_spooldir; }
+ TQString baseSpoolDir() { return m_spooldir; }
protected:
void init();
@@ -61,7 +61,7 @@ private:
QString m_printcapfile;
bool m_local;
QString m_spooldir;
- QString m_defaultremotehost;
+ TQString m_defaultremotehost;
};
#endif
diff --git a/kdeprint/lpr/matichandler.cpp b/kdeprint/lpr/matichandler.cpp
index a4b0d39a6..f3f0d4cdc 100644
--- a/kdeprint/lpr/matichandler.cpp
+++ b/kdeprint/lpr/matichandler.cpp
@@ -34,9 +34,9 @@
#include <kapplication.h>
#include <kdebug.h>
#include <kprocess.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
#include <stdlib.h>
#include <sys/wait.h>
@@ -104,18 +104,18 @@ bool MaticHandler::completePrinter(KMPrinter *prt, PrintcapEntry *entry, bool sh
KURL url ( parsePostpipe(postpipe) );
if (!url.isEmpty())
{
- QString ds = QString::fromLatin1("%1 (%2)").arg(prt->location()).arg(url.protocol());
+ QString ds = TQString::fromLatin1("%1 (%2)").arg(prt->location()).arg(url.protocol());
prt->setDevice(url.url());
prt->setLocation(ds);
}
}
- QMap<QString,QVariant> m = loader.data()[ "VAR" ].toMap();
+ TQMap<TQString,TQVariant> m = loader.data()[ "VAR" ].toMap();
if ( !m.isEmpty() )
{
prt->setManufacturer(m["make"].toString());
prt->setModel(m["model"].toString());
- prt->setDriverInfo(QString::fromLatin1("%1 %2 (%3)").arg(prt->manufacturer()).arg(prt->model()).arg(m["driver"].toString()));
+ prt->setDriverInfo(TQString::fromLatin1("%1 %2 (%3)").arg(prt->manufacturer()).arg(prt->model()).arg(m["driver"].toString()));
}
}
}
@@ -123,11 +123,11 @@ bool MaticHandler::completePrinter(KMPrinter *prt, PrintcapEntry *entry, bool sh
return true;
}
-QString MaticHandler::parsePostpipe(const QString& s)
+TQString MaticHandler::parsePostpipe(const TQString& s)
{
QString url;
int p = s.findRev('|');
- QStringList args = QStringList::split(" ", s.right(s.length()-p-1));
+ QStringList args = TQStringList::split(" ", s.right(s.length()-p-1));
if (args.count() != 0)
{
@@ -143,7 +143,7 @@ QString MaticHandler::parsePostpipe(const QString& s)
// smb printer
else if (args[0].right(10) == "/smbclient")
{
- QStringList host_components = QStringList::split(QRegExp("/|\\\\\""), args[1], false);
+ QStringList host_components = TQStringList::split(TQRegExp("/|\\\\\""), args[1], false);
QString workgrp, user, pass;
for (uint i=2; i<args.count(); i++)
{
@@ -181,7 +181,7 @@ QString MaticHandler::parsePostpipe(const QString& s)
return url;
}
-QString MaticHandler::createPostpipe(const QString& _url)
+TQString MaticHandler::createPostpipe(const TQString& _url)
{
KURL url( _url );
QString prot = url.protocol();
@@ -191,7 +191,7 @@ QString MaticHandler::createPostpipe(const QString& _url)
str += ("| " + m_ncpath);
str += (" " + url.host());
if (url.port() != 0)
- str += (" " + QString::number(url.port()));
+ str += (" " + TQString::number(url.port()));
}
else if (prot == "lpd")
{
@@ -201,7 +201,7 @@ QString MaticHandler::createPostpipe(const QString& _url)
}
else if (prot == "smb")
{
- QString work, server, printer, user, passwd;
+ TQString work, server, printer, user, passwd;
if ( splitSmbURI( _url, work, server, printer, user, passwd ) )
{
str += ("| (\\n echo \\\"print -\\\"\\n cat \\n) | " + m_smbpath);
@@ -225,7 +225,7 @@ DrMain* MaticHandler::loadDriver(KMPrinter*, PrintcapEntry *entry, bool)
// changing printer name), the template would be also removed
QString origfilename = maticFile(entry);
QString filename = locateLocal("tmp", "foomatic_" + kapp->randomString(8));
- ::system(QFile::encodeName("cp " + KProcess::quote(origfilename) + " " + KProcess::quote(filename)));
+ ::system(TQFile::encodeName("cp " + KProcess::quote(origfilename) + " " + KProcess::quote(filename)));
DrMain *driver = Foomatic2Loader::loadDriver(filename);
if (driver)
{
@@ -237,9 +237,9 @@ DrMain* MaticHandler::loadDriver(KMPrinter*, PrintcapEntry *entry, bool)
return NULL;
}
-DrMain* MaticHandler::loadDbDriver(const QString& path)
+DrMain* MaticHandler::loadDbDriver(const TQString& path)
{
- QStringList comps = QStringList::split('/', path, false);
+ QStringList comps = TQStringList::split('/', path, false);
if (comps.count() < 3 || comps[0] != "foomatic")
{
manager()->setErrorMsg(i18n("Internal error."));
@@ -247,7 +247,7 @@ DrMain* MaticHandler::loadDbDriver(const QString& path)
}
QString tmpFile = locateLocal("tmp", "foomatic_" + kapp->randomString(8));
- QString PATH = getenv("PATH") + QString::fromLatin1(":/usr/sbin:/usr/local/sbin:/opt/sbin:/opt/local/sbin");
+ QString PATH = getenv("PATH") + TQString::fromLatin1(":/usr/sbin:/usr/local/sbin:/opt/sbin:/opt/local/sbin");
QString exe = KStandardDirs::findExe("foomatic-datafile", PATH);
if (exe.isEmpty())
{
@@ -258,7 +258,7 @@ DrMain* MaticHandler::loadDbDriver(const QString& path)
KPipeProcess in;
QFile out(tmpFile);
- QString cmd = KProcess::quote(exe);
+ TQString cmd = KProcess::quote(exe);
cmd += " -t lpd -d ";
cmd += KProcess::quote(comps[2]);
cmd += " -p ";
@@ -330,28 +330,28 @@ bool MaticHandler::savePrinterDriver(KMPrinter *prt, PrintcapEntry *entry, DrMai
tmpFile.close();
QString cmd = "mv " + KProcess::quote(tmpFile.name()) + " " + KProcess::quote(outFile);
- int status = ::system(QFile::encodeName(cmd).data());
- QFile::remove(tmpFile.name());
+ int status = ::system(TQFile::encodeName(cmd).data());
+ TQFile::remove(tmpFile.name());
result = (status != -1 && WEXITSTATUS(status) == 0);
}
if (!result)
manager()->setErrorMsg(i18n("You probably don't have the required permissions "
"to perform that operation."));
- QFile::remove(tmpFile.name());
+ TQFile::remove(tmpFile.name());
if (!result || entry->field("ppdfile").isEmpty())
return result;
else
return savePpdFile(driver, entry->field("ppdfile"));
}
-bool MaticHandler::savePpdFile(DrMain *driver, const QString& filename)
+bool MaticHandler::savePpdFile(DrMain *driver, const TQString& filename)
{
QString mdriver(driver->get("matic_driver")), mprinter(driver->get("matic_printer"));
if (mdriver.isEmpty() || mprinter.isEmpty())
return true;
- QString PATH = getenv("PATH") + QString::fromLatin1(":/usr/sbin:/usr/local/sbin:/opt/sbin:/opt/local/sbin");
+ QString PATH = getenv("PATH") + TQString::fromLatin1(":/usr/sbin:/usr/local/sbin:/opt/sbin:/opt/local/sbin");
QString exe = KStandardDirs::findExe("foomatic-datafile", PATH);
if (exe.isEmpty())
{
@@ -452,7 +452,7 @@ bool MaticHandler::removePrinter(KMPrinter *prt, PrintcapEntry *entry)
QString af = entry->field("af");
if (af.isEmpty())
return true;
- if (!QFile::remove(af))
+ if (!TQFile::remove(af))
{
manager()->setErrorMsg(i18n("Unable to remove driver file %1.").arg(af));
return false;
@@ -460,11 +460,11 @@ bool MaticHandler::removePrinter(KMPrinter *prt, PrintcapEntry *entry)
return true;
}
-QString MaticHandler::printOptions(KPrinter *printer)
+TQString MaticHandler::printOptions(KPrinter *printer)
{
- QMap<QString,QString> opts = printer->options();
+ TQMap<TQString,TQString> opts = printer->options();
QString str;
- for (QMap<QString,QString>::Iterator it=opts.begin(); it!=opts.end(); ++it)
+ for (TQMap<TQString,TQString>::Iterator it=opts.begin(); it!=opts.end(); ++it)
{
if (it.key().startsWith("kde-") || it.key().startsWith("_kde-") || it.key().startsWith( "app-" ))
continue;
@@ -475,7 +475,7 @@ QString MaticHandler::printOptions(KPrinter *printer)
return str;
}
-QString MaticHandler::driverDirInternal()
+TQString MaticHandler::driverDirInternal()
{
return locateDir("foomatic/db/source", "/usr/share:/usr/local/share:/opt/share");
}
diff --git a/kdeprint/lpr/matichandler.h b/kdeprint/lpr/matichandler.h
index 1cbcc9941..a7111f5ff 100644
--- a/kdeprint/lpr/matichandler.h
+++ b/kdeprint/lpr/matichandler.h
@@ -35,19 +35,19 @@ public:
KMPrinter* createPrinter(PrintcapEntry*);
bool completePrinter(KMPrinter*, PrintcapEntry*, bool = true);
DrMain* loadDriver(KMPrinter*, PrintcapEntry*, bool = false);
- DrMain* loadDbDriver(const QString&);
+ DrMain* loadDbDriver(const TQString&);
bool savePrinterDriver(KMPrinter*, PrintcapEntry*, DrMain*, bool* = 0);
PrintcapEntry* createEntry(KMPrinter*);
bool removePrinter(KMPrinter*, PrintcapEntry*);
- QString printOptions(KPrinter*);
+ TQString printOptions(KPrinter*);
protected:
- QString driverDirInternal();
+ TQString driverDirInternal();
private:
- QString parsePostpipe(const QString&);
- QString createPostpipe(const QString&);
- bool savePpdFile(DrMain*, const QString&);
+ TQString parsePostpipe(const TQString&);
+ TQString createPostpipe(const TQString&);
+ bool savePpdFile(DrMain*, const TQString&);
private:
QString m_exematicpath;
diff --git a/kdeprint/lpr/matichelper.cpp b/kdeprint/lpr/matichelper.cpp
index 230bcd55b..544db8c71 100644
--- a/kdeprint/lpr/matichelper.cpp
+++ b/kdeprint/lpr/matichelper.cpp
@@ -21,7 +21,7 @@
#include "printcapentry.h"
#include "driver.h"
-QString maticFile(PrintcapEntry *entry)
+TQString maticFile(PrintcapEntry *entry)
{
QString s(entry->field("af"));
if (s.isEmpty())
diff --git a/kdeprint/lpr/matichelper.h b/kdeprint/lpr/matichelper.h
index 8d78d57e7..622dd06aa 100644
--- a/kdeprint/lpr/matichelper.h
+++ b/kdeprint/lpr/matichelper.h
@@ -20,10 +20,10 @@
#ifndef MATICHELPER_H
#define MATICHELPER_H
-#include <qstring.h>
+#include <tqstring.h>
class PrintcapEntry;
-QString maticFile(PrintcapEntry*);
+TQString maticFile(PrintcapEntry*);
#endif
diff --git a/kdeprint/lpr/printcapentry.cpp b/kdeprint/lpr/printcapentry.cpp
index 0a8d79ce4..419a532a9 100644
--- a/kdeprint/lpr/printcapentry.cpp
+++ b/kdeprint/lpr/printcapentry.cpp
@@ -19,7 +19,7 @@
#include "printcapentry.h"
-QString Field::toString() const
+TQString Field::toString() const
{
QString s = name;
switch (type)
@@ -38,14 +38,14 @@ QString Field::toString() const
return s;
}
-bool PrintcapEntry::writeEntry(QTextStream& t)
+bool PrintcapEntry::writeEntry(TQTextStream& t)
{
t << comment << endl;
t << name;
if (aliases.count() > 0)
t << '|' << aliases.join("|");
t << ':';
- for (QMap<QString,Field>::ConstIterator it=fields.begin(); it!=fields.end(); ++it)
+ for (TQMap<TQString,Field>::ConstIterator it=fields.begin(); it!=fields.end(); ++it)
{
t << '\\' << endl << " :";
t << (*it).name;
@@ -72,7 +72,7 @@ bool PrintcapEntry::writeEntry(QTextStream& t)
return true;
}
-void PrintcapEntry::addField(const QString& name, Field::Type type, const QString& value)
+void PrintcapEntry::addField(const TQString& name, Field::Type type, const TQString& value)
{
Field f;
f.name = name;
diff --git a/kdeprint/lpr/printcapentry.h b/kdeprint/lpr/printcapentry.h
index 17dbb9275..15adafddd 100644
--- a/kdeprint/lpr/printcapentry.h
+++ b/kdeprint/lpr/printcapentry.h
@@ -24,10 +24,10 @@
#warning internal header, do not use except if you are a KDEPrint developer
#endif
-#include <qstring.h>
-#include <qmap.h>
-#include <qstringlist.h>
-#include <qtextstream.h>
+#include <tqstring.h>
+#include <tqmap.h>
+#include <tqstringlist.h>
+#include <tqtextstream.h>
/**
* @internal
@@ -49,7 +49,7 @@ public:
value = f.value;
return (*this);
}
- QString toString() const;
+ TQString toString() const;
Type type;
QString name;
@@ -69,13 +69,13 @@ public:
QString name;
QStringList aliases;
QString comment;
- QMap<QString,Field> fields;
+ TQMap<TQString,Field> fields;
QString postcomment;
- bool has(const QString& f) const { return fields.contains(f); }
- QString field(const QString& f) const { return fields[f].value; }
- bool writeEntry(QTextStream&);
- void addField(const QString& name, Field::Type type = Field::Boolean, const QString& value = QString::null);
+ bool has(const TQString& f) const { return fields.contains(f); }
+ TQString field(const TQString& f) const { return fields[f].value; }
+ bool writeEntry(TQTextStream&);
+ void addField(const TQString& name, Field::Type type = Field::Boolean, const TQString& value = TQString::null);
};
#endif
diff --git a/kdeprint/lpr/printcapreader.cpp b/kdeprint/lpr/printcapreader.cpp
index b57d33ba0..a3ab30e8f 100644
--- a/kdeprint/lpr/printcapreader.cpp
+++ b/kdeprint/lpr/printcapreader.cpp
@@ -20,26 +20,26 @@
#include "printcapreader.h"
#include "printcapentry.h"
-#include <qfile.h>
+#include <tqfile.h>
#include <kdebug.h>
-void PrintcapReader::setPrintcapFile(QFile *f)
+void PrintcapReader::setPrintcapFile(TQFile *f)
{
if (f->isOpen())
{
m_stream.setDevice(f);
- m_buffer = QString::null;
+ m_buffer = TQString::null;
}
}
-bool PrintcapReader::nextLine(QString& line)
+bool PrintcapReader::nextLine(TQString& line)
{
if (m_stream.atEnd() && m_buffer.isEmpty())
return false;
else if (!m_buffer.isEmpty())
{
line = m_buffer;
- m_buffer = QString::null;
+ m_buffer = TQString::null;
}
else
line = m_stream.readLine().stripWhiteSpace();
@@ -49,7 +49,7 @@ bool PrintcapReader::nextLine(QString& line)
return true;
}
-void PrintcapReader::unputLine(const QString& s)
+void PrintcapReader::unputLine(const TQString& s)
{
m_buffer = s;
}
@@ -59,7 +59,7 @@ PrintcapEntry* PrintcapReader::nextEntry()
if (!m_stream.device())
return NULL;
- QString line, comment, name, fields, buf;
+ TQString line, comment, name, fields, buf;
// skip comments, keep last one
while (1)
{
@@ -114,7 +114,7 @@ PrintcapEntry* PrintcapReader::nextEntry()
if (!name.isEmpty())
{
PrintcapEntry *entry = new PrintcapEntry;
- QStringList l = QStringList::split('|', name, false);
+ TQStringList l = TQStringList::split('|', name, false);
entry->name = l[0];
entry->comment = comment;
// kdDebug() << "Printer: " << entry->name << endl;
@@ -128,8 +128,8 @@ PrintcapEntry* PrintcapReader::nextEntry()
{
// kdDebug() << "Fields:" << endl;
// kdDebug() << "(" << fields << ")" << endl;
- l = QStringList::split(':', fields, false);
- for (QStringList::ConstIterator it=l.begin(); it!=l.end(); ++it)
+ l = TQStringList::split(':', fields, false);
+ for (TQStringList::ConstIterator it=l.begin(); it!=l.end(); ++it)
{
Field f;
int p = (*it).find('=');
diff --git a/kdeprint/lpr/printcapreader.h b/kdeprint/lpr/printcapreader.h
index 4741f2520..117b34f8c 100644
--- a/kdeprint/lpr/printcapreader.h
+++ b/kdeprint/lpr/printcapreader.h
@@ -20,8 +20,8 @@
#ifndef PRINTCAPREADER_H
#define PRINTCAPREADER_H
-#include <qstring.h>
-#include <qtextstream.h>
+#include <tqstring.h>
+#include <tqtextstream.h>
class QFile;
class PrintcapEntry;
@@ -29,15 +29,15 @@ class PrintcapEntry;
class PrintcapReader
{
public:
- void setPrintcapFile(QFile*);
+ void setPrintcapFile(TQFile*);
PrintcapEntry* nextEntry();
private:
- QString m_buffer;
- QTextStream m_stream;
+ TQString m_buffer;
+ TQTextStream m_stream;
- bool nextLine(QString&);
- void unputLine(const QString&);
+ bool nextLine(TQString&);
+ void unputLine(const TQString&);
};
#endif
diff --git a/kdeprint/management/cjanuswidget.cpp b/kdeprint/management/cjanuswidget.cpp
index a2ea52b2e..7bad07264 100644
--- a/kdeprint/management/cjanuswidget.cpp
+++ b/kdeprint/management/cjanuswidget.cpp
@@ -19,11 +19,11 @@
#include "cjanuswidget.h"
-#include <qwidgetstack.h>
-#include <qlabel.h>
-#include <qpainter.h>
+#include <tqwidgetstack.h>
+#include <tqlabel.h>
+#include <tqpainter.h>
#include <klistbox.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kseparator.h>
class CJanusWidget::CPage
@@ -41,35 +41,35 @@ public:
class CJanusWidget::CListBoxItem : public QListBoxItem
{
public:
- CListBoxItem(QListBox *lb, QListBoxItem *after, const QPixmap& pix, const QString& text);
- int height(const QListBox*) const;
- int width(const QListBox*) const;
+ CListBoxItem(TQListBox *lb, TQListBoxItem *after, const TQPixmap& pix, const TQString& text);
+ int height(const TQListBox*) const;
+ int width(const TQListBox*) const;
protected:
- void paint(QPainter*);
+ void paint(TQPainter*);
private:
QPixmap m_pix;
};
-CJanusWidget::CListBoxItem::CListBoxItem(QListBox *lb, QListBoxItem *after, const QPixmap& pix, const QString& text)
-: QListBoxItem(lb, after), m_pix(pix)
+CJanusWidget::CListBoxItem::CListBoxItem(TQListBox *lb, TQListBoxItem *after, const TQPixmap& pix, const TQString& text)
+: TQListBoxItem(lb, after), m_pix(pix)
{
setText(text);
}
-int CJanusWidget::CListBoxItem::height(const QListBox *lb) const
+int CJanusWidget::CListBoxItem::height(const TQListBox *lb) const
{
return (m_pix.height() + lb->fontMetrics().lineSpacing() + 12);
}
-int CJanusWidget::CListBoxItem::width(const QListBox *lb) const
+int CJanusWidget::CListBoxItem::width(const TQListBox *lb) const
{
int w = QMAX(lb->fontMetrics().width(text()),m_pix.width());
return (w + 10);
}
-void CJanusWidget::CListBoxItem::paint(QPainter *p)
+void CJanusWidget::CListBoxItem::paint(TQPainter *p)
{
int w1 = (listBox()->contentsWidth()-m_pix.width())/2;
@@ -82,16 +82,16 @@ void CJanusWidget::CListBoxItem::paint(QPainter *p)
class CJanusWidget::CListBox : public KListBox
{
public:
- CListBox(QWidget *parent = 0, const char *name = 0);
+ CListBox(TQWidget *parent = 0, const char *name = 0);
~CListBox();
void computeWidth();
protected:
- virtual bool eventFilter(QObject*, QEvent*);
+ virtual bool eventFilter(TQObject*, TQEvent*);
};
-CJanusWidget::CListBox::CListBox(QWidget *parent, const char *name)
+CJanusWidget::CListBox::CListBox(TQWidget *parent, const char *name)
: KListBox(parent,name)
{
verticalScrollBar()->installEventFilter(this);
@@ -101,9 +101,9 @@ CJanusWidget::CListBox::~CListBox()
{
}
-bool CJanusWidget::CListBox::eventFilter(QObject *o, QEvent *e)
+bool CJanusWidget::CListBox::eventFilter(TQObject *o, TQEvent *e)
{
- if (e->type() == QEvent::Show || e->type() == QEvent::Hide)
+ if (e->type() == TQEvent::Show || e->type() == TQEvent::Hide)
computeWidth();
return KListBox::eventFilter(o,e);
}
@@ -125,13 +125,13 @@ void CJanusWidget::CListBox::computeWidth()
//***********************************************************************************
-CJanusWidget::CJanusWidget(QWidget *parent, const char *name)
-: QWidget(parent,name)
+CJanusWidget::CJanusWidget(TQWidget *parent, const char *name)
+: TQWidget(parent,name)
{
m_pages.setAutoDelete(true);
- m_stack = new QWidgetStack(this);
- m_header = new QLabel(this);
+ m_stack = new TQWidgetStack(this);
+ m_header = new TQLabel(this);
QFont f(m_header->font());
f.setBold(true);
m_header->setFont(f);
@@ -143,13 +143,13 @@ CJanusWidget::CJanusWidget(QWidget *parent, const char *name)
f = m_iconlist->font();
f.setBold(true);
m_iconlist->setFont(f);
- connect(m_iconlist,SIGNAL(selectionChanged(QListBoxItem*)),SLOT(slotSelected(QListBoxItem*)));
+ connect(m_iconlist,TQT_SIGNAL(selectionChanged(TQListBoxItem*)),TQT_SLOT(slotSelected(TQListBoxItem*)));
- m_empty = new QWidget(this, "Empty");
+ m_empty = new TQWidget(this, "Empty");
m_stack->addWidget(m_empty,0);
- QHBoxLayout *main_ = new QHBoxLayout(this, 0, 10);
- QVBoxLayout *sub_ = new QVBoxLayout(0, 0, 5);
+ QHBoxLayout *main_ = new TQHBoxLayout(this, 0, 10);
+ QVBoxLayout *sub_ = new TQVBoxLayout(0, 0, 5);
main_->addWidget(m_iconlist,0);
main_->addLayout(sub_,1);
sub_->addWidget(m_header,0);
@@ -161,7 +161,7 @@ CJanusWidget::~CJanusWidget()
{
}
-void CJanusWidget::addPage(QWidget *w, const QString& text, const QString& header, const QPixmap& pix)
+void CJanusWidget::addPage(TQWidget *w, const TQString& text, const TQString& header, const TQPixmap& pix)
{
CPage *page = new CPage();
m_pages.append(page);
@@ -177,7 +177,7 @@ void CJanusWidget::addPage(QWidget *w, const QString& text, const QString& heade
m_iconlist->setSelected(page->m_item,true);
}
-void CJanusWidget::enablePage(QWidget *w)
+void CJanusWidget::enablePage(TQWidget *w)
{
CPage *page = findPage(w);
if (page && !page->m_item)
@@ -189,7 +189,7 @@ void CJanusWidget::enablePage(QWidget *w)
}
}
-void CJanusWidget::disablePage(QWidget *w)
+void CJanusWidget::disablePage(TQWidget *w)
{
CPage *page = findPage(w);
if (page && page->m_item)
@@ -206,7 +206,7 @@ void CJanusWidget::disablePage(QWidget *w)
}
}
-void CJanusWidget::slotSelected(QListBoxItem *item)
+void CJanusWidget::slotSelected(TQListBoxItem *item)
{
CPage *page = findPage(item);
if (page)
@@ -221,25 +221,25 @@ void CJanusWidget::slotSelected(QListBoxItem *item)
}
}
-CJanusWidget::CPage* CJanusWidget::findPage(QWidget *w)
+CJanusWidget::CPage* CJanusWidget::findPage(TQWidget *w)
{
- QPtrListIterator<CPage> it(m_pages);
+ TQPtrListIterator<CPage> it(m_pages);
for (;it.current();++it)
if (it.current()->m_widget == w)
return it.current();
return 0;
}
-CJanusWidget::CPage* CJanusWidget::findPage(QListBoxItem *i)
+CJanusWidget::CPage* CJanusWidget::findPage(TQListBoxItem *i)
{
- QPtrListIterator<CPage> it(m_pages);
+ TQPtrListIterator<CPage> it(m_pages);
for (;it.current();++it)
if (it.current()->m_item == i)
return it.current();
return 0;
}
-QListBoxItem* CJanusWidget::findPrevItem(CPage *p)
+TQListBoxItem* CJanusWidget::findPrevItem(CPage *p)
{
if (m_pages.findRef(p) == -1)
m_pages.last();
@@ -253,7 +253,7 @@ QListBoxItem* CJanusWidget::findPrevItem(CPage *p)
void CJanusWidget::clearPages()
{
- QPtrListIterator<CPage> it(m_pages);
+ TQPtrListIterator<CPage> it(m_pages);
for (;it.current(); ++it)
{
delete it.current()->m_widget;
diff --git a/kdeprint/management/cjanuswidget.h b/kdeprint/management/cjanuswidget.h
index b0d1da50f..7bfb2ab46 100644
--- a/kdeprint/management/cjanuswidget.h
+++ b/kdeprint/management/cjanuswidget.h
@@ -20,9 +20,9 @@
#ifndef CJANUSWIDGET_H
#define CJANUSWIDGET_H
-#include <qwidget.h>
-#include <qpixmap.h>
-#include <qptrlist.h>
+#include <tqwidget.h>
+#include <tqpixmap.h>
+#include <tqptrlist.h>
class QWidgetStack;
class QLabel;
@@ -32,16 +32,16 @@ class CJanusWidget : public QWidget
{
Q_OBJECT
public:
- CJanusWidget(QWidget *parent, const char *name);
+ CJanusWidget(TQWidget *parent, const char *name);
~CJanusWidget();
- void addPage(QWidget *w, const QString& text, const QString& header, const QPixmap& pix);
- void enablePage(QWidget *w);
- void disablePage(QWidget *w);
+ void addPage(TQWidget *w, const TQString& text, const TQString& header, const TQPixmap& pix);
+ void enablePage(TQWidget *w);
+ void disablePage(TQWidget *w);
void clearPages();
protected slots:
- void slotSelected(QListBoxItem*);
+ void slotSelected(TQListBoxItem*);
public:
class CPage;
@@ -49,12 +49,12 @@ public:
class CListBoxItem;
private:
- CPage* findPage(QWidget *w);
- CPage* findPage(QListBoxItem *i);
- QListBoxItem* findPrevItem(CPage*);
+ CPage* findPage(TQWidget *w);
+ CPage* findPage(TQListBoxItem *i);
+ TQListBoxItem* findPrevItem(CPage*);
private:
- QPtrList<CPage> m_pages;
+ TQPtrList<CPage> m_pages;
CListBox *m_iconlist;
QLabel *m_header;
QWidgetStack *m_stack;
diff --git a/kdeprint/management/jobitem.cpp b/kdeprint/management/jobitem.cpp
index 61a2eaf9d..171a91657 100644
--- a/kdeprint/management/jobitem.cpp
+++ b/kdeprint/management/jobitem.cpp
@@ -22,8 +22,8 @@
#include <kiconloader.h>
-JobItem::JobItem(QListView *parent, KMJob *job)
-: QListViewItem(parent)
+JobItem::JobItem(TQListView *parent, KMJob *job)
+: TQListViewItem(parent)
{
m_job = new KMJob;
init(job);
@@ -39,13 +39,13 @@ void JobItem::init(KMJob *job)
m_job->copy(job ? *job : KMJob());
setPixmap(0,SmallIcon(m_job->pixmap()));
- setText(0,QString::number(m_job->id()));
+ setText(0,TQString::number(m_job->id()));
//setText(6,m_job->printer());
setText(2,m_job->name());
setText(1,m_job->owner());
setText(3,m_job->stateString());
- setText(4,QString::number(m_job->size()));
- setText(5,QString::number(m_job->processedPages()));
+ setText(4,TQString::number(m_job->size()));
+ setText(5,TQString::number(m_job->processedPages()));
m_ID = m_job->id();
m_uri = m_job->uri();
@@ -56,7 +56,7 @@ void JobItem::init(KMJob *job)
widthChanged();
}
-int JobItem::compare(QListViewItem *item, int col, bool asc) const
+int JobItem::compare(TQListViewItem *item, int col, bool asc) const
{
switch (col)
{
@@ -69,6 +69,6 @@ int JobItem::compare(QListViewItem *item, int col, bool asc) const
break;
}
default:
- return QListViewItem::compare(item, col, asc);
+ return TQListViewItem::compare(item, col, asc);
}
}
diff --git a/kdeprint/management/jobitem.h b/kdeprint/management/jobitem.h
index fdb310b31..31c7923d8 100644
--- a/kdeprint/management/jobitem.h
+++ b/kdeprint/management/jobitem.h
@@ -20,21 +20,21 @@
#ifndef JOBITEM_H
#define JOBITEM_H
-#include <qlistview.h>
+#include <tqlistview.h>
#include "kmobject.h"
class KMJob;
-class JobItem : public QListViewItem, public KMObject
+class JobItem : public TQListViewItem, public KMObject
{
public:
- JobItem(QListView *parent, KMJob *job = 0);
+ JobItem(TQListView *parent, KMJob *job = 0);
~JobItem();
void init(KMJob *job);
- int compare(QListViewItem*, int, bool) const;
+ int compare(TQListViewItem*, int, bool) const;
int jobID() const;
- QString jobUri() const;
+ TQString jobUri() const;
KMJob* job() const;
private:
@@ -49,7 +49,7 @@ inline int JobItem::jobID() const
inline KMJob* JobItem::job() const
{ return m_job; }
-inline QString JobItem::jobUri() const
+inline TQString JobItem::jobUri() const
{ return m_uri; }
#endif
diff --git a/kdeprint/management/kdeprint_management_module.cpp b/kdeprint/management/kdeprint_management_module.cpp
index 276eb76f5..70c7b4cfd 100644
--- a/kdeprint/management/kdeprint_management_module.cpp
+++ b/kdeprint/management/kdeprint_management_module.cpp
@@ -32,25 +32,25 @@
extern "C"
{
- KDEPRINT_EXPORT int add_printer_wizard(QWidget *parent)
+ KDEPRINT_EXPORT int add_printer_wizard(TQWidget *parent)
{
return kdeprint_management_add_printer_wizard( parent );
}
- KDEPRINT_EXPORT bool config_dialog(QWidget *parent)
+ KDEPRINT_EXPORT bool config_dialog(TQWidget *parent)
{
KMConfigDialog dlg(parent);
return dlg.exec();
}
- KDEPRINT_EXPORT QString select_command( QWidget* parent )
+ KDEPRINT_EXPORT TQString select_command( TQWidget* parent )
{
KDialogBase dlg( parent, 0, true, i18n( "Select Command" ), KDialogBase::Ok|KDialogBase::Cancel );
KXmlCommandSelector *xmlSel = new KXmlCommandSelector( false, &dlg, "CommandSelector", &dlg );
dlg.setMainWidget( xmlSel );
if ( dlg.exec() )
return xmlSel->command();
- return QString::null;
+ return TQString::null;
}
}
diff --git a/kdeprint/management/kiconselectaction.cpp b/kdeprint/management/kiconselectaction.cpp
index 9939d061e..6b22dbee8 100644
--- a/kdeprint/management/kiconselectaction.cpp
+++ b/kdeprint/management/kiconselectaction.cpp
@@ -19,7 +19,7 @@
#include "kiconselectaction.h"
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
#include <kiconloader.h>
#include <kdebug.h>
#include <ktoolbar.h>
@@ -33,10 +33,10 @@ public:
m_menu = 0;
}
QStringList m_iconlst;
- QPopupMenu* m_menu;
+ TQPopupMenu* m_menu;
};
-KIconSelectAction::KIconSelectAction(const QString& text, int accel, QObject* parent, const char* name)
+KIconSelectAction::KIconSelectAction(const TQString& text, int accel, TQObject* parent, const char* name)
: KSelectAction(text, accel, parent, name)
{
d = new KIconSelectActionPrivate;
@@ -66,17 +66,17 @@ void KIconSelectAction::createPopupMenu()
}
}
-void KIconSelectAction::setItems(const QStringList& lst, const QStringList& iconlst)
+void KIconSelectAction::setItems(const TQStringList& lst, const TQStringList& iconlst)
{
KSelectAction::setItems(lst);
d->m_iconlst = iconlst;
updateIcons();
}
-int KIconSelectAction::plug(QWidget* widget, int index)
+int KIconSelectAction::plug(TQWidget* widget, int index)
{
int value(-1);
- if (widget->inherits("QPopupMenu"))
+ if (widget->inherits("TQPopupMenu"))
{
createPopupMenu();
value = KSelectAction::plug(widget, index);
@@ -94,7 +94,7 @@ int KIconSelectAction::plug(QWidget* widget, int index)
bar->getButton(id)->setPopup(d->m_menu, true);
bar->setItemEnabled(id, isEnabled());
addContainer(bar, id);
- connect(bar, SIGNAL(destroyed()), SLOT(slotDestroyed()));
+ connect(bar, TQT_SIGNAL(destroyed()), TQT_SLOT(slotDestroyed()));
value = containerCount()-1;
}
@@ -103,7 +103,7 @@ int KIconSelectAction::plug(QWidget* widget, int index)
void KIconSelectAction::updateCurrentItem(int id)
{
- QWidget* w = container(id);
+ TQWidget* w = container(id);
if (w->inherits("KToolBar"))
static_cast<KToolBar*>(w)->getButton(itemId(id))->setIcon(d->m_iconlst[currentItem()]);
else
diff --git a/kdeprint/management/kiconselectaction.h b/kdeprint/management/kiconselectaction.h
index 0cfcdaf84..dfd6ea17b 100644
--- a/kdeprint/management/kiconselectaction.h
+++ b/kdeprint/management/kiconselectaction.h
@@ -28,13 +28,13 @@ class KIconSelectAction : public KSelectAction
{
Q_OBJECT
public:
- KIconSelectAction(const QString& text, int accel = 0, QObject* parent = 0, const char* name = 0);
+ KIconSelectAction(const TQString& text, int accel = 0, TQObject* parent = 0, const char* name = 0);
virtual ~KIconSelectAction();
- virtual int plug(QWidget* widget, int index = -1);
+ virtual int plug(TQWidget* widget, int index = -1);
public slots:
- virtual void setItems(const QStringList& lst, const QStringList& iconlst);
+ virtual void setItems(const TQStringList& lst, const TQStringList& iconlst);
virtual void setCurrentItem(int index);
protected:
diff --git a/kdeprint/management/kmconfigcommand.cpp b/kdeprint/management/kmconfigcommand.cpp
index 5af13e170..21a1a330b 100644
--- a/kdeprint/management/kmconfigcommand.cpp
+++ b/kdeprint/management/kmconfigcommand.cpp
@@ -20,22 +20,22 @@
#include "kmconfigcommand.h"
#include "kxmlcommandselector.h"
-#include <qlabel.h>
-#include <qgroupbox.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqgroupbox.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kdialog.h>
-KMConfigCommand::KMConfigCommand(QWidget *parent, const char *name)
+KMConfigCommand::KMConfigCommand(TQWidget *parent, const char *name)
: KMConfigPage(parent, name)
{
setPageName(i18n("Commands"));
setPageHeader(i18n("Command Settings"));
setPagePixmap("exec");
- QGroupBox *gb = new QGroupBox(0, Qt::Horizontal, i18n("Edit/Create Commands"), this);
- QLabel *lab = new QLabel(i18n(
+ QGroupBox *gb = new TQGroupBox(0, Qt::Horizontal, i18n("Edit/Create Commands"), this);
+ QLabel *lab = new TQLabel(i18n(
"<p>Command objects perform a conversion from input to output.<br>"
"They are used as the basis to build both print filters "
"and special printers. They are described by a command string, a "
@@ -44,10 +44,10 @@ KMConfigCommand::KMConfigCommand(QWidget *parent, const char *name)
"changes will only be effective for you."), gb);
KXmlCommandSelector *sel = new KXmlCommandSelector(false, gb);
- QVBoxLayout *l0 = new QVBoxLayout(this, 0, KDialog::spacingHint());
+ QVBoxLayout *l0 = new TQVBoxLayout(this, 0, KDialog::spacingHint());
l0->addWidget(gb);
l0->addStretch(1);
- QVBoxLayout *l2 = new QVBoxLayout(gb->layout(), KDialog::spacingHint());
+ QVBoxLayout *l2 = new TQVBoxLayout(gb->layout(), KDialog::spacingHint());
l2->addWidget(lab);
l2->addWidget(sel);
}
diff --git a/kdeprint/management/kmconfigcommand.h b/kdeprint/management/kmconfigcommand.h
index 17aa88042..2ec662d95 100644
--- a/kdeprint/management/kmconfigcommand.h
+++ b/kdeprint/management/kmconfigcommand.h
@@ -25,7 +25,7 @@
class KMConfigCommand : public KMConfigPage
{
public:
- KMConfigCommand(QWidget *parent = 0, const char *name = 0);
+ KMConfigCommand(TQWidget *parent = 0, const char *name = 0);
};
#endif
diff --git a/kdeprint/management/kmconfigdialog.cpp b/kdeprint/management/kmconfigdialog.cpp
index b775786e8..9bd20e494 100644
--- a/kdeprint/management/kmconfigdialog.cpp
+++ b/kdeprint/management/kmconfigdialog.cpp
@@ -29,12 +29,12 @@
#include "kmconfigfonts.h"
#include "kmconfigjobs.h"
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kiconloader.h>
#include <kconfig.h>
-KMConfigDialog::KMConfigDialog(QWidget *parent, const char *name)
+KMConfigDialog::KMConfigDialog(TQWidget *parent, const char *name)
: KDialogBase(IconList,i18n("KDE Print Configuration"),Ok|Cancel,Ok,parent,name,true,true)
{
m_pages.setAutoDelete(false);
@@ -48,7 +48,7 @@ KMConfigDialog::KMConfigDialog(QWidget *parent, const char *name)
// initialize pages
KConfig *conf = KMFactory::self()->printConfig();
- QPtrListIterator<KMConfigPage> it(m_pages);
+ TQPtrListIterator<KMConfigPage> it(m_pages);
for (;it.current();++it)
it.current()->loadConfig(conf);
@@ -60,15 +60,15 @@ void KMConfigDialog::addConfigPage(KMConfigPage *page)
{
if (page)
{
- QPixmap icon = KGlobal::instance()->iconLoader()->loadIcon(
+ TQPixmap icon = KGlobal::instance()->iconLoader()->loadIcon(
page->pagePixmap(),
KIcon::NoGroup,
KIcon::SizeMedium
);
QFrame *frame = addPage(page->pageName(),page->pageHeader(),icon);
- page->reparent(frame,QPoint(0,0));
- QVBoxLayout *lay = new QVBoxLayout(frame, 0, 0);
+ page->reparent(frame,TQPoint(0,0));
+ QVBoxLayout *lay = new TQVBoxLayout(frame, 0, 0);
lay->addWidget(page);
m_pages.append(page);
}
@@ -78,7 +78,7 @@ void KMConfigDialog::slotOk()
{
// save configuration
KConfig *conf = KMFactory::self()->printConfig();
- QPtrListIterator<KMConfigPage> it(m_pages);
+ TQPtrListIterator<KMConfigPage> it(m_pages);
for (;it.current();++it)
it.current()->saveConfig(conf);
KMFactory::self()->saveConfig();
diff --git a/kdeprint/management/kmconfigdialog.h b/kdeprint/management/kmconfigdialog.h
index 977408d70..ed60378c5 100644
--- a/kdeprint/management/kmconfigdialog.h
+++ b/kdeprint/management/kmconfigdialog.h
@@ -21,7 +21,7 @@
#define KMCONFIGDIALOG_H
#include <kdialogbase.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include "kmconfigpage.h"
@@ -29,7 +29,7 @@ class KDEPRINT_EXPORT KMConfigDialog : public KDialogBase
{
Q_OBJECT
public:
- KMConfigDialog(QWidget *parent = 0, const char *name = 0);
+ KMConfigDialog(TQWidget *parent = 0, const char *name = 0);
void addConfigPage(KMConfigPage*);
@@ -37,7 +37,7 @@ protected slots:
void slotOk();
private:
- QPtrList<KMConfigPage> m_pages;
+ TQPtrList<KMConfigPage> m_pages;
};
#endif
diff --git a/kdeprint/management/kmconfigfilter.cpp b/kdeprint/management/kmconfigfilter.cpp
index 1a62112f7..10dff4749 100644
--- a/kdeprint/management/kmconfigfilter.cpp
+++ b/kdeprint/management/kmconfigfilter.cpp
@@ -21,12 +21,12 @@
#include "kmmanager.h"
#include "kmfactory.h"
-#include <qgroupbox.h>
-#include <qlineedit.h>
-#include <qtoolbutton.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qapplication.h>
+#include <tqgroupbox.h>
+#include <tqlineedit.h>
+#include <tqtoolbutton.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqapplication.h>
#include <klocale.h>
#include <kconfig.h>
@@ -34,38 +34,38 @@
#include <klistbox.h>
#include <kdialog.h>
-KMConfigFilter::KMConfigFilter(QWidget *parent, const char *name)
+KMConfigFilter::KMConfigFilter(TQWidget *parent, const char *name)
: KMConfigPage(parent, name)
{
setPageName(i18n("Filter"));
setPageHeader(i18n("Printer Filtering Settings"));
setPagePixmap("filter");
- QGroupBox *box = new QGroupBox(0, Qt::Vertical, i18n("Printer Filter"), this);
+ QGroupBox *box = new TQGroupBox(0, Qt::Vertical, i18n("Printer Filter"), this);
m_list1 = new KListBox(box);
m_list1->setSelectionMode(KListBox::Extended);
m_list2 = new KListBox(box);
m_list2->setSelectionMode(KListBox::Extended);
- m_add = new QToolButton( box );
- m_add->setIconSet(QApplication::reverseLayout() ? SmallIconSet( "back" ) : SmallIconSet( "forward" ));
- m_remove = new QToolButton( box );
- m_remove->setIconSet(QApplication::reverseLayout() ? SmallIconSet( "forward" ) : SmallIconSet( "back" ));
- m_locationre = new QLineEdit(box);
- QLabel *lab = new QLabel(box);
+ m_add = new TQToolButton( box );
+ m_add->setIconSet(TQApplication::reverseLayout() ? SmallIconSet( "back" ) : SmallIconSet( "forward" ));
+ m_remove = new TQToolButton( box );
+ m_remove->setIconSet(TQApplication::reverseLayout() ? SmallIconSet( "forward" ) : SmallIconSet( "back" ));
+ m_locationre = new TQLineEdit(box);
+ QLabel *lab = new TQLabel(box);
lab->setText(i18n("The printer filtering allows you to view only a specific set of "
"printers instead of all of them. This may be useful when there are a "
"lot of printers available but you only use a few ones. Select the "
"printers you want to see from the list on the left or enter a <b>Location</b> "
"filter (ex: Group_1*). Both are cumulative and ignored if empty."));
lab->setTextFormat(Qt::RichText);
- QLabel *lab1 = new QLabel(i18n("Location filter:"), box);
+ QLabel *lab1 = new TQLabel(i18n("Location filter:"), box);
- QVBoxLayout *l0 = new QVBoxLayout(this, 0, KDialog::spacingHint());
+ QVBoxLayout *l0 = new TQVBoxLayout(this, 0, KDialog::spacingHint());
l0->addWidget(box, 1);
- QVBoxLayout *l1 = new QVBoxLayout(box->layout(), KDialog::spacingHint());
+ QVBoxLayout *l1 = new TQVBoxLayout(box->layout(), KDialog::spacingHint());
l1->addWidget(lab);
- QGridLayout *l2 = new QGridLayout(0, 4, 3, 0, KDialog::spacingHint());
+ QGridLayout *l2 = new TQGridLayout(0, 4, 3, 0, KDialog::spacingHint());
l1->addLayout(l2);
l2->setRowStretch(0, 1);
l2->setRowStretch(3, 1);
@@ -75,15 +75,15 @@ KMConfigFilter::KMConfigFilter(QWidget *parent, const char *name)
l2->addMultiCellWidget(m_list2, 0, 3, 2, 2);
l2->addWidget(m_add, 1, 1);
l2->addWidget(m_remove, 2, 1);
- QHBoxLayout *l3 = new QHBoxLayout(0, 0, KDialog::spacingHint());
+ QHBoxLayout *l3 = new TQHBoxLayout(0, 0, KDialog::spacingHint());
l1->addLayout(l3, 0);
l3->addWidget(lab1, 0);
l3->addWidget(m_locationre, 1);
- connect(m_add, SIGNAL(clicked()), SLOT(slotAddClicked()));
- connect(m_remove, SIGNAL(clicked()), SLOT(slotRemoveClicked()));
- connect(m_list1, SIGNAL(selectionChanged()), SLOT(slotSelectionChanged()));
- connect(m_list2, SIGNAL(selectionChanged()), SLOT(slotSelectionChanged()));
+ connect(m_add, TQT_SIGNAL(clicked()), TQT_SLOT(slotAddClicked()));
+ connect(m_remove, TQT_SIGNAL(clicked()), TQT_SLOT(slotRemoveClicked()));
+ connect(m_list1, TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotSelectionChanged()));
+ connect(m_list2, TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotSelectionChanged()));
m_add->setEnabled(false);
m_remove->setEnabled(false);
}
@@ -92,7 +92,7 @@ void KMConfigFilter::loadConfig(KConfig *conf)
{
conf->setGroup("Filter");
QStringList m_plist = conf->readListEntry("Printers");
- QPtrListIterator<KMPrinter> it(*(KMManager::self()->printerListComplete(false)));
+ TQPtrListIterator<KMPrinter> it(*(KMManager::self()->printerListComplete(false)));
for (; it.current(); ++it)
{
if (!it.current()->isSpecial() && !it.current()->isVirtual())
diff --git a/kdeprint/management/kmconfigfilter.h b/kdeprint/management/kmconfigfilter.h
index 2374f3b05..82ac2190b 100644
--- a/kdeprint/management/kmconfigfilter.h
+++ b/kdeprint/management/kmconfigfilter.h
@@ -30,7 +30,7 @@ class KMConfigFilter : public KMConfigPage
{
Q_OBJECT
public:
- KMConfigFilter(QWidget *parent = 0, const char *name = 0);
+ KMConfigFilter(TQWidget *parent = 0, const char *name = 0);
void loadConfig(KConfig*);
void saveConfig(KConfig*);
diff --git a/kdeprint/management/kmconfigfonts.cpp b/kdeprint/management/kmconfigfonts.cpp
index c7b4420cb..e59f75728 100644
--- a/kdeprint/management/kmconfigfonts.cpp
+++ b/kdeprint/management/kmconfigfonts.cpp
@@ -19,14 +19,14 @@
#include "kmconfigfonts.h"
-#include <qgroupbox.h>
+#include <tqgroupbox.h>
#include <kpushbutton.h>
-#include <qlayout.h>
-#include <qheader.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qsettings.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqheader.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqsettings.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
#include <kconfig.h>
@@ -36,17 +36,17 @@
#include <klistview.h>
#include <kdialog.h>
-KMConfigFonts::KMConfigFonts(QWidget *parent, const char *name)
+KMConfigFonts::KMConfigFonts(TQWidget *parent, const char *name)
: KMConfigPage(parent, name)
{
setPageName(i18n("Fonts"));
setPageHeader(i18n("Font Settings"));
setPagePixmap("fonts");
- QGroupBox *box = new QGroupBox(0, Qt::Vertical, i18n("Fonts Embedding"), this);
- QGroupBox *box2 = new QGroupBox(0, Qt::Vertical, i18n("Fonts Path"), this);
+ QGroupBox *box = new TQGroupBox(0, Qt::Vertical, i18n("Fonts Embedding"), this);
+ QGroupBox *box2 = new TQGroupBox(0, Qt::Vertical, i18n("Fonts Path"), this);
- m_embedfonts = new QCheckBox(i18n("&Embed fonts in PostScript data when printing"), box);
+ m_embedfonts = new TQCheckBox(i18n("&Embed fonts in PostScript data when printing"), box);
m_fontpath = new KListView(box2);
m_fontpath->addColumn("");
m_fontpath->header()->setStretchEnabled(true, 0);
@@ -58,14 +58,14 @@ KMConfigFonts::KMConfigFonts(QWidget *parent, const char *name)
m_down = new KPushButton(KGuiItem(i18n("&Down"), "down"), box2);
m_add = new KPushButton(KGuiItem(i18n("&Add"), "add"), box2);
m_remove = new KPushButton(KGuiItem(i18n("&Remove"), "editdelete"), box2);
- QLabel *lab0 = new QLabel(i18n("Additional director&y:"), box2);
+ QLabel *lab0 = new TQLabel(i18n("Additional director&y:"), box2);
lab0->setBuddy(m_addpath);
- QVBoxLayout *l0 = new QVBoxLayout(box->layout(), KDialog::spacingHint());
+ QVBoxLayout *l0 = new TQVBoxLayout(box->layout(), KDialog::spacingHint());
l0->addWidget(m_embedfonts);
- QVBoxLayout *l1 = new QVBoxLayout(box2->layout(), KDialog::spacingHint());
+ QVBoxLayout *l1 = new TQVBoxLayout(box2->layout(), KDialog::spacingHint());
l1->addWidget(m_fontpath);
- QHBoxLayout *l2 = new QHBoxLayout(0, 0, KDialog::spacingHint());
+ QHBoxLayout *l2 = new TQHBoxLayout(0, 0, KDialog::spacingHint());
l1->addLayout(l2);
l2->addWidget(m_up);
l2->addWidget(m_down);
@@ -73,30 +73,30 @@ KMConfigFonts::KMConfigFonts(QWidget *parent, const char *name)
l1->addSpacing(10);
l1->addWidget(lab0);
l1->addWidget(m_addpath);
- QHBoxLayout *l3 = new QHBoxLayout(0, 0, KDialog::spacingHint());
+ QHBoxLayout *l3 = new TQHBoxLayout(0, 0, KDialog::spacingHint());
l1->addLayout(l3);
l3->addStretch(1);
l3->addWidget(m_add);
- QVBoxLayout *l4 = new QVBoxLayout(this, 0, KDialog::spacingHint());
+ QVBoxLayout *l4 = new TQVBoxLayout(this, 0, KDialog::spacingHint());
l4->addWidget(box);
l4->addWidget(box2);
- QWhatsThis::add(m_embedfonts,
+ TQWhatsThis::add(m_embedfonts,
i18n("These options will automatically put fonts in the PostScript file "
"which are not present on the printer. Font embedding usually produces better print results "
"(closer to what you see on the screen), but larger print data as well."));
- QWhatsThis::add(m_fontpath,
+ TQWhatsThis::add(m_fontpath,
i18n("When using font embedding you can select additional directories where "
"KDE should search for embeddable font files. By default, the X server "
"font path is used, so adding those directories is not needed. The default "
"search path should be sufficient in most cases."));
- connect(m_remove, SIGNAL(clicked()), SLOT(slotRemove()));
- connect(m_add, SIGNAL(clicked()), SLOT(slotAdd()));
- connect(m_up, SIGNAL(clicked()), SLOT(slotUp()));
- connect(m_down, SIGNAL(clicked()), SLOT(slotDown()));
- connect(m_fontpath, SIGNAL(selectionChanged()), SLOT(slotSelected()));
- connect(m_addpath, SIGNAL(textChanged(const QString&)), SLOT(slotTextChanged(const QString&)));
+ connect(m_remove, TQT_SIGNAL(clicked()), TQT_SLOT(slotRemove()));
+ connect(m_add, TQT_SIGNAL(clicked()), TQT_SLOT(slotAdd()));
+ connect(m_up, TQT_SIGNAL(clicked()), TQT_SLOT(slotUp()));
+ connect(m_down, TQT_SIGNAL(clicked()), TQT_SLOT(slotDown()));
+ connect(m_fontpath, TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotSelected()));
+ connect(m_addpath, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotTextChanged(const TQString&)));
m_add->setEnabled(false);
m_remove->setEnabled(false);
m_up->setEnabled(false);
@@ -109,8 +109,8 @@ void KMConfigFonts::loadConfig(KConfig *)
m_embedfonts->setChecked(settings.readBoolEntry("/qt/embedFonts", true));
QStringList paths = settings.readListEntry("/qt/fontPath", ':');
QListViewItem *item(0);
- for (QStringList::ConstIterator it=paths.begin(); it!=paths.end(); ++it)
- item = new QListViewItem(m_fontpath, item, *it);
+ for (TQStringList::ConstIterator it=paths.begin(); it!=paths.end(); ++it)
+ item = new TQListViewItem(m_fontpath, item, *it);
}
void KMConfigFonts::saveConfig(KConfig *)
@@ -142,7 +142,7 @@ void KMConfigFonts::slotAdd()
QListViewItem *lastItem(m_fontpath->firstChild());
while (lastItem && lastItem->nextSibling())
lastItem = lastItem->nextSibling();
- QListViewItem *item = new QListViewItem(m_fontpath, lastItem, m_addpath->url());
+ QListViewItem *item = new TQListViewItem(m_fontpath, lastItem, m_addpath->url());
m_fontpath->setSelected(item, true);
}
@@ -159,7 +159,7 @@ void KMConfigFonts::slotUp()
QListViewItem *citem = m_fontpath->selectedItem(), *nitem = 0;
if (!citem || !citem->itemAbove())
return;
- nitem = new QListViewItem(m_fontpath, citem->itemAbove()->itemAbove(), citem->text(0));
+ nitem = new TQListViewItem(m_fontpath, citem->itemAbove()->itemAbove(), citem->text(0));
delete citem;
m_fontpath->setSelected(nitem, true);
}
@@ -169,12 +169,12 @@ void KMConfigFonts::slotDown()
QListViewItem *citem = m_fontpath->selectedItem(), *nitem = 0;
if (!citem || !citem->itemBelow())
return;
- nitem = new QListViewItem(m_fontpath, citem->itemBelow(), citem->text(0));
+ nitem = new TQListViewItem(m_fontpath, citem->itemBelow(), citem->text(0));
delete citem;
m_fontpath->setSelected(nitem, true);
}
-void KMConfigFonts::slotTextChanged(const QString& t)
+void KMConfigFonts::slotTextChanged(const TQString& t)
{
m_add->setEnabled(!t.isEmpty());
}
diff --git a/kdeprint/management/kmconfigfonts.h b/kdeprint/management/kmconfigfonts.h
index c1c383199..a20ead918 100644
--- a/kdeprint/management/kmconfigfonts.h
+++ b/kdeprint/management/kmconfigfonts.h
@@ -31,7 +31,7 @@ class KMConfigFonts : public KMConfigPage
{
Q_OBJECT
public:
- KMConfigFonts(QWidget *parent = 0, const char *name = 0);
+ KMConfigFonts(TQWidget *parent = 0, const char *name = 0);
void loadConfig(KConfig*);
void saveConfig(KConfig*);
@@ -42,7 +42,7 @@ protected slots:
void slotRemove();
void slotAdd();
void slotSelected();
- void slotTextChanged(const QString&);
+ void slotTextChanged(const TQString&);
private:
QCheckBox *m_embedfonts;
diff --git a/kdeprint/management/kmconfiggeneral.cpp b/kdeprint/management/kmconfiggeneral.cpp
index 65f9d2437..c729c6516 100644
--- a/kdeprint/management/kmconfiggeneral.cpp
+++ b/kdeprint/management/kmconfiggeneral.cpp
@@ -19,11 +19,11 @@
#include "kmconfiggeneral.h"
-#include <qlayout.h>
-#include <qgroupbox.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqgroupbox.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqwhatsthis.h>
#include <kpushbutton.h>
#include <klocale.h>
@@ -38,63 +38,63 @@
#include <kguiitem.h>
#include <kdialog.h>
-KMConfigGeneral::KMConfigGeneral(QWidget *parent)
+KMConfigGeneral::KMConfigGeneral(TQWidget *parent)
: KMConfigPage(parent,"ConfigTimer")
{
setPageName(i18n("General"));
setPageHeader(i18n("General Settings"));
setPagePixmap("fileprint");
- QGroupBox *m_timerbox = new QGroupBox(0, Qt::Vertical, i18n("Refresh Interval"), this);
+ QGroupBox *m_timerbox = new TQGroupBox(0, Qt::Vertical, i18n("Refresh Interval"), this);
m_timer = new KIntNumInput(m_timerbox,"Timer");
m_timer->setRange(0,30);
m_timer->setSuffix( i18n( " sec" ) );
m_timer->setSpecialValueText(i18n("Disabled"));
- QWhatsThis::add(m_timer, i18n("This time setting controls the refresh rate of various "
+ TQWhatsThis::add(m_timer, i18n("This time setting controls the refresh rate of various "
"<b>KDE Print</b> components like the print manager "
"and the job viewer."));
- QGroupBox *m_testpagebox = new QGroupBox(0, Qt::Vertical, i18n("Test Page"), this);
- m_defaulttestpage = new QCheckBox(i18n("&Specify personal test page"), m_testpagebox, "TestPageCheck");
+ QGroupBox *m_testpagebox = new TQGroupBox(0, Qt::Vertical, i18n("Test Page"), this);
+ m_defaulttestpage = new TQCheckBox(i18n("&Specify personal test page"), m_testpagebox, "TestPageCheck");
m_testpage = new KURLRequester(m_testpagebox,"TestPage");
m_preview = new KPushButton(KGuiItem(i18n("Preview..."), "filefind"), m_testpagebox);
- connect(m_defaulttestpage,SIGNAL(toggled(bool)),m_testpage,SLOT(setEnabled(bool)));
- connect(m_defaulttestpage,SIGNAL(toggled(bool)),this,SLOT(setEnabledPreviewButton(bool)));
- connect(m_preview,SIGNAL(clicked()),SLOT(slotTestPagePreview()));
- connect(m_testpage->lineEdit(),SIGNAL(textChanged ( const QString & )),this,SLOT(testPageChanged(const QString & )));
+ connect(m_defaulttestpage,TQT_SIGNAL(toggled(bool)),m_testpage,TQT_SLOT(setEnabled(bool)));
+ connect(m_defaulttestpage,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(setEnabledPreviewButton(bool)));
+ connect(m_preview,TQT_SIGNAL(clicked()),TQT_SLOT(slotTestPagePreview()));
+ connect(m_testpage->lineEdit(),TQT_SIGNAL(textChanged ( const TQString & )),this,TQT_SLOT(testPageChanged(const TQString & )));
m_testpage->setDisabled(true);
m_preview->setDisabled(true);
m_defaulttestpage->setCursor(KCursor::handCursor());
- QGroupBox *m_statusbox = new QGroupBox(0, Qt::Vertical, i18n("Miscellaneous"), this);
- m_statusmsg = new QCheckBox(i18n("Sho&w printing status message box"), m_statusbox);
- m_uselast = new QCheckBox(i18n("De&faults to the last printer used in the application"), m_statusbox);
+ QGroupBox *m_statusbox = new TQGroupBox(0, Qt::Vertical, i18n("Miscellaneous"), this);
+ m_statusmsg = new TQCheckBox(i18n("Sho&w printing status message box"), m_statusbox);
+ m_uselast = new TQCheckBox(i18n("De&faults to the last printer used in the application"), m_statusbox);
//layout
- QVBoxLayout *lay0 = new QVBoxLayout(this, 0, KDialog::spacingHint());
+ QVBoxLayout *lay0 = new TQVBoxLayout(this, 0, KDialog::spacingHint());
lay0->addWidget(m_timerbox);
lay0->addWidget(m_testpagebox);
lay0->addWidget(m_statusbox);
lay0->addStretch(1);
- QVBoxLayout *lay1 = new QVBoxLayout(m_timerbox->layout(),
+ QVBoxLayout *lay1 = new TQVBoxLayout(m_timerbox->layout(),
KDialog::spacingHint());
lay1->addWidget(m_timer);
- QVBoxLayout *lay2 = new QVBoxLayout(m_testpagebox->layout(),
+ QVBoxLayout *lay2 = new TQVBoxLayout(m_testpagebox->layout(),
KDialog::spacingHint());
- QHBoxLayout *lay3 = new QHBoxLayout(0, 0, 0);
+ QHBoxLayout *lay3 = new TQHBoxLayout(0, 0, 0);
lay2->addWidget(m_defaulttestpage);
lay2->addWidget(m_testpage);
lay2->addLayout(lay3);
lay3->addStretch(1);
lay3->addWidget(m_preview);
- QVBoxLayout *lay4 = new QVBoxLayout(m_statusbox->layout(),
+ QVBoxLayout *lay4 = new TQVBoxLayout(m_statusbox->layout(),
KDialog::spacingHint());
lay4->addWidget(m_statusmsg);
lay4->addWidget(m_uselast);
m_preview->setEnabled( !m_testpage->url().isEmpty());
}
-void KMConfigGeneral::testPageChanged(const QString &test )
+void KMConfigGeneral::testPageChanged(const TQString &test )
{
m_preview->setEnabled( !test.isEmpty());
}
@@ -122,7 +122,7 @@ void KMConfigGeneral::saveConfig(KConfig *conf)
{
conf->setGroup("General");
conf->writeEntry("TimerDelay",m_timer->value());
- conf->writePathEntry("TestPage",(m_defaulttestpage->isChecked() ? m_testpage->url() : QString::null));
+ conf->writePathEntry("TestPage",(m_defaulttestpage->isChecked() ? m_testpage->url() : TQString::null));
if (m_defaulttestpage->isChecked() && KMimeMagic::self()->findFileType(m_testpage->url())->mimeType() != "application/postscript")
KMessageBox::sorry(this, i18n("The selected test page is not a PostScript file. You may not "
"be able to test your printer anymore."));
diff --git a/kdeprint/management/kmconfiggeneral.h b/kdeprint/management/kmconfiggeneral.h
index 87c10c2bf..f28f29446 100644
--- a/kdeprint/management/kmconfiggeneral.h
+++ b/kdeprint/management/kmconfiggeneral.h
@@ -30,14 +30,14 @@ class KMConfigGeneral : public KMConfigPage
{
Q_OBJECT
public:
- KMConfigGeneral(QWidget *parent = 0);
+ KMConfigGeneral(TQWidget *parent = 0);
void loadConfig(KConfig*);
void saveConfig(KConfig*);
protected slots:
void slotTestPagePreview();
- void testPageChanged(const QString & );
+ void testPageChanged(const TQString & );
void setEnabledPreviewButton(bool b);
private:
KIntNumInput *m_timer;
diff --git a/kdeprint/management/kmconfigjobs.cpp b/kdeprint/management/kmconfigjobs.cpp
index 31ca1ed26..1aaf0ec26 100644
--- a/kdeprint/management/kmconfigjobs.cpp
+++ b/kdeprint/management/kmconfigjobs.cpp
@@ -19,32 +19,32 @@
#include "kmconfigjobs.h"
-#include <qgroupbox.h>
-#include <qlayout.h>
+#include <tqgroupbox.h>
+#include <tqlayout.h>
#include <knuminput.h>
#include <klocale.h>
#include <kconfig.h>
#include <kdialog.h>
-KMConfigJobs::KMConfigJobs(QWidget *parent, const char *name)
+KMConfigJobs::KMConfigJobs(TQWidget *parent, const char *name)
: KMConfigPage(parent, name)
{
setPageName(i18n("Jobs"));
setPageHeader(i18n("Print Job Settings"));
setPagePixmap("exec");
- QGroupBox *box = new QGroupBox(0, Qt::Vertical, i18n("Jobs Shown"), this);
+ QGroupBox *box = new TQGroupBox(0, Qt::Vertical, i18n("Jobs Shown"), this);
m_limit = new KIntNumInput(box);
m_limit->setRange(0, 9999, 1, true);
m_limit->setSpecialValueText(i18n("Unlimited"));
m_limit->setLabel(i18n("Maximum number of jobs shown:"));
- QVBoxLayout *l0 = new QVBoxLayout(this, 0, KDialog::spacingHint());
+ QVBoxLayout *l0 = new TQVBoxLayout(this, 0, KDialog::spacingHint());
l0->addWidget(box, 0);
l0->addStretch(1);
- QVBoxLayout *l1 = new QVBoxLayout(box->layout(), KDialog::spacingHint());
+ QVBoxLayout *l1 = new TQVBoxLayout(box->layout(), KDialog::spacingHint());
l1->addWidget(m_limit);
}
diff --git a/kdeprint/management/kmconfigjobs.h b/kdeprint/management/kmconfigjobs.h
index c1a301b32..73d6274ba 100644
--- a/kdeprint/management/kmconfigjobs.h
+++ b/kdeprint/management/kmconfigjobs.h
@@ -28,7 +28,7 @@ class KMConfigJobs : public KMConfigPage
{
Q_OBJECT
public:
- KMConfigJobs(QWidget *parent = 0, const char *name = 0);
+ KMConfigJobs(TQWidget *parent = 0, const char *name = 0);
void loadConfig(KConfig*);
void saveConfig(KConfig*);
diff --git a/kdeprint/management/kmconfigpage.cpp b/kdeprint/management/kmconfigpage.cpp
index afeda5f9e..b31575d33 100644
--- a/kdeprint/management/kmconfigpage.cpp
+++ b/kdeprint/management/kmconfigpage.cpp
@@ -19,8 +19,8 @@
#include "kmconfigpage.h"
-KMConfigPage::KMConfigPage(QWidget *parent, const char *name)
-: QWidget(parent,name)
+KMConfigPage::KMConfigPage(TQWidget *parent, const char *name)
+: TQWidget(parent,name)
{
m_name = "Name";
m_header = "Header";
diff --git a/kdeprint/management/kmconfigpage.h b/kdeprint/management/kmconfigpage.h
index d3db9994b..138d7c152 100644
--- a/kdeprint/management/kmconfigpage.h
+++ b/kdeprint/management/kmconfigpage.h
@@ -20,7 +20,7 @@
#ifndef KMCONFIGPAGE_H
#define KMCONFIGPAGE_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdelibs_export.h>
@@ -30,19 +30,19 @@ class KDEPRINT_EXPORT KMConfigPage : public QWidget
{
Q_OBJECT
public:
- KMConfigPage(QWidget *parent = 0, const char *name = 0);
+ KMConfigPage(TQWidget *parent = 0, const char *name = 0);
virtual void loadConfig(KConfig*);
virtual void saveConfig(KConfig*);
- QString pageName() const { return m_name; }
- QString pageHeader() const { return m_header; }
- QString pagePixmap() const { return m_pixmap; }
+ TQString pageName() const { return m_name; }
+ TQString pageHeader() const { return m_header; }
+ TQString pagePixmap() const { return m_pixmap; }
protected:
- void setPageName(const QString& s) { m_name = s; }
- void setPageHeader(const QString& s) { m_header = s; }
- void setPagePixmap(const QString& s) { m_pixmap = s; }
+ void setPageName(const TQString& s) { m_name = s; }
+ void setPageHeader(const TQString& s) { m_header = s; }
+ void setPagePixmap(const TQString& s) { m_pixmap = s; }
protected:
QString m_name;
diff --git a/kdeprint/management/kmconfigpreview.cpp b/kdeprint/management/kmconfigpreview.cpp
index a3ed5581e..1bd9f46e5 100644
--- a/kdeprint/management/kmconfigpreview.cpp
+++ b/kdeprint/management/kmconfigpreview.cpp
@@ -19,43 +19,43 @@
#include "kmconfigpreview.h"
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
#include <klocale.h>
#include <kurlrequester.h>
#include <kconfig.h>
#include <kdialog.h>
-KMConfigPreview::KMConfigPreview(QWidget *parent, const char *name)
+KMConfigPreview::KMConfigPreview(TQWidget *parent, const char *name)
: KMConfigPage(parent, name)
{
setPageName(i18n("Preview"));
setPageHeader(i18n("Preview Settings"));
setPagePixmap("filefind");
- QGroupBox *box = new QGroupBox(0, Qt::Vertical, i18n("Preview Program"), this);
+ TQGroupBox *box = new TQGroupBox(0, Qt::Vertical, i18n("Preview Program"), this);
- m_useext = new QCheckBox(i18n("&Use external preview program"), box);
+ m_useext = new TQCheckBox(i18n("&Use external preview program"), box);
m_program = new KURLRequester(box);
- QLabel *lab = new QLabel(box);
+ QLabel *lab = new TQLabel(box);
lab->setText(i18n("You can use an external preview program (PS viewer) instead of the "
"KDE built-in preview system. Note that if the KDE default PS viewer "
"(KGhostView) cannot be found, KDE tries automatically to find another "
"external PostScript viewer"));
lab->setTextFormat(Qt::RichText);
- QVBoxLayout *l0 = new QVBoxLayout(this, 0, KDialog::spacingHint());
+ QVBoxLayout *l0 = new TQVBoxLayout(this, 0, KDialog::spacingHint());
l0->addWidget(box);
l0->addStretch(1);
- QVBoxLayout *l1 = new QVBoxLayout(box->layout(), KDialog::spacingHint());
+ QVBoxLayout *l1 = new TQVBoxLayout(box->layout(), KDialog::spacingHint());
l1->addWidget(lab);
l1->addWidget(m_useext);
l1->addWidget(m_program);
- connect(m_useext, SIGNAL(toggled(bool)), m_program, SLOT(setEnabled(bool)));
+ connect(m_useext, TQT_SIGNAL(toggled(bool)), m_program, TQT_SLOT(setEnabled(bool)));
m_program->setEnabled(false);
}
diff --git a/kdeprint/management/kmconfigpreview.h b/kdeprint/management/kmconfigpreview.h
index e37aa2b8f..52a9704d1 100644
--- a/kdeprint/management/kmconfigpreview.h
+++ b/kdeprint/management/kmconfigpreview.h
@@ -28,7 +28,7 @@ class KURLRequester;
class KMConfigPreview : public KMConfigPage
{
public:
- KMConfigPreview(QWidget *parent = 0, const char *name = 0);
+ KMConfigPreview(TQWidget *parent = 0, const char *name = 0);
void loadConfig(KConfig*);
void saveConfig(KConfig*);
diff --git a/kdeprint/management/kmdbcreator.cpp b/kdeprint/management/kmdbcreator.cpp
index 021619db9..3b271ff00 100644
--- a/kdeprint/management/kmdbcreator.cpp
+++ b/kdeprint/management/kmdbcreator.cpp
@@ -21,23 +21,23 @@
#include "kmfactory.h"
#include "kmmanager.h"
-#include <qprogressdialog.h>
-#include <qfileinfo.h>
-#include <qdir.h>
+#include <tqprogressdialog.h>
+#include <tqfileinfo.h>
+#include <tqdir.h>
#include <klocale.h>
#include <kapplication.h>
#include <kstandarddirs.h>
#include <kdebug.h>
-KMDBCreator::KMDBCreator(QObject *parent, const char *name)
-: QObject(parent,name)
+KMDBCreator::KMDBCreator(TQObject *parent, const char *name)
+: TQObject(parent,name)
{
m_dlg = 0;
m_status = true;
- connect(&m_proc,SIGNAL(receivedStdout(KProcess*,char*,int)),SLOT(slotReceivedStdout(KProcess*,char*,int)));
- connect(&m_proc,SIGNAL(receivedStderr(KProcess*,char*,int)),SLOT(slotReceivedStderr(KProcess*,char*,int)));
- connect(&m_proc,SIGNAL(processExited(KProcess*)),SLOT(slotProcessExited(KProcess*)));
+ connect(&m_proc,TQT_SIGNAL(receivedStdout(KProcess*,char*,int)),TQT_SLOT(slotReceivedStdout(KProcess*,char*,int)));
+ connect(&m_proc,TQT_SIGNAL(receivedStderr(KProcess*,char*,int)),TQT_SLOT(slotReceivedStderr(KProcess*,char*,int)));
+ connect(&m_proc,TQT_SIGNAL(processExited(KProcess*)),TQT_SLOT(slotProcessExited(KProcess*)));
}
KMDBCreator::~KMDBCreator()
@@ -48,7 +48,7 @@ KMDBCreator::~KMDBCreator()
// it's parent. It will be destroyed along with its parent.
}
-bool KMDBCreator::checkDriverDB(const QString& dirname, const QDateTime& d)
+bool KMDBCreator::checkDriverDB(const TQString& dirname, const TQDateTime& d)
{
// don't block GUI
kapp->processEvents();
@@ -60,13 +60,13 @@ bool KMDBCreator::checkDriverDB(const QString& dirname, const QDateTime& d)
// then check most recent file in current directory
QDir dir(dirname);
- const QFileInfoList *list = dir.entryInfoList(QDir::Files,QDir::Time);
+ const QFileInfoList *list = dir.entryInfoList(TQDir::Files,TQDir::Time);
if (list && list->count() > 0 && list->getFirst()->lastModified() > d)
return false;
// then loop into subdirs
- QStringList slist = dir.entryList(QDir::Dirs,QDir::Time);
- for (QStringList::ConstIterator it=slist.begin(); it!=slist.end(); ++it)
+ QStringList slist = dir.entryList(TQDir::Dirs,TQDir::Time);
+ for (TQStringList::ConstIterator it=slist.begin(); it!=slist.end(); ++it)
if ((*it) != "." && (*it) != ".." && !checkDriverDB(dir.absFilePath(*it),d))
return false;
@@ -74,7 +74,7 @@ bool KMDBCreator::checkDriverDB(const QString& dirname, const QDateTime& d)
return true;
}
-bool KMDBCreator::createDriverDB(const QString& dirname, const QString& filename, QWidget *parent)
+bool KMDBCreator::createDriverDB(const TQString& dirname, const TQString& filename, TQWidget *parent)
{
bool started(true);
@@ -109,10 +109,10 @@ bool KMDBCreator::createDriverDB(const QString& dirname, const QString& filename
{
if (!m_dlg)
{
- m_dlg = new QProgressDialog(parent->topLevelWidget(),"progress-dialog",true);
+ m_dlg = new TQProgressDialog(parent->topLevelWidget(),"progress-dialog",true);
m_dlg->setLabelText(i18n("Please wait while KDE rebuilds a driver database."));
m_dlg->setCaption(i18n("Driver Database"));
- connect(m_dlg,SIGNAL(canceled()),SLOT(slotCancelled()));
+ connect(m_dlg,TQT_SIGNAL(canceled()),TQT_SLOT(slotCancelled()));
}
m_dlg->setMinimumDuration(0); // always show the dialog
m_dlg->setProgress(0); // to force showing
@@ -127,7 +127,7 @@ bool KMDBCreator::createDriverDB(const QString& dirname, const QString& filename
void KMDBCreator::slotReceivedStdout(KProcess*, char *buf, int len)
{
// save buffer
- QString str( QCString(buf, len) );
+ QString str( TQCString(buf, len) );
// get the number, cut the string at the first '\n' otherwise
// the toInt() will return 0. If that occurs for the first number,
@@ -171,7 +171,7 @@ void KMDBCreator::slotProcessExited(KProcess*)
KMFactory::self()->manager()->setErrorMsg(i18n("Error while creating driver database: abnormal child-process termination."));
// remove the incomplete driver DB file so that, it will be
// reconstructed on next check
- QFile::remove(m_proc.args()[2]);
+ TQFile::remove(m_proc.args()[2]);
}
//else
emit dbCreated();
diff --git a/kdeprint/management/kmdbcreator.h b/kdeprint/management/kmdbcreator.h
index 8af6e5bcf..188ff9a42 100644
--- a/kdeprint/management/kmdbcreator.h
+++ b/kdeprint/management/kmdbcreator.h
@@ -20,9 +20,9 @@
#ifndef KMDBCREATOR_H
#define KMDBCREATOR_H
-#include <qobject.h>
-#include <qstring.h>
-#include <qdatetime.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
#include <kprocess.h>
class QWidget;
@@ -32,11 +32,11 @@ class KMDBCreator : public QObject
{
Q_OBJECT
public:
- KMDBCreator(QObject *parent = 0, const char *name = 0);
+ KMDBCreator(TQObject *parent = 0, const char *name = 0);
~KMDBCreator();
- bool checkDriverDB(const QString& dirname, const QDateTime& d);
- bool createDriverDB(const QString& dirname, const QString& filename, QWidget *parent = 0);
+ bool checkDriverDB(const TQString& dirname, const TQDateTime& d);
+ bool createDriverDB(const TQString& dirname, const TQString& filename, TQWidget *parent = 0);
bool status() const { return m_status; }
protected slots:
diff --git a/kdeprint/management/kmdriverdb.cpp b/kdeprint/management/kmdriverdb.cpp
index d75588d0d..6e275a6d4 100644
--- a/kdeprint/management/kmdriverdb.cpp
+++ b/kdeprint/management/kmdriverdb.cpp
@@ -24,9 +24,9 @@
#include "kmfactory.h"
#include <kdebug.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qfileinfo.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqfileinfo.h>
#include <kstandarddirs.h>
#include <kapplication.h>
#include <kmessagebox.h>
@@ -43,11 +43,11 @@ KMDriverDB* KMDriverDB::self()
return m_self;
}
-KMDriverDB::KMDriverDB(QObject *parent, const char *name)
-: QObject(parent,name)
+KMDriverDB::KMDriverDB(TQObject *parent, const char *name)
+: TQObject(parent,name)
{
m_creator = new KMDBCreator(this,"db-creator");
- connect(m_creator,SIGNAL(dbCreated()),SLOT(slotDbCreated()));
+ connect(m_creator,TQT_SIGNAL(dbCreated()),TQT_SLOT(slotDbCreated()));
m_entries.setAutoDelete(true);
m_pnpentries.setAutoDelete(true);
@@ -57,21 +57,21 @@ KMDriverDB::~KMDriverDB()
{
}
-QString KMDriverDB::dbFile()
+TQString KMDriverDB::dbFile()
{
// this calls insure missing directories creation
- QString filename = locateLocal("data",QString::fromLatin1("kdeprint/printerdb_%1.txt").arg(KMFactory::self()->printSystem()));
+ QString filename = locateLocal("data",TQString::fromLatin1("kdeprint/printerdb_%1.txt").arg(KMFactory::self()->printSystem()));
return filename;
}
-void KMDriverDB::init(QWidget *parent)
+void KMDriverDB::init(TQWidget *parent)
{
QFileInfo dbfi(dbFile());
QString dirname = KMFactory::self()->manager()->driverDirectory();
- QStringList dbDirs = QStringList::split(':', dirname, false);
+ QStringList dbDirs = TQStringList::split(':', dirname, false);
bool createflag(false);
- for (QStringList::ConstIterator it=dbDirs.begin(); it!=dbDirs.end() && !createflag; ++it)
+ for (TQStringList::ConstIterator it=dbDirs.begin(); it!=dbDirs.end() && !createflag; ++it)
if (!(*it).startsWith("module:") && !m_creator->checkDriverDB(*it, dbfi.lastModified()))
createflag = true;
@@ -108,23 +108,23 @@ void KMDriverDB::slotDbCreated()
//emit dbLoaded(true);
}
-KMDBEntryList* KMDriverDB::findEntry(const QString& manu, const QString& model)
+KMDBEntryList* KMDriverDB::findEntry(const TQString& manu, const TQString& model)
{
- QDict<KMDBEntryList> *models = m_entries.find(manu);
+ TQDict<KMDBEntryList> *models = m_entries.find(manu);
if (models)
return models->find(model);
return 0;
}
-KMDBEntryList* KMDriverDB::findPnpEntry(const QString& manu, const QString& model)
+KMDBEntryList* KMDriverDB::findPnpEntry(const TQString& manu, const TQString& model)
{
- QDict<KMDBEntryList> *models = m_pnpentries.find(manu);
+ TQDict<KMDBEntryList> *models = m_pnpentries.find(manu);
if (models)
return models->find(model);
return 0;
}
-QDict<KMDBEntryList>* KMDriverDB::findModels(const QString& manu)
+TQDict<KMDBEntryList>* KMDriverDB::findModels(const TQString& manu)
{
return m_entries.find(manu);
}
@@ -140,10 +140,10 @@ void KMDriverDB::insertEntry(KMDBEntry *entry)
}
// insert it in normal entries
- QDict<KMDBEntryList> *models = m_entries.find(entry->manufacturer);
+ TQDict<KMDBEntryList> *models = m_entries.find(entry->manufacturer);
if (!models)
{
- models = new QDict<KMDBEntryList>(17,false);
+ models = new TQDict<KMDBEntryList>(17,false);
models->setAutoDelete(true);
m_entries.insert(entry->manufacturer,models);
}
@@ -162,7 +162,7 @@ void KMDriverDB::insertEntry(KMDBEntry *entry)
models = m_pnpentries.find(entry->manufacturer);
if (!models)
{
- models = new QDict<KMDBEntryList>(17,false);
+ models = new TQDict<KMDBEntryList>(17,false);
models->setAutoDelete(true);
m_pnpentries.insert(entry->manufacturer,models);
}
diff --git a/kdeprint/management/kmdriverdb.h b/kdeprint/management/kmdriverdb.h
index e0f3a7eba..1ffecdc0a 100644
--- a/kdeprint/management/kmdriverdb.h
+++ b/kdeprint/management/kmdriverdb.h
@@ -20,10 +20,10 @@
#ifndef KMDRIVERDB_H
#define KMDRIVERDB_H
-#include <qobject.h>
-#include <qptrlist.h>
-#include <qdict.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
+#include <tqdict.h>
+#include <tqstring.h>
#include "kmdbentry.h"
@@ -35,31 +35,31 @@ class KMDriverDB : public QObject
public:
static KMDriverDB* self();
- KMDriverDB(QObject *parent = 0, const char *name = 0);
+ KMDriverDB(TQObject *parent = 0, const char *name = 0);
~KMDriverDB();
- void init(QWidget *parent = 0);
- KMDBEntryList* findEntry(const QString& manu, const QString& model);
- KMDBEntryList* findPnpEntry(const QString& manu, const QString& model);
- QDict<KMDBEntryList>* findModels(const QString& manu);
- const QDict< QDict<KMDBEntryList> >& manufacturers() const { return m_entries; }
+ void init(TQWidget *parent = 0);
+ KMDBEntryList* findEntry(const TQString& manu, const TQString& model);
+ KMDBEntryList* findPnpEntry(const TQString& manu, const TQString& model);
+ TQDict<KMDBEntryList>* findModels(const TQString& manu);
+ const TQDict< TQDict<KMDBEntryList> >& manufacturers() const { return m_entries; }
protected:
void loadDbFile();
void insertEntry(KMDBEntry *entry);
- QString dbFile();
+ TQString dbFile();
protected slots:
void slotDbCreated();
signals:
void dbLoaded(bool reloaded);
- void error(const QString&);
+ void error(const TQString&);
private:
KMDBCreator *m_creator;
- QDict< QDict<KMDBEntryList> > m_entries;
- QDict< QDict<KMDBEntryList> > m_pnpentries;
+ TQDict< TQDict<KMDBEntryList> > m_entries;
+ TQDict< TQDict<KMDBEntryList> > m_pnpentries;
static KMDriverDB *m_self;
};
diff --git a/kdeprint/management/kmdriverdbwidget.cpp b/kdeprint/management/kmdriverdbwidget.cpp
index 076b8897e..fdd3d263c 100644
--- a/kdeprint/management/kmdriverdbwidget.cpp
+++ b/kdeprint/management/kmdriverdbwidget.cpp
@@ -25,13 +25,13 @@
#include <klistbox.h>
#include <kpushbutton.h>
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
#include <kcursor.h>
-#include <qapplication.h>
+#include <tqapplication.h>
#include <kmessagebox.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qstrlist.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqstrlist.h>
#include <klocale.h>
#include <kcursor.h>
@@ -39,29 +39,29 @@
#include <kguiitem.h>
#include <kio/netaccess.h>
-KMDriverDbWidget::KMDriverDbWidget(QWidget *parent, const char *name)
-: QWidget(parent,name)
+KMDriverDbWidget::KMDriverDbWidget(TQWidget *parent, const char *name)
+: TQWidget(parent,name)
{
- m_external = QString::null;
+ m_external = TQString::null;
m_valid = false;
// build widget
m_manu = new KListBox(this);
m_model = new KListBox(this);
- m_postscript = new QCheckBox(i18n("&PostScript printer"),this);
- m_raw = new QCheckBox(i18n("&Raw printer (no driver needed)"),this);
+ m_postscript = new TQCheckBox(i18n("&PostScript printer"),this);
+ m_raw = new TQCheckBox(i18n("&Raw printer (no driver needed)"),this);
m_postscript->setCursor(KCursor::handCursor());
m_raw->setCursor(KCursor::handCursor());
m_other = new KPushButton(KGuiItem(i18n("&Other..."), "fileopen"), this);
- QLabel *l1 = new QLabel(i18n("&Manufacturer:"), this);
- QLabel *l2 = new QLabel(i18n("Mo&del:"), this);
+ QLabel *l1 = new TQLabel(i18n("&Manufacturer:"), this);
+ QLabel *l2 = new TQLabel(i18n("Mo&del:"), this);
l1->setBuddy(m_manu);
l2->setBuddy(m_model);
// build layout
- QVBoxLayout *main_ = new QVBoxLayout(this, 0, 10);
- QGridLayout *sub1_ = new QGridLayout(0, 2, 3, 0, 0);
- QHBoxLayout *sub2_ = new QHBoxLayout(0, 0, 10);
+ QVBoxLayout *main_ = new TQVBoxLayout(this, 0, 10);
+ QGridLayout *sub1_ = new TQGridLayout(0, 2, 3, 0, 0);
+ QHBoxLayout *sub2_ = new TQHBoxLayout(0, 0, 10);
main_->addLayout(sub1_);
main_->addLayout(sub2_);
main_->addWidget(m_raw);
@@ -74,26 +74,26 @@ KMDriverDbWidget::KMDriverDbWidget(QWidget *parent, const char *name)
sub2_->addWidget(m_other,0);
// build connections
- connect(KMDriverDB::self(),SIGNAL(dbLoaded(bool)),SLOT(slotDbLoaded(bool)));
- connect(KMDriverDB::self(), SIGNAL(error(const QString&)), SLOT(slotError(const QString&)));
- connect(m_manu,SIGNAL(highlighted(const QString&)),SLOT(slotManufacturerSelected(const QString&)));
- connect(m_raw,SIGNAL(toggled(bool)),m_manu,SLOT(setDisabled(bool)));
- connect(m_raw,SIGNAL(toggled(bool)),m_model,SLOT(setDisabled(bool)));
- connect(m_raw,SIGNAL(toggled(bool)),m_other,SLOT(setDisabled(bool)));
- connect(m_raw,SIGNAL(toggled(bool)),m_postscript,SLOT(setDisabled(bool)));
- connect(m_postscript,SIGNAL(toggled(bool)),m_manu,SLOT(setDisabled(bool)));
- connect(m_postscript,SIGNAL(toggled(bool)),m_model,SLOT(setDisabled(bool)));
- connect(m_postscript,SIGNAL(toggled(bool)),m_other,SLOT(setDisabled(bool)));
- connect(m_postscript,SIGNAL(toggled(bool)),m_raw,SLOT(setDisabled(bool)));
- connect(m_postscript,SIGNAL(toggled(bool)),SLOT(slotPostscriptToggled(bool)));
- connect(m_other,SIGNAL(clicked()),SLOT(slotOtherClicked()));
+ connect(KMDriverDB::self(),TQT_SIGNAL(dbLoaded(bool)),TQT_SLOT(slotDbLoaded(bool)));
+ connect(KMDriverDB::self(), TQT_SIGNAL(error(const TQString&)), TQT_SLOT(slotError(const TQString&)));
+ connect(m_manu,TQT_SIGNAL(highlighted(const TQString&)),TQT_SLOT(slotManufacturerSelected(const TQString&)));
+ connect(m_raw,TQT_SIGNAL(toggled(bool)),m_manu,TQT_SLOT(setDisabled(bool)));
+ connect(m_raw,TQT_SIGNAL(toggled(bool)),m_model,TQT_SLOT(setDisabled(bool)));
+ connect(m_raw,TQT_SIGNAL(toggled(bool)),m_other,TQT_SLOT(setDisabled(bool)));
+ connect(m_raw,TQT_SIGNAL(toggled(bool)),m_postscript,TQT_SLOT(setDisabled(bool)));
+ connect(m_postscript,TQT_SIGNAL(toggled(bool)),m_manu,TQT_SLOT(setDisabled(bool)));
+ connect(m_postscript,TQT_SIGNAL(toggled(bool)),m_model,TQT_SLOT(setDisabled(bool)));
+ connect(m_postscript,TQT_SIGNAL(toggled(bool)),m_other,TQT_SLOT(setDisabled(bool)));
+ connect(m_postscript,TQT_SIGNAL(toggled(bool)),m_raw,TQT_SLOT(setDisabled(bool)));
+ connect(m_postscript,TQT_SIGNAL(toggled(bool)),TQT_SLOT(slotPostscriptToggled(bool)));
+ connect(m_other,TQT_SIGNAL(clicked()),TQT_SLOT(slotOtherClicked()));
}
KMDriverDbWidget::~KMDriverDbWidget()
{
}
-void KMDriverDbWidget::setDriver(const QString& manu, const QString& model)
+void KMDriverDbWidget::setDriver(const TQString& manu, const TQString& model)
{
QListBoxItem *item = m_manu->findItem(manu);
QString model_(model);
@@ -105,7 +105,7 @@ void KMDriverDbWidget::setDriver(const QString& manu, const QString& model)
// try by stripping the manufacturer name from
// the beginning of the model string. This is
// often the case with PPD files
- item = m_model->findItem(model_.replace(0,manu.length()+1,QString::fromLatin1("")));
+ item = m_model->findItem(model_.replace(0,manu.length()+1,TQString::fromLatin1("")));
if (item)
m_model->setCurrentItem(item);
}
@@ -127,12 +127,12 @@ void KMDriverDbWidget::setHaveOther(bool on)
m_other->hide();
}
-QString KMDriverDbWidget::manufacturer()
+TQString KMDriverDbWidget::manufacturer()
{
return m_manu->currentText();
}
-QString KMDriverDbWidget::model()
+TQString KMDriverDbWidget::model()
{
return m_model->currentText();
}
@@ -151,7 +151,7 @@ void KMDriverDbWidget::init()
{
if (!m_valid)
{
- QApplication::setOverrideCursor(KCursor::waitCursor());
+ TQApplication::setOverrideCursor(KCursor::waitCursor());
m_manu->clear();
m_model->clear();
m_manu->insertItem(i18n("Loading..."));
@@ -161,13 +161,13 @@ void KMDriverDbWidget::init()
void KMDriverDbWidget::slotDbLoaded(bool reloaded)
{
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
m_valid = true;
if (reloaded || m_manu->count() == 0 || (m_manu->count() == 1 && m_manu->text(0) == i18n("Loading...")))
{ // do something only if DB reloaded
m_manu->clear();
m_model->clear();
- QDictIterator< QDict<KMDBEntryList> > it(KMDriverDB::self()->manufacturers());
+ TQDictIterator< TQDict<KMDBEntryList> > it(KMDriverDB::self()->manufacturers());
for (;it.current();++it)
m_manu->insertItem(it.currentKey());
m_manu->sort();
@@ -175,22 +175,22 @@ void KMDriverDbWidget::slotDbLoaded(bool reloaded)
}
}
-void KMDriverDbWidget::slotError(const QString& msg)
+void KMDriverDbWidget::slotError(const TQString& msg)
{
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
m_valid = false;
m_manu->clear();
KMessageBox::error(this, "<qt>"+msg+"</qt>");
}
-void KMDriverDbWidget::slotManufacturerSelected(const QString& name)
+void KMDriverDbWidget::slotManufacturerSelected(const TQString& name)
{
m_model->clear();
- QDict<KMDBEntryList> *models = KMDriverDB::self()->findModels(name);
+ TQDict<KMDBEntryList> *models = KMDriverDB::self()->findModels(name);
if (models)
{
QStrIList ilist(true);
- QDictIterator<KMDBEntryList> it(*models);
+ TQDictIterator<KMDBEntryList> it(*models);
for (;it.current();++it)
ilist.append(it.currentKey().latin1());
ilist.sort();
@@ -223,7 +223,7 @@ void KMDriverDbWidget::slotOtherClicked()
{
if (m_external.isEmpty())
{
- KFileDialog dlg( QString::null, QString::null, this, 0, true );
+ KFileDialog dlg( TQString::null, TQString::null, this, 0, true );
KURL url;
dlg.setMode( KFile::File );
@@ -233,14 +233,14 @@ void KMDriverDbWidget::slotOtherClicked()
if ( !url.isEmpty() )
{
- QString filename;
+ TQString filename;
if ( KIO::NetAccess::download( url, filename, this ) )
{
DrMain *driver = KMFactory::self()->manager()->loadFileDriver(filename);
if (driver)
{
m_external = filename;
- disconnect(m_manu,SIGNAL(highlighted(const QString&)),this,SLOT(slotManufacturerSelected(const QString&)));
+ disconnect(m_manu,TQT_SIGNAL(highlighted(const TQString&)),this,TQT_SLOT(slotManufacturerSelected(const TQString&)));
m_manu->clear();
m_model->clear();
QString s = driver->get("manufacturer");
@@ -263,10 +263,10 @@ void KMDriverDbWidget::slotOtherClicked()
}
else
{
- m_external = QString::null;
- connect(m_manu,SIGNAL(highlighted(const QString&)),this,SLOT(slotManufacturerSelected(const QString&)));
+ m_external = TQString::null;
+ connect(m_manu,TQT_SIGNAL(highlighted(const TQString&)),this,TQT_SLOT(slotManufacturerSelected(const TQString&)));
m_other->setText(i18n("Other"));
- m_desc = QString::null;
+ m_desc = TQString::null;
slotDbLoaded(true);
}
}
diff --git a/kdeprint/management/kmdriverdbwidget.h b/kdeprint/management/kmdriverdbwidget.h
index aa040e110..8e111f042 100644
--- a/kdeprint/management/kmdriverdbwidget.h
+++ b/kdeprint/management/kmdriverdbwidget.h
@@ -20,7 +20,7 @@
#ifndef KMDRIVERDBWIDGET_H
#define KMDRIVERDBWIDGET_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include "kmdbentry.h"
class QListBox;
@@ -31,28 +31,28 @@ class KMDriverDbWidget : public QWidget
{
Q_OBJECT
public:
- KMDriverDbWidget(QWidget *parent = 0, const char *name = 0);
+ KMDriverDbWidget(TQWidget *parent = 0, const char *name = 0);
~KMDriverDbWidget();
void init();
void setHaveRaw(bool on);
void setHaveOther(bool on);
- void setDriver(const QString& manu, const QString& model);
+ void setDriver(const TQString& manu, const TQString& model);
- QString manufacturer();
- QString model();
- QString description() { return m_desc; }
+ TQString manufacturer();
+ TQString model();
+ TQString description() { return m_desc; }
KMDBEntryList* drivers();
- QString driverFile();
+ TQString driverFile();
bool isRaw();
bool isExternal();
protected slots:
void slotDbLoaded(bool reloaded);
- void slotManufacturerSelected(const QString& name);
+ void slotManufacturerSelected(const TQString& name);
void slotPostscriptToggled(bool);
void slotOtherClicked();
- void slotError(const QString&);
+ void slotError(const TQString&);
private:
QListBox *m_manu;
@@ -65,7 +65,7 @@ private:
bool m_valid;
};
-inline QString KMDriverDbWidget::driverFile()
+inline TQString KMDriverDbWidget::driverFile()
{ return m_external; }
inline bool KMDriverDbWidget::isExternal()
diff --git a/kdeprint/management/kmdriverdialog.cpp b/kdeprint/management/kmdriverdialog.cpp
index f25ba8725..2e79a8c6f 100644
--- a/kdeprint/management/kmdriverdialog.cpp
+++ b/kdeprint/management/kmdriverdialog.cpp
@@ -23,7 +23,7 @@
#include <klocale.h>
#include <kmessagebox.h>
-KMDriverDialog::KMDriverDialog(QWidget *parent, const char *name)
+KMDriverDialog::KMDriverDialog(TQWidget *parent, const char *name)
: KDialogBase(KDialogBase::Swallow,i18n("Configure"),KDialogBase::Ok|KDialogBase::Cancel,KDialogBase::Ok,parent,name,true,false)
{
m_view = new DriverView(0);
diff --git a/kdeprint/management/kmdriverdialog.h b/kdeprint/management/kmdriverdialog.h
index b3368ae13..8720213d7 100644
--- a/kdeprint/management/kmdriverdialog.h
+++ b/kdeprint/management/kmdriverdialog.h
@@ -29,7 +29,7 @@ class KMDriverDialog : public KDialogBase
{
Q_OBJECT
public:
- KMDriverDialog(QWidget *parent = 0, const char *name = 0);
+ KMDriverDialog(TQWidget *parent = 0, const char *name = 0);
~KMDriverDialog();
void setDriver(DrMain*);
diff --git a/kdeprint/management/kmiconview.cpp b/kdeprint/management/kmiconview.cpp
index cabd4496a..5d16e34d0 100644
--- a/kdeprint/management/kmiconview.cpp
+++ b/kdeprint/management/kmiconview.cpp
@@ -20,21 +20,21 @@
#include "kmiconview.h"
#include "kmprinter.h"
-#include <qpainter.h>
+#include <tqpainter.h>
#include <kiconloader.h>
#include <kdebug.h>
-KMIconViewItem::KMIconViewItem(QIconView *parent, KMPrinter *p)
-: QIconViewItem(parent)
+KMIconViewItem::KMIconViewItem(TQIconView *parent, KMPrinter *p)
+: TQIconViewItem(parent)
{
m_state = 0;
m_mode = parent->itemTextPos();
- m_pixmap = QString::null;
+ m_pixmap = TQString::null;
m_isclass = false;
updatePrinter(p, m_mode);
}
-void KMIconViewItem::paintItem(QPainter *p, const QColorGroup& cg)
+void KMIconViewItem::paintItem(TQPainter *p, const TQColorGroup& cg)
{
if (m_state != 0)
{
@@ -43,10 +43,10 @@ void KMIconViewItem::paintItem(QPainter *p, const QColorGroup& cg)
if (m_state & 0x2) f.setItalic(true);
p->setFont(f);
}
- QIconViewItem::paintItem(p,cg);
+ TQIconViewItem::paintItem(p,cg);
}
-void KMIconViewItem::calcRect(const QString&)
+void KMIconViewItem::calcRect(const TQString&)
{
QRect ir(rect()), pr, tr;
@@ -59,25 +59,25 @@ void KMIconViewItem::calcRect(const QString&)
if (m_state & 0x1) f.setBold(true);
if (m_state & 0x2) f.setItalic(true);
QFontMetrics fm(f);
- if (m_mode == QIconView::Bottom)
+ if (m_mode == TQIconView::Bottom)
tr = fm.boundingRect(0, 0, iconView()->maxItemWidth(), 0xFFFFFF, AlignHCenter|AlignTop|WordBreak|BreakAnywhere, text()+"X");
else
tr = fm.boundingRect(0, 0, 0xFFFFFF, 0xFFFFFF, AlignLeft|AlignTop, text()+"X");
// item rect
- if (m_mode == QIconView::Bottom)
+ if (m_mode == TQIconView::Bottom)
{
ir.setHeight(pr.height() + tr.height() + 15);
ir.setWidth(QMAX(pr.width(), tr.width()) + 10);
- pr = QRect((ir.width()-pr.width())/2, 5, pr.width(), pr.height());
- tr = QRect((ir.width()-tr.width())/2, 10+pr.height(), tr.width(), tr.height());
+ pr = TQRect((ir.width()-pr.width())/2, 5, pr.width(), pr.height());
+ tr = TQRect((ir.width()-tr.width())/2, 10+pr.height(), tr.width(), tr.height());
}
else
{
ir.setHeight(QMAX(pr.height(), tr.height()) + 4);
ir.setWidth(pr.width() + tr.width() + 6);
- pr = QRect(2, (ir.height()-pr.height())/2, pr.width(), pr.height());
- tr = QRect(4+pr.width(), (ir.height()-tr.height())/2, tr.width(), tr.height());
+ pr = TQRect(2, (ir.height()-pr.height())/2, pr.width(), pr.height());
+ tr = TQRect(4+pr.width(), (ir.height()-tr.height())/2, tr.width(), tr.height());
}
// set rects
@@ -96,10 +96,10 @@ void KMIconViewItem::updatePrinter(KMPrinter *p, int mode)
update = (oldstate != m_state);
if (p->name() != text() || update)
{
- setText(QString::null);
+ setText(TQString::null);
setText(p->name());
}
- setKey(QString::fromLatin1("%1_%2").arg((p->isSpecial() ? "special" : (p->isClass(false) ? "class" : "printer"))).arg(p->name()));
+ setKey(TQString::fromLatin1("%1_%2").arg((p->isSpecial() ? "special" : (p->isClass(false) ? "class" : "printer"))).arg(p->name()));
m_isclass = p->isClass(false);
}
if (mode != m_mode || ((oldstate&0x4) != (m_state&0x4)) || (p && p->pixmap() != m_pixmap))
@@ -108,7 +108,7 @@ void KMIconViewItem::updatePrinter(KMPrinter *p, int mode)
if (p)
m_pixmap = p->pixmap();
m_mode = mode;
- if (m_mode == QIconView::Bottom)
+ if (m_mode == TQIconView::Bottom)
setPixmap(DesktopIcon(m_pixmap, 0, iconstate));
else
setPixmap(SmallIcon(m_pixmap, 0, iconstate));
@@ -118,19 +118,19 @@ void KMIconViewItem::updatePrinter(KMPrinter *p, int mode)
setDiscarded(false);
}
-KMIconView::KMIconView(QWidget *parent, const char *name)
+KMIconView::KMIconView(TQWidget *parent, const char *name)
: KIconView(parent,name)
{
setMode(KIconView::Select);
- setSelectionMode(QIconView::Single);
+ setSelectionMode(TQIconView::Single);
setItemsMovable(false);
- setResizeMode(QIconView::Adjust);
+ setResizeMode(TQIconView::Adjust);
m_items.setAutoDelete(false);
setViewMode(KMIconView::Big);
- connect(this,SIGNAL(contextMenuRequested(QIconViewItem*,const QPoint&)),SLOT(slotRightButtonClicked(QIconViewItem*,const QPoint&)));
- connect(this,SIGNAL(selectionChanged()),SLOT(slotSelectionChanged()));
+ connect(this,TQT_SIGNAL(contextMenuRequested(TQIconViewItem*,const TQPoint&)),TQT_SLOT(slotRightButtonClicked(TQIconViewItem*,const TQPoint&)));
+ connect(this,TQT_SIGNAL(selectionChanged()),TQT_SLOT(slotSelectionChanged()));
}
KMIconView::~KMIconView()
@@ -141,7 +141,7 @@ KMIconViewItem* KMIconView::findItem(KMPrinter *p)
{
if (p)
{
- QPtrListIterator<KMIconViewItem> it(m_items);
+ TQPtrListIterator<KMIconViewItem> it(m_items);
for (;it.current();++it)
if (it.current()->text() == p->name()
&& it.current()->isClass() == p->isClass())
@@ -150,17 +150,17 @@ KMIconViewItem* KMIconView::findItem(KMPrinter *p)
return 0;
}
-void KMIconView::setPrinterList(QPtrList<KMPrinter> *list)
+void KMIconView::setPrinterList(TQPtrList<KMPrinter> *list)
{
bool changed(false);
- QPtrListIterator<KMIconViewItem> it(m_items);
+ TQPtrListIterator<KMIconViewItem> it(m_items);
for (;it.current();++it)
it.current()->setDiscarded(true);
if (list)
{
- QPtrListIterator<KMPrinter> it(*list);
+ TQPtrListIterator<KMPrinter> it(*list);
KMIconViewItem *item(0);
for (;it.current();++it)
{
@@ -195,32 +195,32 @@ void KMIconView::setViewMode(ViewMode m)
{
m_mode = m;
bool big = (m == KMIconView::Big);
- int mode = (big ? QIconView::Bottom : QIconView::Right);
+ int mode = (big ? TQIconView::Bottom : TQIconView::Right);
- QPtrListIterator<KMIconViewItem> it(m_items);
+ TQPtrListIterator<KMIconViewItem> it(m_items);
for (;it.current();++it)
it.current()->updatePrinter(0, mode);
- setArrangement((big ? QIconView::LeftToRight : QIconView::TopToBottom));
- setItemTextPos((QIconView::ItemTextPos)mode);
+ setArrangement((big ? TQIconView::LeftToRight : TQIconView::TopToBottom));
+ setItemTextPos((TQIconView::ItemTextPos)mode);
//setGridX((big ? 60 : -1));
setWordWrapIconText(true);
}
-void KMIconView::slotRightButtonClicked(QIconViewItem *item, const QPoint& p)
+void KMIconView::slotRightButtonClicked(TQIconViewItem *item, const TQPoint& p)
{
- emit rightButtonClicked(item ? item->text() : QString::null, p);
+ emit rightButtonClicked(item ? item->text() : TQString::null, p);
}
void KMIconView::slotSelectionChanged()
{
KMIconViewItem *item = static_cast<KMIconViewItem*>(currentItem());
- emit printerSelected((item && !item->isDiscarded() && item->isSelected() ? item->text() : QString::null));
+ emit printerSelected((item && !item->isDiscarded() && item->isSelected() ? item->text() : TQString::null));
}
-void KMIconView::setPrinter(const QString& prname)
+void KMIconView::setPrinter(const TQString& prname)
{
- QPtrListIterator<KMIconViewItem> it(m_items);
+ TQPtrListIterator<KMIconViewItem> it(m_items);
for (; it.current(); ++it)
if (it.current()->text() == prname)
{
@@ -231,7 +231,7 @@ void KMIconView::setPrinter(const QString& prname)
void KMIconView::setPrinter(KMPrinter *p)
{
- setPrinter(p ? p->name() : QString::null);
+ setPrinter(p ? p->name() : TQString::null);
}
#include "kmiconview.moc"
diff --git a/kdeprint/management/kmiconview.h b/kdeprint/management/kmiconview.h
index 1cc8daa09..1c3aeb542 100644
--- a/kdeprint/management/kmiconview.h
+++ b/kdeprint/management/kmiconview.h
@@ -21,22 +21,22 @@
#define KMICONVIEW_H
#include <kiconview.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include "kmobject.h"
class KMPrinter;
-class KMIconViewItem : public QIconViewItem, public KMObject
+class KMIconViewItem : public TQIconViewItem, public KMObject
{
public:
- KMIconViewItem(QIconView *parent, KMPrinter *p);
- void updatePrinter(KMPrinter *printer = 0, int mode = QIconView::Bottom);
+ KMIconViewItem(TQIconView *parent, KMPrinter *p);
+ void updatePrinter(KMPrinter *printer = 0, int mode = TQIconView::Bottom);
bool isClass() const { return m_isclass; }
protected:
- virtual void paintItem(QPainter*, const QColorGroup&);
- virtual void calcRect(const QString& text_ = QString::null);
+ virtual void paintItem(TQPainter*, const TQColorGroup&);
+ virtual void calcRect(const TQString& text_ = TQString::null);
private:
int m_mode;
@@ -51,27 +51,27 @@ class KMIconView : public KIconView
public:
enum ViewMode { Big, Small };
- KMIconView(QWidget *parent = 0, const char *name = 0);
+ KMIconView(TQWidget *parent = 0, const char *name = 0);
~KMIconView();
- void setPrinterList(QPtrList<KMPrinter> *list);
- void setPrinter(const QString&);
+ void setPrinterList(TQPtrList<KMPrinter> *list);
+ void setPrinter(const TQString&);
void setPrinter(KMPrinter*);
void setViewMode(ViewMode);
signals:
- void rightButtonClicked(const QString&, const QPoint&);
- void printerSelected(const QString&);
+ void rightButtonClicked(const TQString&, const TQPoint&);
+ void printerSelected(const TQString&);
protected slots:
- void slotRightButtonClicked(QIconViewItem*, const QPoint&);
+ void slotRightButtonClicked(TQIconViewItem*, const TQPoint&);
void slotSelectionChanged();
private:
KMIconViewItem* findItem(KMPrinter *p);
private:
- QPtrList<KMIconViewItem> m_items;
+ TQPtrList<KMIconViewItem> m_items;
ViewMode m_mode;
};
diff --git a/kdeprint/management/kminfopage.cpp b/kdeprint/management/kminfopage.cpp
index 4366265ab..e06fa3c28 100644
--- a/kdeprint/management/kminfopage.cpp
+++ b/kdeprint/management/kminfopage.cpp
@@ -20,44 +20,44 @@
#include "kminfopage.h"
#include "kmprinter.h"
-#include <qpixmap.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqpixmap.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kiconloader.h>
#include <kseparator.h>
-KMInfoPage::KMInfoPage(QWidget *parent, const char *name)
-: QWidget(parent,name)
+KMInfoPage::KMInfoPage(TQWidget *parent, const char *name)
+: TQWidget(parent,name)
{
- m_title = new QLabel(this);
- m_titlepixmap = new QLabel(this);
+ m_title = new TQLabel(this);
+ m_titlepixmap = new TQLabel(this);
m_titlepixmap->setAlignment(Qt::AlignCenter);
KSeparator* sep = new KSeparator( KSeparator::HLine, this);
- m_type = new QLabel(this);
- m_description = new QLabel(this);
- m_state = new QLabel(this);
- m_location = new QLabel(this);
- m_model = new QLabel(this);
- m_uri = new QLabel(this);
- m_device = new QLabel(this);
- QLabel *m_loclabel = new QLabel(i18n("Physical Location", "Location:"), this);
+ m_type = new TQLabel(this);
+ m_description = new TQLabel(this);
+ m_state = new TQLabel(this);
+ m_location = new TQLabel(this);
+ m_model = new TQLabel(this);
+ m_uri = new TQLabel(this);
+ m_device = new TQLabel(this);
+ QLabel *m_loclabel = new TQLabel(i18n("Physical Location", "Location:"), this);
m_loclabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
- QLabel *m_desclabel = new QLabel(i18n("Description:"), this);
+ QLabel *m_desclabel = new TQLabel(i18n("Description:"), this);
m_desclabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
- QLabel *m_typelabel = new QLabel(i18n("Type:"), this);
+ QLabel *m_typelabel = new TQLabel(i18n("Type:"), this);
m_typelabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
- QLabel *m_statelabel = new QLabel(i18n("Status", "State:"), this);
+ QLabel *m_statelabel = new TQLabel(i18n("Status", "State:"), this);
m_statelabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
- QLabel *m_urilabel = new QLabel(i18n("URI:"), this);
+ QLabel *m_urilabel = new TQLabel(i18n("URI:"), this);
m_urilabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
- m_devlabel = new QLabel(i18n("Device:"), this);
+ m_devlabel = new TQLabel(i18n("Device:"), this);
m_devlabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
- QLabel *m_modellabel = new QLabel(i18n("Model:"), this);
+ QLabel *m_modellabel = new TQLabel(i18n("Model:"), this);
m_modellabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
- QGridLayout *lay0 = new QGridLayout(this, 11, 2, 0, 5);
- QHBoxLayout *lay1 = new QHBoxLayout(0, 0, 10);
+ QGridLayout *lay0 = new TQGridLayout(this, 11, 2, 0, 5);
+ QHBoxLayout *lay1 = new TQHBoxLayout(0, 0, 10);
lay0->addRowSpacing(7,20);
lay0->setRowStretch(7,0);
lay0->setRowStretch(10,1);
@@ -95,19 +95,19 @@ void KMInfoPage::setPrinter(KMPrinter *p)
// clear everything if p == 0
if (!p)
{
- m_title->setText(QString::null);
- m_titlepixmap->setPixmap(QPixmap());
- m_type->setText(QString::null);
- m_state->setText(QString::null);
- m_location->setText(QString::null);
- m_description->setText(QString::null);
- m_uri->setText(QString::null);
- m_device->setText(QString::null);
- m_model->setText(QString::null);
+ m_title->setText(TQString::null);
+ m_titlepixmap->setPixmap(TQPixmap());
+ m_type->setText(TQString::null);
+ m_state->setText(TQString::null);
+ m_location->setText(TQString::null);
+ m_description->setText(TQString::null);
+ m_uri->setText(TQString::null);
+ m_device->setText(TQString::null);
+ m_model->setText(TQString::null);
}
else
{
- m_title->setText(QString::fromLatin1("<b>%1</b>").arg(p->name()));
+ m_title->setText(TQString::fromLatin1("<b>%1</b>").arg(p->name()));
m_titlepixmap->setPixmap(SmallIcon(p->pixmap()));
if (p->isImplicit()) m_type->setText(i18n("Implicit class"));
else if (p->isClass(false))
@@ -126,7 +126,7 @@ void KMInfoPage::setPrinter(KMPrinter *p)
if (p->isClass(false))
{
QString s;
- for (QStringList::ConstIterator it=p->members().begin(); it!=p->members().end(); ++it)
+ for (TQStringList::ConstIterator it=p->members().begin(); it!=p->members().end(); ++it)
s.append(KURL(*it).prettyURL() + ", ");
s.truncate(s.length()-2);
m_device->setText(s);
diff --git a/kdeprint/management/kminfopage.h b/kdeprint/management/kminfopage.h
index a93aa1296..9c1c6ff10 100644
--- a/kdeprint/management/kminfopage.h
+++ b/kdeprint/management/kminfopage.h
@@ -21,14 +21,14 @@
#define KMINFOPAGE_H
#include "kmprinterpage.h"
-#include <qwidget.h>
+#include <tqwidget.h>
class QLabel;
-class KMInfoPage : public QWidget, public KMPrinterPage
+class KMInfoPage : public TQWidget, public KMPrinterPage
{
public:
- KMInfoPage(QWidget *parent = 0, const char *name = 0);
+ KMInfoPage(TQWidget *parent = 0, const char *name = 0);
~KMInfoPage();
void setPrinter(KMPrinter *p);
diff --git a/kdeprint/management/kminstancepage.cpp b/kdeprint/management/kminstancepage.cpp
index d4bb32687..6e6fcc391 100644
--- a/kdeprint/management/kminstancepage.cpp
+++ b/kdeprint/management/kminstancepage.cpp
@@ -26,10 +26,10 @@
#include "kprinter.h"
#include "kmtimer.h"
-#include <qlayout.h>
-#include <qregexp.h>
-#include <qwhatsthis.h>
-#include <qpushbutton.h>
+#include <tqlayout.h>
+#include <tqregexp.h>
+#include <tqwhatsthis.h>
+#include <tqpushbutton.h>
#include <kmessagebox.h>
#include <kinputdialog.h>
#include <klistbox.h>
@@ -38,26 +38,26 @@
#include <kstandarddirs.h>
#include <kdebug.h>
-KMInstancePage::KMInstancePage(QWidget *parent, const char *name)
-: QWidget(parent,name)
+KMInstancePage::KMInstancePage(TQWidget *parent, const char *name)
+: TQWidget(parent,name)
{
m_view = new KListBox(this);
m_printer = 0;
initActions();
- QHBoxLayout *main_ = new QHBoxLayout(this, 0, 0);
+ QHBoxLayout *main_ = new TQHBoxLayout(this, 0, 0);
main_->addWidget(m_view);
- QVBoxLayout *sub_ = new QVBoxLayout(0, 0, 0);
+ QVBoxLayout *sub_ = new TQVBoxLayout(0, 0, 0);
main_->addLayout(sub_);
- for (QValueList<QButton*>::Iterator it=m_buttons.begin(); it!=m_buttons.end(); ++it)
+ for (TQValueList<TQButton*>::Iterator it=m_buttons.begin(); it!=m_buttons.end(); ++it)
if (*it)
sub_->addWidget(*it);
else
sub_->addSpacing(10);
sub_->addStretch(1);
- QWhatsThis::add(this,
+ TQWhatsThis::add(this,
i18n("Define/Edit here instances for the current selected "
"printer. An instance is a combination of a real "
"(physical) printer and a set of predefined options. "
@@ -72,26 +72,26 @@ KMInstancePage::~KMInstancePage()
{
}
-void KMInstancePage::addButton(const QString& txt, const QString& pixmap, const char *receiver)
+void KMInstancePage::addButton(const TQString& txt, const TQString& pixmap, const char *receiver)
{
- QPushButton *btn = new QPushButton(this, 0L);
+ QPushButton *btn = new TQPushButton(this, 0L);
btn->setText(txt);
btn->setIconSet(BarIconSet(pixmap));
btn->setFlat(true);
- connect(btn, SIGNAL(clicked()), receiver);
+ connect(btn, TQT_SIGNAL(clicked()), receiver);
m_buttons.append(btn);
}
void KMInstancePage::initActions()
{
- addButton(i18n("New..."), "filenew", SLOT(slotNew()));
- addButton(i18n("Copy..."), "editcopy", SLOT(slotCopy()));
- addButton(i18n("Remove"), "edittrash", SLOT(slotRemove()));
+ addButton(i18n("New..."), "filenew", TQT_SLOT(slotNew()));
+ addButton(i18n("Copy..."), "editcopy", TQT_SLOT(slotCopy()));
+ addButton(i18n("Remove"), "edittrash", TQT_SLOT(slotRemove()));
m_buttons.append(0);
- addButton(i18n("Set as Default"), "exec", SLOT(slotDefault()));
- addButton(i18n("Settings"), "configure", SLOT(slotSettings()));
+ addButton(i18n("Set as Default"), "exec", TQT_SLOT(slotDefault()));
+ addButton(i18n("Settings"), "configure", TQT_SLOT(slotSettings()));
m_buttons.append(0);
- addButton(i18n("Test..."), "fileprint", SLOT(slotTest()));
+ addButton(i18n("Test..."), "fileprint", TQT_SLOT(slotTest()));
}
void KMInstancePage::setPrinter(KMPrinter *p)
@@ -104,18 +104,18 @@ void KMInstancePage::setPrinter(KMPrinter *p)
bool ok = (p != 0);
if (ok)
{
- QPtrList<KMPrinter> list;
+ TQPtrList<KMPrinter> list;
KMFactory::self()->virtualManager()->virtualList(list,p->name());
- QPtrListIterator<KMPrinter> it(list);
+ TQPtrListIterator<KMPrinter> it(list);
for (;it.current();++it)
{
- QStringList pair = QStringList::split('/',it.current()->name(),false);
+ QStringList pair = TQStringList::split('/',it.current()->name(),false);
m_view->insertItem(SmallIcon((it.current()->isSoftDefault() ? "exec" : "fileprint")),(pair.count() > 1 ? pair[1] : i18n("(Default)")));
}
m_view->sort();
}
- for (QValueList<QButton*>::ConstIterator it=m_buttons.begin(); it!=m_buttons.end(); ++it)
+ for (TQValueList<TQButton*>::ConstIterator it=m_buttons.begin(); it!=m_buttons.end(); ++it)
if (*it)
(*it)->setEnabled(ok);
@@ -138,12 +138,12 @@ void KMInstancePage::slotNew()
i18n("(Default)"),&ok,this);
if (ok)
{
- if (name.find(QRegExp("[/\\s]")) != -1)
+ if (name.find(TQRegExp("[/\\s]")) != -1)
KMessageBox::error(this, i18n("Instance name must not contain any spaces or slashes."));
else
{
if (name == i18n("(Default)"))
- name = QString::null;
+ name = TQString::null;
KMFactory::self()->virtualManager()->create(m_printer,name);
setPrinter(m_printer);
}
@@ -158,11 +158,11 @@ void KMInstancePage::slotRemove()
bool reload(false);
QString src = m_view->currentText();
- QString msg = (src != i18n("(Default)") ? i18n("Do you really want to remove instance %1?") : i18n("You can't remove the default instance. However all settings of %1 will be discarded. Continue?"));
- if (!src.isEmpty() && KMessageBox::warningContinueCancel(this,msg.arg(src),QString::null,KStdGuiItem::del()) == KMessageBox::Continue)
+ TQString msg = (src != i18n("(Default)") ? i18n("Do you really want to remove instance %1?") : i18n("You can't remove the default instance. However all settings of %1 will be discarded. Continue?"));
+ if (!src.isEmpty() && KMessageBox::warningContinueCancel(this,msg.arg(src),TQString::null,KStdGuiItem::del()) == KMessageBox::Continue)
{
if (src == i18n("(Default)"))
- src = QString::null;
+ src = TQString::null;
reload = KMFactory::self()->virtualManager()->isDefault(m_printer,src);
KMFactory::self()->virtualManager()->remove(m_printer,src);
setPrinter(m_printer);
@@ -183,14 +183,14 @@ void KMInstancePage::slotCopy()
i18n("(Default)"),&ok,this);
if (ok)
{
- if (name.find(QRegExp("[/\\s]")) != -1)
+ if (name.find(TQRegExp("[/\\s]")) != -1)
KMessageBox::error(this, i18n("Instance name must not contain any spaces or slashes."));
else
{
if (src == i18n("(Default)"))
- src = QString::null;
+ src = TQString::null;
if (name == i18n("(Default)"))
- name = QString::null;
+ name = TQString::null;
KMFactory::self()->virtualManager()->copy(m_printer,src,name);
setPrinter(m_printer);
}
@@ -207,7 +207,7 @@ void KMInstancePage::slotSettings()
QString src = m_view->currentText();
if (!src.isEmpty())
{
- if (src == i18n("(Default)")) src = QString::null;
+ if (src == i18n("(Default)")) src = TQString::null;
KMPrinter *pr = KMFactory::self()->virtualManager()->findInstance(m_printer,src);
if ( !pr )
KMessageBox::error( this, i18n( "Unable to find instance %1." ).arg( m_view->currentText() ) );
@@ -222,7 +222,7 @@ void KMInstancePage::slotSettings()
if (pr->isEdited())
{ // printer edited, need to save changes
pr->setDefaultOptions(pr->editedOptions());
- pr->setEditedOptions(QMap<QString,QString>());
+ pr->setEditedOptions(TQMap<TQString,TQString>());
pr->setEdited(false);
KMFactory::self()->virtualManager()->triggerSave();
}
@@ -242,7 +242,7 @@ void KMInstancePage::slotDefault()
if (!src.isEmpty())
{
if (src == i18n("(Default)"))
- src = QString::null;
+ src = TQString::null;
KMFactory::self()->virtualManager()->setAsDefault(m_printer,src);
setPrinter(m_printer);
}
@@ -258,11 +258,11 @@ void KMInstancePage::slotTest()
if (!src.isEmpty())
{
if (src == i18n("(Default)"))
- src = QString::null;
+ src = TQString::null;
KMPrinter *mpr = KMFactory::self()->virtualManager()->findInstance(m_printer,src);
if (!mpr)
KMessageBox::error(this,i18n("Internal error: printer not found."));
- else if (KMessageBox::warningContinueCancel(this, i18n("You are about to print a test page on %1. Do you want to continue?").arg(mpr->printerName()), QString::null, i18n("Print Test Page"), "printTestPage") == KMessageBox::Continue)
+ else if (KMessageBox::warningContinueCancel(this, i18n("You are about to print a test page on %1. Do you want to continue?").arg(mpr->printerName()), TQString::null, i18n("Print Test Page"), "printTestPage") == KMessageBox::Continue)
{
if (!KMFactory::self()->virtualManager()->testInstance(mpr))
KMessageBox::error(this, i18n("Unable to send test page to %1.").arg(mpr->printerName()));
diff --git a/kdeprint/management/kminstancepage.h b/kdeprint/management/kminstancepage.h
index d85a4bdb9..876c1f030 100644
--- a/kdeprint/management/kminstancepage.h
+++ b/kdeprint/management/kminstancepage.h
@@ -21,18 +21,18 @@
#define KMINSTANCEPAGE_H
#include "kmprinterpage.h"
-#include <qvaluelist.h>
-#include <qwidget.h>
+#include <tqvaluelist.h>
+#include <tqwidget.h>
class KListBox;
class KMPrinter;
class QButton;
-class KMInstancePage : public QWidget, public KMPrinterPage
+class KMInstancePage : public TQWidget, public KMPrinterPage
{
Q_OBJECT
public:
- KMInstancePage(QWidget *parent = 0, const char *name = 0);
+ KMInstancePage(TQWidget *parent = 0, const char *name = 0);
~KMInstancePage();
void setPrinter(KMPrinter*);
@@ -47,11 +47,11 @@ protected slots:
protected:
void initActions();
- void addButton(const QString& text, const QString& pixmap, const char *receiver);
+ void addButton(const TQString& text, const TQString& pixmap, const char *receiver);
private:
KListBox *m_view;
- QValueList<QButton*> m_buttons;
+ TQValueList<TQButton*> m_buttons;
KMPrinter *m_printer;
};
diff --git a/kdeprint/management/kmjobviewer.cpp b/kdeprint/management/kmjobviewer.cpp
index bc27d0928..a5e419fc6 100644
--- a/kdeprint/management/kmjobviewer.cpp
+++ b/kdeprint/management/kmjobviewer.cpp
@@ -32,7 +32,7 @@
#include <klistview.h>
#include <kstatusbar.h>
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
#include <kmessagebox.h>
#include <klocale.h>
#include <kpopupmenu.h>
@@ -45,12 +45,12 @@
#include <kdebug.h>
#include <kwin.h>
#include <kio/netaccess.h>
-#include <qtimer.h>
-#include <qlayout.h>
+#include <tqtimer.h>
+#include <tqlayout.h>
#include <stdlib.h>
-#include <qlineedit.h>
+#include <tqlineedit.h>
#include <kdialogbase.h>
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
#include <kurldrag.h>
#include <kconfig.h>
@@ -60,20 +60,20 @@
class KJobListView : public KListView
{
public:
- KJobListView( QWidget *parent = 0, const char *name = 0 );
+ KJobListView( TQWidget *parent = 0, const char *name = 0 );
protected:
- bool acceptDrag( QDropEvent* ) const;
+ bool acceptDrag( TQDropEvent* ) const;
};
-KJobListView::KJobListView( QWidget *parent, const char *name )
+KJobListView::KJobListView( TQWidget *parent, const char *name )
: KListView( parent, name )
{
setAcceptDrops( true );
setDropVisualizer( false );
}
-bool KJobListView::acceptDrag( QDropEvent *e ) const
+bool KJobListView::acceptDrag( TQDropEvent *e ) const
{
if ( KURLDrag::canDecode( e ) )
return true;
@@ -81,7 +81,7 @@ bool KJobListView::acceptDrag( QDropEvent *e ) const
return KListView::acceptDrag( e );
}
-KMJobViewer::KMJobViewer(QWidget *parent, const char *name)
+KMJobViewer::KMJobViewer(TQWidget *parent, const char *name)
: KMainWindow(parent,name)
{
m_view = 0;
@@ -100,7 +100,7 @@ KMJobViewer::KMJobViewer(QWidget *parent, const char *name)
{
setCaption(i18n("No Printer"));
KConfig *conf = KMFactory::self()->printConfig();
- QSize defSize( 550, 250 );
+ TQSize defSize( 550, 250 );
conf->setGroup( "Jobs" );
resize( conf->readSizeEntry( "Size", &defSize ) );
}
@@ -121,10 +121,10 @@ KMJobViewer::~KMJobViewer()
void KMJobViewer::setPrinter(KMPrinter *p)
{
- setPrinter((p ? p->printerName() : QString::null));
+ setPrinter((p ? p->printerName() : TQString::null));
}
-void KMJobViewer::setPrinter(const QString& prname)
+void KMJobViewer::setPrinter(const TQString& prname)
{
// We need to trigger a refresh even if the printer
// has not changed, some jobs may have been canceled
@@ -177,7 +177,7 @@ void KMJobViewer::addToManager()
if (m_prname == i18n("All Printers"))
{
loadPrinters();
- QPtrListIterator<KMPrinter> it(m_printers);
+ TQPtrListIterator<KMPrinter> it(m_printers);
for (; it.current(); ++it)
m_manager->addPrinter(it.current()->printerName(), (KMJobManager::JobType)m_type, it.current()->isSpecial());
}
@@ -193,7 +193,7 @@ void KMJobViewer::removeFromManager()
{
if (m_prname == i18n("All Printers"))
{
- QPtrListIterator<KMPrinter> it(m_printers);
+ TQPtrListIterator<KMPrinter> it(m_printers);
for (; it.current(); ++it)
m_manager->removePrinter(it.current()->printerName(), (KMJobManager::JobType)m_type);
}
@@ -206,7 +206,7 @@ void KMJobViewer::removeFromManager()
void KMJobViewer::refresh(bool reload)
{
m_jobs.clear();
- QPtrListIterator<KMJob> it(m_manager->jobList(reload));
+ TQPtrListIterator<KMJob> it(m_manager->jobList(reload));
bool all = (m_prname == i18n("All Printers")), active = (m_type == KMJobManager::ActiveJobs);
for (; it.current(); ++it)
if ((all || it.current()->printer() == m_prname)
@@ -239,17 +239,17 @@ void KMJobViewer::init()
m_view->addColumn(i18n("Size (KB)"));
m_view->addColumn(i18n("Page(s)"));
m_view->setColumnAlignment(5,Qt::AlignRight|Qt::AlignVCenter);
- connect( m_view, SIGNAL( dropped( QDropEvent*, QListViewItem* ) ), SLOT( slotDropped( QDropEvent*, QListViewItem* ) ) );
+ connect( m_view, TQT_SIGNAL( dropped( TQDropEvent*, TQListViewItem* ) ), TQT_SLOT( slotDropped( TQDropEvent*, TQListViewItem* ) ) );
//m_view->addColumn(i18n("Printer"));
//m_view->setColumnAlignment(6,Qt::AlignRight|Qt::AlignVCenter);
KMFactory::self()->uiManager()->setupJobViewer(m_view);
- m_view->setFrameStyle(QFrame::WinPanel|QFrame::Sunken);
+ m_view->setFrameStyle(TQFrame::WinPanel|TQFrame::Sunken);
m_view->setLineWidth(1);
m_view->setSorting(0);
m_view->setAllColumnsShowFocus(true);
- m_view->setSelectionMode(QListView::Extended);
- connect(m_view,SIGNAL(selectionChanged()),SLOT(slotSelectionChanged()));
- connect(m_view,SIGNAL(rightButtonPressed(QListViewItem*,const QPoint&,int)),SLOT(slotRightClicked(QListViewItem*,const QPoint&,int)));
+ m_view->setSelectionMode(TQListView::Extended);
+ connect(m_view,TQT_SIGNAL(selectionChanged()),TQT_SLOT(slotSelectionChanged()));
+ connect(m_view,TQT_SIGNAL(rightButtonPressed(TQListViewItem*,const TQPoint&,int)),TQT_SLOT(slotRightClicked(TQListViewItem*,const TQPoint&,int)));
setCentralWidget(m_view);
}
@@ -259,35 +259,35 @@ void KMJobViewer::init()
void KMJobViewer::initActions()
{
// job actions
- KAction *hact = new KAction(i18n("&Hold"),"stop",0,this,SLOT(slotHold()),actionCollection(),"job_hold");
- KAction *ract = new KAction(i18n("&Resume"),"run",0,this,SLOT(slotResume()),actionCollection(),"job_resume");
- KAction *dact = new KAction(i18n("Remo&ve"),"edittrash",Qt::Key_Delete,this,SLOT(slotRemove()),actionCollection(),"job_remove");
- KAction *sact = new KAction(i18n("Res&tart"),"redo",0,this,SLOT(slotRestart()),actionCollection(),"job_restart");
+ KAction *hact = new KAction(i18n("&Hold"),"stop",0,this,TQT_SLOT(slotHold()),actionCollection(),"job_hold");
+ KAction *ract = new KAction(i18n("&Resume"),"run",0,this,TQT_SLOT(slotResume()),actionCollection(),"job_resume");
+ KAction *dact = new KAction(i18n("Remo&ve"),"edittrash",Qt::Key_Delete,this,TQT_SLOT(slotRemove()),actionCollection(),"job_remove");
+ KAction *sact = new KAction(i18n("Res&tart"),"redo",0,this,TQT_SLOT(slotRestart()),actionCollection(),"job_restart");
KActionMenu *mact = new KActionMenu(i18n("&Move to Printer"),"fileprint",actionCollection(),"job_move");
mact->setDelayed(false);
- connect(mact->popupMenu(),SIGNAL(activated(int)),SLOT(slotMove(int)));
- connect(mact->popupMenu(),SIGNAL(aboutToShow()),KMTimer::self(),SLOT(hold()));
- connect(mact->popupMenu(),SIGNAL(aboutToHide()),KMTimer::self(),SLOT(release()));
- connect(mact->popupMenu(),SIGNAL(aboutToShow()),SLOT(slotShowMoveMenu()));
+ connect(mact->popupMenu(),TQT_SIGNAL(activated(int)),TQT_SLOT(slotMove(int)));
+ connect(mact->popupMenu(),TQT_SIGNAL(aboutToShow()),KMTimer::self(),TQT_SLOT(hold()));
+ connect(mact->popupMenu(),TQT_SIGNAL(aboutToHide()),KMTimer::self(),TQT_SLOT(release()));
+ connect(mact->popupMenu(),TQT_SIGNAL(aboutToShow()),TQT_SLOT(slotShowMoveMenu()));
KToggleAction *tact = new KToggleAction(i18n("&Toggle Completed Jobs"),"history",0,actionCollection(),"view_completed");
tact->setEnabled(m_manager->actions() & KMJob::ShowCompleted);
- connect(tact,SIGNAL(toggled(bool)),SLOT(slotShowCompleted(bool)));
+ connect(tact,TQT_SIGNAL(toggled(bool)),TQT_SLOT(slotShowCompleted(bool)));
KToggleAction *uact = new KToggleAction(i18n("Show Only User Jobs"), "personal", 0, actionCollection(), "view_user_jobs");
uact->setCheckedState(KGuiItem(i18n("Hide Only User Jobs"),"personal"));
- connect(uact, SIGNAL(toggled(bool)), SLOT(slotUserOnly(bool)));
- m_userfield = new QLineEdit(0);
+ connect(uact, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotUserOnly(bool)));
+ m_userfield = new TQLineEdit(0);
m_userfield->setText(getenv("USER"));
- connect(m_userfield, SIGNAL(returnPressed()), SLOT(slotUserChanged()));
- connect(uact, SIGNAL(toggled(bool)), m_userfield, SLOT(setEnabled(bool)));
+ connect(m_userfield, TQT_SIGNAL(returnPressed()), TQT_SLOT(slotUserChanged()));
+ connect(uact, TQT_SIGNAL(toggled(bool)), m_userfield, TQT_SLOT(setEnabled(bool)));
m_userfield->setEnabled(false);
- m_userfield->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
+ m_userfield->setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed));
KWidgetAction *ufact = new KWidgetAction(m_userfield, i18n("User Name"), 0, 0, 0, actionCollection(), "view_username");
if (!m_pop)
{
- m_pop = new QPopupMenu(this);
- connect(m_pop,SIGNAL(aboutToShow()),KMTimer::self(),SLOT(hold()));
- connect(m_pop,SIGNAL(aboutToHide()),KMTimer::self(),SLOT(release()));
+ m_pop = new TQPopupMenu(this);
+ connect(m_pop,TQT_SIGNAL(aboutToShow()),KMTimer::self(),TQT_SLOT(hold()));
+ connect(m_pop,TQT_SIGNAL(aboutToHide()),KMTimer::self(),TQT_SLOT(release()));
hact->plug(m_pop);
ract->plug(m_pop);
m_pop->insertSeparator();
@@ -300,10 +300,10 @@ void KMJobViewer::initActions()
// Filter actions
KActionMenu *fact = new KActionMenu(i18n("&Select Printer"), "kdeprint_printer", actionCollection(), "filter_modify");
fact->setDelayed(false);
- connect(fact->popupMenu(),SIGNAL(activated(int)),SLOT(slotPrinterSelected(int)));
- connect(fact->popupMenu(),SIGNAL(aboutToShow()),KMTimer::self(),SLOT(hold()));
- connect(fact->popupMenu(),SIGNAL(aboutToHide()),KMTimer::self(),SLOT(release()));
- connect(fact->popupMenu(),SIGNAL(aboutToShow()),SLOT(slotShowPrinterMenu()));
+ connect(fact->popupMenu(),TQT_SIGNAL(activated(int)),TQT_SLOT(slotPrinterSelected(int)));
+ connect(fact->popupMenu(),TQT_SIGNAL(aboutToShow()),KMTimer::self(),TQT_SLOT(hold()));
+ connect(fact->popupMenu(),TQT_SIGNAL(aboutToHide()),KMTimer::self(),TQT_SLOT(release()));
+ connect(fact->popupMenu(),TQT_SIGNAL(aboutToShow()),TQT_SLOT(slotShowPrinterMenu()));
if (!m_standalone)
{
@@ -322,16 +322,16 @@ void KMJobViewer::initActions()
}
else
{// stand-alone application
- KStdAction::quit(kapp,SLOT(quit()),actionCollection());
- KStdAction::close(this,SLOT(slotClose()),actionCollection());
- KStdAction::preferences(this, SLOT(slotConfigure()), actionCollection());
+ KStdAction::quit(kapp,TQT_SLOT(quit()),actionCollection());
+ KStdAction::close(this,TQT_SLOT(slotClose()),actionCollection());
+ KStdAction::preferences(this, TQT_SLOT(slotConfigure()), actionCollection());
// refresh action
- new KAction(i18n("Refresh"),"reload",0,this,SLOT(slotRefresh()),actionCollection(),"refresh");
+ new KAction(i18n("Refresh"),"reload",0,this,TQT_SLOT(slotRefresh()),actionCollection(),"refresh");
// create status bar
KStatusBar *statusbar = statusBar();
- m_stickybox = new QCheckBox( i18n( "Keep window permanent" ), statusbar );
+ m_stickybox = new TQCheckBox( i18n( "Keep window permanent" ), statusbar );
statusbar->addWidget( m_stickybox, 1, false );
statusbar->insertItem(" " + i18n("Max.: %1").arg(i18n("Unlimited"))+ " ", 0, 0, true);
statusbar->setItemFixed(0);
@@ -344,12 +344,12 @@ void KMJobViewer::initActions()
slotSelectionChanged();
}
-void KMJobViewer::buildPrinterMenu(QPopupMenu *menu, bool use_all, bool use_specials)
+void KMJobViewer::buildPrinterMenu(TQPopupMenu *menu, bool use_all, bool use_specials)
{
loadPrinters();
menu->clear();
- QPtrListIterator<KMPrinter> it(m_printers);
+ TQPtrListIterator<KMPrinter> it(m_printers);
int i(0);
if (use_all)
{
@@ -379,11 +379,11 @@ void KMJobViewer::slotShowPrinterMenu()
void KMJobViewer::updateJobs()
{
- QPtrListIterator<JobItem> jit(m_items);
+ TQPtrListIterator<JobItem> jit(m_items);
for (;jit.current();++jit)
jit.current()->setDiscarded(true);
- QPtrListIterator<KMJob> it(m_jobs);
+ TQPtrListIterator<KMJob> it(m_jobs);
for (;it.current();++it)
{
KMJob *j(it.current());
@@ -407,9 +407,9 @@ void KMJobViewer::updateJobs()
slotSelectionChanged();
}
-JobItem* KMJobViewer::findItem(const QString& uri)
+JobItem* KMJobViewer::findItem(const TQString& uri)
{
- QPtrListIterator<JobItem> it(m_items);
+ TQPtrListIterator<JobItem> it(m_items);
for (;it.current();++it)
if (it.current()->jobUri() == uri) return it.current();
return 0;
@@ -422,8 +422,8 @@ void KMJobViewer::slotSelectionChanged()
int thread(0);
bool completed(true), remote(false);
- QPtrListIterator<JobItem> it(m_items);
- QPtrList<KMJob> joblist;
+ TQPtrListIterator<JobItem> it(m_items);
+ TQPtrList<KMJob> joblist;
joblist.setAutoDelete(false);
for (;it.current();++it)
@@ -459,26 +459,26 @@ void KMJobViewer::slotSelectionChanged()
m_manager->validatePluginActions(actionCollection(), joblist);
}
-void KMJobViewer::jobSelection(QPtrList<KMJob>& l)
+void KMJobViewer::jobSelection(TQPtrList<KMJob>& l)
{
l.setAutoDelete(false);
- QPtrListIterator<JobItem> it(m_items);
+ TQPtrListIterator<JobItem> it(m_items);
for (;it.current();++it)
if (it.current()->isSelected())
l.append(it.current()->job());
}
-void KMJobViewer::send(int cmd, const QString& name, const QString& arg)
+void KMJobViewer::send(int cmd, const TQString& name, const TQString& arg)
{
KMTimer::self()->hold();
- QPtrList<KMJob> l;
+ TQPtrList<KMJob> l;
jobSelection(l);
if (!m_manager->sendCommand(l,cmd,arg))
{
KMessageBox::error(this,"<qt>"+i18n("Unable to perform action \"%1\" on selected jobs. Error received from manager:").arg(name)+"<p>"+KMManager::self()->errorMsg()+"</p></qt>");
// error reported, clean it
- KMManager::self()->setErrorMsg(QString::null);
+ KMManager::self()->setErrorMsg(TQString::null);
}
triggerRefresh();
@@ -515,7 +515,7 @@ void KMJobViewer::slotMove(int prID)
}
}
-void KMJobViewer::slotRightClicked(QListViewItem*,const QPoint& p,int)
+void KMJobViewer::slotRightClicked(TQListViewItem*,const TQPoint& p,int)
{
if (m_pop) m_pop->popup(p);
}
@@ -525,7 +525,7 @@ void KMJobViewer::loadPrinters()
m_printers.clear();
// retrieve printer list without reloading it (faster)
- QPtrListIterator<KMPrinter> it(*(KMFactory::self()->manager()->printerList(false)));
+ TQPtrListIterator<KMPrinter> it(*(KMFactory::self()->manager()->printerList(false)));
for (;it.current();++it)
{
// keep only real printers (no instance, no implicit) and special printers
@@ -594,25 +594,25 @@ void KMJobViewer::loadPluginActions()
}
}
- QValueList<KAction*> acts = m_manager->createPluginActions(actionCollection());
- for (QValueListIterator<KAction*> it=acts.begin(); it!=acts.end(); ++it)
+ TQValueList<KAction*> acts = m_manager->createPluginActions(actionCollection());
+ for (TQValueListIterator<KAction*> it=acts.begin(); it!=acts.end(); ++it)
{
// connect the action to this
- connect((*it), SIGNAL(activated(int)), SLOT(pluginActionActivated(int)));
+ connect((*it), TQT_SIGNAL(activated(int)), TQT_SLOT(pluginActionActivated(int)));
// should add it to the toolbar and menubar
(*it)->plug(toolBar(), toolbarindex++);
if (m_pop)
(*it)->plug(m_pop, mpopindex++);
if (menu)
- (*it)->plug(static_cast<QPopupMenu*>(menu), menuindex++);
+ (*it)->plug(static_cast<TQPopupMenu*>(menu), menuindex++);
}
}
void KMJobViewer::removePluginActions()
{
- QValueList<KAction*> acts = actionCollection()->actions("plugin");
- for (QValueListIterator<KAction*> it=acts.begin(); it!=acts.end(); ++it)
+ TQValueList<KAction*> acts = actionCollection()->actions("plugin");
+ for (TQValueListIterator<KAction*> it=acts.begin(); it!=acts.end(); ++it)
{
(*it)->unplugAll();
delete (*it);
@@ -653,7 +653,7 @@ void KMJobViewer::reload()
static_cast<KToggleAction*>(actionCollection()->action("view_completed"))->setChecked(false);
}
-void KMJobViewer::closeEvent(QCloseEvent *e)
+void KMJobViewer::closeEvent(TQCloseEvent *e)
{
if (m_standalone && !kapp->sessionSaving())
{
@@ -668,7 +668,7 @@ void KMJobViewer::pluginActionActivated(int ID)
{
KMTimer::self()->hold();
- QPtrList<KMJob> joblist;
+ TQPtrList<KMJob> joblist;
jobSelection(joblist);
if (!m_manager->doPluginAction(ID, joblist))
KMessageBox::error(this, "<qt>"+i18n("Operation failed.")+"<p>"+KMManager::self()->errorMsg()+"</p></qt>");
@@ -679,7 +679,7 @@ void KMJobViewer::pluginActionActivated(int ID)
void KMJobViewer::slotUserOnly(bool on)
{
- m_username = (on ? m_userfield->text() : QString::null);
+ m_username = (on ? m_userfield->text() : TQString::null);
refresh(false);
}
@@ -717,10 +717,10 @@ bool KMJobViewer::isSticky() const
return ( m_stickybox ? m_stickybox->isChecked() : false );
}
-void KMJobViewer::slotDropped( QDropEvent *e, QListViewItem* )
+void KMJobViewer::slotDropped( TQDropEvent *e, TQListViewItem* )
{
- QStringList files;
- QString target;
+ TQStringList files;
+ TQString target;
KURL::List uris;
KURLDrag::decode( e, uris );
diff --git a/kdeprint/management/kmjobviewer.h b/kdeprint/management/kmjobviewer.h
index 69a3f27d6..9cdf6aceb 100644
--- a/kdeprint/management/kmjobviewer.h
+++ b/kdeprint/management/kmjobviewer.h
@@ -50,19 +50,19 @@ class KDEPRINT_EXPORT KMJobViewer : public KMainWindow, public KMPrinterPage, pu
{
Q_OBJECT
public:
- KMJobViewer(QWidget *parent = 0, const char *name = 0);
+ KMJobViewer(TQWidget *parent = 0, const char *name = 0);
~KMJobViewer();
- void setPrinter(const QString& prname);
+ void setPrinter(const TQString& prname);
void setPrinter(KMPrinter *p);
void refresh(bool reload = false);
- QString printer() const;
+ TQString printer() const;
bool isSticky() const;
signals:
void jobsShown(KMJobViewer*, bool hasJobs);
void refreshClicked();
- void printerChanged(KMJobViewer*, const QString& prname);
+ void printerChanged(KMJobViewer*, const TQString& prname);
void viewerDestroyed(KMJobViewer*);
public slots:
@@ -74,7 +74,7 @@ protected slots:
void slotResume();
void slotRemove();
void slotRestart();
- void slotRightClicked(QListViewItem*,const QPoint&,int);
+ void slotRightClicked(TQListViewItem*,const TQPoint&,int);
void slotMove(int prID);
void slotPrinterSelected(int);
void slotShowCompleted(bool);
@@ -85,34 +85,34 @@ protected slots:
void slotUserOnly(bool);
void slotUserChanged();
void slotConfigure();
- void slotDropped( QDropEvent*, QListViewItem* );
+ void slotDropped( TQDropEvent*, TQListViewItem* );
protected:
void init();
void updateJobs();
void initActions();
- JobItem* findItem(const QString& uri);
- void jobSelection(QPtrList<KMJob>& l);
- void send(int cmd, const QString& name, const QString& arg = QString::null);
+ JobItem* findItem(const TQString& uri);
+ void jobSelection(TQPtrList<KMJob>& l);
+ void send(int cmd, const TQString& name, const TQString& arg = TQString::null);
void loadPrinters();
void loadPluginActions();
void removePluginActions();
void reload();
//void aboutToReload();
- void closeEvent(QCloseEvent*);
+ void closeEvent(TQCloseEvent*);
void triggerRefresh();
void addToManager();
void removeFromManager();
- void buildPrinterMenu(QPopupMenu *menu, bool use_all = false, bool use_specials = false);
+ void buildPrinterMenu(TQPopupMenu *menu, bool use_all = false, bool use_specials = false);
void updateCaption();
void updateStatusBar();
private:
KListView *m_view;
- QPtrList<KMJob> m_jobs;
- QPtrList<JobItem> m_items;
+ TQPtrList<KMJob> m_jobs;
+ TQPtrList<JobItem> m_items;
QPopupMenu *m_pop;
- QPtrList<KMPrinter> m_printers;
+ TQPtrList<KMPrinter> m_printers;
QString m_prname;
int m_type;
QString m_username;
@@ -121,7 +121,7 @@ private:
bool m_standalone;
};
-inline QString KMJobViewer::printer() const
+inline TQString KMJobViewer::printer() const
{ return m_prname; }
#endif
diff --git a/kdeprint/management/kmlistview.cpp b/kdeprint/management/kmlistview.cpp
index cbb1ca088..e754cfe1d 100644
--- a/kdeprint/management/kmlistview.cpp
+++ b/kdeprint/management/kmlistview.cpp
@@ -21,20 +21,20 @@
#include "kmprinter.h"
#include "kmobject.h"
-#include <qheader.h>
-#include <qpainter.h>
+#include <tqheader.h>
+#include <tqpainter.h>
#include <klocale.h>
#include <kiconloader.h>
#include <kcursor.h>
-class KMListViewItem : public QListViewItem, public KMObject
+class KMListViewItem : public TQListViewItem, public KMObject
{
public:
- KMListViewItem(QListView *parent, const QString& txt);
- KMListViewItem(QListViewItem *parent, const QString& txt);
- KMListViewItem(QListViewItem *parent, KMPrinter *p);
+ KMListViewItem(TQListView *parent, const TQString& txt);
+ KMListViewItem(TQListViewItem *parent, const TQString& txt);
+ KMListViewItem(TQListViewItem *parent, KMPrinter *p);
- virtual void paintCell(QPainter*, const QColorGroup&, int, int, int);
+ virtual void paintCell(TQPainter*, const TQColorGroup&, int, int, int);
void updatePrinter(KMPrinter *p);
bool isClass() const { return m_isclass; }
@@ -46,20 +46,20 @@ private:
bool m_isclass;
};
-KMListViewItem::KMListViewItem(QListView *parent, const QString& txt)
-: QListViewItem(parent,txt)
+KMListViewItem::KMListViewItem(TQListView *parent, const TQString& txt)
+: TQListViewItem(parent,txt)
{
init();
}
-KMListViewItem::KMListViewItem(QListViewItem *parent, const QString& txt)
-: QListViewItem(parent,txt)
+KMListViewItem::KMListViewItem(TQListViewItem *parent, const TQString& txt)
+: TQListViewItem(parent,txt)
{
init();
}
-KMListViewItem::KMListViewItem(QListViewItem *parent, KMPrinter *p)
-: QListViewItem(parent)
+KMListViewItem::KMListViewItem(TQListViewItem *parent, KMPrinter *p)
+: TQListViewItem(parent)
{
init(p);
}
@@ -92,7 +92,7 @@ void KMListViewItem::updatePrinter(KMPrinter *p)
repaint();
}
-void KMListViewItem::paintCell(QPainter *p, const QColorGroup& cg, int c, int w, int a)
+void KMListViewItem::paintCell(TQPainter *p, const TQColorGroup& cg, int c, int w, int a)
{
if (m_state != 0)
{
@@ -101,26 +101,26 @@ void KMListViewItem::paintCell(QPainter *p, const QColorGroup& cg, int c, int w,
if (m_state & 0x2) f.setItalic(true);
p->setFont(f);
}
- QListViewItem::paintCell(p,cg,c,w,a);
+ TQListViewItem::paintCell(p,cg,c,w,a);
}
//************************************************************************************************
-KMListView::KMListView(QWidget *parent, const char *name)
-: QListView(parent,name)
+KMListView::KMListView(TQWidget *parent, const char *name)
+: TQListView(parent,name)
{
m_items.setAutoDelete(false);
addColumn("");
header()->hide();
- setFrameStyle(QFrame::WinPanel|QFrame::Sunken);
+ setFrameStyle(TQFrame::WinPanel|TQFrame::Sunken);
setLineWidth(1);
setSorting(0);
- connect(this,SIGNAL(contextMenuRequested(QListViewItem*,const QPoint&,int)),SLOT(slotRightButtonClicked(QListViewItem*,const QPoint&,int)));
- connect(this,SIGNAL(selectionChanged()),SLOT(slotSelectionChanged()));
- connect(this,SIGNAL(onItem(QListViewItem*)),SLOT(slotOnItem(QListViewItem*)));
- connect(this,SIGNAL(onViewport()),SLOT(slotOnViewport()));
+ connect(this,TQT_SIGNAL(contextMenuRequested(TQListViewItem*,const TQPoint&,int)),TQT_SLOT(slotRightButtonClicked(TQListViewItem*,const TQPoint&,int)));
+ connect(this,TQT_SIGNAL(selectionChanged()),TQT_SLOT(slotSelectionChanged()));
+ connect(this,TQT_SIGNAL(onItem(TQListViewItem*)),TQT_SLOT(slotOnItem(TQListViewItem*)));
+ connect(this,TQT_SIGNAL(onViewport()),TQT_SLOT(slotOnViewport()));
m_root = new KMListViewItem(this,i18n("Print System"));
m_root->setPixmap(0,SmallIcon("kdeprint_printer"));
@@ -142,16 +142,16 @@ KMListView::~KMListView()
{
}
-void KMListView::slotRightButtonClicked(QListViewItem *item, const QPoint& p, int)
+void KMListView::slotRightButtonClicked(TQListViewItem *item, const TQPoint& p, int)
{
- emit rightButtonClicked(item && item->depth() == 2 ? item->text(0) : QString::null, p);
+ emit rightButtonClicked(item && item->depth() == 2 ? item->text(0) : TQString::null, p);
}
KMListViewItem* KMListView::findItem(KMPrinter *p)
{
if (p)
{
- QPtrListIterator<KMListViewItem> it(m_items);
+ TQPtrListIterator<KMListViewItem> it(m_items);
bool isVirtual(p->isVirtual()), isClass(p->isClass());
for (;it.current();++it)
if (isVirtual)
@@ -169,26 +169,26 @@ KMListViewItem* KMListView::findItem(KMPrinter *p)
return 0;
}
-KMListViewItem* KMListView::findItem(const QString& prname)
+KMListViewItem* KMListView::findItem(const TQString& prname)
{
- QPtrListIterator<KMListViewItem> it(m_items);
+ TQPtrListIterator<KMListViewItem> it(m_items);
for (; it.current(); ++it)
if (it.current()->depth() == 2 && it.current()->text(0) == prname)
return it.current();
return 0;
}
-void KMListView::setPrinterList(QPtrList<KMPrinter> *list)
+void KMListView::setPrinterList(TQPtrList<KMPrinter> *list)
{
bool changed(false);
- QPtrListIterator<KMListViewItem> it(m_items);
+ TQPtrListIterator<KMListViewItem> it(m_items);
for (;it.current();++it)
it.current()->setDiscarded(true);
if (list)
{
- QPtrListIterator<KMPrinter> it(*list);
+ TQPtrListIterator<KMPrinter> it(*list);
KMListViewItem *item (0);
for (;it.current();++it)
{
@@ -213,7 +213,7 @@ void KMListView::setPrinterList(QPtrList<KMPrinter> *list)
}
}
- QPtrList<KMListViewItem> deleteList;
+ TQPtrList<KMListViewItem> deleteList;
deleteList.setAutoDelete(true);
for (uint i=0; i<m_items.count(); i++)
if (m_items.at(i)->isDiscarded())
@@ -237,12 +237,12 @@ void KMListView::setPrinterList(QPtrList<KMPrinter> *list)
void KMListView::slotSelectionChanged()
{
KMListViewItem *item = static_cast<KMListViewItem*>(currentItem());
- emit printerSelected((item && !item->isDiscarded() && item->depth() == 2 ? item->text(0) : QString::null));
+ emit printerSelected((item && !item->isDiscarded() && item->depth() == 2 ? item->text(0) : TQString::null));
}
-void KMListView::setPrinter(const QString& prname)
+void KMListView::setPrinter(const TQString& prname)
{
- QPtrListIterator<KMListViewItem> it(m_items);
+ TQPtrListIterator<KMListViewItem> it(m_items);
for (;it.current();++it)
if (it.current()->text(0) == prname)
{
@@ -253,10 +253,10 @@ void KMListView::setPrinter(const QString& prname)
void KMListView::setPrinter(KMPrinter *p)
{
- setPrinter(p ? p->name() : QString::null);
+ setPrinter(p ? p->name() : TQString::null);
}
-void KMListView::slotOnItem(QListViewItem *)
+void KMListView::slotOnItem(TQListViewItem *)
{
setCursor(KCursor::handCursor());
}
diff --git a/kdeprint/management/kmlistview.h b/kdeprint/management/kmlistview.h
index 9e5ce6651..e9a6b29e5 100644
--- a/kdeprint/management/kmlistview.h
+++ b/kdeprint/management/kmlistview.h
@@ -20,8 +20,8 @@
#ifndef KMLISTVIEW_H
#define KMLISTVIEW_H
-#include <qlistview.h>
-#include <qptrlist.h>
+#include <tqlistview.h>
+#include <tqptrlist.h>
class KMListViewItem;
class KMPrinter;
@@ -30,29 +30,29 @@ class KMListView : public QListView
{
Q_OBJECT
public:
- KMListView(QWidget *parent = 0, const char *name = 0);
+ KMListView(TQWidget *parent = 0, const char *name = 0);
~KMListView();
- void setPrinterList(QPtrList<KMPrinter> *list);
- void setPrinter(const QString&);
+ void setPrinterList(TQPtrList<KMPrinter> *list);
+ void setPrinter(const TQString&);
void setPrinter(KMPrinter*);
signals:
- void rightButtonClicked(const QString&, const QPoint&);
- void printerSelected(const QString&);
+ void rightButtonClicked(const TQString&, const TQPoint&);
+ void printerSelected(const TQString&);
protected slots:
- void slotRightButtonClicked(QListViewItem*, const QPoint&, int);
+ void slotRightButtonClicked(TQListViewItem*, const TQPoint&, int);
void slotSelectionChanged();
- void slotOnItem(QListViewItem*);
+ void slotOnItem(TQListViewItem*);
void slotOnViewport();
protected:
KMListViewItem* findItem(KMPrinter*);
- KMListViewItem* findItem(const QString&);
+ KMListViewItem* findItem(const TQString&);
private:
- QPtrList<KMListViewItem> m_items;
+ TQPtrList<KMListViewItem> m_items;
KMListViewItem *m_root, *m_classes, *m_printers, *m_specials;
};
diff --git a/kdeprint/management/kmmainview.cpp b/kdeprint/management/kmmainview.cpp
index 3bb20a99e..0e53f2757 100644
--- a/kdeprint/management/kmmainview.cpp
+++ b/kdeprint/management/kmmainview.cpp
@@ -35,13 +35,13 @@
#include "kiconselectaction.h"
#include "messagewindow.h"
-#include <qdockarea.h>
+#include <tqdockarea.h>
#include <kmenubar.h>
-#include <qtimer.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpopupmenu.h>
+#include <tqtimer.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpopupmenu.h>
#include <kmessagebox.h>
#include <kaction.h>
#include <klocale.h>
@@ -59,7 +59,7 @@
#undef m_manager
#define m_manager KMFactory::self()->manager()
-int kdeprint_management_add_printer_wizard( QWidget* parent )
+int kdeprint_management_add_printer_wizard( TQWidget* parent )
{
KMWizard dlg(parent);
int flag(0);
@@ -77,8 +77,8 @@ int kdeprint_management_add_printer_wizard( QWidget* parent )
return flag;
}
-KMMainView::KMMainView(QWidget *parent, const char *name, KActionCollection *coll)
-: QWidget(parent, name)
+KMMainView::KMMainView(TQWidget *parent, const char *name, KActionCollection *coll)
+: TQWidget(parent, name)
{
m_current = 0;
m_first = true;
@@ -86,7 +86,7 @@ KMMainView::KMMainView(QWidget *parent, const char *name, KActionCollection *col
// create widgets
m_printerview = new KMPrinterView(this, "PrinterView");
m_printerpages = new KMPages(this, "PrinterPages");
- m_pop = new QPopupMenu(this);
+ m_pop = new TQPopupMenu(this);
m_toolbar = new KToolBar(this, "ToolBar");
m_toolbar->setMovingEnabled(false);
m_plugin = new PluginComboBox(this, "Plugin");
@@ -99,10 +99,10 @@ KMMainView::KMMainView(QWidget *parent, const char *name, KActionCollection *col
m_menubar->setMovingEnabled( false );
// layout
- QVBoxLayout *m_layout = new QVBoxLayout(this, 0, 0);
+ QVBoxLayout *m_layout = new TQVBoxLayout(this, 0, 0);
m_layout->addWidget(m_toolbar);
m_layout->addWidget( m_menubar );
- m_boxlayout = new QBoxLayout(QBoxLayout::TopToBottom, 0, 0);
+ m_boxlayout = new TQBoxLayout(TQBoxLayout::TopToBottom, 0, 0);
m_layout->addLayout(m_boxlayout);
m_boxlayout->addWidget(m_printerview);
m_boxlayout->addWidget(m_printerpages);
@@ -110,12 +110,12 @@ KMMainView::KMMainView(QWidget *parent, const char *name, KActionCollection *col
m_layout->addWidget(m_plugin, 0);
// connections
- connect(KMTimer::self(),SIGNAL(timeout()),SLOT(slotTimer()));
- connect(m_printerview,SIGNAL(printerSelected(const QString&)),SLOT(slotPrinterSelected(const QString&)));
- connect(m_printerview,SIGNAL(rightButtonClicked(const QString&,const QPoint&)),SLOT(slotRightButtonClicked(const QString&,const QPoint&)));
- connect(m_pop,SIGNAL(aboutToShow()),KMTimer::self(),SLOT(hold()));
- connect(m_pop,SIGNAL(aboutToHide()),KMTimer::self(),SLOT(release()));
- connect( m_manager, SIGNAL( updatePossible( bool ) ), SLOT( slotUpdatePossible( bool ) ) );
+ connect(KMTimer::self(),TQT_SIGNAL(timeout()),TQT_SLOT(slotTimer()));
+ connect(m_printerview,TQT_SIGNAL(printerSelected(const TQString&)),TQT_SLOT(slotPrinterSelected(const TQString&)));
+ connect(m_printerview,TQT_SIGNAL(rightButtonClicked(const TQString&,const TQPoint&)),TQT_SLOT(slotRightButtonClicked(const TQString&,const TQPoint&)));
+ connect(m_pop,TQT_SIGNAL(aboutToShow()),KMTimer::self(),TQT_SLOT(hold()));
+ connect(m_pop,TQT_SIGNAL(aboutToHide()),KMTimer::self(),TQT_SLOT(release()));
+ connect( m_manager, TQT_SIGNAL( updatePossible( bool ) ), TQT_SLOT( slotUpdatePossible( bool ) ) );
// actions
if (coll)
@@ -176,64 +176,64 @@ void KMMainView::initActions()
KIconSelectAction *vact = new KIconSelectAction(i18n("&View"),0,m_actions,"view_change");
QStringList iconlst;
iconlst << "view_icon" << "view_detailed" << "view_tree";
- vact->setItems(QStringList::split(',',i18n("&Icons,&List,&Tree"),false), iconlst);
+ vact->setItems(TQStringList::split(',',i18n("&Icons,&List,&Tree"),false), iconlst);
vact->setCurrentItem(0);
- connect(vact,SIGNAL(activated(int)),SLOT(slotChangeView(int)));
+ connect(vact,TQT_SIGNAL(activated(int)),TQT_SLOT(slotChangeView(int)));
KActionMenu *stateAct = new KActionMenu(i18n("Start/Stop Printer"), "kdeprint_printstate", m_actions, "printer_state_change");
stateAct->setDelayed(false);
- stateAct->insert(new KAction(i18n("&Start Printer"),"kdeprint_enableprinter",0,this,SLOT(slotChangePrinterState()),m_actions,"printer_start"));
- stateAct->insert(new KAction(i18n("Sto&p Printer"),"kdeprint_stopprinter",0,this,SLOT(slotChangePrinterState()),m_actions,"printer_stop"));
+ stateAct->insert(new KAction(i18n("&Start Printer"),"kdeprint_enableprinter",0,this,TQT_SLOT(slotChangePrinterState()),m_actions,"printer_start"));
+ stateAct->insert(new KAction(i18n("Sto&p Printer"),"kdeprint_stopprinter",0,this,TQT_SLOT(slotChangePrinterState()),m_actions,"printer_stop"));
stateAct = new KActionMenu(i18n("Enable/Disable Job Spooling"), "kdeprint_queuestate", m_actions, "printer_spool_change");
stateAct->setDelayed(false);
- stateAct->insert(new KAction(i18n("&Enable Job Spooling"),"kdeprint_enableprinter",0,this,SLOT(slotChangePrinterState()),m_actions,"printer_enable"));
- stateAct->insert(new KAction(i18n("&Disable Job Spooling"),"kdeprint_stopprinter",0,this,SLOT(slotChangePrinterState()),m_actions,"printer_disable"));
-
- new KAction(i18n("&Remove"),"edittrash",0,this,SLOT(slotRemove()),m_actions,"printer_remove");
- new KAction(i18n("&Configure..."),"configure",0,this,SLOT(slotConfigure()),m_actions,"printer_configure");
- new KAction(i18n("Add &Printer/Class..."),"kdeprint_addprinter",0,this,SLOT(slotAdd()),m_actions,"printer_add");
- new KAction(i18n("Add &Special (pseudo) Printer..."),"kdeprint_addpseudo",0,this,SLOT(slotAddSpecial()),m_actions,"printer_add_special");
- new KAction(i18n("Set as &Local Default"),"kdeprint_defaulthard",0,this,SLOT(slotHardDefault()),m_actions,"printer_hard_default");
- new KAction(i18n("Set as &User Default"),"kdeprint_defaultsoft",0,this,SLOT(slotSoftDefault()),m_actions,"printer_soft_default");
- new KAction(i18n("&Test Printer..."),"kdeprint_testprinter",0,this,SLOT(slotTest()),m_actions,"printer_test");
- new KAction(i18n("Configure &Manager..."),"kdeprint_configmgr",0,this,SLOT(slotManagerConfigure()),m_actions,"manager_configure");
- new KAction(i18n("Initialize Manager/&View"),"reload",0,this,SLOT(slotInit()),m_actions,"view_refresh");
+ stateAct->insert(new KAction(i18n("&Enable Job Spooling"),"kdeprint_enableprinter",0,this,TQT_SLOT(slotChangePrinterState()),m_actions,"printer_enable"));
+ stateAct->insert(new KAction(i18n("&Disable Job Spooling"),"kdeprint_stopprinter",0,this,TQT_SLOT(slotChangePrinterState()),m_actions,"printer_disable"));
+
+ new KAction(i18n("&Remove"),"edittrash",0,this,TQT_SLOT(slotRemove()),m_actions,"printer_remove");
+ new KAction(i18n("&Configure..."),"configure",0,this,TQT_SLOT(slotConfigure()),m_actions,"printer_configure");
+ new KAction(i18n("Add &Printer/Class..."),"kdeprint_addprinter",0,this,TQT_SLOT(slotAdd()),m_actions,"printer_add");
+ new KAction(i18n("Add &Special (pseudo) Printer..."),"kdeprint_addpseudo",0,this,TQT_SLOT(slotAddSpecial()),m_actions,"printer_add_special");
+ new KAction(i18n("Set as &Local Default"),"kdeprint_defaulthard",0,this,TQT_SLOT(slotHardDefault()),m_actions,"printer_hard_default");
+ new KAction(i18n("Set as &User Default"),"kdeprint_defaultsoft",0,this,TQT_SLOT(slotSoftDefault()),m_actions,"printer_soft_default");
+ new KAction(i18n("&Test Printer..."),"kdeprint_testprinter",0,this,TQT_SLOT(slotTest()),m_actions,"printer_test");
+ new KAction(i18n("Configure &Manager..."),"kdeprint_configmgr",0,this,TQT_SLOT(slotManagerConfigure()),m_actions,"manager_configure");
+ new KAction(i18n("Initialize Manager/&View"),"reload",0,this,TQT_SLOT(slotInit()),m_actions,"view_refresh");
KIconSelectAction *dact = new KIconSelectAction(i18n("&Orientation"),0,m_actions,"orientation_change");
iconlst.clear();
iconlst << "view_top_bottom" << "view_left_right";
- dact->setItems(QStringList::split(',',i18n("&Vertical,&Horizontal"),false), iconlst);
+ dact->setItems(TQStringList::split(',',i18n("&Vertical,&Horizontal"),false), iconlst);
dact->setCurrentItem(0);
- connect(dact,SIGNAL(activated(int)),SLOT(slotChangeDirection(int)));
+ connect(dact,TQT_SIGNAL(activated(int)),TQT_SLOT(slotChangeDirection(int)));
- new KAction(i18n("R&estart Server"),"kdeprint_restartsrv",0,this,SLOT(slotServerRestart()),m_actions,"server_restart");
- new KAction(i18n("Configure &Server..."),"kdeprint_configsrv",0,this,SLOT(slotServerConfigure()),m_actions,"server_configure");
- new KAction(i18n("Configure Server Access..."),"kdeprint_configsrv",0,this,SLOT(slotServerAccessConfigure()),m_actions,"server_access_configure");
+ new KAction(i18n("R&estart Server"),"kdeprint_restartsrv",0,this,TQT_SLOT(slotServerRestart()),m_actions,"server_restart");
+ new KAction(i18n("Configure &Server..."),"kdeprint_configsrv",0,this,TQT_SLOT(slotServerConfigure()),m_actions,"server_configure");
+ new KAction(i18n("Configure Server Access..."),"kdeprint_configsrv",0,this,TQT_SLOT(slotServerAccessConfigure()),m_actions,"server_access_configure");
KToggleAction *tact = new KToggleAction(i18n("Show &Toolbar"),0,m_actions,"view_toolbar");
tact->setCheckedState(i18n("Hide &Toolbar"));
- connect(tact,SIGNAL(toggled(bool)),SLOT(slotToggleToolBar(bool)));
+ connect(tact,TQT_SIGNAL(toggled(bool)),TQT_SLOT(slotToggleToolBar(bool)));
tact = new KToggleAction( i18n( "Show Me&nu Toolbar" ), 0, m_actions, "view_menubar" );
tact->setCheckedState(i18n("Hide Me&nu Toolbar"));
- connect( tact, SIGNAL( toggled( bool ) ), SLOT( slotToggleMenuBar( bool ) ) );
+ connect( tact, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( slotToggleMenuBar( bool ) ) );
tact = new KToggleAction(i18n("Show Pr&inter Details"),"kdeprint_printer_infos", 0,m_actions,"view_printerinfos");
tact->setCheckedState(KGuiItem(i18n("Hide Pr&inter Details"),"kdeprint_printer_infos"));
tact->setChecked(true);
- connect(tact,SIGNAL(toggled(bool)),SLOT(slotShowPrinterInfos(bool)));
+ connect(tact,TQT_SIGNAL(toggled(bool)),TQT_SLOT(slotShowPrinterInfos(bool)));
tact = new KToggleAction(i18n("Toggle Printer &Filtering"), "filter", 0, m_actions, "view_pfilter");
tact->setChecked(KMManager::self()->isFilterEnabled());
- connect(tact, SIGNAL(toggled(bool)), SLOT(slotToggleFilter(bool)));
+ connect(tact, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotToggleFilter(bool)));
- new KAction( i18n( "%1 &Handbook" ).arg( "KDEPrint" ), "contents", 0, this, SLOT( slotHelp() ), m_actions, "invoke_help" );
- new KAction( i18n( "%1 &Web Site" ).arg( "KDEPrint" ), "network", 0, this, SLOT( slotHelp() ), m_actions, "invoke_web" );
+ new KAction( i18n( "%1 &Handbook" ).arg( "KDEPrint" ), "contents", 0, this, TQT_SLOT( slotHelp() ), m_actions, "invoke_help" );
+ new KAction( i18n( "%1 &Web Site" ).arg( "KDEPrint" ), "network", 0, this, TQT_SLOT( slotHelp() ), m_actions, "invoke_web" );
KActionMenu *mact = new KActionMenu(i18n("Pri&nter Tools"), "package_utilities", m_actions, "printer_tool");
mact->setDelayed(false);
- connect(mact->popupMenu(), SIGNAL(activated(int)), SLOT(slotToolSelected(int)));
+ connect(mact->popupMenu(), TQT_SIGNAL(activated(int)), TQT_SLOT(slotToolSelected(int)));
QStringList files = KGlobal::dirs()->findAllResources("data", "kdeprint/tools/*.desktop");
- for (QStringList::ConstIterator it=files.begin(); it!=files.end(); ++it)
+ for (TQStringList::ConstIterator it=files.begin(); it!=files.end(); ++it)
{
KSimpleConfig conf(*it);
conf.setGroup("Desktop Entry");
@@ -269,13 +269,13 @@ void KMMainView::initActions()
m_actions->action("view_pfilter")->plug(m_toolbar);
// add actions to the menu bar
- QPopupMenu *menu = new QPopupMenu( this );
+ TQPopupMenu *menu = new TQPopupMenu( this );
m_actions->action( "printer_add" )->plug( menu );
m_actions->action( "printer_add_special" )->plug( menu );
//m_menubar->insertItem( i18n( "Add" ), menu );
m_menubar->insertButton( "wizard", 0, true, i18n( "Add" ) );
m_menubar->getButton( 0 )->setPopup( menu, true );
- menu = new QPopupMenu( this );
+ menu = new TQPopupMenu( this );
m_actions->action("printer_state_change")->plug( menu );
m_actions->action("printer_spool_change")->plug( menu );
menu->insertSeparator();
@@ -290,19 +290,19 @@ void KMMainView::initActions()
//m_menubar->insertItem( i18n( "Printer" ), menu );
m_menubar->insertButton( "printer1", 1, true, i18n( "Printer" ) );
m_menubar->getButton( 1 )->setPopup( menu, true );
- menu = new QPopupMenu( this );
+ menu = new TQPopupMenu( this );
m_actions->action("server_restart")->plug( menu );
m_actions->action("server_configure")->plug( menu );
//m_menubar->insertItem( i18n( "Server" ), menu );
m_menubar->insertButton( "misc", 2, true, i18n( "Print Server" ) );
m_menubar->getButton( 2 )->setPopup( menu, true );
- menu = new QPopupMenu( this );
+ menu = new TQPopupMenu( this );
m_actions->action("manager_configure")->plug( menu );
m_actions->action("view_refresh")->plug( menu );
//m_menubar->insertItem( i18n( "Manager" ), menu );
m_menubar->insertButton( "kdeprint_configmgr", 3, true, i18n( "Print Manager" ) );
m_menubar->getButton( 3 )->setPopup( menu, true );
- menu = new QPopupMenu( this );
+ menu = new TQPopupMenu( this );
m_actions->action("view_printerinfos")->plug( menu );
m_actions->action("view_change")->plug( menu );
m_actions->action("orientation_change")->plug( menu );
@@ -314,14 +314,14 @@ void KMMainView::initActions()
m_menubar->insertButton( "view_remove", 4, true, i18n( "View" ) );
m_menubar->getButton( 4 )->setPopup( menu, true );
//m_menubar->setMinimumHeight( m_menubar->heightForWidth( 1000 ) );
- menu = new QPopupMenu( this );
+ menu = new TQPopupMenu( this );
m_actions->action( "invoke_help" )->plug( menu );
m_actions->action( "invoke_web" )->plug( menu );
m_menubar->insertButton( "help", 5, true, i18n( "Documentation" ) );
m_menubar->getButton( 5 )->setPopup( menu, true );
loadPluginActions();
- slotPrinterSelected(QString::null);
+ slotPrinterSelected(TQString::null);
}
void KMMainView::slotRefresh()
@@ -332,7 +332,7 @@ void KMMainView::slotRefresh()
void KMMainView::slotTimer()
{
kdDebug() << "KMMainView::slotTimer" << endl;
- QPtrList<KMPrinter> *printerlist = m_manager->printerList();
+ TQPtrList<KMPrinter> *printerlist = m_manager->printerList();
bool ok = m_manager->errorMsg().isEmpty();
m_printerview->setPrinterList(printerlist);
if ( m_first )
@@ -346,7 +346,7 @@ void KMMainView::slotTimer()
* - hard default printer
* - first printer
*/
- QPtrListIterator<KMPrinter> it( *printerlist );
+ TQPtrListIterator<KMPrinter> it( *printerlist );
KMPrinter *p1 = 0, *p2 = 0, *p3 = 0;
while ( it.current() )
{
@@ -371,7 +371,7 @@ void KMMainView::slotTimer()
}
}
-void KMMainView::slotPrinterSelected(const QString& prname)
+void KMMainView::slotPrinterSelected(const TQString& prname)
{
KMPrinter *p = KMManager::self()->findPrinter(prname);
m_current = p;
@@ -425,7 +425,7 @@ void KMMainView::slotChangeView(int ID)
m_printerview->setViewType((KMPrinterView::ViewType)ID);
}
-void KMMainView::slotRightButtonClicked(const QString& prname, const QPoint& p)
+void KMMainView::slotRightButtonClicked(const TQString& prname, const TQPoint& p)
{
KMPrinter *printer = KMManager::self()->findPrinter(prname);
// construct popup menu
@@ -467,8 +467,8 @@ void KMMainView::slotRightButtonClicked(const QString& prname, const QPoint& p)
}
if (!printer->isSpecial())
{
- QValueList<KAction*> pactions = m_actions->actions("plugin");
- for (QValueList<KAction*>::Iterator it=pactions.begin(); it!=pactions.end(); ++it)
+ TQValueList<KAction*> pactions = m_actions->actions("plugin");
+ for (TQValueList<KAction*>::Iterator it=pactions.begin(); it!=pactions.end(); ++it)
(*it)->plug(m_pop);
if (pactions.count() > 0)
m_pop->insertSeparator();
@@ -608,7 +608,7 @@ void KMMainView::slotSoftDefault()
if (m_current)
{
KMTimer::self()->hold();
- KMFactory::self()->virtualManager()->setAsDefault(m_current,QString::null);
+ KMFactory::self()->virtualManager()->setAsDefault(m_current,TQString::null);
KMTimer::self()->release(true);
}
}
@@ -621,11 +621,11 @@ void KMMainView::setOrientation(int o)
}
int KMMainView::orientation() const
-{ return (m_boxlayout->direction() == QBoxLayout::LeftToRight ? Qt::Horizontal : Qt::Vertical); }
+{ return (m_boxlayout->direction() == TQBoxLayout::LeftToRight ? Qt::Horizontal : Qt::Vertical); }
void KMMainView::slotChangeDirection(int d)
{
- m_boxlayout->setDirection(d == 1 ? QBoxLayout::LeftToRight : QBoxLayout::TopToBottom);
+ m_boxlayout->setDirection(d == 1 ? TQBoxLayout::LeftToRight : TQBoxLayout::TopToBottom);
}
void KMMainView::slotTest()
@@ -633,7 +633,7 @@ void KMMainView::slotTest()
if (m_current)
{
KMTimer::self()->hold();
- if (KMessageBox::warningContinueCancel(this, i18n("You are about to print a test page on %1. Do you want to continue?").arg(m_current->printerName()), QString::null, i18n("Print Test Page"), "printTestPage") == KMessageBox::Continue)
+ if (KMessageBox::warningContinueCancel(this, i18n("You are about to print a test page on %1. Do you want to continue?").arg(m_current->printerName()), TQString::null, i18n("Print Test Page"), "printTestPage") == KMessageBox::Continue)
{
if (KMFactory::self()->manager()->testPrinter(m_current))
KMessageBox::information(this,i18n("Test page successfully sent to printer %1.").arg(m_current->printerName()));
@@ -644,7 +644,7 @@ void KMMainView::slotTest()
}
}
-void KMMainView::showErrorMsg(const QString& msg, bool usemgr)
+void KMMainView::showErrorMsg(const TQString& msg, bool usemgr)
{
QString s(msg);
if (usemgr)
@@ -657,7 +657,7 @@ void KMMainView::showErrorMsg(const QString& msg, bool usemgr)
else
s = s.arg(m_manager->errorMsg());
// clean up error message
- m_manager->setErrorMsg(QString::null);
+ m_manager->setErrorMsg(TQString::null);
}
s.prepend("<qt>").append("</qt>");
KMTimer::self()->hold();
@@ -783,7 +783,7 @@ void KMMainView::reload()
loadPluginActions();
// redo the connection as the old manager object has been removed
- connect( m_manager, SIGNAL( updatePossible( bool ) ), SLOT( slotUpdatePossible( bool ) ) );
+ connect( m_manager, TQT_SIGNAL( updatePossible( bool ) ), TQT_SLOT( slotUpdatePossible( bool ) ) );
// We must delay the refresh such that all objects has been
// correctly reloaded (otherwise, crash in KMJobViewer).
@@ -804,11 +804,11 @@ bool KMMainView::printerInfosShown() const
void KMMainView::loadPluginActions()
{
KMFactory::self()->manager()->createPluginActions(m_actions);
- QValueList<KAction*> pactions = m_actions->actions("plugin");
+ TQValueList<KAction*> pactions = m_actions->actions("plugin");
int index = m_pactionsindex;
- //QPopupMenu *menu = m_menubar->findItem( m_menubar->idAt( 1 ) )->popup();
- QPopupMenu *menu = m_menubar->getButton( 1 )->popup();
- for (QValueList<KAction*>::Iterator it=pactions.begin(); it!=pactions.end(); ++it)
+ //TQPopupMenu *menu = m_menubar->findItem( m_menubar->idAt( 1 ) )->popup();
+ TQPopupMenu *menu = m_menubar->getButton( 1 )->popup();
+ for (TQValueList<KAction*>::Iterator it=pactions.begin(); it!=pactions.end(); ++it)
{
(*it)->plug(m_toolbar, index++);
( *it )->plug( menu );
@@ -817,8 +817,8 @@ void KMMainView::loadPluginActions()
void KMMainView::removePluginActions()
{
- QValueList<KAction*> pactions = m_actions->actions("plugin");
- for (QValueList<KAction*>::Iterator it=pactions.begin(); it!=pactions.end(); ++it)
+ TQValueList<KAction*> pactions = m_actions->actions("plugin");
+ for (TQValueList<KAction*>::Iterator it=pactions.begin(); it!=pactions.end(); ++it)
{
(*it)->unplugAll();
delete (*it);
@@ -874,7 +874,7 @@ void KMMainView::slotUpdatePossible( bool flag )
KMTimer::self()->release( true );
}
-void KMMainView::createMessageWindow( const QString& txt, int delay )
+void KMMainView::createMessageWindow( const TQString& txt, int delay )
{
destroyMessageWindow();
MessageWindow::add( m_printerview, txt, delay );
@@ -890,7 +890,7 @@ void KMMainView::slotInit()
reset( i18n( "Initializing manager..." ), true, true );
}
-void KMMainView::reset( const QString& msg, bool useDelay, bool holdTimer )
+void KMMainView::reset( const TQString& msg, bool useDelay, bool holdTimer )
{
if ( holdTimer )
KMTimer::self()->hold();
@@ -903,12 +903,12 @@ void KMMainView::reset( const QString& msg, bool useDelay, bool holdTimer )
void KMMainView::slotHelp()
{
- QString s = sender()->name();
+ TQString s = sender()->name();
if ( s == "invoke_help" )
- kapp->invokeHelp( QString::null, "kdeprint" );
+ kapp->invokeHelp( TQString::null, "kdeprint" );
else if ( s == "invoke_web" )
{
- QStringList args;
+ TQStringList args;
args << "exec" << "http://printing.kde.org";
kapp->kdeinitExec( "kfmclient", args );
}
diff --git a/kdeprint/management/kmmainview.h b/kdeprint/management/kmmainview.h
index 2e521e50f..f8ab6a388 100644
--- a/kdeprint/management/kmmainview.h
+++ b/kdeprint/management/kmmainview.h
@@ -24,7 +24,7 @@
#warning internal header, do not use except if you are a KDEPrint developer
#endif
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdeprint/kpreloadobject.h>
#include <kmainwindow.h>
@@ -50,11 +50,11 @@ class QMenuBar;
* if you're a KDEPrint developer. The API might change in the
* future and binary compatibility might be broken.
*/
-class KDEPRINT_EXPORT KMMainView : public QWidget, public KPReloadObject
+class KDEPRINT_EXPORT KMMainView : public TQWidget, public KPReloadObject
{
Q_OBJECT
public:
- KMMainView(QWidget *parent = 0, const char *name = 0, KActionCollection *coll = 0);
+ KMMainView(TQWidget *parent = 0, const char *name = 0, KActionCollection *coll = 0);
~KMMainView();
void setOrientation(int);
@@ -87,8 +87,8 @@ public slots:
void slotHelp();
protected slots:
- void slotPrinterSelected(const QString&);
- void slotRightButtonClicked(const QString&, const QPoint&);
+ void slotPrinterSelected(const TQString&);
+ void slotRightButtonClicked(const TQString&, const TQPoint&);
void slotToggleToolBar(bool);
void slotToggleMenuBar(bool);
void slotChangeView(int);
@@ -98,7 +98,7 @@ protected slots:
protected:
void initActions();
- void showErrorMsg(const QString& msg, bool usemgr = true);
+ void showErrorMsg(const TQString& msg, bool usemgr = true);
void restoreSettings();
void saveSettings();
void loadParameters();
@@ -107,9 +107,9 @@ protected:
//void aboutToReload();
void loadPluginActions();
void removePluginActions();
- void createMessageWindow( const QString&, int delay = 500 );
+ void createMessageWindow( const TQString&, int delay = 500 );
void destroyMessageWindow();
- void reset( const QString& msg = QString::null, bool useDelay = true, bool holdTimer = true );
+ void reset( const TQString& msg = TQString::null, bool useDelay = true, bool holdTimer = true );
private:
KMPrinterView *m_printerview;
@@ -128,6 +128,6 @@ private:
KToolBar *m_menubar;
};
-KDEPRINT_EXPORT int kdeprint_management_add_printer_wizard( QWidget* parent );
+KDEPRINT_EXPORT int kdeprint_management_add_printer_wizard( TQWidget* parent );
#endif
diff --git a/kdeprint/management/kmpages.cpp b/kdeprint/management/kmpages.cpp
index 9387b33a0..be7f2f87a 100644
--- a/kdeprint/management/kmpages.cpp
+++ b/kdeprint/management/kmpages.cpp
@@ -27,8 +27,8 @@
#include <kiconloader.h>
#include <kdialog.h>
-KMPages::KMPages(QWidget *parent, const char *name)
-: QTabWidget(parent,name)
+KMPages::KMPages(TQWidget *parent, const char *name)
+: TQTabWidget(parent,name)
{
m_pages.setAutoDelete(false);
initialize();
@@ -40,7 +40,7 @@ KMPages::~KMPages()
void KMPages::setPrinter(KMPrinter *p)
{
- QPtrListIterator<KMPrinterPage> it(m_pages);
+ TQPtrListIterator<KMPrinterPage> it(m_pages);
for (int i=0;it.current();++it,i++)
it.current()->setPrinter(p);
}
diff --git a/kdeprint/management/kmpages.h b/kdeprint/management/kmpages.h
index 5af1da108..e300aa998 100644
--- a/kdeprint/management/kmpages.h
+++ b/kdeprint/management/kmpages.h
@@ -20,8 +20,8 @@
#ifndef KMPAGES_H
#define KMPAGES_H
-#include <qtabwidget.h>
-#include <qptrlist.h>
+#include <tqtabwidget.h>
+#include <tqptrlist.h>
class KMPrinter;
class KMPrinterPage;
@@ -29,7 +29,7 @@ class KMPrinterPage;
class KMPages : public QTabWidget
{
public:
- KMPages(QWidget *parent = 0, const char *name = 0);
+ KMPages(TQWidget *parent = 0, const char *name = 0);
~KMPages();
void setPrinter(KMPrinter *p);
@@ -38,7 +38,7 @@ protected:
void initialize();
private:
- QPtrList<KMPrinterPage> m_pages;
+ TQPtrList<KMPrinterPage> m_pages;
};
#endif
diff --git a/kdeprint/management/kmprinterview.cpp b/kdeprint/management/kmprinterview.cpp
index 89549ed94..794683f54 100644
--- a/kdeprint/management/kmprinterview.cpp
+++ b/kdeprint/management/kmprinterview.cpp
@@ -24,37 +24,37 @@
#include "kmtimer.h"
#include "kmmanager.h"
-#include <qlayout.h>
-#include <qpopupmenu.h>
+#include <tqlayout.h>
+#include <tqpopupmenu.h>
#include <kaction.h>
#include <klocale.h>
-KMPrinterView::KMPrinterView(QWidget *parent, const char *name)
-: QWidgetStack(parent,name), m_type(KMPrinterView::Icons)
+KMPrinterView::KMPrinterView(TQWidget *parent, const char *name)
+: TQWidgetStack(parent,name), m_type(KMPrinterView::Icons)
{
m_iconview = new KMIconView(this);
addWidget(m_iconview,0);
m_listview = new KMListView(this);
addWidget(m_listview,1);
- m_current = QString::null;
+ m_current = TQString::null;
m_listset = false;
- connect(m_iconview,SIGNAL(rightButtonClicked(const QString&,const QPoint&)),SIGNAL(rightButtonClicked(const QString&,const QPoint&)));
- connect(m_listview,SIGNAL(rightButtonClicked(const QString&,const QPoint&)),SIGNAL(rightButtonClicked(const QString&,const QPoint&)));
- connect(m_iconview,SIGNAL(printerSelected(const QString&)),SIGNAL(printerSelected(const QString&)));
- connect(m_listview,SIGNAL(printerSelected(const QString&)),SIGNAL(printerSelected(const QString&)));
- connect(m_iconview,SIGNAL(printerSelected(const QString&)),SLOT(slotPrinterSelected(const QString&)));
- connect(m_listview,SIGNAL(printerSelected(const QString&)),SLOT(slotPrinterSelected(const QString&)));
+ connect(m_iconview,TQT_SIGNAL(rightButtonClicked(const TQString&,const TQPoint&)),TQT_SIGNAL(rightButtonClicked(const TQString&,const TQPoint&)));
+ connect(m_listview,TQT_SIGNAL(rightButtonClicked(const TQString&,const TQPoint&)),TQT_SIGNAL(rightButtonClicked(const TQString&,const TQPoint&)));
+ connect(m_iconview,TQT_SIGNAL(printerSelected(const TQString&)),TQT_SIGNAL(printerSelected(const TQString&)));
+ connect(m_listview,TQT_SIGNAL(printerSelected(const TQString&)),TQT_SIGNAL(printerSelected(const TQString&)));
+ connect(m_iconview,TQT_SIGNAL(printerSelected(const TQString&)),TQT_SLOT(slotPrinterSelected(const TQString&)));
+ connect(m_listview,TQT_SIGNAL(printerSelected(const TQString&)),TQT_SLOT(slotPrinterSelected(const TQString&)));
setViewType(m_type);
- setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) );
+ setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) );
}
KMPrinterView::~KMPrinterView()
{
}
-void KMPrinterView::setPrinterList(QPtrList<KMPrinter> *list)
+void KMPrinterView::setPrinterList(TQPtrList<KMPrinter> *list)
{
if (m_type != KMPrinterView::Tree || list == 0)
m_iconview->setPrinterList(list);
@@ -100,14 +100,14 @@ void KMPrinterView::setViewType(ViewType t)
}
}
-void KMPrinterView::slotPrinterSelected(const QString& p)
+void KMPrinterView::slotPrinterSelected(const TQString& p)
{
m_current = p;
}
-QSize KMPrinterView::minimumSizeHint() const
+TQSize KMPrinterView::minimumSizeHint() const
{
- return QWidgetStack::minimumSizeHint();
+ return TQWidgetStack::minimumSizeHint();
}
#include "kmprinterview.moc"
diff --git a/kdeprint/management/kmprinterview.h b/kdeprint/management/kmprinterview.h
index 394ff7f19..0b8c30c23 100644
--- a/kdeprint/management/kmprinterview.h
+++ b/kdeprint/management/kmprinterview.h
@@ -20,8 +20,8 @@
#ifndef KMPRINTERVIEW_H
#define KMPRINTERVIEW_H
-#include <qwidgetstack.h>
-#include <qptrlist.h>
+#include <tqwidgetstack.h>
+#include <tqptrlist.h>
class KMIconView;
class KMListView;
@@ -34,22 +34,22 @@ class KMPrinterView : public QWidgetStack
public:
enum ViewType { Icons = 0, List, Tree };
- KMPrinterView(QWidget *parent = 0, const char *name = 0);
+ KMPrinterView(TQWidget *parent = 0, const char *name = 0);
~KMPrinterView();
- void setPrinterList(QPtrList<KMPrinter> *list);
+ void setPrinterList(TQPtrList<KMPrinter> *list);
void setPrinter( KMPrinter* );
void setViewType(ViewType t);
ViewType viewType() const { return m_type; }
- QSize minimumSizeHint() const;
+ TQSize minimumSizeHint() const;
signals:
- void printerSelected(const QString&);
- void rightButtonClicked(const QString&, const QPoint&);
+ void printerSelected(const TQString&);
+ void rightButtonClicked(const TQString&, const TQPoint&);
protected slots:
- void slotPrinterSelected(const QString&);
+ void slotPrinterSelected(const TQString&);
private:
KMIconView *m_iconview;
diff --git a/kdeprint/management/kmpropbackend.cpp b/kdeprint/management/kmpropbackend.cpp
index bf92e7fdc..ea6434563 100644
--- a/kdeprint/management/kmpropbackend.cpp
+++ b/kdeprint/management/kmpropbackend.cpp
@@ -21,21 +21,21 @@
#include "kmprinter.h"
#include "kmwizard.h"
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <klocale.h>
-KMPropBackend::KMPropBackend(QWidget *parent, const char *name)
+KMPropBackend::KMPropBackend(TQWidget *parent, const char *name)
: KMPropWidget(parent,name)
{
- m_uri = new QLabel("",this);
- m_type = new QLabel("",this);
+ m_uri = new TQLabel("",this);
+ m_type = new TQLabel("",this);
- QLabel *l1 = new QLabel(i18n("Printer type:"), this);
- QLabel *l2 = new QLabel(i18n("URI:"), this);
+ QLabel *l1 = new TQLabel(i18n("Printer type:"), this);
+ QLabel *l2 = new TQLabel(i18n("URI:"), this);
// layout
- QGridLayout *main_ = new QGridLayout(this, 3, 2, 10, 7);
+ QGridLayout *main_ = new TQGridLayout(this, 3, 2, 10, 7);
main_->setColStretch(0,0);
main_->setColStretch(1,1);
main_->setRowStretch(2,1);
diff --git a/kdeprint/management/kmpropbackend.h b/kdeprint/management/kmpropbackend.h
index fb8c299d8..ffdd15513 100644
--- a/kdeprint/management/kmpropbackend.h
+++ b/kdeprint/management/kmpropbackend.h
@@ -29,7 +29,7 @@ class QLabel;
class KDEPRINT_EXPORT KMPropBackend : public KMPropWidget
{
public:
- KMPropBackend(QWidget *parent = 0, const char *name = 0);
+ KMPropBackend(TQWidget *parent = 0, const char *name = 0);
~KMPropBackend();
void setPrinter(KMPrinter*);
diff --git a/kdeprint/management/kmpropcontainer.cpp b/kdeprint/management/kmpropcontainer.cpp
index cc55aa901..90be6da19 100644
--- a/kdeprint/management/kmpropcontainer.cpp
+++ b/kdeprint/management/kmpropcontainer.cpp
@@ -21,13 +21,13 @@
#include "kmpropwidget.h"
#include <kpushbutton.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kseparator.h>
#include <kguiitem.h>
-KMPropContainer::KMPropContainer(QWidget *parent, const char *name)
-: QWidget(parent,name)
+KMPropContainer::KMPropContainer(TQWidget *parent, const char *name)
+: TQWidget(parent,name)
{
KSeparator* sep = new KSeparator( KSeparator::HLine, this);
sep->setFixedHeight(5);
@@ -35,8 +35,8 @@ KMPropContainer::KMPropContainer(QWidget *parent, const char *name)
m_button = new KPushButton(KGuiItem(i18n("Change..."), "edit"), this);
m_widget = 0;
- QVBoxLayout *main_ = new QVBoxLayout(this, 0, 10);
- QHBoxLayout *btn_ = new QHBoxLayout(0, 0, 0);
+ QVBoxLayout *main_ = new TQVBoxLayout(this, 0, 10);
+ QHBoxLayout *btn_ = new TQHBoxLayout(0, 0, 0);
main_->addWidget(sep,0);
main_->addLayout(btn_,0);
btn_->addStretch(1);
@@ -52,11 +52,11 @@ void KMPropContainer::setWidget(KMPropWidget *w)
if (!m_widget)
{
m_widget = w;
- m_widget->reparent(this,QPoint(0,0));
- connect(m_button,SIGNAL(clicked()),m_widget,SLOT(slotChange()));
- connect(m_widget,SIGNAL(enable(bool)),SIGNAL(enable(bool)));
- connect(m_widget,SIGNAL(enableChange(bool)),SLOT(slotEnableChange(bool)));
- QVBoxLayout *lay = dynamic_cast<QVBoxLayout*>(layout());
+ m_widget->reparent(this,TQPoint(0,0));
+ connect(m_button,TQT_SIGNAL(clicked()),m_widget,TQT_SLOT(slotChange()));
+ connect(m_widget,TQT_SIGNAL(enable(bool)),TQT_SIGNAL(enable(bool)));
+ connect(m_widget,TQT_SIGNAL(enableChange(bool)),TQT_SLOT(slotEnableChange(bool)));
+ QVBoxLayout *lay = dynamic_cast<TQVBoxLayout*>(layout());
if (lay)
{
lay->insertWidget(0,m_widget,1);
diff --git a/kdeprint/management/kmpropcontainer.h b/kdeprint/management/kmpropcontainer.h
index 95d7cb57a..00b125067 100644
--- a/kdeprint/management/kmpropcontainer.h
+++ b/kdeprint/management/kmpropcontainer.h
@@ -20,7 +20,7 @@
#ifndef KMPROPCONTAINER_H
#define KMPROPCONTAINER_H
-#include <qwidget.h>
+#include <tqwidget.h>
class KMPropWidget;
class QPushButton;
@@ -30,7 +30,7 @@ class KMPropContainer : public QWidget
{
Q_OBJECT
public:
- KMPropContainer(QWidget *parent = 0, const char *name = 0);
+ KMPropContainer(TQWidget *parent = 0, const char *name = 0);
~KMPropContainer();
void setWidget(KMPropWidget*);
diff --git a/kdeprint/management/kmpropdriver.cpp b/kdeprint/management/kmpropdriver.cpp
index 8298ee8a8..6b88f63ea 100644
--- a/kdeprint/management/kmpropdriver.cpp
+++ b/kdeprint/management/kmpropdriver.cpp
@@ -21,24 +21,24 @@
#include "kmprinter.h"
#include "kmwizard.h"
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <klocale.h>
-KMPropDriver::KMPropDriver(QWidget *parent, const char *name)
+KMPropDriver::KMPropDriver(TQWidget *parent, const char *name)
: KMPropWidget(parent,name)
{
- m_manufacturer = new QLabel("",this);
- m_model = new QLabel("",this);
- m_driverinfo = new QLabel("",this);
+ m_manufacturer = new TQLabel("",this);
+ m_model = new TQLabel("",this);
+ m_driverinfo = new TQLabel("",this);
m_driverinfo->setTextFormat(Qt::RichText);
- QLabel *l1 = new QLabel(i18n("Manufacturer:"), this);
- QLabel *l2 = new QLabel(i18n("Printer model:"), this);
- QLabel *l3 = new QLabel(i18n("Driver info:"), this);
+ QLabel *l1 = new TQLabel(i18n("Manufacturer:"), this);
+ QLabel *l2 = new TQLabel(i18n("Printer model:"), this);
+ QLabel *l3 = new TQLabel(i18n("Driver info:"), this);
// layout
- QGridLayout *main_ = new QGridLayout(this, 4, 2, 10, 7);
+ QGridLayout *main_ = new TQGridLayout(this, 4, 2, 10, 7);
main_->setColStretch(0,0);
main_->setColStretch(1,1);
main_->setRowStretch(3,1);
diff --git a/kdeprint/management/kmpropdriver.h b/kdeprint/management/kmpropdriver.h
index 9c07fe727..40952162c 100644
--- a/kdeprint/management/kmpropdriver.h
+++ b/kdeprint/management/kmpropdriver.h
@@ -29,7 +29,7 @@ class QLabel;
class KDEPRINT_EXPORT KMPropDriver : public KMPropWidget
{
public:
- KMPropDriver(QWidget *parent = 0, const char *name = 0);
+ KMPropDriver(TQWidget *parent = 0, const char *name = 0);
~KMPropDriver();
void setPrinter(KMPrinter*);
diff --git a/kdeprint/management/kmpropertypage.cpp b/kdeprint/management/kmpropertypage.cpp
index aa8f61663..19461e258 100644
--- a/kdeprint/management/kmpropertypage.cpp
+++ b/kdeprint/management/kmpropertypage.cpp
@@ -26,10 +26,10 @@
#include "kmpropgeneral.h"
-#include <qvbox.h>
+#include <tqvbox.h>
#include <kiconloader.h>
-KMPropertyPage::KMPropertyPage(QWidget *parent, const char *name)
+KMPropertyPage::KMPropertyPage(TQWidget *parent, const char *name)
: CJanusWidget(parent,name)
{
m_widgets.setAutoDelete(false);
@@ -43,7 +43,7 @@ KMPropertyPage::~KMPropertyPage()
void KMPropertyPage::setPrinter(KMPrinter *p)
{
- QPtrListIterator<KMPropWidget> it(m_widgets);
+ TQPtrListIterator<KMPropWidget> it(m_widgets);
for (;it.current();++it)
it.current()->setPrinterBase(p);
}
@@ -55,9 +55,9 @@ void KMPropertyPage::addPropPage(KMPropWidget *w)
m_widgets.append(w);
KMPropContainer *ctn = new KMPropContainer(this,"Container");
ctn->setWidget(w);
- connect(ctn,SIGNAL(enable(bool)),SLOT(slotEnable(bool)));
+ connect(ctn,TQT_SIGNAL(enable(bool)),TQT_SLOT(slotEnable(bool)));
- QPixmap icon = KGlobal::instance()->iconLoader()->loadIcon(
+ TQPixmap icon = KGlobal::instance()->iconLoader()->loadIcon(
w->pixmap(),
KIcon::NoGroup,
KIcon::SizeMedium
@@ -68,7 +68,7 @@ void KMPropertyPage::addPropPage(KMPropWidget *w)
void KMPropertyPage::slotEnable(bool on)
{
- QWidget *w = (QWidget*)(sender());
+ QWidget *w = (TQWidget*)(sender());
if (on)
enablePage(w);
else
diff --git a/kdeprint/management/kmpropertypage.h b/kdeprint/management/kmpropertypage.h
index 7f2f1c074..5698beff8 100644
--- a/kdeprint/management/kmpropertypage.h
+++ b/kdeprint/management/kmpropertypage.h
@@ -24,7 +24,7 @@
#include "kmprinterpage.h"
#include <kdeprint/kpreloadobject.h>
#include <kdelibs_export.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
class KMPropWidget;
class KMPrinter;
@@ -33,7 +33,7 @@ class KDEPRINT_EXPORT KMPropertyPage : public CJanusWidget, public KMPrinterPage
{
Q_OBJECT
public:
- KMPropertyPage(QWidget *parent = 0, const char *name = 0);
+ KMPropertyPage(TQWidget *parent = 0, const char *name = 0);
~KMPropertyPage();
void addPropPage(KMPropWidget*);
@@ -47,7 +47,7 @@ protected:
void reload();
private:
- QPtrList<KMPropWidget> m_widgets;
+ TQPtrList<KMPropWidget> m_widgets;
};
#endif
diff --git a/kdeprint/management/kmpropgeneral.cpp b/kdeprint/management/kmpropgeneral.cpp
index cea16bd5d..1c9389941 100644
--- a/kdeprint/management/kmpropgeneral.cpp
+++ b/kdeprint/management/kmpropgeneral.cpp
@@ -23,23 +23,23 @@
#include "kmfactory.h"
#include "kmmanager.h"
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <klocale.h>
-KMPropGeneral::KMPropGeneral(QWidget *parent, const char *name)
+KMPropGeneral::KMPropGeneral(TQWidget *parent, const char *name)
: KMPropWidget(parent,name)
{
- m_name = new QLabel("",this);
- m_location = new QLabel("",this);
- m_description = new QLabel("",this);
+ m_name = new TQLabel("",this);
+ m_location = new TQLabel("",this);
+ m_description = new TQLabel("",this);
- QLabel *l1 = new QLabel(i18n("Printer name:"), this);
- QLabel *l2 = new QLabel(i18n("Physical Location", "Location:"), this);
- QLabel *l3 = new QLabel(i18n("Description:"), this);
+ QLabel *l1 = new TQLabel(i18n("Printer name:"), this);
+ QLabel *l2 = new TQLabel(i18n("Physical Location", "Location:"), this);
+ QLabel *l3 = new TQLabel(i18n("Description:"), this);
// layout
- QGridLayout *main_ = new QGridLayout(this, 4, 2, 10, 7);
+ QGridLayout *main_ = new TQGridLayout(this, 4, 2, 10, 7);
main_->setColStretch(0,0);
main_->setColStretch(1,1);
main_->setRowStretch(3,1);
diff --git a/kdeprint/management/kmpropgeneral.h b/kdeprint/management/kmpropgeneral.h
index 4fad67996..76bdc3171 100644
--- a/kdeprint/management/kmpropgeneral.h
+++ b/kdeprint/management/kmpropgeneral.h
@@ -27,7 +27,7 @@ class QLabel;
class KMPropGeneral : public KMPropWidget
{
public:
- KMPropGeneral(QWidget *parent = 0, const char *name = 0);
+ KMPropGeneral(TQWidget *parent = 0, const char *name = 0);
~KMPropGeneral();
void setPrinter(KMPrinter*);
diff --git a/kdeprint/management/kmpropmembers.cpp b/kdeprint/management/kmpropmembers.cpp
index 958ee763b..775c71f89 100644
--- a/kdeprint/management/kmpropmembers.cpp
+++ b/kdeprint/management/kmpropmembers.cpp
@@ -21,18 +21,18 @@
#include "kmprinter.h"
#include "kmwizard.h"
-#include <qtextview.h>
-#include <qlayout.h>
+#include <tqtextview.h>
+#include <tqlayout.h>
#include <klocale.h>
-KMPropMembers::KMPropMembers(QWidget *parent, const char *name)
+KMPropMembers::KMPropMembers(TQWidget *parent, const char *name)
: KMPropWidget(parent,name)
{
- m_members = new QTextView(this);
+ m_members = new TQTextView(this);
m_members->setPaper(colorGroup().background());
- m_members->setFrameStyle(QFrame::NoFrame);
+ m_members->setFrameStyle(TQFrame::NoFrame);
- QVBoxLayout *main_ = new QVBoxLayout(this, 10, 0);
+ QVBoxLayout *main_ = new TQVBoxLayout(this, 10, 0);
main_->addWidget(m_members);
m_pixmap = "kdeprint_printer_class";
@@ -50,7 +50,7 @@ void KMPropMembers::setPrinter(KMPrinter *p)
{
QStringList l = p->members();
QString txt("<ul>");
- for (QStringList::ConstIterator it=l.begin(); it!=l.end(); ++it)
+ for (TQStringList::ConstIterator it=l.begin(); it!=l.end(); ++it)
txt.append("<li>" + (*it) + "</li>");
txt.append("</ul>");
m_members->setText(txt);
diff --git a/kdeprint/management/kmpropmembers.h b/kdeprint/management/kmpropmembers.h
index 67f519dc7..c0dda4978 100644
--- a/kdeprint/management/kmpropmembers.h
+++ b/kdeprint/management/kmpropmembers.h
@@ -27,7 +27,7 @@ class QTextView;
class KDEPRINT_EXPORT KMPropMembers : public KMPropWidget
{
public:
- KMPropMembers(QWidget *parent = 0, const char *name = 0);
+ KMPropMembers(TQWidget *parent = 0, const char *name = 0);
~KMPropMembers();
void setPrinter(KMPrinter*);
diff --git a/kdeprint/management/kmpropwidget.cpp b/kdeprint/management/kmpropwidget.cpp
index aa93f6a5f..b112c390b 100644
--- a/kdeprint/management/kmpropwidget.cpp
+++ b/kdeprint/management/kmpropwidget.cpp
@@ -26,15 +26,15 @@
#include <kmessagebox.h>
#include <klocale.h>
-KMPropWidget::KMPropWidget(QWidget *parent, const char *name)
-: QWidget(parent,name)
+KMPropWidget::KMPropWidget(TQWidget *parent, const char *name)
+: TQWidget(parent,name)
{
m_pixmap = "folder";
m_title = m_header = "Title";
m_printer = 0;
m_canchange = ((KMFactory::self()->manager()->printerOperationMask() & KMManager::PrinterCreation) && KMFactory::self()->manager()->hasManagement());
- connect(this,SIGNAL(enable(bool)),this,SIGNAL(enableChange(bool)));
+ connect(this,TQT_SIGNAL(enable(bool)),this,TQT_SIGNAL(enableChange(bool)));
}
KMPropWidget::~KMPropWidget()
@@ -48,7 +48,7 @@ void KMPropWidget::slotChange()
if (value == -1)
{
KMessageBox::error(this, i18n("<qt>Unable to change printer properties. Error received from manager:<p>%1</p></qt>").arg(KMManager::self()->errorMsg()));
- KMManager::self()->setErrorMsg(QString::null);
+ KMManager::self()->setErrorMsg(TQString::null);
}
KMTimer::self()->release((value == 1));
}
diff --git a/kdeprint/management/kmpropwidget.h b/kdeprint/management/kmpropwidget.h
index 43d84d410..f4d3a865b 100644
--- a/kdeprint/management/kmpropwidget.h
+++ b/kdeprint/management/kmpropwidget.h
@@ -20,7 +20,7 @@
#ifndef KMPROPWIDGET_H
#define KMPROPWIDGET_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdelibs_export.h>
@@ -31,14 +31,14 @@ class KDEPRINT_EXPORT KMPropWidget : public QWidget
{
Q_OBJECT
public:
- KMPropWidget(QWidget *parent = 0, const char *name = 0);
+ KMPropWidget(TQWidget *parent = 0, const char *name = 0);
virtual ~KMPropWidget();
virtual void setPrinter(KMPrinter*);
void setPrinterBase(KMPrinter*);
- QString pixmap() const { return m_pixmap; }
- QString title() const { return m_title; }
- QString header() const { return m_header; }
+ TQString pixmap() const { return m_pixmap; }
+ TQString title() const { return m_title; }
+ TQString header() const { return m_header; }
bool canChange() const { return m_canchange; }
signals:
diff --git a/kdeprint/management/kmspecialprinterdlg.cpp b/kdeprint/management/kmspecialprinterdlg.cpp
index 31728249f..20d8d17b7 100644
--- a/kdeprint/management/kmspecialprinterdlg.cpp
+++ b/kdeprint/management/kmspecialprinterdlg.cpp
@@ -26,36 +26,36 @@
#include "kxmlcommand.h"
#include "driver.h"
-#include <qpushbutton.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
-#include <qgroupbox.h>
+#include <tqpushbutton.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
+#include <tqgroupbox.h>
#include <klocale.h>
#include <kmessagebox.h>
#include <kicondialog.h>
#include <kfiledialog.h>
#include <kseparator.h>
-KMSpecialPrinterDlg::KMSpecialPrinterDlg(QWidget *parent, const char *name)
-: KDialogBase(parent, name, true, QString::null, Ok|Cancel, Ok)
+KMSpecialPrinterDlg::KMSpecialPrinterDlg(TQWidget *parent, const char *name)
+: KDialogBase(parent, name, true, TQString::null, Ok|Cancel, Ok)
{
setCaption(i18n("Add Special Printer"));
- QWidget *dummy = new QWidget(this);
+ QWidget *dummy = new TQWidget(this);
setMainWidget(dummy);
// widget creation
- m_name = new QLineEdit(dummy);
- connect(m_name, SIGNAL(textChanged ( const QString & )),this,SLOT(slotTextChanged(const QString & )));
- m_description = new QLineEdit(dummy);
- m_location = new QLineEdit(dummy);
- QLabel *m_namelabel = new QLabel(i18n("&Name:"), dummy);
- QLabel *m_desclabel = new QLabel(i18n("&Description:"), dummy);
- QLabel *m_loclabel = new QLabel(i18n("&Location:"), dummy);
+ m_name = new TQLineEdit(dummy);
+ connect(m_name, TQT_SIGNAL(textChanged ( const TQString & )),this,TQT_SLOT(slotTextChanged(const TQString & )));
+ m_description = new TQLineEdit(dummy);
+ m_location = new TQLineEdit(dummy);
+ QLabel *m_namelabel = new TQLabel(i18n("&Name:"), dummy);
+ QLabel *m_desclabel = new TQLabel(i18n("&Description:"), dummy);
+ QLabel *m_loclabel = new TQLabel(i18n("&Location:"), dummy);
m_namelabel->setBuddy(m_name);
m_desclabel->setBuddy(m_description);
m_loclabel->setBuddy(m_location);
@@ -63,16 +63,16 @@ KMSpecialPrinterDlg::KMSpecialPrinterDlg(QWidget *parent, const char *name)
KSeparator* sep = new KSeparator( KSeparator::HLine, dummy);
sep->setFixedHeight(10);
- QGroupBox *m_gb = new QGroupBox(1, Qt::Horizontal, i18n("Command &Settings"), dummy);
+ QGroupBox *m_gb = new TQGroupBox(1, Qt::Horizontal, i18n("Command &Settings"), dummy);
m_command = new KXmlCommandSelector(true, m_gb, "CommandSelector", this);
- QGroupBox *m_outfile_gb = new QGroupBox( 0, Qt::Horizontal, i18n( "Outp&ut File" ), dummy );
+ TQGroupBox *m_outfile_gb = new TQGroupBox( 0, Qt::Horizontal, i18n( "Outp&ut File" ), dummy );
- m_usefile = new QCheckBox( i18n("&Enable output file"), m_outfile_gb);
+ m_usefile = new TQCheckBox( i18n("&Enable output file"), m_outfile_gb);
- m_mimetype = new QComboBox(m_outfile_gb);
+ m_mimetype = new TQComboBox(m_outfile_gb);
KMimeType::List list = KMimeType::allMimeTypes();
- for (QValueList<KMimeType::Ptr>::ConstIterator it=list.begin(); it!=list.end(); ++it)
+ for (TQValueList<KMimeType::Ptr>::ConstIterator it=list.begin(); it!=list.end(); ++it)
{
QString mimetype = (*it)->name();
m_mimelist << mimetype;
@@ -80,31 +80,31 @@ KMSpecialPrinterDlg::KMSpecialPrinterDlg(QWidget *parent, const char *name)
m_mimelist.sort();
m_mimetype->insertStringList(m_mimelist);
- QLabel *m_mimetypelabel = new QLabel(i18n("&Format:"), m_outfile_gb);
+ QLabel *m_mimetypelabel = new TQLabel(i18n("&Format:"), m_outfile_gb);
m_mimetypelabel->setBuddy (m_mimetype);
- m_extension = new QLineEdit(m_outfile_gb);
+ m_extension = new TQLineEdit(m_outfile_gb);
- QLabel *m_extensionlabel = new QLabel(i18n("Filename e&xtension:"), m_outfile_gb);
+ QLabel *m_extensionlabel = new TQLabel(i18n("Filename e&xtension:"), m_outfile_gb);
m_extensionlabel->setBuddy(m_extension);
m_icon = new KIconButton(dummy);
m_icon->setIcon("fileprint");
- m_icon->setFixedSize(QSize(48,48));
+ m_icon->setFixedSize(TQSize(48,48));
- connect( m_usefile, SIGNAL( toggled( bool ) ), m_mimetype, SLOT( setEnabled( bool ) ) );
- connect( m_usefile, SIGNAL( toggled( bool ) ), m_extension, SLOT( setEnabled( bool ) ) );
- connect( m_usefile, SIGNAL( toggled( bool ) ), m_mimetypelabel, SLOT( setEnabled( bool ) ) );
- connect( m_usefile, SIGNAL( toggled( bool ) ), m_extensionlabel, SLOT( setEnabled( bool ) ) );
+ connect( m_usefile, TQT_SIGNAL( toggled( bool ) ), m_mimetype, TQT_SLOT( setEnabled( bool ) ) );
+ connect( m_usefile, TQT_SIGNAL( toggled( bool ) ), m_extension, TQT_SLOT( setEnabled( bool ) ) );
+ connect( m_usefile, TQT_SIGNAL( toggled( bool ) ), m_mimetypelabel, TQT_SLOT( setEnabled( bool ) ) );
+ connect( m_usefile, TQT_SIGNAL( toggled( bool ) ), m_extensionlabel, TQT_SLOT( setEnabled( bool ) ) );
m_mimetypelabel->setEnabled( false );
m_mimetype->setEnabled( false );
m_extensionlabel->setEnabled( false );
m_extension->setEnabled( false );
- QWhatsThis::add(m_usefile,
+ TQWhatsThis::add(m_usefile,
i18n("<p>The command will use an output file. If checked, make sure the "
"command contains an output tag.</p>"));
- QWhatsThis::add(m_command,
+ TQWhatsThis::add(m_command,
i18n("<p>The command to execute when printing on this special printer. Either enter "
"the command to execute directly, or associate/create a command object with/for "
"this special printer. The command object is the preferred method as it provides "
@@ -115,16 +115,16 @@ KMSpecialPrinterDlg::KMSpecialPrinterDlg(QWidget *parent, const char *name)
"<li><b>%out</b>: the output file (required if using an output file).</li>"
"<li><b>%psl</b>: the paper size in lower case.</li>"
"<li><b>%psu</b>: the paper size with the first letter in upper case.</li></ul>"));
- QString mimetypeWhatsThis = i18n("<p>The default mimetype for the output file (e.g. application/postscript).</p>");
- QWhatsThis::add(m_mimetypelabel, mimetypeWhatsThis);
- QWhatsThis::add(m_mimetype, mimetypeWhatsThis);
- QString extensionWhatsThis = i18n("<p>The default extension for the output file (e.g. ps, pdf, ps.gz).</p>");
- QWhatsThis::add(m_extensionlabel, extensionWhatsThis);
- QWhatsThis::add(m_extension, extensionWhatsThis);
+ TQString mimetypeWhatsThis = i18n("<p>The default mimetype for the output file (e.g. application/postscript).</p>");
+ TQWhatsThis::add(m_mimetypelabel, mimetypeWhatsThis);
+ TQWhatsThis::add(m_mimetype, mimetypeWhatsThis);
+ TQString extensionWhatsThis = i18n("<p>The default extension for the output file (e.g. ps, pdf, ps.gz).</p>");
+ TQWhatsThis::add(m_extensionlabel, extensionWhatsThis);
+ TQWhatsThis::add(m_extension, extensionWhatsThis);
// layout creation
- QVBoxLayout *l0 = new QVBoxLayout(dummy, 0, 10);
- QGridLayout *l1 = new QGridLayout(0, 3, 3, 0, 5);
+ QVBoxLayout *l0 = new TQVBoxLayout(dummy, 0, 10);
+ QGridLayout *l1 = new TQGridLayout(0, 3, 3, 0, 5);
l0->addLayout(l1);
l1->setColStretch(2,1);
l1->addColSpacing(0,60);
@@ -138,7 +138,7 @@ KMSpecialPrinterDlg::KMSpecialPrinterDlg(QWidget *parent, const char *name)
l0->addWidget(sep);
l0->addWidget(m_gb);
l0->addWidget(m_outfile_gb);
- QGridLayout *l6 = new QGridLayout(m_outfile_gb->layout(), 3, 2, 10);
+ QGridLayout *l6 = new TQGridLayout(m_outfile_gb->layout(), 3, 2, 10);
l6->addMultiCellWidget( m_usefile, 0, 0, 0, 1 );
l6->addWidget(m_mimetypelabel, 1, 0);
l6->addWidget(m_mimetype, 1, 1);
@@ -151,7 +151,7 @@ KMSpecialPrinterDlg::KMSpecialPrinterDlg(QWidget *parent, const char *name)
resize(400,100);
}
-void KMSpecialPrinterDlg::slotTextChanged(const QString & )
+void KMSpecialPrinterDlg::slotTextChanged(const TQString & )
{
enableButton(Ok, !m_name->text().isEmpty());
}
diff --git a/kdeprint/management/kmspecialprinterdlg.h b/kdeprint/management/kmspecialprinterdlg.h
index 2cba217c4..2b440c567 100644
--- a/kdeprint/management/kmspecialprinterdlg.h
+++ b/kdeprint/management/kmspecialprinterdlg.h
@@ -33,7 +33,7 @@ class KMSpecialPrinterDlg : public KDialogBase
{
Q_OBJECT
public:
- KMSpecialPrinterDlg(QWidget *parent = 0, const char *name = 0);
+ KMSpecialPrinterDlg(TQWidget *parent = 0, const char *name = 0);
void setPrinter(KMPrinter*);
KMPrinter* printer();
@@ -43,7 +43,7 @@ protected:
protected slots:
void slotOk();
- void slotTextChanged(const QString &);
+ void slotTextChanged(const TQString &);
private:
QLineEdit *m_name, *m_description, *m_location, *m_extension;
diff --git a/kdeprint/management/kmtimer.cpp b/kdeprint/management/kmtimer.cpp
index ae8725848..099d358f6 100644
--- a/kdeprint/management/kmtimer.cpp
+++ b/kdeprint/management/kmtimer.cpp
@@ -34,10 +34,10 @@ KMTimer* KMTimer::self()
return m_self;
}
-KMTimer::KMTimer(QObject *parent, const char *name)
-: QTimer(parent, name), m_count(0)
+KMTimer::KMTimer(TQObject *parent, const char *name)
+: TQTimer(parent, name), m_count(0)
{
- connect(this, SIGNAL(timeout()), SLOT(slotTimeout()));
+ connect(this, TQT_SIGNAL(timeout()), TQT_SLOT(slotTimeout()));
}
KMTimer::~KMTimer()
diff --git a/kdeprint/management/kmtimer.h b/kdeprint/management/kmtimer.h
index b4ac49a56..cf5efb719 100644
--- a/kdeprint/management/kmtimer.h
+++ b/kdeprint/management/kmtimer.h
@@ -24,7 +24,7 @@
#warning internal header, do not use except if you are a KDEPrint developer
#endif
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kdelibs_export.h>
/**
@@ -54,7 +54,7 @@ private slots:
private:
static KMTimer *m_self;
int m_count;
- KMTimer(QObject *parent = 0, const char *name = 0);
+ KMTimer(TQObject *parent = 0, const char *name = 0);
void releaseTimer(bool do_emit = false);
void startTimer(int delay = -1);
};
diff --git a/kdeprint/management/kmwbackend.cpp b/kdeprint/management/kmwbackend.cpp
index 32f95949d..53803d383 100644
--- a/kdeprint/management/kmwbackend.cpp
+++ b/kdeprint/management/kmwbackend.cpp
@@ -21,11 +21,11 @@
#include "kmwizard.h"
#include "kmprinter.h"
-#include <qlayout.h>
-#include <qregexp.h>
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqregexp.h>
+#include <tqbuttongroup.h>
+#include <tqradiobutton.h>
+#include <tqwhatsthis.h>
#include <kcursor.h>
#include <klocale.h>
@@ -36,32 +36,32 @@
class KRadioButton : public QRadioButton
{
public:
- KRadioButton(const QString& txt, QWidget *parent = 0, const char *name = 0);
+ KRadioButton(const TQString& txt, TQWidget *parent = 0, const char *name = 0);
};
-KRadioButton::KRadioButton(const QString& txt, QWidget *parent, const char *name)
-: QRadioButton(txt,parent,name)
+KRadioButton::KRadioButton(const TQString& txt, TQWidget *parent, const char *name)
+: TQRadioButton(txt,parent,name)
{
setCursor(KCursor::handCursor());
}
//********************************************************************************************************
-KMWBackend::KMWBackend(QWidget *parent, const char *name)
+KMWBackend::KMWBackend(TQWidget *parent, const char *name)
: KMWizardPage(parent,name)
{
m_ID = KMWizard::Backend;
m_title = i18n("Backend Selection");
- m_buttons = new QButtonGroup(this);
+ m_buttons = new TQButtonGroup(this);
m_buttons->hide();
- m_layout = new QVBoxLayout(this, 0, KDialog::spacingHint());
+ m_layout = new TQVBoxLayout(this, 0, KDialog::spacingHint());
m_layout->addStretch(1);
m_count = 0;
}
-bool KMWBackend::isValid(QString& msg)
+bool KMWBackend::isValid(TQString& msg)
{
if (!m_buttons->selected())
{
@@ -100,9 +100,9 @@ void KMWBackend::updatePrinter(KMPrinter *p)
int ID = m_buttons->id(m_buttons->selected());
if (ID == KMWizard::Class) p->setType(KMPrinter::Class);
else p->setType(KMPrinter::Printer);
- p->setOption("kde-backend",QString::number(ID));
+ p->setOption("kde-backend",TQString::number(ID));
QString s = m_buttons->selected()->text();
- s.replace(QRegExp("&(?=\\w)"), QString::fromLatin1(""));
+ s.replace(TQRegExp("&(?=\\w)"), TQString::fromLatin1(""));
p->setOption("kde-backend-description",s);
setNextPage((m_map.contains(ID) ? m_map[ID] : KMWizard::Error));
}
@@ -142,14 +142,14 @@ void KMWBackend::addBackend( int ID, bool on, int nextpage )
nextpage );
break;
case -1:
- addBackend( ID, QString::null, on, QString::null, nextpage );
+ addBackend( ID, TQString::null, on, TQString::null, nextpage );
break;
default:
kdError( 500 ) << "Non standard wizard page ID: " << ID << endl;
}
}
-void KMWBackend::addBackend(int ID, const QString& txt, bool on, const QString& whatsThis, int nextpage)
+void KMWBackend::addBackend(int ID, const TQString& txt, bool on, const TQString& whatsThis, int nextpage)
{
if (ID == -1)
{
@@ -161,7 +161,7 @@ void KMWBackend::addBackend(int ID, const QString& txt, bool on, const QString&
KRadioButton *btn = new KRadioButton(txt, this);
btn->setEnabled(on);
if ( !whatsThis.isEmpty() )
- QWhatsThis::add( btn, whatsThis );
+ TQWhatsThis::add( btn, whatsThis );
m_buttons->insert(btn, ID);
m_map[ID] = (nextpage == -1 ? ID : nextpage); // use nextpage if specified, default to ID
m_layout->insertWidget(m_count, btn);
diff --git a/kdeprint/management/kmwbackend.h b/kdeprint/management/kmwbackend.h
index 654ec3337..e31136851 100644
--- a/kdeprint/management/kmwbackend.h
+++ b/kdeprint/management/kmwbackend.h
@@ -22,7 +22,7 @@
#include "kmwizardpage.h"
#include <kdelibs_export.h>
-#include <qmap.h>
+#include <tqmap.h>
class QButtonGroup;
class QVBoxLayout;
@@ -30,13 +30,13 @@ class QVBoxLayout;
class KDEPRINT_EXPORT KMWBackend : public KMWizardPage
{
public:
- KMWBackend(QWidget *parent = 0, const char *name = 0);
+ KMWBackend(TQWidget *parent = 0, const char *name = 0);
- bool isValid(QString&);
+ bool isValid(TQString&);
void initPrinter(KMPrinter*);
void updatePrinter(KMPrinter*);
- void addBackend(int ID, const QString& txt, bool on = true, const QString& whatsThis = QString::null, int nextpage = -1);
+ void addBackend(int ID, const TQString& txt, bool on = true, const TQString& whatsThis = TQString::null, int nextpage = -1);
void addBackend(int ID = -1, bool on = true, int nextpage = -1);
void enableBackend(int ID, bool on = true);
@@ -47,7 +47,7 @@ private:
// to have different backends switching to the same page (like backends requiring
// a password). If the next page is not given when adding the backend, the ID is
// used by default.
- QMap<int,int> m_map;
+ TQMap<int,int> m_map;
int m_count;
};
diff --git a/kdeprint/management/kmwclass.cpp b/kdeprint/management/kmwclass.cpp
index 6d80a6ff3..d432af8e1 100644
--- a/kdeprint/management/kmwclass.cpp
+++ b/kdeprint/management/kmwclass.cpp
@@ -23,14 +23,14 @@
#include "kmmanager.h"
#include "kmprinter.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qtoolbutton.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqtoolbutton.h>
#include <klistbox.h>
#include <klocale.h>
#include <kiconloader.h>
-KMWClass::KMWClass(QWidget *parent, const char *name)
+KMWClass::KMWClass(TQWidget *parent, const char *name)
: KMWizardPage(parent,name)
{
m_ID = KMWizard::Class;
@@ -38,23 +38,23 @@ KMWClass::KMWClass(QWidget *parent, const char *name)
m_nextpage = KMWizard::Name;
m_list1 = new KListBox(this);
- m_list1->setSelectionMode(QListBox::Extended);
+ m_list1->setSelectionMode(TQListBox::Extended);
m_list2 = new KListBox(this);
- m_list2->setSelectionMode(QListBox::Extended);
+ m_list2->setSelectionMode(TQListBox::Extended);
- QToolButton *add = new QToolButton(this);
- QToolButton *remove = new QToolButton(this);
+ QToolButton *add = new TQToolButton(this);
+ QToolButton *remove = new TQToolButton(this);
add->setIconSet(BarIcon("forward"));
remove->setIconSet(BarIcon("back"));
- connect(add,SIGNAL(clicked()),SLOT(slotAdd()));
- connect(remove,SIGNAL(clicked()),SLOT(slotRemove()));
+ connect(add,TQT_SIGNAL(clicked()),TQT_SLOT(slotAdd()));
+ connect(remove,TQT_SIGNAL(clicked()),TQT_SLOT(slotRemove()));
- QLabel *l1 = new QLabel(i18n("Available printers:"), this);
- QLabel *l2 = new QLabel(i18n("Class printers:"), this);
+ QLabel *l1 = new TQLabel(i18n("Available printers:"), this);
+ QLabel *l2 = new TQLabel(i18n("Class printers:"), this);
- QHBoxLayout *lay1 = new QHBoxLayout(this, 0, 15);
- QVBoxLayout *lay2 = new QVBoxLayout(0, 0, 20);
- QVBoxLayout *lay3 = new QVBoxLayout(0, 0, 0), *lay4 = new QVBoxLayout(0, 0, 0);
+ QHBoxLayout *lay1 = new TQHBoxLayout(this, 0, 15);
+ QVBoxLayout *lay2 = new TQVBoxLayout(0, 0, 20);
+ QVBoxLayout *lay3 = new TQVBoxLayout(0, 0, 0), *lay4 = new TQVBoxLayout(0, 0, 0);
lay1->addLayout(lay3, 1);
lay1->addLayout(lay2, 0);
lay1->addLayout(lay4, 1);
@@ -72,7 +72,7 @@ KMWClass::~KMWClass()
{
}
-bool KMWClass::isValid(QString& msg)
+bool KMWClass::isValid(TQString& msg)
{
if (m_list2->count() == 0)
{
@@ -88,11 +88,11 @@ void KMWClass::initPrinter(KMPrinter *p)
KMManager *mgr = KMFactory::self()->manager();
// first load available printers
- QPtrList<KMPrinter> *list = mgr->printerList(false);
+ TQPtrList<KMPrinter> *list = mgr->printerList(false);
m_list1->clear();
if (list)
{
- QPtrListIterator<KMPrinter> it(*list);
+ TQPtrListIterator<KMPrinter> it(*list);
for (;it.current();++it)
if (it.current()->instanceName().isEmpty() && !it.current()->isClass(true) && !it.current()->isSpecial() && !members.contains(it.current()->name()))
m_list1->insertItem(SmallIcon(it.current()->pixmap()), it.current()->name());
@@ -101,7 +101,7 @@ void KMWClass::initPrinter(KMPrinter *p)
// set class printers
m_list2->clear();
- for (QStringList::ConstIterator it=members.begin(); it!=members.end(); ++it)
+ for (TQStringList::ConstIterator it=members.begin(); it!=members.end(); ++it)
{
KMPrinter *pr = mgr->findPrinter(*it);
if (pr) m_list2->insertItem(SmallIcon(pr->pixmap()), *it);
diff --git a/kdeprint/management/kmwclass.h b/kdeprint/management/kmwclass.h
index 4a4475b7d..1fadf45f4 100644
--- a/kdeprint/management/kmwclass.h
+++ b/kdeprint/management/kmwclass.h
@@ -28,10 +28,10 @@ class KMWClass : public KMWizardPage
{
Q_OBJECT
public:
- KMWClass(QWidget *parent = 0, const char *name = 0);
+ KMWClass(TQWidget *parent = 0, const char *name = 0);
~KMWClass();
- bool isValid(QString&);
+ bool isValid(TQString&);
void initPrinter(KMPrinter*);
void updatePrinter(KMPrinter*);
diff --git a/kdeprint/management/kmwdriver.cpp b/kdeprint/management/kmwdriver.cpp
index 66ab87d20..a50454d0b 100644
--- a/kdeprint/management/kmwdriver.cpp
+++ b/kdeprint/management/kmwdriver.cpp
@@ -23,10 +23,10 @@
#include "kmdriverdbwidget.h"
#include "kmdriverdb.h"
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klocale.h>
-KMWDriver::KMWDriver(QWidget *parent, const char *name)
+KMWDriver::KMWDriver(TQWidget *parent, const char *name)
: KMWizardPage(parent,name)
{
m_ID = KMWizard::Driver;
@@ -35,7 +35,7 @@ KMWDriver::KMWDriver(QWidget *parent, const char *name)
m_widget = new KMDriverDbWidget(this);
- QVBoxLayout *lay1 = new QVBoxLayout(this, 0, 0);
+ QVBoxLayout *lay1 = new TQVBoxLayout(this, 0, 0);
lay1->addWidget(m_widget);
}
@@ -44,7 +44,7 @@ void KMWDriver::initPrinter(KMPrinter *p)
m_widget->init();
if (p)
{
- QString autoDetect = p->option( "kde-autodetect" );
+ TQString autoDetect = p->option( "kde-autodetect" );
if ( !autoDetect.isEmpty() )
{
// use auto-detection info instead: split the string
@@ -52,7 +52,7 @@ void KMWDriver::initPrinter(KMPrinter *p)
int p = autoDetect.find( ' ' );
if ( p != -1 )
{
- QString manu = autoDetect.left( p ), model = autoDetect.mid( p+1 );
+ TQString manu = autoDetect.left( p ), model = autoDetect.mid( p+1 );
KMDBEntryList *l = KMDriverDB::self()->findPnpEntry( manu, model );
if ( l && l->count() > 0 )
{
@@ -69,11 +69,11 @@ void KMWDriver::updatePrinter(KMPrinter *p)
{
if (p)
{
- p->setManufacturer(QString::null);
- p->setModel(QString::null);
+ p->setManufacturer(TQString::null);
+ p->setModel(TQString::null);
p->setDbEntry(0);
- p->setDriverInfo(QString::null);
- p->setOption("kde-driver",QString::null);
+ p->setDriverInfo(TQString::null);
+ p->setOption("kde-driver",TQString::null);
setNextPage(KMWizard::DriverTest);
if (m_widget->isRaw())
{
@@ -104,7 +104,7 @@ void KMWDriver::updatePrinter(KMPrinter *p)
}
}
-bool KMWDriver::isValid(QString& msg)
+bool KMWDriver::isValid(TQString& msg)
{
if (m_widget->isRaw() || m_widget->isExternal() || m_widget->drivers())
return true;
diff --git a/kdeprint/management/kmwdriver.h b/kdeprint/management/kmwdriver.h
index 0961f7a81..cb49246b6 100644
--- a/kdeprint/management/kmwdriver.h
+++ b/kdeprint/management/kmwdriver.h
@@ -27,9 +27,9 @@ class KMDriverDbWidget;
class KMWDriver : public KMWizardPage
{
public:
- KMWDriver(QWidget *parent = 0, const char *name = 0);
+ KMWDriver(TQWidget *parent = 0, const char *name = 0);
- bool isValid(QString&);
+ bool isValid(TQString&);
void updatePrinter(KMPrinter*);
void initPrinter(KMPrinter*);
diff --git a/kdeprint/management/kmwdriverselect.cpp b/kdeprint/management/kmwdriverselect.cpp
index ed97b967c..5ce70016d 100644
--- a/kdeprint/management/kmwdriverselect.cpp
+++ b/kdeprint/management/kmwdriverselect.cpp
@@ -23,14 +23,14 @@
#include "kmdbentry.h"
#include "kmdriverdb.h"
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <kpushbutton.h>
#include <klistbox.h>
#include <klocale.h>
#include <kmessagebox.h>
-KMWDriverSelect::KMWDriverSelect(QWidget *parent, const char *name)
+KMWDriverSelect::KMWDriverSelect(TQWidget *parent, const char *name)
: KMWizardPage(parent,name)
{
m_ID = KMWizard::DriverSelect;
@@ -39,23 +39,23 @@ KMWDriverSelect::KMWDriverSelect(QWidget *parent, const char *name)
m_entries = NULL;
m_list = new KListBox(this);
- QLabel *l1 = new QLabel(this);
+ QLabel *l1 = new TQLabel(this);
l1->setText(i18n("<p>Several drivers have been detected for this model. Select the driver "
"you want to use. You will have the opportunity to test it as well as to "
"change it if necessary.</p>"));
m_drivercomment = new KPushButton(i18n("Driver Information"), this);
- connect(m_drivercomment, SIGNAL(clicked()), SLOT(slotDriverComment()));
+ connect(m_drivercomment, TQT_SIGNAL(clicked()), TQT_SLOT(slotDriverComment()));
- QVBoxLayout *main_ = new QVBoxLayout(this, 0, 10);
+ QVBoxLayout *main_ = new TQVBoxLayout(this, 0, 10);
main_->addWidget(l1,0);
main_->addWidget(m_list,1);
- QHBoxLayout *lay0 = new QHBoxLayout(0, 0, 0);
+ QHBoxLayout *lay0 = new TQHBoxLayout(0, 0, 0);
main_->addLayout(lay0,0);
lay0->addStretch(1);
lay0->addWidget(m_drivercomment);
}
-bool KMWDriverSelect::isValid(QString& msg)
+bool KMWDriverSelect::isValid(TQString& msg)
{
if (m_list->currentItem() == -1)
{
@@ -100,7 +100,7 @@ void KMWDriverSelect::updatePrinter(KMPrinter *p)
else
{
p->setDbEntry(0);
- p->setDriverInfo(QString::null);
+ p->setDriverInfo(TQString::null);
}
}
@@ -108,7 +108,7 @@ void KMWDriverSelect::slotDriverComment()
{
int index = m_list->currentItem();
if (m_entries && index >=0 && index < (int)(m_entries->count()) && !m_entries->at(index)->drivercomment.isEmpty())
- KMessageBox::information(this, m_entries->at(index)->drivercomment, QString::null, QString::null, KMessageBox::AllowLink);
+ KMessageBox::information(this, m_entries->at(index)->drivercomment, TQString::null, TQString::null, KMessageBox::AllowLink);
else
KMessageBox::error(this, i18n("No information about the selected driver."));
}
diff --git a/kdeprint/management/kmwdriverselect.h b/kdeprint/management/kmwdriverselect.h
index bf00f2e46..935bb56ca 100644
--- a/kdeprint/management/kmwdriverselect.h
+++ b/kdeprint/management/kmwdriverselect.h
@@ -30,9 +30,9 @@ class KMWDriverSelect : public KMWizardPage
{
Q_OBJECT
public:
- KMWDriverSelect(QWidget *parent = 0, const char *name = 0);
+ KMWDriverSelect(TQWidget *parent = 0, const char *name = 0);
- bool isValid(QString&);
+ bool isValid(TQString&);
void initPrinter(KMPrinter*);
void updatePrinter(KMPrinter*);
diff --git a/kdeprint/management/kmwdrivertest.cpp b/kdeprint/management/kmwdrivertest.cpp
index 5075e2204..4024f110d 100644
--- a/kdeprint/management/kmwdrivertest.cpp
+++ b/kdeprint/management/kmwdrivertest.cpp
@@ -25,16 +25,16 @@
#include "kmmanager.h"
#include "kmdriverdialog.h"
-#include <qlabel.h>
+#include <tqlabel.h>
#include <kpushbutton.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kapplication.h>
#include <kmessagebox.h>
#include <kguiitem.h>
#include <kio/netaccess.h>
-KMWDriverTest::KMWDriverTest(QWidget *parent, const char *name)
+KMWDriverTest::KMWDriverTest(TQWidget *parent, const char *name)
: KMWizardPage(parent,name)
{
m_ID = KMWizard::DriverTest;
@@ -44,26 +44,26 @@ KMWDriverTest::KMWDriverTest(QWidget *parent, const char *name)
m_driver = 0;
m_printer = 0;
- m_manufacturer = new QLabel(this);
- m_model = new QLabel(this);
- m_driverinfo = new QLabel(this);
+ m_manufacturer = new TQLabel(this);
+ m_model = new TQLabel(this);
+ m_driverinfo = new TQLabel(this);
m_driverinfo->setTextFormat(Qt::RichText);
- QLabel *l1 = new QLabel(i18n("<b>Manufacturer:</b>"), this);
- QLabel *l2 = new QLabel(i18n("<b>Model:</b>"), this);
- QLabel *l3 = new QLabel(i18n("<b>Description:</b>"), this);
+ QLabel *l1 = new TQLabel(i18n("<b>Manufacturer:</b>"), this);
+ QLabel *l2 = new TQLabel(i18n("<b>Model:</b>"), this);
+ QLabel *l3 = new TQLabel(i18n("<b>Description:</b>"), this);
m_test = new KPushButton(KGuiItem(i18n("&Test"), "kdeprint_testprinter"), this);
m_settings = new KPushButton(KGuiItem(i18n("&Settings"), "configure"), this);
- QLabel *l0 = new QLabel(this);
+ QLabel *l0 = new TQLabel(this);
l0->setText(i18n("<p>Now you can test the printer before finishing installation. "
"Use the <b>Settings</b> button to configure the printer driver and "
"the <b>Test</b> button to test your configuration. Use the <b>Back</b> "
"button to change the driver (your current configuration will be discarded).</p>"));
- QVBoxLayout *lay1 = new QVBoxLayout(this, 0, 15);
- QGridLayout *lay2 = new QGridLayout(0, 3, 3, 0, 0);
- QHBoxLayout *lay3 = new QHBoxLayout(0, 0, 10);
+ QVBoxLayout *lay1 = new TQVBoxLayout(this, 0, 15);
+ QGridLayout *lay2 = new TQGridLayout(0, 3, 3, 0, 0);
+ QHBoxLayout *lay3 = new TQHBoxLayout(0, 0, 10);
lay1->addWidget(l0,0);
lay1->addLayout(lay2,0);
lay1->addLayout(lay3,0);
@@ -80,8 +80,8 @@ KMWDriverTest::KMWDriverTest(QWidget *parent, const char *name)
lay3->addWidget(m_settings,0);
lay3->addStretch(1);
- connect(m_test,SIGNAL(clicked()),SLOT(slotTest()));
- connect(m_settings,SIGNAL(clicked()),SLOT(slotSettings()));
+ connect(m_test,TQT_SIGNAL(clicked()),TQT_SLOT(slotTest()));
+ connect(m_settings,TQT_SIGNAL(clicked()),TQT_SLOT(slotSettings()));
}
KMWDriverTest::~KMWDriverTest()
@@ -115,7 +115,7 @@ void KMWDriverTest::initPrinter(KMPrinter *p)
if (checkDriver && !m_driver)
{
KMessageBox::error(this, i18n("<qt>Unable to load the requested driver:<p>%1</p></qt>").arg(KMManager::self()->errorMsg()));
- KMManager::self()->setErrorMsg(QString::null);
+ KMManager::self()->setErrorMsg(TQString::null);
}
m_settings->setEnabled((m_driver != 0));
}
diff --git a/kdeprint/management/kmwdrivertest.h b/kdeprint/management/kmwdrivertest.h
index 8433687dd..5ab716459 100644
--- a/kdeprint/management/kmwdrivertest.h
+++ b/kdeprint/management/kmwdrivertest.h
@@ -30,7 +30,7 @@ class KMWDriverTest : public KMWizardPage
{
Q_OBJECT
public:
- KMWDriverTest(QWidget *parent = 0, const char *name = 0);
+ KMWDriverTest(TQWidget *parent = 0, const char *name = 0);
~KMWDriverTest();
void initPrinter(KMPrinter*);
diff --git a/kdeprint/management/kmwend.cpp b/kdeprint/management/kmwend.cpp
index 7386ba7f0..5fd3c7fc0 100644
--- a/kdeprint/management/kmwend.cpp
+++ b/kdeprint/management/kmwend.cpp
@@ -22,31 +22,31 @@
#include "kmwizard.h"
#include "util.h"
-#include <qtextview.h>
+#include <tqtextview.h>
#include <klocale.h>
-#include <qlayout.h>
+#include <tqlayout.h>
-KMWEnd::KMWEnd(QWidget *parent, const char *name)
+KMWEnd::KMWEnd(TQWidget *parent, const char *name)
: KMWizardPage(parent,name)
{
m_ID = KMWizard::End;
m_title = i18n("Confirmation");
m_nextpage = KMWizard::Error;
- m_view = new QTextView(this);
+ m_view = new TQTextView(this);
- QVBoxLayout *lay = new QVBoxLayout(this, 0, 0);
+ QVBoxLayout *lay = new TQVBoxLayout(this, 0, 0);
lay->addWidget(m_view,1);
}
void KMWEnd::initPrinter(KMPrinter *p)
{
QString txt;
- QString s(QString::fromLatin1("<li><u>%1</u>: %2</li>"));
+ QString s(TQString::fromLatin1("<li><u>%1</u>: %2</li>"));
int ID = p->option("kde-backend").toInt();
// general information
- txt.append(QString::fromLatin1("<b>%1</b><ul type=circle>").arg(i18n("General")));
+ txt.append(TQString::fromLatin1("<b>%1</b><ul type=circle>").arg(i18n("General")));
txt.append(s.arg(i18n("Type")).arg(p->option("kde-backend-description")));
txt.append(s.arg(i18n("Name")).arg(p->name()));
txt.append(s.arg(i18n("Location")).arg(p->location()));
@@ -56,17 +56,17 @@ void KMWEnd::initPrinter(KMPrinter *p)
if (ID == KMWizard::Class)
{
// class members
- txt.append(QString::fromLatin1("<b>%1</b><ul type=circle>").arg(i18n("Members")));
+ txt.append(TQString::fromLatin1("<b>%1</b><ul type=circle>").arg(i18n("Members")));
QStringList m(p->members());
- QString s1(QString::fromLatin1("<li>%1</li>"));
- for (QStringList::ConstIterator it=m.begin(); it!=m.end(); ++it)
+ QString s1(TQString::fromLatin1("<li>%1</li>"));
+ for (TQStringList::ConstIterator it=m.begin(); it!=m.end(); ++it)
txt.append(s1.arg(*it));
txt.append("</ul><br>");
}
else
{
// backend information
- txt.append(QString::fromLatin1("<b>%1</b><ul type=circle>").arg(i18n("Backend")));
+ txt.append(TQString::fromLatin1("<b>%1</b><ul type=circle>").arg(i18n("Backend")));
KURL url ( p->device() );
switch (ID)
{
@@ -101,7 +101,7 @@ void KMWEnd::initPrinter(KMPrinter *p)
if (p->option("kde-driver") == "raw" || p->driver())
{
// driver information
- txt.append(QString::fromLatin1("<b>%1</b><ul type=circle>").arg(i18n("Driver")));
+ txt.append(TQString::fromLatin1("<b>%1</b><ul type=circle>").arg(i18n("Driver")));
if (p->option("kde-driver") == "raw")
txt.append(s.arg(i18n("Type")).arg(i18n("Raw printer")));
else
diff --git a/kdeprint/management/kmwend.h b/kdeprint/management/kmwend.h
index 4682d831e..d30972361 100644
--- a/kdeprint/management/kmwend.h
+++ b/kdeprint/management/kmwend.h
@@ -27,7 +27,7 @@ class QTextView;
class KMWEnd : public KMWizardPage
{
public:
- KMWEnd(QWidget *parent = 0, const char *name = 0);
+ KMWEnd(TQWidget *parent = 0, const char *name = 0);
void initPrinter(KMPrinter*);
diff --git a/kdeprint/management/kmwfile.cpp b/kdeprint/management/kmwfile.cpp
index 497b03f27..9daeee77b 100644
--- a/kdeprint/management/kmwfile.cpp
+++ b/kdeprint/management/kmwfile.cpp
@@ -21,14 +21,14 @@
#include "kmwizard.h"
#include "kmprinter.h"
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <kurlrequester.h>
#include <klocale.h>
#include <kfiledialog.h>
-KMWFile::KMWFile(QWidget *parent, const char *name)
+KMWFile::KMWFile(TQWidget *parent, const char *name)
: KMWizardPage(parent,name)
{
m_ID = KMWizard::File;
@@ -37,14 +37,14 @@ KMWFile::KMWFile(QWidget *parent, const char *name)
m_url = new KURLRequester(this);
m_url->setMode((KFile::Mode)(KFile::File|KFile::LocalOnly));
- QLabel *l1 = new QLabel(this);
+ QLabel *l1 = new TQLabel(this);
l1->setText(i18n("<p>The printing will be redirected to a file. Enter here the path "
"of the file you want to use for redirection. Use an absolute path or "
"the browse button for graphical selection.</p>"));
- QLabel *l2 = new QLabel(i18n("Print to file:"), this);
+ QLabel *l2 = new TQLabel(i18n("Print to file:"), this);
- QVBoxLayout *lay1 = new QVBoxLayout(this, 0, 30);
- QVBoxLayout *lay2 = new QVBoxLayout(0, 0, 5);
+ QVBoxLayout *lay1 = new TQVBoxLayout(this, 0, 30);
+ QVBoxLayout *lay2 = new TQVBoxLayout(0, 0, 5);
lay1->addWidget(l1);
lay1->addLayout(lay2);
lay1->addStretch(1);
@@ -52,7 +52,7 @@ KMWFile::KMWFile(QWidget *parent, const char *name)
lay2->addWidget(m_url);
}
-bool KMWFile::isValid(QString& msg)
+bool KMWFile::isValid(TQString& msg)
{
QFileInfo fi(m_url->url());
if (fi.fileName().isEmpty())
@@ -72,6 +72,6 @@ bool KMWFile::isValid(QString& msg)
void KMWFile::updatePrinter(KMPrinter *p)
{
- QString dev = QString::fromLatin1("file:%1").arg(m_url->url());
+ QString dev = TQString::fromLatin1("file:%1").arg(m_url->url());
p->setDevice(dev);
}
diff --git a/kdeprint/management/kmwfile.h b/kdeprint/management/kmwfile.h
index 7bcd779ed..2e6997372 100644
--- a/kdeprint/management/kmwfile.h
+++ b/kdeprint/management/kmwfile.h
@@ -27,9 +27,9 @@ class KURLRequester;
class KMWFile : public KMWizardPage
{
public:
- KMWFile(QWidget *parent = 0, const char *name = 0);
+ KMWFile(TQWidget *parent = 0, const char *name = 0);
- bool isValid(QString&);
+ bool isValid(TQString&);
void updatePrinter(KMPrinter*);
private:
diff --git a/kdeprint/management/kmwinfobase.cpp b/kdeprint/management/kmwinfobase.cpp
index e58e452bb..aef26049f 100644
--- a/kdeprint/management/kmwinfobase.cpp
+++ b/kdeprint/management/kmwinfobase.cpp
@@ -19,57 +19,57 @@
#include "kmwinfobase.h"
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqlayout.h>
-KMWInfoBase::KMWInfoBase(int n, QWidget *parent, const char *name)
+KMWInfoBase::KMWInfoBase(int n, TQWidget *parent, const char *name)
: KMWizardPage(parent,name)
{
m_labels.setAutoDelete(false);
m_edits.setAutoDelete(false);
m_nlines = n;
- QGridLayout *lay1 = new QGridLayout(this, m_nlines+3, 2, 0, 10);
+ QGridLayout *lay1 = new TQGridLayout(this, m_nlines+3, 2, 0, 10);
lay1->addRowSpacing(1,10);
lay1->setRowStretch(m_nlines+2,1);
lay1->setColStretch(1,1);
- m_info = new QLabel(this);
+ m_info = new TQLabel(this);
m_info->setTextFormat(Qt::RichText);
lay1->addMultiCellWidget(m_info,0,0,0,1);
for (int i=0;i<m_nlines;i++)
{
- m_labels.append(new QLabel(this));
- m_edits.append(new QLineEdit(this));
+ m_labels.append(new TQLabel(this));
+ m_edits.append(new TQLineEdit(this));
lay1->addWidget(m_labels.last(),i+2,0);
lay1->addWidget(m_edits.last(),i+2,1);
}
}
-void KMWInfoBase::setInfo(const QString& s)
+void KMWInfoBase::setInfo(const TQString& s)
{
m_info->setText(s);
}
-void KMWInfoBase::setLabel(int i, const QString& s)
+void KMWInfoBase::setLabel(int i, const TQString& s)
{
if (i >= 0 && i < m_nlines)
m_labels.at(i)->setText(s);
}
-void KMWInfoBase::setText(int i, const QString& s)
+void KMWInfoBase::setText(int i, const TQString& s)
{
if (i >= 0 && i < m_nlines)
m_edits.at(i)->setText(s);
}
-QString KMWInfoBase::text(int i)
+TQString KMWInfoBase::text(int i)
{
if (i >= 0 && i < m_nlines)
return m_edits.at(i)->text();
- return QString::null;
+ return TQString::null;
}
void KMWInfoBase::setCurrent(int i)
@@ -81,7 +81,7 @@ void KMWInfoBase::setCurrent(int i)
}
}
-QLineEdit* KMWInfoBase::lineEdit( int i )
+TQLineEdit* KMWInfoBase::lineEdit( int i )
{
if ( i >= 0 && i < m_nlines )
return m_edits.at( i );
diff --git a/kdeprint/management/kmwinfobase.h b/kdeprint/management/kmwinfobase.h
index 77f9e976a..1a6576618 100644
--- a/kdeprint/management/kmwinfobase.h
+++ b/kdeprint/management/kmwinfobase.h
@@ -21,7 +21,7 @@
#define KMWINFOBASE_H
#include "kmwizardpage.h"
-#include <qptrlist.h>
+#include <tqptrlist.h>
class QLabel;
class QLineEdit;
@@ -29,21 +29,21 @@ class QLineEdit;
class KDEPRINT_EXPORT KMWInfoBase : public KMWizardPage
{
public:
- KMWInfoBase(int n = 1, QWidget *parent = 0, const char *name = 0);
+ KMWInfoBase(int n = 1, TQWidget *parent = 0, const char *name = 0);
- void setInfo(const QString&);
- void setLabel(int, const QString&);
- void setText(int, const QString&);
+ void setInfo(const TQString&);
+ void setLabel(int, const TQString&);
+ void setText(int, const TQString&);
void setCurrent(int);
- QString text(int);
+ TQString text(int);
protected:
- QLineEdit* lineEdit( int );
+ TQLineEdit* lineEdit( int );
private:
- QPtrList<QLabel> m_labels;
- QPtrList<QLineEdit> m_edits;
+ TQPtrList<TQLabel> m_labels;
+ TQPtrList<TQLineEdit> m_edits;
QLabel *m_info;
int m_nlines;
};
diff --git a/kdeprint/management/kmwinfopage.cpp b/kdeprint/management/kmwinfopage.cpp
index 43e830a20..092a8669d 100644
--- a/kdeprint/management/kmwinfopage.cpp
+++ b/kdeprint/management/kmwinfopage.cpp
@@ -20,19 +20,19 @@
#include "kmwinfopage.h"
#include "kmwizard.h"
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kactivelabel.h>
-KMWInfoPage::KMWInfoPage(QWidget *parent, const char *name)
+KMWInfoPage::KMWInfoPage(TQWidget *parent, const char *name)
: KMWizardPage(parent,name)
{
m_ID = KMWizard::Start;
m_title = i18n("Introduction");
m_nextpage = KMWizard::Backend;
- //QLabel *m_label = new QLabel(this);
+ //QLabel *m_label = new TQLabel(this);
KActiveLabel *m_label = new KActiveLabel(this);
m_label->setText(i18n("<p>Welcome,</p><br>"
"<p>This wizard will help to install a new printer on your computer. "
@@ -43,6 +43,6 @@ KMWInfoPage::KMWInfoPage(QWidget *parent, const char *name)
"<p align=right><a href=\"http://printing.kde.org\"><i>"
"The KDE printing team</i></a>.</p>"));
- QVBoxLayout *main_ = new QVBoxLayout(this, 0, 0);
+ QVBoxLayout *main_ = new TQVBoxLayout(this, 0, 0);
main_->addWidget(m_label);
}
diff --git a/kdeprint/management/kmwinfopage.h b/kdeprint/management/kmwinfopage.h
index 76719e0ff..aefa675fe 100644
--- a/kdeprint/management/kmwinfopage.h
+++ b/kdeprint/management/kmwinfopage.h
@@ -25,7 +25,7 @@
class KMWInfoPage : public KMWizardPage
{
public:
- KMWInfoPage(QWidget *parent = 0, const char *name = 0);
+ KMWInfoPage(TQWidget *parent = 0, const char *name = 0);
};
#endif
diff --git a/kdeprint/management/kmwizard.cpp b/kdeprint/management/kmwizard.cpp
index d44ac87e8..6a793dd5a 100644
--- a/kdeprint/management/kmwizard.cpp
+++ b/kdeprint/management/kmwizard.cpp
@@ -24,10 +24,10 @@
#include "kmuimanager.h"
#include <kpushbutton.h>
-#include <qlabel.h>
-#include <qwidgetstack.h>
+#include <tqlabel.h>
+#include <tqwidgetstack.h>
#include <kmessagebox.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kdebug.h>
#include <kseparator.h>
@@ -50,8 +50,8 @@
#include "kmwlocal.h"
#include "sidepixmap.h"
-KMWizard::KMWizard(QWidget *parent, const char *name)
-: QDialog(parent,name,true)
+KMWizard::KMWizard(TQWidget *parent, const char *name)
+: TQDialog(parent,name,true)
{
m_start = KMWizard::Start;
m_end = KMWizard::End;
@@ -60,12 +60,12 @@ KMWizard::KMWizard(QWidget *parent, const char *name)
m_pagepool.setAutoDelete(false);
- m_stack = new QWidgetStack(this);
+ m_stack = new TQWidgetStack(this);
m_next = new KPushButton(i18n("&Next >"), this);
m_next->setDefault(true);
m_prev = new KPushButton(i18n("< &Back"), this);
QPushButton *m_cancel = new KPushButton(KStdGuiItem::cancel(), this);
- m_title = new QLabel(this);
+ m_title = new TQLabel(this);
QFont f(m_title->font());
f.setBold(true);
m_title->setFont(f);
@@ -74,10 +74,10 @@ KMWizard::KMWizard(QWidget *parent, const char *name)
KSeparator* sep2 = new KSeparator( KSeparator::HLine, this);
QPushButton *m_help = new KPushButton(KStdGuiItem::help(), this);
- connect(m_cancel,SIGNAL(clicked()),SLOT(reject()));
- connect(m_next,SIGNAL(clicked()),SLOT(slotNext()));
- connect(m_prev,SIGNAL(clicked()),SLOT(slotPrev()));
- connect(m_help, SIGNAL(clicked()), SLOT(slotHelp()));
+ connect(m_cancel,TQT_SIGNAL(clicked()),TQT_SLOT(reject()));
+ connect(m_next,TQT_SIGNAL(clicked()),TQT_SLOT(slotNext()));
+ connect(m_prev,TQT_SIGNAL(clicked()),TQT_SLOT(slotPrev()));
+ connect(m_help, TQT_SIGNAL(clicked()), TQT_SLOT(slotHelp()));
m_side = new SidePixmap(this);
if (!m_side->isValid())
@@ -87,10 +87,10 @@ KMWizard::KMWizard(QWidget *parent, const char *name)
}
// layout
- QVBoxLayout *main0_ = new QVBoxLayout(this, 10, 10);
- QVBoxLayout *main_ = new QVBoxLayout(0, 0, 0);
- QHBoxLayout *main1_ = new QHBoxLayout(0, 0, 10);
- QHBoxLayout *btn_ = new QHBoxLayout(0, 0, 10);
+ TQVBoxLayout *main0_ = new TQVBoxLayout(this, 10, 10);
+ QVBoxLayout *main_ = new TQVBoxLayout(0, 0, 0);
+ TQHBoxLayout *main1_ = new TQHBoxLayout(0, 0, 10);
+ QHBoxLayout *btn_ = new TQHBoxLayout(0, 0, 10);
main0_->addLayout(main1_);
if (m_side)
main1_->addWidget(m_side);
@@ -244,7 +244,7 @@ void KMWizard::slotNext()
void KMWizard::slotHelp()
{
- kapp->invokeHelp(QString::null, "kdeprint");
+ kapp->invokeHelp(TQString::null, "kdeprint");
}
void KMWizard::enableWizard()
diff --git a/kdeprint/management/kmwizard.h b/kdeprint/management/kmwizard.h
index 4a52628fb..a6f3d8dfc 100644
--- a/kdeprint/management/kmwizard.h
+++ b/kdeprint/management/kmwizard.h
@@ -20,9 +20,9 @@
#ifndef KMWIZARD_H
#define KMWIZARD_H
-#include <qdialog.h>
-#include <qintdict.h>
-#include <qvaluestack.h>
+#include <tqdialog.h>
+#include <tqintdict.h>
+#include <tqvaluestack.h>
#include <kdelibs_export.h>
@@ -60,7 +60,7 @@ public:
Custom = 100
};
- KMWizard(QWidget *parent = 0, const char *name = 0);
+ KMWizard(TQWidget *parent = 0, const char *name = 0);
~KMWizard();
void configure(int start, int end, bool inclusive = true);
@@ -81,8 +81,8 @@ protected slots:
void slotHelp();
private:
- QIntDict<KMWizardPage> m_pagepool;
- QValueStack<int> m_pagestack;
+ TQIntDict<KMWizardPage> m_pagepool;
+ TQValueStack<int> m_pagestack;
QWidgetStack *m_stack;
QLabel *m_title;
diff --git a/kdeprint/management/kmwizardpage.cpp b/kdeprint/management/kmwizardpage.cpp
index fe872161e..936a30c87 100644
--- a/kdeprint/management/kmwizardpage.cpp
+++ b/kdeprint/management/kmwizardpage.cpp
@@ -20,8 +20,8 @@
#include "kmwizardpage.h"
#include "kmwizard.h"
-KMWizardPage::KMWizardPage(QWidget *parent, const char *name)
-: QWidget(parent,name)
+KMWizardPage::KMWizardPage(TQWidget *parent, const char *name)
+: TQWidget(parent,name)
{
m_ID = KMWizard::Error;
m_title = "KMWizardPage";
@@ -33,7 +33,7 @@ KMWizardPage::~KMWizardPage()
{
}
-bool KMWizardPage::isValid(QString&)
+bool KMWizardPage::isValid(TQString&)
{
return true;
}
diff --git a/kdeprint/management/kmwizardpage.h b/kdeprint/management/kmwizardpage.h
index d0846b57f..d6756ab37 100644
--- a/kdeprint/management/kmwizardpage.h
+++ b/kdeprint/management/kmwizardpage.h
@@ -20,7 +20,7 @@
#ifndef KMWIZARDPAGE_H
#define KMWIZARDPAGE_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdelibs_export.h>
@@ -30,14 +30,14 @@ class KDEPRINT_EXPORT KMWizardPage : public QWidget
{
Q_OBJECT
public:
- KMWizardPage(QWidget *parent = 0, const char *name = 0);
+ KMWizardPage(TQWidget *parent = 0, const char *name = 0);
virtual ~KMWizardPage();
int id() const { return m_ID; }
- const QString& title() const { return m_title; }
+ const TQString& title() const { return m_title; }
int nextPage() const { return m_nextpage; }
void setNextPage(int p) { m_nextpage = p; }
- virtual bool isValid(QString&);
+ virtual bool isValid(TQString&);
virtual void initPrinter(KMPrinter*);
virtual void updatePrinter(KMPrinter*);
bool needsInitOnBack() { return m_needsinitonback; }
diff --git a/kdeprint/management/kmwlocal.cpp b/kdeprint/management/kmwlocal.cpp
index 10657f246..1a89babe0 100644
--- a/kdeprint/management/kmwlocal.cpp
+++ b/kdeprint/management/kmwlocal.cpp
@@ -24,15 +24,15 @@
#include "kmmanager.h"
#include <klocale.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qlabel.h>
-#include <qheader.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
+#include <tqheader.h>
#include <klistview.h>
#include <kmessagebox.h>
#include <kiconloader.h>
-KMWLocal::KMWLocal(QWidget *parent, const char *name)
+KMWLocal::KMWLocal(TQWidget *parent, const char *name)
: KMWizardPage(parent,name)
{
m_title = i18n("Local Port Selection");
@@ -42,28 +42,28 @@ KMWLocal::KMWLocal(QWidget *parent, const char *name)
m_block = false;
m_ports = new KListView(this);
- m_ports->setFrameStyle(QFrame::WinPanel|QFrame::Sunken);
+ m_ports->setFrameStyle(TQFrame::WinPanel|TQFrame::Sunken);
m_ports->setLineWidth(1);
m_ports->header()->hide();
m_ports->addColumn("");
m_ports->setSorting(-1);
- QListViewItem *root = new QListViewItem(m_ports, i18n("Local System"));
+ QListViewItem *root = new TQListViewItem(m_ports, i18n("Local System"));
root->setPixmap(0, SmallIcon("kdeprint_computer"));
root->setOpen(true);
- connect(m_ports, SIGNAL(selectionChanged(QListViewItem*)), SLOT(slotPortSelected(QListViewItem*)));
- QLabel *l1 = new QLabel(i18n("URI:"), this);
- m_localuri = new QLineEdit(this);
- connect( m_localuri, SIGNAL( textChanged( const QString& ) ), SLOT( slotTextChanged( const QString& ) ) );
- m_parents[0] = new QListViewItem(root, i18n("Parallel"));
- m_parents[1] = new QListViewItem(root, m_parents[0], i18n("Serial"));
- m_parents[2] = new QListViewItem(root, m_parents[1], i18n("USB"));
- m_parents[3] = new QListViewItem(root, m_parents[2], i18n("Others"));
+ connect(m_ports, TQT_SIGNAL(selectionChanged(TQListViewItem*)), TQT_SLOT(slotPortSelected(TQListViewItem*)));
+ QLabel *l1 = new TQLabel(i18n("URI:"), this);
+ m_localuri = new TQLineEdit(this);
+ connect( m_localuri, TQT_SIGNAL( textChanged( const TQString& ) ), TQT_SLOT( slotTextChanged( const TQString& ) ) );
+ m_parents[0] = new TQListViewItem(root, i18n("Parallel"));
+ m_parents[1] = new TQListViewItem(root, m_parents[0], i18n("Serial"));
+ m_parents[2] = new TQListViewItem(root, m_parents[1], i18n("USB"));
+ m_parents[3] = new TQListViewItem(root, m_parents[2], i18n("Others"));
for (int i=0;i<4;i++)
m_parents[i]->setPixmap(0, SmallIcon("input_devices_settings"));
- QLabel *l2 = new QLabel(i18n("<p>Select a valid detected port, or enter directly the corresponding URI in the bottom edit field.</p>"), this);
+ QLabel *l2 = new TQLabel(i18n("<p>Select a valid detected port, or enter directly the corresponding URI in the bottom edit field.</p>"), this);
- QVBoxLayout *lay0 = new QVBoxLayout(this, 0, 10);
- QHBoxLayout *lay1 = new QHBoxLayout(0, 0, 10);
+ QVBoxLayout *lay0 = new TQVBoxLayout(this, 0, 10);
+ QHBoxLayout *lay1 = new TQHBoxLayout(0, 0, 10);
lay0->addWidget(l2, 0);
lay0->addWidget(m_ports, 1);
lay0->addLayout(lay1, 0);
@@ -71,7 +71,7 @@ KMWLocal::KMWLocal(QWidget *parent, const char *name)
lay1->addWidget(m_localuri, 1);
}
-bool KMWLocal::isValid(QString& msg)
+bool KMWLocal::isValid(TQString& msg)
{
if (m_localuri->text().isEmpty())
{
@@ -89,14 +89,14 @@ bool KMWLocal::isValid(QString& msg)
return true;
}
-void KMWLocal::slotPortSelected(QListViewItem *item)
+void KMWLocal::slotPortSelected(TQListViewItem *item)
{
if ( m_block )
return;
- QString uri;
+ TQString uri;
if (!item || item->depth() <= 1 || item->depth() > 3)
- uri = QString::null;
+ uri = TQString::null;
else if (item->depth() == 3)
uri = item->parent()->text( 1 );
else
@@ -108,7 +108,7 @@ void KMWLocal::slotPortSelected(QListViewItem *item)
void KMWLocal::updatePrinter(KMPrinter *printer)
{
- QListViewItem *item = m_ports->selectedItem();
+ TQListViewItem *item = m_ports->selectedItem();
if ( item && item->depth() == 3 )
printer->setOption( "kde-autodetect", item->text( 0 ) );
printer->setDevice(m_localuri->text());
@@ -125,11 +125,11 @@ void KMWLocal::initPrinter(KMPrinter *printer)
}
}
-QListViewItem* KMWLocal::lookForItem( const QString& uri )
+TQListViewItem* KMWLocal::lookForItem( const TQString& uri )
{
for ( int i=0; i<4; i++ )
{
- QListViewItem *item = m_parents[ i ]->firstChild();
+ TQListViewItem *item = m_parents[ i ]->firstChild();
while ( item )
if ( item->text( 1 ) == uri )
if ( item->firstChild() )
@@ -142,12 +142,12 @@ QListViewItem* KMWLocal::lookForItem( const QString& uri )
return 0;
}
-void KMWLocal::slotTextChanged( const QString& txt )
+void KMWLocal::slotTextChanged( const TQString& txt )
{
if ( m_block )
return;
- QListViewItem *item = lookForItem( txt );
+ TQListViewItem *item = lookForItem( txt );
if ( item )
{
m_block = true;
@@ -167,14 +167,14 @@ void KMWLocal::initialize()
return;
}
QListViewItem *last[4] = {0, 0, 0, 0};
- for (QStringList::Iterator it=list.begin(); it!=list.end(); ++it)
+ for (TQStringList::Iterator it=list.begin(); it!=list.end(); ++it)
{
- QString cl = *it;
+ TQString cl = *it;
++it;
QString uri = *it;
int p = uri.find( ':' );
- QString desc = *(++it), prot = ( p != -1 ? uri.left( p ) : QString::null );
+ QString desc = *(++it), prot = ( p != -1 ? uri.left( p ) : TQString::null );
QString printer = *(++it);
int index(-1);
if (desc.isEmpty())
@@ -189,13 +189,13 @@ void KMWLocal::initialize()
index = 3;
else
continue;
- last[index] = new QListViewItem(m_parents[index], last[index], desc, uri);
+ last[index] = new TQListViewItem(m_parents[index], last[index], desc, uri);
last[index]->setPixmap(0, SmallIcon("blockdevice"));
m_parents[index]->setOpen(true);
m_uris << uri;
if (!printer.isEmpty())
{
- QListViewItem *pItem = new QListViewItem(last[index], printer);
+ QListViewItem *pItem = new TQListViewItem(last[index], printer);
last[index]->setOpen(true);
pItem->setPixmap(0, SmallIcon("kdeprint_printer"));
}
diff --git a/kdeprint/management/kmwlocal.h b/kdeprint/management/kmwlocal.h
index 5f99c32e0..2dd770341 100644
--- a/kdeprint/management/kmwlocal.h
+++ b/kdeprint/management/kmwlocal.h
@@ -22,7 +22,7 @@
#include "kmwizardpage.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
class QLineEdit;
class KListView;
@@ -32,19 +32,19 @@ class KMWLocal : public KMWizardPage
{
Q_OBJECT
public:
- KMWLocal(QWidget *parent = 0, const char *name = 0);
+ KMWLocal(TQWidget *parent = 0, const char *name = 0);
- bool isValid(QString&);
+ bool isValid(TQString&);
void updatePrinter(KMPrinter*);
void initPrinter(KMPrinter*);
protected slots:
- void slotPortSelected(QListViewItem*);
- void slotTextChanged( const QString& );
+ void slotPortSelected(TQListViewItem*);
+ void slotTextChanged( const TQString& );
protected:
void initialize();
- QListViewItem* lookForItem( const QString& );
+ TQListViewItem* lookForItem( const TQString& );
protected:
KListView *m_ports;
diff --git a/kdeprint/management/kmwlpd.cpp b/kdeprint/management/kmwlpd.cpp
index fdb762e7d..c2686b481 100644
--- a/kdeprint/management/kmwlpd.cpp
+++ b/kdeprint/management/kmwlpd.cpp
@@ -24,9 +24,9 @@
#include <kurl.h>
#include <klocale.h>
-#include <qlabel.h>
+#include <tqlabel.h>
#include <kdebug.h>
-#include <qlineedit.h>
+#include <tqlineedit.h>
#include <kmessagebox.h>
#include <kextsock.h>
@@ -34,7 +34,7 @@ static bool checkLpdQueue(const char *host, const char *queue);
//********************************************************************************************************
-KMWLpd::KMWLpd(QWidget *parent, const char *name)
+KMWLpd::KMWLpd(TQWidget *parent, const char *name)
: KMWInfoBase(2,parent,name)
{
m_ID = KMWizard::LPD;
@@ -47,7 +47,7 @@ KMWLpd::KMWLpd(QWidget *parent, const char *name)
setLabel(1,i18n("Queue:"));
}
-bool KMWLpd::isValid(QString& msg)
+bool KMWLpd::isValid(TQString& msg)
{
if (text(0).isEmpty() || text(1).isEmpty())
{
@@ -66,7 +66,7 @@ bool KMWLpd::isValid(QString& msg)
void KMWLpd::updatePrinter(KMPrinter *p)
{
- QString dev = QString::fromLatin1("lpd://%1/%2").arg(text(0)).arg(text(1));
+ QString dev = TQString::fromLatin1("lpd://%1/%2").arg(text(0)).arg(text(1));
p->setDevice(dev);
}
diff --git a/kdeprint/management/kmwlpd.h b/kdeprint/management/kmwlpd.h
index bd4b636f8..16cd70592 100644
--- a/kdeprint/management/kmwlpd.h
+++ b/kdeprint/management/kmwlpd.h
@@ -25,9 +25,9 @@
class KMWLpd : public KMWInfoBase
{
public:
- KMWLpd(QWidget *parent = 0, const char *name = 0);
+ KMWLpd(TQWidget *parent = 0, const char *name = 0);
- bool isValid(QString&);
+ bool isValid(TQString&);
void updatePrinter(KMPrinter*);
};
diff --git a/kdeprint/management/kmwname.cpp b/kdeprint/management/kmwname.cpp
index 0cfbfbea9..d46b104a7 100644
--- a/kdeprint/management/kmwname.cpp
+++ b/kdeprint/management/kmwname.cpp
@@ -21,13 +21,13 @@
#include "kmwizard.h"
#include "kmprinter.h"
-#include <qlabel.h>
-#include <qlineedit.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
#include <klocale.h>
#include <kmessagebox.h>
-#include <qregexp.h>
+#include <tqregexp.h>
-KMWName::KMWName(QWidget *parent, const char *name)
+KMWName::KMWName(TQWidget *parent, const char *name)
: KMWInfoBase(3,parent,name)
{
m_ID = KMWizard::Name;
@@ -41,24 +41,24 @@ KMWName::KMWName(QWidget *parent, const char *name)
setLabel(2,i18n("Description:"));
}
-bool KMWName::isValid(QString& msg)
+bool KMWName::isValid(TQString& msg)
{
if (text(0).isEmpty())
{
msg = i18n("You must supply at least a name.");
return false;
}
- else if (text(0).find(QRegExp("\\s")) != -1)
+ else if (text(0).find(TQRegExp("\\s")) != -1)
{
QString conv = text(0);
- conv.replace(QRegExp("\\s"), "");
+ conv.replace(TQRegExp("\\s"), "");
int result = KMessageBox::warningYesNoCancel(this,
i18n("It is usually not a good idea to include spaces "
"in printer name: it may prevent your printer from "
"working correctly. The wizard can strip all spaces "
"from the string you entered, resulting in %1; "
"what do you want to do?").arg(conv),
- QString::null,
+ TQString::null,
i18n("Strip"), i18n("Keep"));
switch (result)
{
diff --git a/kdeprint/management/kmwname.h b/kdeprint/management/kmwname.h
index 245b2c985..e3b74f224 100644
--- a/kdeprint/management/kmwname.h
+++ b/kdeprint/management/kmwname.h
@@ -25,9 +25,9 @@
class KMWName : public KMWInfoBase
{
public:
- KMWName(QWidget *parent = 0, const char *name = 0);
+ KMWName(TQWidget *parent = 0, const char *name = 0);
- bool isValid(QString&);
+ bool isValid(TQString&);
void initPrinter(KMPrinter*);
void updatePrinter(KMPrinter*);
};
diff --git a/kdeprint/management/kmwpassword.cpp b/kdeprint/management/kmwpassword.cpp
index 1b67ac6be..a84b8f904 100644
--- a/kdeprint/management/kmwpassword.cpp
+++ b/kdeprint/management/kmwpassword.cpp
@@ -21,17 +21,17 @@
#include "kmwizard.h"
#include "kmprinter.h"
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qvbuttongroup.h>
-#include <qradiobutton.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqvbuttongroup.h>
+#include <tqradiobutton.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kcursor.h>
#include <stdlib.h>
-KMWPassword::KMWPassword(QWidget *parent, const char *name)
+KMWPassword::KMWPassword(TQWidget *parent, const char *name)
: KMWizardPage(parent,name)
{
m_title = i18n("User Identification");
@@ -39,20 +39,20 @@ KMWPassword::KMWPassword(QWidget *parent, const char *name)
m_nextpage = KMWizard::SMB;
// create widgets
- QLabel *infotext_ = new QLabel(this);
+ QLabel *infotext_ = new TQLabel(this);
infotext_->setText(i18n("<p>This backend may require a login/password to work properly. "
"Select the type of access to use and fill in the login and password entries if needed.</p>"));
- m_login = new QLineEdit(this);
- m_login->setText(QString::fromLocal8Bit(getenv("USER")));
- m_password = new QLineEdit(this);
- m_password->setEchoMode(QLineEdit::Password);
- QLabel *loginlabel_ = new QLabel(i18n("&Login:"),this);
- QLabel *passwdlabel_ = new QLabel(i18n("&Password:"),this);
- m_btngroup = new QVButtonGroup( this );
- m_btngroup->setFrameStyle( QFrame::NoFrame );
- QRadioButton *btn1 = new QRadioButton( i18n( "&Anonymous (no login/password)" ), m_btngroup );
- QRadioButton *btn2 = new QRadioButton( i18n( "&Guest account (login=\"guest\")" ), m_btngroup );
- QRadioButton *btn3 = new QRadioButton( i18n( "Nor&mal account" ), m_btngroup );
+ m_login = new TQLineEdit(this);
+ m_login->setText(TQString::fromLocal8Bit(getenv("USER")));
+ m_password = new TQLineEdit(this);
+ m_password->setEchoMode(TQLineEdit::Password);
+ QLabel *loginlabel_ = new TQLabel(i18n("&Login:"),this);
+ QLabel *passwdlabel_ = new TQLabel(i18n("&Password:"),this);
+ m_btngroup = new TQVButtonGroup( this );
+ m_btngroup->setFrameStyle( TQFrame::NoFrame );
+ TQRadioButton *btn1 = new TQRadioButton( i18n( "&Anonymous (no login/password)" ), m_btngroup );
+ TQRadioButton *btn2 = new TQRadioButton( i18n( "&Guest account (login=\"guest\")" ), m_btngroup );
+ TQRadioButton *btn3 = new TQRadioButton( i18n( "Nor&mal account" ), m_btngroup );
btn1->setCursor( KCursor::handCursor() );
btn2->setCursor( KCursor::handCursor() );
btn3->setCursor( KCursor::handCursor() );
@@ -63,15 +63,15 @@ KMWPassword::KMWPassword(QWidget *parent, const char *name)
m_login->setEnabled(false);
m_password->setEnabled(false);
- connect(btn3,SIGNAL(toggled(bool)),m_login,SLOT(setEnabled(bool)));
- connect(btn3,SIGNAL(toggled(bool)),m_password,SLOT(setEnabled(bool)));
+ connect(btn3,TQT_SIGNAL(toggled(bool)),m_login,TQT_SLOT(setEnabled(bool)));
+ connect(btn3,TQT_SIGNAL(toggled(bool)),m_password,TQT_SLOT(setEnabled(bool)));
// layout
- QVBoxLayout *main_ = new QVBoxLayout( this, 0, 0 );
+ TQVBoxLayout *main_ = new TQVBoxLayout( this, 0, 0 );
main_->addWidget( infotext_ );
main_->addSpacing( 10 );
main_->addWidget( m_btngroup );
- QGridLayout *l1 = new QGridLayout( 0, 2, 3 );
+ TQGridLayout *l1 = new TQGridLayout( 0, 2, 3 );
main_->addLayout( l1 );
main_->addStretch( 1 );
l1->setColSpacing( 0, 35 );
@@ -82,7 +82,7 @@ KMWPassword::KMWPassword(QWidget *parent, const char *name)
l1->addWidget( m_password, 1, 2 );
}
-bool KMWPassword::isValid(QString& msg)
+bool KMWPassword::isValid(TQString& msg)
{
if ( !m_btngroup->selected() )
msg = i18n( "Select one option" );
@@ -117,12 +117,12 @@ void KMWPassword::updatePrinter(KMPrinter *p)
switch ( m_btngroup->selectedId() )
{
case 0:
- p->setOption( "kde-login", QString::null );
- p->setOption( "kde-password", QString::null );
+ p->setOption( "kde-login", TQString::null );
+ p->setOption( "kde-password", TQString::null );
break;
case 1:
- p->setOption( "kde-login", QString::fromLatin1( "guest" ) );
- p->setOption( "kde-password", QString::null );
+ p->setOption( "kde-login", TQString::fromLatin1( "guest" ) );
+ p->setOption( "kde-password", TQString::null );
break;
case 2:
p->setOption( "kde-login", m_login->text() );
diff --git a/kdeprint/management/kmwpassword.h b/kdeprint/management/kmwpassword.h
index 9941376f6..50fb4f42a 100644
--- a/kdeprint/management/kmwpassword.h
+++ b/kdeprint/management/kmwpassword.h
@@ -28,16 +28,16 @@ class QButtonGroup;
class KMWPassword : public KMWizardPage
{
public:
- KMWPassword(QWidget *parent = 0, const char *name = 0);
+ KMWPassword(TQWidget *parent = 0, const char *name = 0);
- bool isValid(QString&);
+ bool isValid(TQString&);
void initPrinter( KMPrinter* );
void updatePrinter(KMPrinter*);
private:
- QLineEdit *m_login;
- QLineEdit *m_password;
- QButtonGroup *m_btngroup;
+ TQLineEdit *m_login;
+ TQLineEdit *m_password;
+ TQButtonGroup *m_btngroup;
};
#endif
diff --git a/kdeprint/management/kmwsmb.cpp b/kdeprint/management/kmwsmb.cpp
index bd1372c42..a4d82fba1 100644
--- a/kdeprint/management/kmwsmb.cpp
+++ b/kdeprint/management/kmwsmb.cpp
@@ -25,11 +25,11 @@
#include <klocale.h>
#include <kpushbutton.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
-KMWSmb::KMWSmb(QWidget *parent, const char *name)
+KMWSmb::KMWSmb(TQWidget *parent, const char *name)
: KMWizardPage(parent,name)
{
m_title = i18n("SMB Printer Settings");
@@ -37,20 +37,20 @@ KMWSmb::KMWSmb(QWidget *parent, const char *name)
m_nextpage = KMWizard::Driver;
m_view = new SmbView(this,"SmbView");
- m_loginlabel = new QLabel( this );
+ m_loginlabel = new TQLabel( this );
QPushButton *m_scan = new KPushButton(KGuiItem(i18n("Scan"), "viewmag"), this);
QPushButton *m_abort = new KPushButton(KGuiItem(i18n("Abort"), "stop"), this);
m_abort->setEnabled(false);
- QLabel *m_worklabel = new QLabel(i18n("Workgroup:"), this);
- QLabel *m_serverlabel = new QLabel(i18n("Server:"), this);
- QLabel *m_printerlabel = new QLabel(i18n("Printer:"), this);
- m_work = new QLineEdit(this);
- m_server = new QLineEdit(this);
- m_printer = new QLineEdit(this);
+ QLabel *m_worklabel = new TQLabel(i18n("Workgroup:"), this);
+ QLabel *m_serverlabel = new TQLabel(i18n("Server:"), this);
+ QLabel *m_printerlabel = new TQLabel(i18n("Printer:"), this);
+ m_work = new TQLineEdit(this);
+ m_server = new TQLineEdit(this);
+ m_printer = new TQLineEdit(this);
- QVBoxLayout *lay0 = new QVBoxLayout(this, 0, 10);
- QGridLayout *lay1 = new QGridLayout(0, 3, 2, 0, 10);
- QHBoxLayout *lay3 = new QHBoxLayout(0, 0, 10);
+ QVBoxLayout *lay0 = new TQVBoxLayout(this, 0, 10);
+ QGridLayout *lay1 = new TQGridLayout(0, 3, 2, 0, 10);
+ QHBoxLayout *lay3 = new TQHBoxLayout(0, 0, 10);
lay0->addLayout(lay1,0);
lay0->addWidget(m_view,1);
lay0->addLayout(lay3,0);
@@ -67,13 +67,13 @@ KMWSmb::KMWSmb(QWidget *parent, const char *name)
lay3->addWidget(m_scan);
lay3->addWidget(m_abort);
- connect(m_scan,SIGNAL(clicked()),SLOT(slotScan()));
- connect(m_abort,SIGNAL(clicked()),SLOT(slotAbort()));
- connect(m_view,SIGNAL(printerSelected(const QString&,const QString&,const QString&)),SLOT(slotPrinterSelected(const QString&,const QString&,const QString&)));
- connect(m_view,SIGNAL(running(bool)),m_abort,SLOT(setEnabled(bool)));
+ connect(m_scan,TQT_SIGNAL(clicked()),TQT_SLOT(slotScan()));
+ connect(m_abort,TQT_SIGNAL(clicked()),TQT_SLOT(slotAbort()));
+ connect(m_view,TQT_SIGNAL(printerSelected(const TQString&,const TQString&,const TQString&)),TQT_SLOT(slotPrinterSelected(const TQString&,const TQString&,const TQString&)));
+ connect(m_view,TQT_SIGNAL(running(bool)),m_abort,TQT_SLOT(setEnabled(bool)));
}
-bool KMWSmb::isValid(QString& msg)
+bool KMWSmb::isValid(TQString& msg)
{
if (m_server->text().isEmpty())
msg = i18n("Empty server name.");
@@ -86,7 +86,7 @@ bool KMWSmb::isValid(QString& msg)
void KMWSmb::updatePrinter(KMPrinter *printer)
{
- QString uri = buildSmbURI( m_work->text(), m_server->text(), m_printer->text(), printer->option( "kde-login" ), printer->option( "kde-password" ) );
+ TQString uri = buildSmbURI( m_work->text(), m_server->text(), m_printer->text(), printer->option( "kde-login" ), printer->option( "kde-password" ) );
printer->setDevice( uri );
}
@@ -94,7 +94,7 @@ void KMWSmb::initPrinter(KMPrinter *printer)
{
if (printer)
{
- QString login = printer->option( "kde-login" );
+ TQString login = printer->option( "kde-login" );
m_view->setLoginInfos(login,printer->option("kde-password"));
m_loginlabel->setText( i18n( "Login: %1" ).arg( login.isEmpty() ? i18n( "<anonymous>" ) : login ) );
}
@@ -110,7 +110,7 @@ void KMWSmb::slotAbort()
m_view->abort();
}
-void KMWSmb::slotPrinterSelected(const QString& work, const QString& server, const QString& printer)
+void KMWSmb::slotPrinterSelected(const TQString& work, const TQString& server, const TQString& printer)
{
m_work->setText(work);
m_server->setText(server);
diff --git a/kdeprint/management/kmwsmb.h b/kdeprint/management/kmwsmb.h
index e76668f74..8c0768287 100644
--- a/kdeprint/management/kmwsmb.h
+++ b/kdeprint/management/kmwsmb.h
@@ -30,21 +30,21 @@ class KMWSmb : public KMWizardPage
{
Q_OBJECT
public:
- KMWSmb(QWidget *parent = 0, const char *name = 0);
+ KMWSmb(TQWidget *parent = 0, const char *name = 0);
- bool isValid(QString&);
+ bool isValid(TQString&);
void updatePrinter(KMPrinter*);
void initPrinter(KMPrinter*);
protected slots:
void slotScan();
void slotAbort();
- void slotPrinterSelected(const QString& work, const QString& server, const QString& printer);
+ void slotPrinterSelected(const TQString& work, const TQString& server, const TQString& printer);
protected:
SmbView *m_view;
QLineEdit *m_work, *m_server, *m_printer;
- QLabel *m_loginlabel;
+ TQLabel *m_loginlabel;
};
#endif
diff --git a/kdeprint/management/kmwsocket.cpp b/kdeprint/management/kmwsocket.cpp
index aa7ebb340..749ab8ea7 100644
--- a/kdeprint/management/kmwsocket.cpp
+++ b/kdeprint/management/kmwsocket.cpp
@@ -23,16 +23,16 @@
#include "kmprinter.h"
#include <klistview.h>
-#include <qheader.h>
-#include <qlineedit.h>
-#include <qlabel.h>
+#include <tqheader.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
#include <kmessagebox.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kiconloader.h>
#include <kseparator.h>
-KMWSocket::KMWSocket(QWidget *parent, const char *name)
+KMWSocket::KMWSocket(TQWidget *parent, const char *name)
: KMWizardPage(parent,name)
{
m_title = i18n("Network Printer Information");
@@ -42,15 +42,15 @@ KMWSocket::KMWSocket(QWidget *parent, const char *name)
m_list = new KListView(this);
m_list->addColumn("");
m_list->header()->hide();
- m_list->setFrameStyle(QFrame::WinPanel|QFrame::Sunken);
+ m_list->setFrameStyle(TQFrame::WinPanel|TQFrame::Sunken);
m_list->setLineWidth(1);
- QLabel *l1 = new QLabel(i18n("&Printer address:"),this);
- QLabel *l2 = new QLabel(i18n("P&ort:"),this);
+ QLabel *l1 = new TQLabel(i18n("&Printer address:"),this);
+ QLabel *l2 = new TQLabel(i18n("P&ort:"),this);
- m_printer = new QLineEdit(this);
- m_port = new QLineEdit(this);
- m_port->setText(QString("9100"));
+ m_printer = new TQLineEdit(this);
+ m_port = new TQLineEdit(this);
+ m_port->setText(TQString("9100"));
l1->setBuddy(m_printer);
l2->setBuddy(m_port);
@@ -60,15 +60,15 @@ KMWSocket::KMWSocket(QWidget *parent, const char *name)
KSeparator* sep = new KSeparator( KSeparator::HLine, this);
sep->setFixedHeight(40);
- connect(m_list,SIGNAL(selectionChanged(QListViewItem*)),SLOT(slotPrinterSelected(QListViewItem*)));
- connect( m_scanner, SIGNAL( scanStarted() ), SLOT( slotScanStarted() ) );
- connect( m_scanner, SIGNAL( scanFinished() ), SLOT( slotScanFinished() ) );
- connect( m_scanner, SIGNAL( scanStarted() ), parent, SLOT( disableWizard() ) );
- connect( m_scanner, SIGNAL( scanFinished() ), parent, SLOT( enableWizard() ) );
+ connect(m_list,TQT_SIGNAL(selectionChanged(TQListViewItem*)),TQT_SLOT(slotPrinterSelected(TQListViewItem*)));
+ connect( m_scanner, TQT_SIGNAL( scanStarted() ), TQT_SLOT( slotScanStarted() ) );
+ connect( m_scanner, TQT_SIGNAL( scanFinished() ), TQT_SLOT( slotScanFinished() ) );
+ connect( m_scanner, TQT_SIGNAL( scanStarted() ), parent, TQT_SLOT( disableWizard() ) );
+ connect( m_scanner, TQT_SIGNAL( scanFinished() ), parent, TQT_SLOT( enableWizard() ) );
// layout
- QHBoxLayout *lay3 = new QHBoxLayout(this, 0, 10);
- QVBoxLayout *lay2 = new QVBoxLayout(0, 0, 0);
+ QHBoxLayout *lay3 = new TQHBoxLayout(this, 0, 10);
+ QVBoxLayout *lay2 = new TQVBoxLayout(0, 0, 0);
lay3->addWidget(m_list,1);
lay3->addLayout(lay2,1);
@@ -88,11 +88,11 @@ KMWSocket::~KMWSocket()
void KMWSocket::updatePrinter(KMPrinter *p)
{
- QString dev = QString::fromLatin1("socket://%1:%2").arg(m_printer->text()).arg(m_port->text());
+ QString dev = TQString::fromLatin1("socket://%1:%2").arg(m_printer->text()).arg(m_port->text());
p->setDevice(dev);
}
-bool KMWSocket::isValid(QString& msg)
+bool KMWSocket::isValid(TQString& msg)
{
if (m_printer->text().isEmpty())
{
@@ -127,8 +127,8 @@ void KMWSocket::slotScanStarted()
void KMWSocket::slotScanFinished()
{
- const QPtrList<NetworkScanner::SocketInfo> *list = m_scanner->printerList();
- QPtrListIterator<NetworkScanner::SocketInfo> it(*list);
+ const TQPtrList<NetworkScanner::SocketInfo> *list = m_scanner->printerList();
+ TQPtrListIterator<NetworkScanner::SocketInfo> it(*list);
for (;it.current();++it)
{
QString name;
@@ -136,12 +136,12 @@ void KMWSocket::slotScanFinished()
name = i18n("Unknown host - 1 is the IP", "<Unknown> (%1)").arg(it.current()->IP);
else
name = it.current()->Name;
- QListViewItem *item = new QListViewItem(m_list,name,it.current()->IP,QString::number(it.current()->Port));
+ QListViewItem *item = new TQListViewItem(m_list,name,it.current()->IP,TQString::number(it.current()->Port));
item->setPixmap(0,SmallIcon("kdeprint_printer"));
}
}
-void KMWSocket::slotPrinterSelected(QListViewItem *item)
+void KMWSocket::slotPrinterSelected(TQListViewItem *item)
{
if (!item) return;
m_printer->setText(item->text(1));
diff --git a/kdeprint/management/kmwsocket.h b/kdeprint/management/kmwsocket.h
index f7aeb7157..ca0b506df 100644
--- a/kdeprint/management/kmwsocket.h
+++ b/kdeprint/management/kmwsocket.h
@@ -31,14 +31,14 @@ class KMWSocket : public KMWizardPage
{
Q_OBJECT
public:
- KMWSocket(QWidget *parent = 0, const char *name = 0);
+ KMWSocket(TQWidget *parent = 0, const char *name = 0);
~KMWSocket();
- bool isValid(QString&);
+ bool isValid(TQString&);
void updatePrinter(KMPrinter*);
protected slots:
- void slotPrinterSelected(QListViewItem*);
+ void slotPrinterSelected(TQListViewItem*);
void slotScanStarted();
void slotScanFinished();
diff --git a/kdeprint/management/kmwsocketutil.cpp b/kdeprint/management/kmwsocketutil.cpp
index f0a6b3bba..d3f838ce7 100644
--- a/kdeprint/management/kmwsocketutil.cpp
+++ b/kdeprint/management/kmwsocketutil.cpp
@@ -22,14 +22,14 @@
#include "kmwsocketutil.h"
-#include <qprogressbar.h>
-#include <qlineedit.h>
-#include <qlabel.h>
-#include <qcombobox.h>
-#include <qpushbutton.h>
+#include <tqprogressbar.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
+#include <tqpushbutton.h>
#include <kmessagebox.h>
-#include <qlayout.h>
-#include <qregexp.h>
+#include <tqlayout.h>
+#include <tqregexp.h>
#include <knumvalidator.h>
#include <kapplication.h>
@@ -39,30 +39,30 @@
#include <unistd.h>
-QString localRootIP();
+TQString localRootIP();
//----------------------------------------------------------------------------------------
-SocketConfig::SocketConfig(KMWSocketUtil *util, QWidget *parent, const char *name)
-: KDialogBase(parent, name, true, QString::null, Ok|Cancel, Ok, true)
+SocketConfig::SocketConfig(KMWSocketUtil *util, TQWidget *parent, const char *name)
+: KDialogBase(parent, name, true, TQString::null, Ok|Cancel, Ok, true)
{
- QWidget *dummy = new QWidget(this);
+ QWidget *dummy = new TQWidget(this);
setMainWidget(dummy);
KIntValidator *val = new KIntValidator( this );
- QLabel *masklabel = new QLabel(i18n("&Subnetwork:"),dummy);
- QLabel *portlabel = new QLabel(i18n("&Port:"),dummy);
- QLabel *toutlabel = new QLabel(i18n("&Timeout (ms):"),dummy);
- QLineEdit *mm = new QLineEdit(dummy);
- mm->setText(QString::fromLatin1(".[0-255]"));
+ QLabel *masklabel = new TQLabel(i18n("&Subnetwork:"),dummy);
+ QLabel *portlabel = new TQLabel(i18n("&Port:"),dummy);
+ QLabel *toutlabel = new TQLabel(i18n("&Timeout (ms):"),dummy);
+ QLineEdit *mm = new TQLineEdit(dummy);
+ mm->setText(TQString::fromLatin1(".[0-255]"));
mm->setReadOnly(true);
mm->setFixedWidth(fontMetrics().width(mm->text())+10);
- mask_ = new QLineEdit(dummy);
+ mask_ = new TQLineEdit(dummy);
mask_->setAlignment(Qt::AlignRight);
- port_ = new QComboBox(true,dummy);
+ port_ = new TQComboBox(true,dummy);
if ( port_->lineEdit() )
port_->lineEdit()->setValidator( val );
- tout_ = new QLineEdit(dummy);
+ tout_ = new TQLineEdit(dummy);
tout_->setValidator( val );
masklabel->setBuddy(mask_);
@@ -74,11 +74,11 @@ SocketConfig::SocketConfig(KMWSocketUtil *util, QWidget *parent, const char *nam
port_->insertItem("9100");
port_->insertItem("9101");
port_->insertItem("9102");
- port_->setEditText(QString::number(util->port_));
- tout_->setText(QString::number(util->timeout_));
+ port_->setEditText(TQString::number(util->port_));
+ tout_->setText(TQString::number(util->timeout_));
- QGridLayout *main_ = new QGridLayout(dummy, 3, 2, 0, 10);
- QHBoxLayout *lay1 = new QHBoxLayout(0, 0, 5);
+ QGridLayout *main_ = new TQGridLayout(dummy, 3, 2, 0, 10);
+ QHBoxLayout *lay1 = new TQHBoxLayout(0, 0, 5);
main_->addWidget(masklabel, 0, 0);
main_->addWidget(portlabel, 1, 0);
main_->addWidget(toutlabel, 2, 0);
@@ -138,7 +138,7 @@ KMWSocketUtil::KMWSocketUtil()
timeout_ = 50;
}
-bool KMWSocketUtil::checkPrinter(const QString& IPstr, int port, QString* hostname)
+bool KMWSocketUtil::checkPrinter(const TQString& IPstr, int port, TQString* hostname)
{
KExtendedSocket sock(IPstr, port, KExtendedSocket::inetSocket|KExtendedSocket::streamSocket);
bool result(false);
@@ -156,7 +156,7 @@ bool KMWSocketUtil::checkPrinter(const QString& IPstr, int port, QString* hostna
return result;
}
-bool KMWSocketUtil::scanNetwork(QProgressBar *bar)
+bool KMWSocketUtil::scanNetwork(TQProgressBar *bar)
{
printerlist_.setAutoDelete(true);
printerlist_.clear();
@@ -165,7 +165,7 @@ bool KMWSocketUtil::scanNetwork(QProgressBar *bar)
bar->setTotalSteps(n);
for (int i=0; i<n; i++)
{
- QString IPstr = root_ + "." + QString::number(i);
+ QString IPstr = root_ + "." + TQString::number(i);
QString hostname;
if (checkPrinter(IPstr, port_, &hostname))
{ // we found a printer at this address, create SocketInfo entry in printer list
@@ -184,7 +184,7 @@ bool KMWSocketUtil::scanNetwork(QProgressBar *bar)
return true;
}
-void KMWSocketUtil::configureScan(QWidget *parent)
+void KMWSocketUtil::configureScan(TQWidget *parent)
{
SocketConfig *dlg = new SocketConfig(this,parent);
if (dlg->exec())
@@ -198,13 +198,13 @@ void KMWSocketUtil::configureScan(QWidget *parent)
//----------------------------------------------------------------------------------------
-QString localRootIP()
+TQString localRootIP()
{
char buf[256];
buf[0] = '\0';
if (!gethostname(buf, sizeof(buf)))
buf[sizeof(buf)-1] = '\0';
- QPtrList<KAddressInfo> infos = KExtendedSocket::lookup(buf, QString::null);
+ TQPtrList<KAddressInfo> infos = KExtendedSocket::lookup(buf, TQString::null);
infos.setAutoDelete(true);
if (infos.count() > 0)
{
@@ -213,7 +213,7 @@ QString localRootIP()
IPstr.truncate(p);
return IPstr;
}
- return QString::null;
+ return TQString::null;
}
#include "kmwsocketutil.moc"
diff --git a/kdeprint/management/kmwsocketutil.h b/kdeprint/management/kmwsocketutil.h
index fa1942ef5..0fd96cc59 100644
--- a/kdeprint/management/kmwsocketutil.h
+++ b/kdeprint/management/kmwsocketutil.h
@@ -20,8 +20,8 @@
#ifndef KMWSOCKETUTIL_H
#define KMWSOCKETUTIL_H
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
#include <kdialogbase.h>
struct SocketInfo
@@ -41,7 +41,7 @@ class SocketConfig : public KDialogBase
friend class KMWSocketUtil;
Q_OBJECT
public:
- SocketConfig(KMWSocketUtil *util, QWidget *parent = 0, const char *name = 0);
+ SocketConfig(KMWSocketUtil *util, TQWidget *parent = 0, const char *name = 0);
~SocketConfig();
protected slots:
@@ -59,15 +59,15 @@ class KMWSocketUtil
public:
KMWSocketUtil();
- bool checkPrinter(const QString& host, int port, QString* hostname = 0);
+ bool checkPrinter(const TQString& host, int port, TQString* hostname = 0);
- const QPtrList<SocketInfo>* printerList() { return &printerlist_; }
- bool scanNetwork(QProgressBar *bar = 0);
- void configureScan(QWidget *parent = 0);
+ const TQPtrList<SocketInfo>* printerList() { return &printerlist_; }
+ bool scanNetwork(TQProgressBar *bar = 0);
+ void configureScan(TQWidget *parent = 0);
void setDefaultPort(int p) { port_ = p; }
private:
- QPtrList<SocketInfo> printerlist_;
+ TQPtrList<SocketInfo> printerlist_;
QString root_;
int port_;
int timeout_; // in milliseconds
diff --git a/kdeprint/management/kxmlcommanddlg.cpp b/kdeprint/management/kxmlcommanddlg.cpp
index b9610ad13..24e6f4adf 100644
--- a/kdeprint/management/kxmlcommanddlg.cpp
+++ b/kdeprint/management/kxmlcommanddlg.cpp
@@ -21,21 +21,21 @@
#include "driver.h"
#include "kxmlcommand.h"
-#include <qlayout.h>
-#include <qheader.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qcombobox.h>
-#include <qgroupbox.h>
-#include <qwidgetstack.h>
-#include <qtoolbutton.h>
+#include <tqlayout.h>
+#include <tqheader.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqcombobox.h>
+#include <tqgroupbox.h>
+#include <tqwidgetstack.h>
+#include <tqtoolbutton.h>
#include <kpushbutton.h>
-#include <qtooltip.h>
-#include <qcheckbox.h>
+#include <tqtooltip.h>
+#include <tqcheckbox.h>
#include <ktextedit.h>
-#include <qregexp.h>
-#include <qwhatsthis.h>
-#include <qapplication.h>
+#include <tqregexp.h>
+#include <tqwhatsthis.h>
+#include <tqapplication.h>
#include <klistview.h>
#include <klocale.h>
@@ -49,14 +49,14 @@
#include <kdebug.h>
#include <kguiitem.h>
-QString generateId(const QMap<QString, DrBase*>& map)
+TQString generateId(const TQMap<TQString, DrBase*>& map)
{
int index(-1);
- while (map.contains(QString::fromLatin1("item%1").arg(++index))) ;
- return QString::fromLatin1("item%1").arg(index);
+ while (map.contains(TQString::fromLatin1("item%1").arg(++index))) ;
+ return TQString::fromLatin1("item%1").arg(index);
}
-QListViewItem* findPrev(QListViewItem *item)
+TQListViewItem* findPrev(TQListViewItem *item)
{
QListViewItem *prev = item->itemAbove();
while (prev && prev->depth() > item->depth())
@@ -67,7 +67,7 @@ QListViewItem* findPrev(QListViewItem *item)
return 0;
}
-QListViewItem* findNext(QListViewItem *item)
+TQListViewItem* findNext(TQListViewItem *item)
{
QListViewItem *next = item->itemBelow();
while (next && next->depth() > item->depth())
@@ -78,63 +78,63 @@ QListViewItem* findNext(QListViewItem *item)
return 0;
}
-KXmlCommandAdvancedDlg::KXmlCommandAdvancedDlg(QWidget *parent, const char *name)
-: QWidget(parent, name)
+KXmlCommandAdvancedDlg::KXmlCommandAdvancedDlg(TQWidget *parent, const char *name)
+: TQWidget(parent, name)
{
m_xmlcmd = 0;
- m_command = new QLineEdit(this);
+ m_command = new TQLineEdit(this);
m_view = new KListView(this);
m_view->addColumn("");
m_view->header()->hide();
m_view->setSorting(-1);
- m_apply = new QToolButton(this);
- m_apply->setIconSet( QApplication::reverseLayout()? SmallIconSet( "forward" ) : SmallIconSet("back"));
- m_addgrp = new QToolButton(this);
+ m_apply = new TQToolButton(this);
+ m_apply->setIconSet( TQApplication::reverseLayout()? SmallIconSet( "forward" ) : SmallIconSet("back"));
+ m_addgrp = new TQToolButton(this);
m_addgrp->setIconSet(SmallIconSet("folder"));
- m_addopt = new QToolButton(this);
+ m_addopt = new TQToolButton(this);
m_addopt->setIconSet(SmallIconSet("document"));
- m_delopt = new QToolButton(this);
+ m_delopt = new TQToolButton(this);
m_delopt->setIconSet(SmallIconSet("editdelete"));
- m_up = new QToolButton(this);
+ m_up = new TQToolButton(this);
m_up->setIconSet(SmallIconSet("up"));
- m_down = new QToolButton(this);
+ m_down = new TQToolButton(this);
m_down->setIconSet(SmallIconSet("down"));
- m_dummy = new QWidget(this);
- m_desc = new QLineEdit(m_dummy);
- m_name = new QLineEdit(m_dummy);
- m_type = new QComboBox(m_dummy);
+ m_dummy = new TQWidget(this);
+ m_desc = new TQLineEdit(m_dummy);
+ m_name = new TQLineEdit(m_dummy);
+ m_type = new TQComboBox(m_dummy);
m_type->insertItem(i18n("String"));
m_type->insertItem(i18n("Integer"));
m_type->insertItem(i18n("Float"));
m_type->insertItem(i18n("List"));
m_type->insertItem(i18n("Boolean"));
- m_format = new QLineEdit(m_dummy);
- m_default = new QLineEdit(m_dummy);
- QLabel *m_namelab = new QLabel(i18n("&Name:"), m_dummy);
- QLabel *m_desclab = new QLabel(i18n("&Description:"), m_dummy);
- QLabel *m_formatlab = new QLabel(i18n("&Format:"), m_dummy);
- QLabel *m_typelab = new QLabel(i18n("&Type:"), m_dummy);
- QLabel *m_defaultlab = new QLabel(i18n("Default &value:"), m_dummy);
- QLabel *m_commandlab = new QLabel(i18n("Co&mmand:"), this);
+ m_format = new TQLineEdit(m_dummy);
+ m_default = new TQLineEdit(m_dummy);
+ QLabel *m_namelab = new TQLabel(i18n("&Name:"), m_dummy);
+ QLabel *m_desclab = new TQLabel(i18n("&Description:"), m_dummy);
+ QLabel *m_formatlab = new TQLabel(i18n("&Format:"), m_dummy);
+ QLabel *m_typelab = new TQLabel(i18n("&Type:"), m_dummy);
+ QLabel *m_defaultlab = new TQLabel(i18n("Default &value:"), m_dummy);
+ QLabel *m_commandlab = new TQLabel(i18n("Co&mmand:"), this);
m_namelab->setBuddy(m_name);
m_desclab->setBuddy(m_desc);
m_formatlab->setBuddy(m_format);
m_typelab->setBuddy(m_type);
m_defaultlab->setBuddy(m_default);
m_commandlab->setBuddy(m_command);
- m_persistent = new QCheckBox( i18n( "&Persistent option" ), m_dummy );
+ m_persistent = new TQCheckBox( i18n( "&Persistent option" ), m_dummy );
- QGroupBox *gb = new QGroupBox(0, Qt::Horizontal, i18n("Va&lues"), m_dummy);
- m_stack = new QWidgetStack(gb);
- QWidget *w1 = new QWidget(m_stack), *w2 = new QWidget(m_stack), *w3 = new QWidget(m_stack);
+ QGroupBox *gb = new TQGroupBox(0, Qt::Horizontal, i18n("Va&lues"), m_dummy);
+ m_stack = new TQWidgetStack(gb);
+ QWidget *w1 = new TQWidget(m_stack), *w2 = new TQWidget(m_stack), *w3 = new TQWidget(m_stack);
m_stack->addWidget(w1, 1);
m_stack->addWidget(w2, 2);
m_stack->addWidget(w3, 3);
- m_edit1 = new QLineEdit(w1);
- m_edit2 = new QLineEdit(w1);
- QLabel *m_editlab1 = new QLabel(i18n("Minimum v&alue:"), w1);
- QLabel *m_editlab2 = new QLabel(i18n("Ma&ximum value:"), w1);
+ m_edit1 = new TQLineEdit(w1);
+ m_edit2 = new TQLineEdit(w1);
+ QLabel *m_editlab1 = new TQLabel(i18n("Minimum v&alue:"), w1);
+ QLabel *m_editlab2 = new TQLabel(i18n("Ma&ximum value:"), w1);
m_editlab1->setBuddy(m_edit1);
m_editlab2->setBuddy(m_edit2);
m_values = new KListView(w2);
@@ -143,46 +143,46 @@ KXmlCommandAdvancedDlg::KXmlCommandAdvancedDlg(QWidget *parent, const char *name
m_values->setAllColumnsShowFocus(true);
m_values->setSorting(-1);
m_values->setMaximumHeight(110);
- m_addval = new QToolButton(w2);
+ m_addval = new TQToolButton(w2);
m_addval->setIconSet(SmallIconSet("editcopy"));
- m_delval = new QToolButton(w2);
+ m_delval = new TQToolButton(w2);
m_delval->setIconSet(SmallIconSet("editdelete"));
- QToolTip::add(m_addval, i18n("Add value"));
- QToolTip::add(m_delval, i18n("Delete value"));
+ TQToolTip::add(m_addval, i18n("Add value"));
+ TQToolTip::add(m_delval, i18n("Delete value"));
- QToolTip::add(m_apply, i18n("Apply changes"));
- QToolTip::add(m_addgrp, i18n("Add group"));
- QToolTip::add(m_addopt, i18n("Add option"));
- QToolTip::add(m_delopt, i18n("Delete item"));
- QToolTip::add(m_up, i18n("Move up"));
- QToolTip::add(m_down, i18n("Move down"));
+ TQToolTip::add(m_apply, i18n("Apply changes"));
+ TQToolTip::add(m_addgrp, i18n("Add group"));
+ TQToolTip::add(m_addopt, i18n("Add option"));
+ TQToolTip::add(m_delopt, i18n("Delete item"));
+ TQToolTip::add(m_up, i18n("Move up"));
+ TQToolTip::add(m_down, i18n("Move down"));
KSeparator *sep1 = new KSeparator(KSeparator::HLine, m_dummy);
- QGroupBox *gb_input = new QGroupBox(0, Qt::Horizontal, i18n("&Input From"), this);
- QGroupBox *gb_output = new QGroupBox(0, Qt::Horizontal, i18n("O&utput To"), this);
- QLabel *m_inputfilelab = new QLabel(i18n("File:"), gb_input);
- QLabel *m_inputpipelab = new QLabel(i18n("Pipe:"), gb_input);
- QLabel *m_outputfilelab = new QLabel(i18n("File:"), gb_output);
- QLabel *m_outputpipelab = new QLabel(i18n("Pipe:"), gb_output);
- m_inputfile = new QLineEdit(gb_input);
- m_inputpipe = new QLineEdit(gb_input);
- m_outputfile = new QLineEdit(gb_output);
- m_outputpipe = new QLineEdit(gb_output);
+ QGroupBox *gb_input = new TQGroupBox(0, Qt::Horizontal, i18n("&Input From"), this);
+ QGroupBox *gb_output = new TQGroupBox(0, Qt::Horizontal, i18n("O&utput To"), this);
+ QLabel *m_inputfilelab = new TQLabel(i18n("File:"), gb_input);
+ QLabel *m_inputpipelab = new TQLabel(i18n("Pipe:"), gb_input);
+ QLabel *m_outputfilelab = new TQLabel(i18n("File:"), gb_output);
+ QLabel *m_outputpipelab = new TQLabel(i18n("Pipe:"), gb_output);
+ m_inputfile = new TQLineEdit(gb_input);
+ m_inputpipe = new TQLineEdit(gb_input);
+ m_outputfile = new TQLineEdit(gb_output);
+ m_outputpipe = new TQLineEdit(gb_output);
m_comment = new KTextEdit( this );
m_comment->setTextFormat(Qt::RichText );
m_comment->setReadOnly(true);
- QLabel *m_commentlab = new QLabel( i18n( "Comment:" ), this );
+ TQLabel *m_commentlab = new TQLabel( i18n( "Comment:" ), this );
- QVBoxLayout *l2 = new QVBoxLayout(this, 0, KDialog::spacingHint());
- QHBoxLayout *l3 = new QHBoxLayout(0, 0, KDialog::spacingHint());
- QVBoxLayout *l7 = new QVBoxLayout(0, 0, 0);
+ QVBoxLayout *l2 = new TQVBoxLayout(this, 0, KDialog::spacingHint());
+ QHBoxLayout *l3 = new TQHBoxLayout(0, 0, KDialog::spacingHint());
+ QVBoxLayout *l7 = new TQVBoxLayout(0, 0, 0);
l2->addLayout(l3, 0);
l3->addWidget(m_commandlab);
l3->addWidget(m_command);
- QHBoxLayout *l0 = new QHBoxLayout(0, 0, KDialog::spacingHint());
- QGridLayout *l10 = new QGridLayout(0, 2, 2, 0, KDialog::spacingHint());
+ QHBoxLayout *l0 = new TQHBoxLayout(0, 0, KDialog::spacingHint());
+ QGridLayout *l10 = new TQGridLayout(0, 2, 2, 0, KDialog::spacingHint());
l2->addLayout(l0, 1);
l0->addLayout(l10);
l10->addMultiCellWidget(m_view, 0, 0, 0, 1);
@@ -200,7 +200,7 @@ KXmlCommandAdvancedDlg::KXmlCommandAdvancedDlg(QWidget *parent, const char *name
l7->addWidget(m_down);
l7->addStretch(1);
l0->addWidget(m_dummy, 1);
- QGridLayout *l1 = new QGridLayout(m_dummy, 9, 2, 0, KDialog::spacingHint());
+ QGridLayout *l1 = new TQGridLayout(m_dummy, 9, 2, 0, KDialog::spacingHint());
l1->addWidget(m_desclab, 0, 0, Qt::AlignRight|Qt::AlignVCenter);
l1->addWidget(m_desc, 0, 1);
l1->addMultiCellWidget(sep1, 1, 1, 0, 1);
@@ -216,23 +216,23 @@ KXmlCommandAdvancedDlg::KXmlCommandAdvancedDlg(QWidget *parent, const char *name
l1->addMultiCellWidget(gb, 7, 7, 0, 1);
l1->setRowStretch(8, 1);
- QHBoxLayout *l4 = new QHBoxLayout(w2, 0, KDialog::spacingHint());
+ QHBoxLayout *l4 = new TQHBoxLayout(w2, 0, KDialog::spacingHint());
l4->addWidget(m_values);
- QVBoxLayout *l6 = new QVBoxLayout(0, 0, 0);
+ QVBoxLayout *l6 = new TQVBoxLayout(0, 0, 0);
l4->addLayout(l6);
l6->addWidget(m_addval);
l6->addWidget(m_delval);
l6->addStretch(1);
- QGridLayout *l5 = new QGridLayout(w1, 3, 2, 0, KDialog::spacingHint());
+ QGridLayout *l5 = new TQGridLayout(w1, 3, 2, 0, KDialog::spacingHint());
l5->setRowStretch(2, 1);
l5->addWidget(m_editlab1, 0, 0, Qt::AlignRight|Qt::AlignVCenter);
l5->addWidget(m_editlab2, 1, 0, Qt::AlignRight|Qt::AlignVCenter);
l5->addWidget(m_edit1, 0, 1);
l5->addWidget(m_edit2, 1, 1);
- QGridLayout *l8 = new QGridLayout(gb_input->layout(), 2, 2,
+ QGridLayout *l8 = new TQGridLayout(gb_input->layout(), 2, 2,
KDialog::spacingHint());
- QGridLayout *l9 = new QGridLayout(gb_output->layout(), 2, 2,
+ QGridLayout *l9 = new TQGridLayout(gb_output->layout(), 2, 2,
KDialog::spacingHint());
l8->addWidget(m_inputfilelab, 0, 0);
l8->addWidget(m_inputpipelab, 1, 0);
@@ -243,73 +243,73 @@ KXmlCommandAdvancedDlg::KXmlCommandAdvancedDlg(QWidget *parent, const char *name
l9->addWidget(m_outputfile, 0, 1);
l9->addWidget(m_outputpipe, 1, 1);
- QVBoxLayout *l11 = new QVBoxLayout(gb->layout());
+ QVBoxLayout *l11 = new TQVBoxLayout(gb->layout());
l11->addWidget(m_stack);
- QVBoxLayout *l12 = new QVBoxLayout( 0, 0, 0 );
+ TQVBoxLayout *l12 = new TQVBoxLayout( 0, 0, 0 );
l2->addSpacing( 10 );
l2->addLayout( l12 );
l12->addWidget( m_commentlab );
l12->addWidget( m_comment );
- connect(m_view, SIGNAL(selectionChanged(QListViewItem*)), SLOT(slotSelectionChanged(QListViewItem*)));
- connect(m_values, SIGNAL(selectionChanged(QListViewItem*)), SLOT(slotValueSelected(QListViewItem*)));
- connect(m_type, SIGNAL(activated(int)), SLOT(slotTypeChanged(int)));
- connect(m_addval, SIGNAL(clicked()), SLOT(slotAddValue()));
- connect(m_delval, SIGNAL(clicked()), SLOT(slotRemoveValue()));
- connect(m_apply, SIGNAL(clicked()), SLOT(slotApplyChanges()));
- connect(m_addgrp, SIGNAL(clicked()), SLOT(slotAddGroup()));
- connect(m_addopt, SIGNAL(clicked()), SLOT(slotAddOption()));
- connect(m_delopt, SIGNAL(clicked()), SLOT(slotRemoveItem()));
- connect(m_up, SIGNAL(clicked()), SLOT(slotMoveUp()));
- connect(m_down, SIGNAL(clicked()), SLOT(slotMoveDown()));
- connect(m_command, SIGNAL(textChanged(const QString&)), SLOT(slotCommandChanged(const QString&)));
- connect(m_view, SIGNAL(itemRenamed(QListViewItem*,int)), SLOT(slotOptionRenamed(QListViewItem*,int)));
- connect(m_desc, SIGNAL(textChanged(const QString&)), SLOT(slotChanged()));
- connect(m_name, SIGNAL(textChanged(const QString&)), SLOT(slotChanged()));
- connect(m_format, SIGNAL(textChanged(const QString&)), SLOT(slotChanged()));
- connect(m_default, SIGNAL(textChanged(const QString&)), SLOT(slotChanged()));
- connect(m_edit1, SIGNAL(textChanged(const QString&)), SLOT(slotChanged()));
- connect(m_edit2, SIGNAL(textChanged(const QString&)), SLOT(slotChanged()));
- connect(m_type, SIGNAL(activated(int)), SLOT(slotChanged()));
- connect(m_addval, SIGNAL(clicked()), SLOT(slotChanged()));
- connect(m_delval, SIGNAL(clicked()), SLOT(slotChanged()));
- connect( m_persistent, SIGNAL( toggled(bool) ), SLOT( slotChanged() ) );
+ connect(m_view, TQT_SIGNAL(selectionChanged(TQListViewItem*)), TQT_SLOT(slotSelectionChanged(TQListViewItem*)));
+ connect(m_values, TQT_SIGNAL(selectionChanged(TQListViewItem*)), TQT_SLOT(slotValueSelected(TQListViewItem*)));
+ connect(m_type, TQT_SIGNAL(activated(int)), TQT_SLOT(slotTypeChanged(int)));
+ connect(m_addval, TQT_SIGNAL(clicked()), TQT_SLOT(slotAddValue()));
+ connect(m_delval, TQT_SIGNAL(clicked()), TQT_SLOT(slotRemoveValue()));
+ connect(m_apply, TQT_SIGNAL(clicked()), TQT_SLOT(slotApplyChanges()));
+ connect(m_addgrp, TQT_SIGNAL(clicked()), TQT_SLOT(slotAddGroup()));
+ connect(m_addopt, TQT_SIGNAL(clicked()), TQT_SLOT(slotAddOption()));
+ connect(m_delopt, TQT_SIGNAL(clicked()), TQT_SLOT(slotRemoveItem()));
+ connect(m_up, TQT_SIGNAL(clicked()), TQT_SLOT(slotMoveUp()));
+ connect(m_down, TQT_SIGNAL(clicked()), TQT_SLOT(slotMoveDown()));
+ connect(m_command, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotCommandChanged(const TQString&)));
+ connect(m_view, TQT_SIGNAL(itemRenamed(TQListViewItem*,int)), TQT_SLOT(slotOptionRenamed(TQListViewItem*,int)));
+ connect(m_desc, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotChanged()));
+ connect(m_name, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotChanged()));
+ connect(m_format, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotChanged()));
+ connect(m_default, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotChanged()));
+ connect(m_edit1, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotChanged()));
+ connect(m_edit2, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotChanged()));
+ connect(m_type, TQT_SIGNAL(activated(int)), TQT_SLOT(slotChanged()));
+ connect(m_addval, TQT_SIGNAL(clicked()), TQT_SLOT(slotChanged()));
+ connect(m_delval, TQT_SIGNAL(clicked()), TQT_SLOT(slotChanged()));
+ connect( m_persistent, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( slotChanged() ) );
m_dummy->setEnabled(false);
viewItem(0);
/**
* Add some short help for the normal (non expert) user
*/
- QWhatsThis::add( m_name, i18n(
+ TQWhatsThis::add( m_name, i18n(
"An identification string. Use only alphanumeric characters except spaces. "
"The string <b>__root__</b> is reserved for internal use." ) );
- QWhatsThis::add( m_namelab, QWhatsThis::textFor( m_name ) );
- QWhatsThis::add( m_desc, i18n(
+ TQWhatsThis::add( m_namelab, TQWhatsThis::textFor( m_name ) );
+ TQWhatsThis::add( m_desc, i18n(
"A description string. This string is shown in the interface, and should "
"be explicit enough about the role of the corresponding option." ) );
- QWhatsThis::add( m_desclab, QWhatsThis::textFor( m_desc ) );
- QWhatsThis::add( m_type, i18n(
+ TQWhatsThis::add( m_desclab, TQWhatsThis::textFor( m_desc ) );
+ TQWhatsThis::add( m_type, i18n(
"The type of the option. This determines how the option is presented "
"graphically to the user." ) );
- QWhatsThis::add( m_typelab, QWhatsThis::textFor( m_type ) );
- QWhatsThis::add( m_format, i18n(
+ TQWhatsThis::add( m_typelab, TQWhatsThis::textFor( m_type ) );
+ TQWhatsThis::add( m_format, i18n(
"The format of the option. This determines how the option is formatted "
"for inclusion in the global command line. The tag <b>%value</b> can be used "
"to represent the user selection. This tag will be replaced at run-time by a "
"string representation of the option value." ) );
- QWhatsThis::add( m_formatlab, QWhatsThis::textFor( m_format ) );
- QWhatsThis::add( m_default, i18n(
+ TQWhatsThis::add( m_formatlab, TQWhatsThis::textFor( m_format ) );
+ TQWhatsThis::add( m_default, i18n(
"The default value of the option. For non persistent options, nothing is "
"added to the command line if the option has that default value. If this "
"value does not correspond to the actual default value of the underlying "
"utility, make the option persistent to avoid unwanted effects." ) );
- QWhatsThis::add( m_defaultlab, QWhatsThis::textFor( m_default ) );
- QWhatsThis::add( m_persistent, i18n(
+ TQWhatsThis::add( m_defaultlab, TQWhatsThis::textFor( m_default ) );
+ TQWhatsThis::add( m_persistent, i18n(
"Make the option persistent. A persistent option is always written to the "
"command line, whatever its value. This is useful when the chosen default "
"value does not match with the actual default value of the underlying utility." ) );
- QWhatsThis::add( m_command, i18n(
+ TQWhatsThis::add( m_command, i18n(
"The full command line to execute the associated underlying utility. This "
"command line is based on a mechanism of tags that are replaced at run-time. "
"The supported tags are:<ul>"
@@ -318,28 +318,28 @@ KXmlCommandAdvancedDlg::KXmlCommandAdvancedDlg(QWidget *parent, const char *name
"<li><b>%filteroutput</b>: output specification</li>"
"<li><b>%psu</b>: the page size in upper case</li>"
"<li><b>%psl</b>: the page size in lower case</li></ul>" ) );
- QWhatsThis::add( m_commandlab, QWhatsThis::textFor( m_command ) );
- QWhatsThis::add( m_inputfile, i18n(
+ TQWhatsThis::add( m_commandlab, TQWhatsThis::textFor( m_command ) );
+ TQWhatsThis::add( m_inputfile, i18n(
"Input specification when the underlying utility reads input data from a file. Use "
"the tag <b>%in</b> to represent the input filename." ) );
- QWhatsThis::add( m_inputfilelab, QWhatsThis::textFor( m_inputfile ) );
- QWhatsThis::add( m_outputfile, i18n(
+ TQWhatsThis::add( m_inputfilelab, TQWhatsThis::textFor( m_inputfile ) );
+ TQWhatsThis::add( m_outputfile, i18n(
"Output specification when the underlying utility writes output data to a file. Use "
"the tag <b>%out</b> to represent the output filename." ) );
- QWhatsThis::add( m_outputfilelab, QWhatsThis::textFor( m_outputfile ) );
- QWhatsThis::add( m_inputpipe, i18n(
+ TQWhatsThis::add( m_outputfilelab, TQWhatsThis::textFor( m_outputfile ) );
+ TQWhatsThis::add( m_inputpipe, i18n(
"Input specification when the underlying utility reads input data from its "
"standard input." ) );
- QWhatsThis::add( m_inputpipelab, QWhatsThis::textFor( m_inputpipe ) );
- QWhatsThis::add( m_outputpipe, i18n(
+ TQWhatsThis::add( m_inputpipelab, TQWhatsThis::textFor( m_inputpipe ) );
+ TQWhatsThis::add( m_outputpipe, i18n(
"Output specification when the underlying utility writes output data to its "
"standard output." ) );
- QWhatsThis::add( m_outputpipelab, QWhatsThis::textFor( m_outputpipe ) );
- QWhatsThis::add( m_comment, i18n(
+ TQWhatsThis::add( m_outputpipelab, TQWhatsThis::textFor( m_outputpipe ) );
+ TQWhatsThis::add( m_comment, i18n(
"A comment about the underlying utility, which can be viewed by the user "
"from the interface. This comment string supports basic HTML tags like "
"&lt;a&gt;, &lt;b&gt; or &lt;i&gt;." ) );
- QWhatsThis::add( m_commentlab, QWhatsThis::textFor( m_comment ) );
+ TQWhatsThis::add( m_commentlab, TQWhatsThis::textFor( m_comment ) );
resize(660, 200);
}
@@ -349,7 +349,7 @@ KXmlCommandAdvancedDlg::~KXmlCommandAdvancedDlg()
if (m_opts.count() > 0)
{
kdDebug() << "KXmlCommandAdvancedDlg: " << m_opts.count() << " items remaining" << endl;
- for (QMap<QString,DrBase*>::ConstIterator it=m_opts.begin(); it!=m_opts.end(); ++it)
+ for (TQMap<TQString,DrBase*>::ConstIterator it=m_opts.begin(); it!=m_opts.end(); ++it)
{
//kdDebug() << "Item: name=" << (*it)->name() << endl;
delete (*it);
@@ -367,7 +367,7 @@ void KXmlCommandAdvancedDlg::setCommand(KXmlCommand *xmlcmd)
void KXmlCommandAdvancedDlg::parseXmlCommand(KXmlCommand *xmlcmd)
{
m_view->clear();
- QListViewItem *root = new QListViewItem(m_view, xmlcmd->name(), xmlcmd->name());
+ QListViewItem *root = new TQListViewItem(m_view, xmlcmd->name(), xmlcmd->name());
DrMain *driver = xmlcmd->driver();
root->setPixmap(0, SmallIcon("fileprint"));
@@ -393,11 +393,11 @@ void KXmlCommandAdvancedDlg::parseXmlCommand(KXmlCommand *xmlcmd)
viewItem(0);
}
-void KXmlCommandAdvancedDlg::parseGroupItem(DrGroup *grp, QListViewItem *parent)
+void KXmlCommandAdvancedDlg::parseGroupItem(DrGroup *grp, TQListViewItem *parent)
{
QListViewItem *item(0);
- QPtrListIterator<DrGroup> git(grp->groups());
+ TQPtrListIterator<DrGroup> git(grp->groups());
for (; git.current(); ++git)
{
QString namestr = git.current()->name();
@@ -406,7 +406,7 @@ void KXmlCommandAdvancedDlg::parseGroupItem(DrGroup *grp, QListViewItem *parent)
namestr = "group_"+kapp->randomString(4);
}
git.current()->setName(namestr);
- item = new QListViewItem(parent, item, git.current()->get("text"), git.current()->name());
+ item = new TQListViewItem(parent, item, git.current()->get("text"), git.current()->name());
item->setPixmap(0, SmallIcon("folder"));
item->setOpen(true);
item->setRenameEnabled(0, true);
@@ -414,7 +414,7 @@ void KXmlCommandAdvancedDlg::parseGroupItem(DrGroup *grp, QListViewItem *parent)
m_opts[namestr] = git.current();
}
- QPtrListIterator<DrBase> oit(grp->options());
+ TQPtrListIterator<DrBase> oit(grp->options());
for (; oit.current(); ++oit)
{
QString namestr = oit.current()->name().mid(m_xmlcmd->name().length()+6);
@@ -423,21 +423,21 @@ void KXmlCommandAdvancedDlg::parseGroupItem(DrGroup *grp, QListViewItem *parent)
namestr = "option_"+kapp->randomString(4);
}
oit.current()->setName(namestr);
- item = new QListViewItem(parent, item, oit.current()->get("text"), namestr);
+ item = new TQListViewItem(parent, item, oit.current()->get("text"), namestr);
item->setPixmap(0, SmallIcon("document"));
item->setRenameEnabled(0, true);
m_opts[namestr] = oit.current();
}
}
-void KXmlCommandAdvancedDlg::slotSelectionChanged(QListViewItem *item)
+void KXmlCommandAdvancedDlg::slotSelectionChanged(TQListViewItem *item)
{
if (item && item->depth() == 0)
item = 0;
viewItem(item);
}
-void KXmlCommandAdvancedDlg::viewItem(QListViewItem *item)
+void KXmlCommandAdvancedDlg::viewItem(TQListViewItem *item)
{
m_dummy->setEnabled((item != 0));
m_name->setText("");
@@ -480,11 +480,11 @@ void KXmlCommandAdvancedDlg::viewItem(QListViewItem *item)
case DrBase::Boolean:
case DrBase::List:
{
- QPtrListIterator<DrBase> it(*(static_cast<DrListOption*>(opt)->choices()));
+ TQPtrListIterator<DrBase> it(*(static_cast<DrListOption*>(opt)->choices()));
QListViewItem *item(0);
for (; it.current(); ++it)
{
- item = new QListViewItem(m_values, item, it.current()->name(), it.current()->get("text"));
+ item = new TQListViewItem(m_values, item, it.current()->name(), it.current()->get("text"));
item->setRenameEnabled(0, true);
item->setRenameEnabled(1, true);
}
@@ -542,7 +542,7 @@ void KXmlCommandAdvancedDlg::slotTypeChanged(int ID)
void KXmlCommandAdvancedDlg::slotAddValue()
{
- QListViewItem *item = new QListViewItem(m_values, m_values->lastItem(), i18n("Name"), i18n("Description"));
+ QListViewItem *item = new TQListViewItem(m_values, m_values->lastItem(), i18n("Name"), i18n("Description"));
item->setRenameEnabled(0, true);
item->setRenameEnabled(1, true);
m_values->ensureItemVisible(item);
@@ -649,7 +649,7 @@ void KXmlCommandAdvancedDlg::slotAddGroup()
grp->set("text", i18n("New Group"));
m_opts[ID] = grp;
- QListViewItem *item = new QListViewItem(m_view->currentItem(), i18n("New Group"), ID);
+ QListViewItem *item = new TQListViewItem(m_view->currentItem(), i18n("New Group"), ID);
item->setRenameEnabled(0, true);
item->setPixmap(0, SmallIcon("folder"));
m_view->ensureItemVisible(item);
@@ -668,7 +668,7 @@ void KXmlCommandAdvancedDlg::slotAddOption()
opt->set("text", i18n("New Option"));
m_opts[ID] = opt;
- QListViewItem *item = new QListViewItem(m_view->currentItem(), i18n("New Option"), ID);
+ QListViewItem *item = new TQListViewItem(m_view->currentItem(), i18n("New Option"), ID);
item->setRenameEnabled(0, true);
item->setPixmap(0, SmallIcon("document"));
m_view->ensureItemVisible(item);
@@ -690,7 +690,7 @@ void KXmlCommandAdvancedDlg::slotRemoveItem()
}
}
-void KXmlCommandAdvancedDlg::removeItem(QListViewItem *item)
+void KXmlCommandAdvancedDlg::removeItem(TQListViewItem *item)
{
delete m_opts[item->text(1)];
m_opts.remove(item->text(1));
@@ -733,7 +733,7 @@ void KXmlCommandAdvancedDlg::slotMoveDown()
}
}
-void KXmlCommandAdvancedDlg::slotCommandChanged(const QString& cmd)
+void KXmlCommandAdvancedDlg::slotCommandChanged(const TQString& cmd)
{
m_inputfile->parentWidget()->setEnabled(cmd.find("%filterinput") != -1);
m_outputfile->parentWidget()->setEnabled(cmd.find("%filteroutput") != -1);
@@ -743,13 +743,13 @@ void KXmlCommandAdvancedDlg::slotCommandChanged(const QString& cmd)
m_view->setOpen(m_view->firstChild(), m_view->isEnabled());
}
-void KXmlCommandAdvancedDlg::slotValueSelected(QListViewItem *item)
+void KXmlCommandAdvancedDlg::slotValueSelected(TQListViewItem *item)
{
m_addval->setEnabled(m_type->currentItem() != 4 || m_values->childCount() < 2);
m_delval->setEnabled(item != 0);
}
-void KXmlCommandAdvancedDlg::slotOptionRenamed(QListViewItem *item, int)
+void KXmlCommandAdvancedDlg::slotOptionRenamed(TQListViewItem *item, int)
{
if (item && m_opts.contains(item->text(1)))
{
@@ -759,7 +759,7 @@ void KXmlCommandAdvancedDlg::slotOptionRenamed(QListViewItem *item, int)
}
}
-void KXmlCommandAdvancedDlg::recreateGroup(QListViewItem *item, DrGroup *grp)
+void KXmlCommandAdvancedDlg::recreateGroup(TQListViewItem *item, DrGroup *grp)
{
if (!item)
return;
@@ -787,7 +787,7 @@ void KXmlCommandAdvancedDlg::recreateGroup(QListViewItem *item, DrGroup *grp)
}
}
-bool KXmlCommandAdvancedDlg::editCommand(KXmlCommand *xmlcmd, QWidget *parent)
+bool KXmlCommandAdvancedDlg::editCommand(KXmlCommand *xmlcmd, TQWidget *parent)
{
if (!xmlcmd)
return false;
@@ -804,7 +804,7 @@ bool KXmlCommandAdvancedDlg::editCommand(KXmlCommand *xmlcmd, QWidget *parent)
xmlcmd->setIo(xmldlg->m_inputpipe->text(), true, true);
xmlcmd->setIo(xmldlg->m_outputfile->text(), false, false);
xmlcmd->setIo(xmldlg->m_outputpipe->text(), false, true);
- xmlcmd->setComment( xmldlg->m_comment->text().replace( QRegExp( "\n" ), " " ) );
+ xmlcmd->setComment( xmldlg->m_comment->text().replace( TQRegExp( "\n" ), " " ) );
// need to recreate the driver tree structure
DrMain *driver = (xmldlg->m_opts.contains("__root__") ? static_cast<DrMain*>(xmldlg->m_opts["__root__"]) : 0);
@@ -827,35 +827,35 @@ bool KXmlCommandAdvancedDlg::editCommand(KXmlCommand *xmlcmd, QWidget *parent)
//-----------------------------------------------------------------------------------------------------
-KXmlCommandDlg::KXmlCommandDlg(QWidget *parent, const char *name)
-: KDialogBase(parent, name, true, QString::null, Ok|Cancel|Details, Ok, true)
+KXmlCommandDlg::KXmlCommandDlg(TQWidget *parent, const char *name)
+: KDialogBase(parent, name, true, TQString::null, Ok|Cancel|Details, Ok, true)
{
setButtonText(Details, i18n("&Mime Type Settings"));
m_cmd = 0;
- QWidget *dummy = new QWidget(this, "TopDetail");
- QWidget *topmain = new QWidget(this, "TopMain");
+ QWidget *dummy = new TQWidget(this, "TopDetail");
+ QWidget *topmain = new TQWidget(this, "TopMain");
- QGroupBox *m_gb1 = new QGroupBox(0, Qt::Horizontal, i18n("Supported &Input Formats"), dummy);
- QGroupBox *m_gb2 = new QGroupBox(0, Qt::Horizontal, i18n("Requirements"), topmain);
+ QGroupBox *m_gb1 = new TQGroupBox(0, Qt::Horizontal, i18n("Supported &Input Formats"), dummy);
+ QGroupBox *m_gb2 = new TQGroupBox(0, Qt::Horizontal, i18n("Requirements"), topmain);
- m_description = new QLineEdit(topmain);
- m_idname = new QLabel(topmain);
+ m_description = new TQLineEdit(topmain);
+ m_idname = new TQLabel(topmain);
m_requirements = new KListView(m_gb2);
m_requirements->addColumn("");
m_requirements->header()->hide();
- m_addreq = new QToolButton(m_gb2);
+ m_addreq = new TQToolButton(m_gb2);
m_addreq->setIconSet(SmallIconSet("filenew"));
- m_removereq = new QToolButton(m_gb2);
+ m_removereq = new TQToolButton(m_gb2);
m_removereq->setIconSet(SmallIconSet("editdelete"));
QPushButton *m_edit = new KPushButton(KGuiItem(i18n("&Edit Command..."), "edit"), topmain);
- m_mimetype = new QComboBox(dummy);
+ m_mimetype = new TQComboBox(dummy);
m_availablemime = new KListBox(m_gb1);
m_selectedmime = new KListBox(m_gb1);
- m_addmime = new QToolButton(m_gb1);
- m_addmime->setIconSet(QApplication::reverseLayout()? SmallIconSet("forward") : SmallIconSet("back"));
- m_removemime = new QToolButton(m_gb1);
- m_removemime->setIconSet(QApplication::reverseLayout()? SmallIconSet("back" ) : SmallIconSet("forward"));
+ m_addmime = new TQToolButton(m_gb1);
+ m_addmime->setIconSet(TQApplication::reverseLayout()? SmallIconSet("forward") : SmallIconSet("back"));
+ m_removemime = new TQToolButton(m_gb1);
+ m_removemime->setIconSet(TQApplication::reverseLayout()? SmallIconSet("back" ) : SmallIconSet("forward"));
m_gb2->setMinimumWidth(380);
m_gb1->setMinimumHeight(180);
m_requirements->setMaximumHeight(80);
@@ -863,64 +863,64 @@ KXmlCommandDlg::KXmlCommandDlg(QWidget *parent, const char *name)
m_addmime->setEnabled(false);
m_removemime->setEnabled(false);
- QLabel *m_desclab = new QLabel(i18n("&Description:"), topmain);
+ QLabel *m_desclab = new TQLabel(i18n("&Description:"), topmain);
m_desclab->setBuddy(m_description);
- QLabel *m_mimetypelab = new QLabel(i18n("Output &format:"), dummy);
+ QLabel *m_mimetypelab = new TQLabel(i18n("Output &format:"), dummy);
m_mimetypelab->setBuddy(m_mimetype);
- QLabel *m_idnamelab = new QLabel(i18n("ID name:"), topmain);
+ QLabel *m_idnamelab = new TQLabel(i18n("ID name:"), topmain);
QFont f(m_idname->font());
f.setBold(true);
m_idname->setFont(f);
- KSeparator *sep1 = new KSeparator(QFrame::HLine, dummy);
+ KSeparator *sep1 = new KSeparator(TQFrame::HLine, dummy);
- QVBoxLayout *l0 = new QVBoxLayout(topmain, 0, 10);
- QGridLayout *l5 = new QGridLayout(0, 2, 2, 0, 5);
+ QVBoxLayout *l0 = new TQVBoxLayout(topmain, 0, 10);
+ QGridLayout *l5 = new TQGridLayout(0, 2, 2, 0, 5);
l0->addLayout(l5);
l5->addWidget(m_idnamelab, 0, 0);
l5->addWidget(m_idname, 0, 1);
l5->addWidget(m_desclab, 1, 0);
l5->addWidget(m_description, 1, 1);
l0->addWidget(m_gb2);
- QHBoxLayout *l3 = new QHBoxLayout(0, 0, 0);
+ QHBoxLayout *l3 = new TQHBoxLayout(0, 0, 0);
l0->addLayout(l3);
l3->addWidget(m_edit);
l3->addStretch(1);
- QVBoxLayout *l7 = new QVBoxLayout(dummy, 0, 10);
- QHBoxLayout *l6 = new QHBoxLayout(0, 0, 5);
+ QVBoxLayout *l7 = new TQVBoxLayout(dummy, 0, 10);
+ QHBoxLayout *l6 = new TQHBoxLayout(0, 0, 5);
l7->addWidget(sep1);
l7->addLayout(l6);
l6->addWidget(m_mimetypelab, 0);
l6->addWidget(m_mimetype, 1);
l7->addWidget(m_gb1);
- QGridLayout *l2 = new QGridLayout(m_gb1->layout(), 4, 3, 10);
+ QGridLayout *l2 = new TQGridLayout(m_gb1->layout(), 4, 3, 10);
l2->addMultiCellWidget(m_availablemime, 0, 3, 2, 2);
l2->addMultiCellWidget(m_selectedmime, 0, 3, 0, 0);
l2->addWidget(m_addmime, 1, 1);
l2->addWidget(m_removemime, 2, 1);
l2->setRowStretch(0, 1);
l2->setRowStretch(3, 1);
- QHBoxLayout *l4 = new QHBoxLayout(m_gb2->layout(), 10);
+ QHBoxLayout *l4 = new TQHBoxLayout(m_gb2->layout(), 10);
l4->addWidget(m_requirements);
- QVBoxLayout *l8 = new QVBoxLayout(0, 0, 0);
+ QVBoxLayout *l8 = new TQVBoxLayout(0, 0, 0);
l4->addLayout(l8);
l8->addWidget(m_addreq);
l8->addWidget(m_removereq);
l8->addStretch(1);
- connect(m_addmime, SIGNAL(clicked()), SLOT(slotAddMime()));
- connect(m_removemime, SIGNAL(clicked()), SLOT(slotRemoveMime()));
- connect(m_edit, SIGNAL(clicked()), SLOT(slotEditCommand()));
- connect(m_requirements, SIGNAL(selectionChanged(QListViewItem*)), SLOT(slotReqSelected(QListViewItem*)));
- connect(m_availablemime, SIGNAL(selectionChanged(QListBoxItem*)), SLOT(slotAvailableSelected(QListBoxItem*)));
- connect(m_selectedmime, SIGNAL(selectionChanged(QListBoxItem*)), SLOT(slotSelectedSelected(QListBoxItem*)));
- connect(m_addreq, SIGNAL(clicked()), SLOT(slotAddReq()));
- connect(m_removereq, SIGNAL(clicked()), SLOT(slotRemoveReq()));
+ connect(m_addmime, TQT_SIGNAL(clicked()), TQT_SLOT(slotAddMime()));
+ connect(m_removemime, TQT_SIGNAL(clicked()), TQT_SLOT(slotRemoveMime()));
+ connect(m_edit, TQT_SIGNAL(clicked()), TQT_SLOT(slotEditCommand()));
+ connect(m_requirements, TQT_SIGNAL(selectionChanged(TQListViewItem*)), TQT_SLOT(slotReqSelected(TQListViewItem*)));
+ connect(m_availablemime, TQT_SIGNAL(selectionChanged(TQListBoxItem*)), TQT_SLOT(slotAvailableSelected(TQListBoxItem*)));
+ connect(m_selectedmime, TQT_SIGNAL(selectionChanged(TQListBoxItem*)), TQT_SLOT(slotSelectedSelected(TQListBoxItem*)));
+ connect(m_addreq, TQT_SIGNAL(clicked()), TQT_SLOT(slotAddReq()));
+ connect(m_removereq, TQT_SIGNAL(clicked()), TQT_SLOT(slotRemoveReq()));
KMimeType::List list = KMimeType::allMimeTypes();
- for (QValueList<KMimeType::Ptr>::ConstIterator it=list.begin(); it!=list.end(); ++it)
+ for (TQValueList<KMimeType::Ptr>::ConstIterator it=list.begin(); it!=list.end(); ++it)
{
QString mimetype = (*it)->name();
m_mimelist << mimetype;
@@ -945,9 +945,9 @@ void KXmlCommandDlg::setCommand(KXmlCommand *xmlCmd)
m_requirements->clear();
QStringList list = xmlCmd->requirements();
QListViewItem *item(0);
- for (QStringList::ConstIterator it=list.begin(); it!=list.end(); ++it)
+ for (TQStringList::ConstIterator it=list.begin(); it!=list.end(); ++it)
{
- item = new QListViewItem(m_requirements, item, *it);
+ item = new TQListViewItem(m_requirements, item, *it);
item->setRenameEnabled(0, true);
}
@@ -961,7 +961,7 @@ void KXmlCommandDlg::setCommand(KXmlCommand *xmlCmd)
m_selectedmime->clear();
m_availablemime->clear();
m_availablemime->insertStringList(m_mimelist);
- for (QStringList::ConstIterator it=list.begin(); it!=list.end(); ++it)
+ for (TQStringList::ConstIterator it=list.begin(); it!=list.end(); ++it)
{
m_selectedmime->insertItem(*it);
delete m_availablemime->findItem(*it, Qt::ExactMatch);
@@ -972,7 +972,7 @@ void KXmlCommandDlg::slotOk()
{
if (m_cmd)
{
- m_cmd->setMimeType((m_mimetype->currentText() == "all/all" ? QString::null : m_mimetype->currentText()));
+ m_cmd->setMimeType((m_mimetype->currentText() == "all/all" ? TQString::null : m_mimetype->currentText()));
m_cmd->setDescription(m_description->text());
QStringList l;
QListViewItem *item = m_requirements->firstChild();
@@ -990,7 +990,7 @@ void KXmlCommandDlg::slotOk()
KDialogBase::slotOk();
}
-bool KXmlCommandDlg::editCommand(KXmlCommand *xmlCmd, QWidget *parent)
+bool KXmlCommandDlg::editCommand(KXmlCommand *xmlCmd, TQWidget *parent)
{
if (!xmlCmd)
return false;
@@ -1030,7 +1030,7 @@ void KXmlCommandDlg::slotEditCommand()
void KXmlCommandDlg::slotAddReq()
{
- QListViewItem *item = new QListViewItem(m_requirements, m_requirements->lastItem(), i18n("exec:/"));
+ QListViewItem *item = new TQListViewItem(m_requirements, m_requirements->lastItem(), i18n("exec:/"));
item->setRenameEnabled(0, true);
m_requirements->ensureItemVisible(item);
item->startRename(0);
@@ -1041,17 +1041,17 @@ void KXmlCommandDlg::slotRemoveReq()
delete m_requirements->currentItem();
}
-void KXmlCommandDlg::slotReqSelected(QListViewItem *item)
+void KXmlCommandDlg::slotReqSelected(TQListViewItem *item)
{
m_removereq->setEnabled(item);
}
-void KXmlCommandDlg::slotAvailableSelected(QListBoxItem *item)
+void KXmlCommandDlg::slotAvailableSelected(TQListBoxItem *item)
{
m_addmime->setEnabled(item);
}
-void KXmlCommandDlg::slotSelectedSelected(QListBoxItem *item)
+void KXmlCommandDlg::slotSelectedSelected(TQListBoxItem *item)
{
m_removemime->setEnabled(item);
}
diff --git a/kdeprint/management/kxmlcommanddlg.h b/kdeprint/management/kxmlcommanddlg.h
index 54bec2dfc..05dc133c2 100644
--- a/kdeprint/management/kxmlcommanddlg.h
+++ b/kdeprint/management/kxmlcommanddlg.h
@@ -20,9 +20,9 @@
#ifndef KXMLCOMMANDDLG_H
#define KXMLCOMMANDDLG_H
-#include <qwidget.h>
-#include <qmap.h>
-#include <qstringlist.h>
+#include <tqwidget.h>
+#include <tqmap.h>
+#include <tqstringlist.h>
#include <kdialogbase.h>
class KListView;
@@ -44,21 +44,21 @@ class KXmlCommandAdvancedDlg : public QWidget
{
Q_OBJECT
public:
- KXmlCommandAdvancedDlg(QWidget *parent = 0, const char *name = 0);
+ KXmlCommandAdvancedDlg(TQWidget *parent = 0, const char *name = 0);
~KXmlCommandAdvancedDlg();
void setCommand(KXmlCommand*);
- static bool editCommand(KXmlCommand *xmlcmd, QWidget *parent = 0);
+ static bool editCommand(KXmlCommand *xmlcmd, TQWidget *parent = 0);
protected:
- void parseGroupItem(DrGroup*, QListViewItem*);
+ void parseGroupItem(DrGroup*, TQListViewItem*);
void parseXmlCommand(KXmlCommand*);
- void viewItem(QListViewItem*);
- void removeItem(QListViewItem*);
- void recreateGroup(QListViewItem*, DrGroup*);
+ void viewItem(TQListViewItem*);
+ void removeItem(TQListViewItem*);
+ void recreateGroup(TQListViewItem*, DrGroup*);
protected slots:
- void slotSelectionChanged(QListViewItem*);
+ void slotSelectionChanged(TQListViewItem*);
void slotTypeChanged(int);
void slotAddValue();
void slotRemoveValue();
@@ -68,9 +68,9 @@ protected slots:
void slotRemoveItem();
void slotMoveUp();
void slotMoveDown();
- void slotCommandChanged(const QString&);
- void slotValueSelected(QListViewItem*);
- void slotOptionRenamed(QListViewItem*, int);
+ void slotCommandChanged(const TQString&);
+ void slotValueSelected(TQListViewItem*);
+ void slotOptionRenamed(TQListViewItem*, int);
void slotChanged();
private:
@@ -84,21 +84,21 @@ private:
QToolButton *m_apply, *m_addgrp, *m_addopt, *m_delopt, *m_up, *m_down;
QLineEdit *m_inputfile, *m_inputpipe, *m_outputfile, *m_outputpipe;
QToolButton *m_addval, *m_delval;
- QTextEdit *m_comment;
- QCheckBox *m_persistent;
+ TQTextEdit *m_comment;
+ TQCheckBox *m_persistent;
KXmlCommand *m_xmlcmd;
- QMap<QString, DrBase*> m_opts;
+ TQMap<TQString, DrBase*> m_opts;
};
class KXmlCommandDlg : public KDialogBase
{
Q_OBJECT
public:
- KXmlCommandDlg(QWidget *parent = 0, const char *name = 0);
+ KXmlCommandDlg(TQWidget *parent = 0, const char *name = 0);
void setCommand(KXmlCommand*);
- static bool editCommand(KXmlCommand*, QWidget *parent = 0);
+ static bool editCommand(KXmlCommand*, TQWidget *parent = 0);
protected slots:
void slotAddMime();
@@ -106,9 +106,9 @@ protected slots:
void slotEditCommand();
void slotAddReq();
void slotRemoveReq();
- void slotReqSelected(QListViewItem*);
- void slotAvailableSelected(QListBoxItem*);
- void slotSelectedSelected(QListBoxItem*);
+ void slotReqSelected(TQListViewItem*);
+ void slotAvailableSelected(TQListBoxItem*);
+ void slotSelectedSelected(TQListBoxItem*);
void slotOk();
private:
diff --git a/kdeprint/management/kxmlcommandselector.cpp b/kdeprint/management/kxmlcommandselector.cpp
index f0363e0b6..4e57b3922 100644
--- a/kdeprint/management/kxmlcommandselector.cpp
+++ b/kdeprint/management/kxmlcommandselector.cpp
@@ -22,13 +22,13 @@
#include "kxmlcommanddlg.h"
#include "kdeprintcheck.h"
-#include <qcombobox.h>
+#include <tqcombobox.h>
#include <kpushbutton.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qlineedit.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqlineedit.h>
#include <kinputdialog.h>
#include <klocale.h>
#include <kiconloader.h>
@@ -40,45 +40,45 @@
#include <kdatetbl.h>
#include <kdialogbase.h>
-KXmlCommandSelector::KXmlCommandSelector(bool canBeNull, QWidget *parent, const char *name, KDialogBase *dlg)
-: QWidget(parent, name)
+KXmlCommandSelector::KXmlCommandSelector(bool canBeNull, TQWidget *parent, const char *name, KDialogBase *dlg)
+: TQWidget(parent, name)
{
- m_cmd = new QComboBox(this);
- connect(m_cmd, SIGNAL(activated(int)), SLOT(slotCommandSelected(int)));
+ m_cmd = new TQComboBox(this);
+ connect(m_cmd, TQT_SIGNAL(activated(int)), TQT_SLOT(slotCommandSelected(int)));
QPushButton *m_add = new KPushButton(this);
QPushButton *m_edit = new KPushButton(this);
m_add->setPixmap(SmallIcon("filenew"));
m_edit->setPixmap(SmallIcon("configure"));
- connect(m_add, SIGNAL(clicked()), SLOT(slotAddCommand()));
- connect(m_edit, SIGNAL(clicked()), SLOT(slotEditCommand()));
- QToolTip::add(m_add, i18n("New command"));
- QToolTip::add(m_edit, i18n("Edit command"));
- m_shortinfo = new QLabel(this);
+ connect(m_add, TQT_SIGNAL(clicked()), TQT_SLOT(slotAddCommand()));
+ connect(m_edit, TQT_SIGNAL(clicked()), TQT_SLOT(slotEditCommand()));
+ TQToolTip::add(m_add, i18n("New command"));
+ TQToolTip::add(m_edit, i18n("Edit command"));
+ m_shortinfo = new TQLabel(this);
m_helpbtn = new KPushButton( this );
m_helpbtn->setIconSet( SmallIconSet( "help" ) );
- connect( m_helpbtn, SIGNAL( clicked() ), SLOT( slotHelpCommand() ) );
- QToolTip::add( m_helpbtn, i18n( "Information" ) );
+ connect( m_helpbtn, TQT_SIGNAL( clicked() ), TQT_SLOT( slotHelpCommand() ) );
+ TQToolTip::add( m_helpbtn, i18n( "Information" ) );
m_helpbtn->setEnabled( false );
m_line = 0;
m_usefilter = 0;
QPushButton *m_browse = 0;
- QVBoxLayout *l0 = new QVBoxLayout(this, 0, 10);
+ QVBoxLayout *l0 = new TQVBoxLayout(this, 0, 10);
if (canBeNull)
{
- m_line = new QLineEdit(this);
+ m_line = new TQLineEdit(this);
m_browse = new KPushButton(KGuiItem(i18n("&Browse..."), "fileopen"), this);
- m_usefilter = new QCheckBox(i18n("Use co&mmand:"), this);
- connect(m_browse, SIGNAL(clicked()), SLOT(slotBrowse()));
- connect(m_usefilter, SIGNAL(toggled(bool)), m_line, SLOT(setDisabled(bool)));
- connect(m_usefilter, SIGNAL(toggled(bool)), m_browse, SLOT(setDisabled(bool)));
- connect(m_usefilter, SIGNAL(toggled(bool)), m_cmd, SLOT(setEnabled(bool)));
- connect(m_usefilter, SIGNAL(toggled(bool)), m_add, SLOT(setEnabled(bool)));
- connect(m_usefilter, SIGNAL(toggled(bool)), m_edit, SLOT(setEnabled(bool)));
- connect(m_usefilter, SIGNAL(toggled(bool)), m_shortinfo, SLOT(setEnabled(bool)));
- connect( m_usefilter, SIGNAL( toggled( bool ) ), SLOT( slotXmlCommandToggled( bool ) ) );
+ m_usefilter = new TQCheckBox(i18n("Use co&mmand:"), this);
+ connect(m_browse, TQT_SIGNAL(clicked()), TQT_SLOT(slotBrowse()));
+ connect(m_usefilter, TQT_SIGNAL(toggled(bool)), m_line, TQT_SLOT(setDisabled(bool)));
+ connect(m_usefilter, TQT_SIGNAL(toggled(bool)), m_browse, TQT_SLOT(setDisabled(bool)));
+ connect(m_usefilter, TQT_SIGNAL(toggled(bool)), m_cmd, TQT_SLOT(setEnabled(bool)));
+ connect(m_usefilter, TQT_SIGNAL(toggled(bool)), m_add, TQT_SLOT(setEnabled(bool)));
+ connect(m_usefilter, TQT_SIGNAL(toggled(bool)), m_edit, TQT_SLOT(setEnabled(bool)));
+ connect(m_usefilter, TQT_SIGNAL(toggled(bool)), m_shortinfo, TQT_SLOT(setEnabled(bool)));
+ connect( m_usefilter, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( slotXmlCommandToggled( bool ) ) );
m_usefilter->setChecked(true);
m_usefilter->setChecked(false);
//setFocusProxy(m_line);
@@ -86,7 +86,7 @@ KXmlCommandSelector::KXmlCommandSelector(bool canBeNull, QWidget *parent, const
setTabOrder(m_cmd, m_add);
setTabOrder(m_add, m_edit);
- QHBoxLayout *l1 = new QHBoxLayout(0, 0, 10);
+ QHBoxLayout *l1 = new TQHBoxLayout(0, 0, 10);
l0->addLayout(l1);
l1->addWidget(m_line);
l1->addWidget(m_browse);
@@ -97,7 +97,7 @@ KXmlCommandSelector::KXmlCommandSelector(bool canBeNull, QWidget *parent, const
else
setFocusProxy(m_cmd);
- QGridLayout *l2 = new QGridLayout(0, 2, (m_usefilter?3:2), 0, 5);
+ QGridLayout *l2 = new TQGridLayout(0, 2, (m_usefilter?3:2), 0, 5);
int c(0);
l0->addLayout(l2);
if (m_usefilter)
@@ -105,31 +105,31 @@ KXmlCommandSelector::KXmlCommandSelector(bool canBeNull, QWidget *parent, const
l2->addWidget(m_usefilter, 0, c++);
}
l2->addWidget(m_cmd, 0, c);
- QHBoxLayout *l4 = new QHBoxLayout( 0, 0, 5 );
+ TQHBoxLayout *l4 = new TQHBoxLayout( 0, 0, 5 );
l2->addLayout( l4, 1, c );
l4->addWidget( m_helpbtn, 0 );
l4->addWidget( m_shortinfo, 1 );
- QHBoxLayout *l3 = new QHBoxLayout(0, 0, 0);
+ QHBoxLayout *l3 = new TQHBoxLayout(0, 0, 0);
l2->addLayout(l3, 0, c+1);
l3->addWidget(m_add);
l3->addWidget(m_edit);
if ( dlg )
- connect( this, SIGNAL( commandValid( bool ) ), dlg, SLOT( enableButtonOK( bool ) ) );
+ connect( this, TQT_SIGNAL( commandValid( bool ) ), dlg, TQT_SLOT( enableButtonOK( bool ) ) );
loadCommands();
}
void KXmlCommandSelector::loadCommands()
{
- QString thisCmd = (m_cmd->currentItem() != -1 ? m_cmdlist[m_cmd->currentItem()] : QString::null);
+ QString thisCmd = (m_cmd->currentItem() != -1 ? m_cmdlist[m_cmd->currentItem()] : TQString::null);
m_cmd->clear();
m_cmdlist.clear();
QStringList list = KXmlCommandManager::self()->commandListWithDescription();
QStringList desclist;
- for (QStringList::Iterator it=list.begin(); it!=list.end(); ++it)
+ for (TQStringList::Iterator it=list.begin(); it!=list.end(); ++it)
{
m_cmdlist << (*it);
++it;
@@ -144,7 +144,7 @@ void KXmlCommandSelector::loadCommands()
slotCommandSelected(m_cmd->currentItem());
}
-QString KXmlCommandSelector::command() const
+TQString KXmlCommandSelector::command() const
{
QString cmd;
if (m_line && !m_usefilter->isChecked())
@@ -154,14 +154,14 @@ QString KXmlCommandSelector::command() const
return cmd;
}
-void KXmlCommandSelector::setCommand(const QString& cmd)
+void KXmlCommandSelector::setCommand(const TQString& cmd)
{
int index = m_cmdlist.findIndex(cmd);
if (m_usefilter)
m_usefilter->setChecked(index != -1);
if (m_line)
- m_line->setText((index == -1 ? cmd : QString::null));
+ m_line->setText((index == -1 ? cmd : TQString::null));
if (index != -1)
m_cmd->setCurrentItem(index);
if (m_cmd->currentItem() != -1 && m_cmd->isEnabled())
@@ -171,7 +171,7 @@ void KXmlCommandSelector::setCommand(const QString& cmd)
void KXmlCommandSelector::slotAddCommand()
{
bool ok(false);
- QString cmdId = KInputDialog::getText(i18n("Command Name"), i18n("Enter an identification name for the new command:"), QString::null, &ok, this);
+ QString cmdId = KInputDialog::getText(i18n("Command Name"), i18n("Enter an identification name for the new command:"), TQString::null, &ok, this);
if (ok)
{
bool added(true);
@@ -182,7 +182,7 @@ void KXmlCommandSelector::slotAddCommand()
this,
i18n("A command named %1 already exists. Do you want "
"to continue and edit the existing one?").arg(cmdId),
- QString::null,
+ TQString::null,
KStdGuiItem::cont()) == KMessageBox::Cancel)
{
return;
@@ -222,7 +222,7 @@ void KXmlCommandSelector::slotEditCommand()
void KXmlCommandSelector::slotBrowse()
{
- QString filename = KFileDialog::getOpenFileName(QString::null, QString::null, this);
+ QString filename = KFileDialog::getOpenFileName(TQString::null, TQString::null, this);
if (!filename.isEmpty() && m_line)
m_line->setText(filename);
}
@@ -232,10 +232,10 @@ void KXmlCommandSelector::slotCommandSelected(int ID)
KXmlCommand *xmlCmd = KXmlCommandManager::self()->loadCommand(m_cmdlist[ID], true);
if (xmlCmd)
{
- QString msg;
+ TQString msg;
if ( xmlCmd->isValid() && KdeprintChecker::check( xmlCmd->requirements() ) )
{
- msg = QString::fromLocal8Bit("(ID = %1, %2 = ").arg(xmlCmd->name()).arg(i18n("output"));
+ msg = TQString::fromLocal8Bit("(ID = %1, %2 = ").arg(xmlCmd->name()).arg(i18n("output"));
if (KXmlCommandManager::self()->checkCommand(xmlCmd->name(), KXmlCommandManager::None, KXmlCommandManager::Basic))
{
if (xmlCmd->mimeType() == "all/all")
@@ -267,7 +267,7 @@ void KXmlCommandSelector::slotXmlCommandToggled( bool on )
else
{
emit commandValid( true );
- m_shortinfo->setText( QString::null );
+ m_shortinfo->setText( TQString::null );
}
}
@@ -277,7 +277,7 @@ void KXmlCommandSelector::slotHelpCommand()
KActiveLabel *lab = new KActiveLabel( m_help, pop );
lab->resize( lab->sizeHint() );
pop->setMainWidget( lab );
- pop->exec( m_helpbtn->mapToGlobal( QPoint( m_helpbtn->width(), 0 ) ) );
+ pop->exec( m_helpbtn->mapToGlobal( TQPoint( m_helpbtn->width(), 0 ) ) );
pop->close( 0 );
delete pop;
}
diff --git a/kdeprint/management/kxmlcommandselector.h b/kdeprint/management/kxmlcommandselector.h
index b0d67284e..23ded759b 100644
--- a/kdeprint/management/kxmlcommandselector.h
+++ b/kdeprint/management/kxmlcommandselector.h
@@ -20,8 +20,8 @@
#ifndef KXMLCOMMANDSELECTOR_H
#define KXMLCOMMANDSELECTOR_H
-#include <qwidget.h>
-#include <qstringlist.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
#include <kdelibs_export.h>
@@ -36,10 +36,10 @@ class KDEPRINT_EXPORT KXmlCommandSelector : public QWidget
{
Q_OBJECT
public:
- KXmlCommandSelector(bool canBeNull = true, QWidget *parent = 0, const char *name = 0, KDialogBase *dlg = 0);
+ KXmlCommandSelector(bool canBeNull = true, TQWidget *parent = 0, const char *name = 0, KDialogBase *dlg = 0);
- void setCommand(const QString&);
- QString command() const;
+ void setCommand(const TQString&);
+ TQString command() const;
protected:
void loadCommands();
@@ -61,8 +61,8 @@ private:
QCheckBox *m_usefilter;
QStringList m_cmdlist;
QLabel *m_shortinfo;
- QPushButton *m_helpbtn;
- QString m_help;
+ TQPushButton *m_helpbtn;
+ TQString m_help;
};
#endif
diff --git a/kdeprint/management/networkscanner.cpp b/kdeprint/management/networkscanner.cpp
index ae99c4fa4..41b368ab0 100644
--- a/kdeprint/management/networkscanner.cpp
+++ b/kdeprint/management/networkscanner.cpp
@@ -21,15 +21,15 @@
#include "networkscanner.h"
-#include <qprogressbar.h>
+#include <tqprogressbar.h>
#include <kpushbutton.h>
-#include <qlayout.h>
-#include <qtimer.h>
-#include <qlabel.h>
-#include <qcombobox.h>
-#include <qlineedit.h>
-#include <qregexp.h>
-#include <qsocket.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
+#include <tqlineedit.h>
+#include <tqregexp.h>
+#include <tqsocket.h>
#include <klocale.h>
#include <kextendedsocket.h>
#include <kmessagebox.h>
@@ -41,18 +41,18 @@ class NetworkScanner::NetworkScannerPrivate
{
public:
int port;
- QString prefixaddress;
+ TQString prefixaddress;
int currentaddress;
int timeout;
bool scanning;
- QPtrList<NetworkScanner::SocketInfo> printers;
+ TQPtrList<NetworkScanner::SocketInfo> printers;
- QProgressBar *bar;
+ TQProgressBar *bar;
KPushButton *scan, *settings;
- QLabel *subnetlab;
- QTimer *timer;
+ TQLabel *subnetlab;
+ TQTimer *timer;
#ifdef USE_QSOCKET
- QSocket *socket;
+ TQSocket *socket;
#else
KExtendedSocket *socket;
#endif
@@ -65,17 +65,17 @@ public:
scanning = false;
printers.setAutoDelete( true );
}
- QString localPrefix();
- QString scanString();
+ TQString localPrefix();
+ TQString scanString();
};
-QString NetworkScanner::NetworkScannerPrivate::localPrefix()
+TQString NetworkScanner::NetworkScannerPrivate::localPrefix()
{
char buf[256];
buf[0] = '\0';
if (!gethostname(buf, sizeof(buf)))
buf[sizeof(buf)-1] = '\0';
- QPtrList<KAddressInfo> infos = KExtendedSocket::lookup(buf, QString::null);
+ TQPtrList<KAddressInfo> infos = KExtendedSocket::lookup(buf, TQString::null);
infos.setAutoDelete(true);
if (infos.count() > 0)
{
@@ -84,49 +84,49 @@ QString NetworkScanner::NetworkScannerPrivate::localPrefix()
IPstr.truncate(p);
return IPstr;
}
- return QString::null;
+ return TQString::null;
}
-QString NetworkScanner::NetworkScannerPrivate::scanString()
+TQString NetworkScanner::NetworkScannerPrivate::scanString()
{
- QString s = prefixaddress + ".*";
+ TQString s = prefixaddress + ".*";
if ( port != -1 )
- s.append( ":" ).append( QString::number( port ) );
+ s.append( ":" ).append( TQString::number( port ) );
return s;
}
-NetworkScanner::NetworkScanner( int port, QWidget *parent, const char *name )
- : QWidget( parent, name )
+NetworkScanner::NetworkScanner( int port, TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
d = new NetworkScannerPrivate( port );
- d->bar = new QProgressBar( 256, this );
+ d->bar = new TQProgressBar( 256, this );
d->settings = new KPushButton( KGuiItem( i18n( "&Settings" ), "configure" ), this );
d->scan = new KPushButton( KGuiItem( i18n( "Sc&an" ), "viewmag" ), this );
- d->timer = new QTimer( this );
+ d->timer = new TQTimer( this );
#ifdef USE_QSOCKET
- d->socket = new QSocket( this );
+ d->socket = new TQSocket( this );
#else
d->socket = new KExtendedSocket();
#endif
- QLabel *label = new QLabel( i18n( "Network scan:" ), this );
- d->subnetlab = new QLabel( i18n( "Subnet: %1" ).arg( d->scanString() ), this );
+ TQLabel *label = new TQLabel( i18n( "Network scan:" ), this );
+ d->subnetlab = new TQLabel( i18n( "Subnet: %1" ).arg( d->scanString() ), this );
- QGridLayout *l0 = new QGridLayout( this, 4, 2, 0, 10 );
+ TQGridLayout *l0 = new TQGridLayout( this, 4, 2, 0, 10 );
l0->addMultiCellWidget( label, 0, 0, 0, 1 );
l0->addMultiCellWidget( d->bar, 1, 1, 0, 1 );
l0->addMultiCellWidget( d->subnetlab, 2, 2, 0, 1 );
l0->addWidget( d->settings, 3, 0 );
l0->addWidget( d->scan, 3, 1 );
- connect( d->timer, SIGNAL( timeout() ), SLOT( slotTimeout() ) );
- connect( d->settings, SIGNAL( clicked() ), SLOT( slotSettingsClicked() ) );
- connect( d->scan, SIGNAL( clicked() ), SLOT( slotScanClicked() ) );
+ connect( d->timer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotTimeout() ) );
+ connect( d->settings, TQT_SIGNAL( clicked() ), TQT_SLOT( slotSettingsClicked() ) );
+ connect( d->scan, TQT_SIGNAL( clicked() ), TQT_SLOT( slotScanClicked() ) );
#ifdef USE_QSOCKET
- connect( d->socket, SIGNAL( connected() ), SLOT( slotConnectionSuccess() ) );
- connect( d->socket, SIGNAL( error( int ) ), SLOT( slotConnectionFailed( int ) ) );
+ connect( d->socket, TQT_SIGNAL( connected() ), TQT_SLOT( slotConnectionSuccess() ) );
+ connect( d->socket, TQT_SIGNAL( error( int ) ), TQT_SLOT( slotConnectionFailed( int ) ) );
#else
- connect( d->socket, SIGNAL( connectionSuccess() ), SLOT( slotConnectionSuccess() ) );
- connect( d->socket, SIGNAL( connectionFailed( int ) ), SLOT( slotConnectionFailed( int ) ) );
+ connect( d->socket, TQT_SIGNAL( connectionSuccess() ), TQT_SLOT( slotConnectionSuccess() ) );
+ connect( d->socket, TQT_SIGNAL( connectionFailed( int ) ), TQT_SLOT( slotConnectionFailed( int ) ) );
#endif
}
@@ -161,7 +161,7 @@ void NetworkScanner::slotScanClicked()
i18n( "You are about to scan a subnet (%1.*) that does not "
"correspond to the current subnet of this computer (%2.*). Do you want "
"to scan the specified subnet anyway?" ).arg( d->prefixaddress ).arg( d->localPrefix() ),
- QString::null, KGuiItem( i18n( "&Scan" ), "viewmag" ), "askForScan" ) == KMessageBox::Continue )
+ TQString::null, KGuiItem( i18n( "&Scan" ), "viewmag" ), "askForScan" ) == KMessageBox::Continue )
start();
}
else
@@ -200,10 +200,10 @@ void NetworkScanner::slotNext()
d->timer->stop();
#ifdef USE_QSOCKET
- d->socket->connectToHost( d->prefixaddress + "." + QString::number( d->currentaddress ), d->port );
+ d->socket->connectToHost( d->prefixaddress + "." + TQString::number( d->currentaddress ), d->port );
kdDebug() << "Address: " << d->socket->peerName() << ", Port: " << d->socket->peerPort() << endl;
#else
- d->socket->setAddress( d->prefixaddress + "." + QString::number( d->currentaddress ), d->port );
+ d->socket->setAddress( d->prefixaddress + "." + TQString::number( d->currentaddress ), d->port );
d->socket->startAsyncLookup();
kdDebug() << "Address: " << d->socket->host() << ", Port: " << d->socket->port() << endl;
#endif
@@ -219,7 +219,7 @@ void NetworkScanner::next()
else
{
d->bar->setProgress( d->currentaddress );
- QTimer::singleShot( 0, this, SLOT( slotNext() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotNext() ) );
}
}
@@ -245,7 +245,7 @@ void NetworkScanner::slotConnectionSuccess()
#else
KSocketAddress *addr = const_cast<KSocketAddress*>( d->socket->peerAddress() );
#endif
- kdDebug() << "Connection success: " << ( addr ? addr->pretty() : QString( "ERROR" ) ) << endl;
+ kdDebug() << "Connection success: " << ( addr ? addr->pretty() : TQString( "ERROR" ) ) << endl;
kdDebug() << "Socket: " << d->socket->socket() << endl;
if ( addr )
{
@@ -256,7 +256,7 @@ void NetworkScanner::slotConnectionSuccess()
info->IP = d->socket->host();
#endif
info->Port = d->port;
- QString portname;
+ TQString portname;
KExtendedSocket::resolve( addr, info->Name, portname );
d->printers.append( info );
d->socket->close();
@@ -273,7 +273,7 @@ void NetworkScanner::slotConnectionFailed( int )
next();
}
-const QPtrList<NetworkScanner::SocketInfo>* NetworkScanner::printerList()
+const TQPtrList<NetworkScanner::SocketInfo>* NetworkScanner::printerList()
{
return &( d->printers );
}
@@ -288,12 +288,12 @@ void NetworkScanner::setTimeout( int to )
d->timeout = to;
}
-QString NetworkScanner::subnet() const
+TQString NetworkScanner::subnet() const
{
return d->prefixaddress;
}
-void NetworkScanner::setSubnet( const QString& sn )
+void NetworkScanner::setSubnet( const TQString& sn )
{
d->prefixaddress = sn;
d->subnetlab->setText( i18n( "Subnet: %1" ).arg( d->scanString() ) );
@@ -310,10 +310,10 @@ void NetworkScanner::setPort( int p )
d->subnetlab->setText( i18n( "Subnet: %1" ).arg( d->scanString() ) );
}
-bool NetworkScanner::checkPrinter( const QString& host, int port )
+bool NetworkScanner::checkPrinter( const TQString& host, int port )
{
// try first to find it in the SocketInfo list
- QPtrListIterator<NetworkScanner::SocketInfo> it( d->printers );
+ TQPtrListIterator<NetworkScanner::SocketInfo> it( d->printers );
for ( ; it.current(); ++it )
{
if ( port == it.current()->Port && ( host == it.current()->IP ||
@@ -329,26 +329,26 @@ bool NetworkScanner::checkPrinter( const QString& host, int port )
}
NetworkScannerConfig::NetworkScannerConfig(NetworkScanner *scanner, const char *name)
- : KDialogBase(scanner, name, true, QString::null, Ok|Cancel, Ok, true)
+ : KDialogBase(scanner, name, true, TQString::null, Ok|Cancel, Ok, true)
{
scanner_ = scanner;
- QWidget *dummy = new QWidget(this);
+ QWidget *dummy = new TQWidget(this);
setMainWidget(dummy);
KIntValidator *val = new KIntValidator( this );
- QLabel *masklabel = new QLabel(i18n("&Subnetwork:"),dummy);
- QLabel *portlabel = new QLabel(i18n("&Port:"),dummy);
- QLabel *toutlabel = new QLabel(i18n("&Timeout (ms):"),dummy);
- QLineEdit *mm = new QLineEdit(dummy);
- mm->setText(QString::fromLatin1(".[0-255]"));
+ QLabel *masklabel = new TQLabel(i18n("&Subnetwork:"),dummy);
+ QLabel *portlabel = new TQLabel(i18n("&Port:"),dummy);
+ QLabel *toutlabel = new TQLabel(i18n("&Timeout (ms):"),dummy);
+ QLineEdit *mm = new TQLineEdit(dummy);
+ mm->setText(TQString::fromLatin1(".[0-255]"));
mm->setReadOnly(true);
mm->setFixedWidth(fontMetrics().width(mm->text())+10);
- mask_ = new QLineEdit(dummy);
+ mask_ = new TQLineEdit(dummy);
mask_->setAlignment(Qt::AlignRight);
- port_ = new QComboBox(true,dummy);
+ port_ = new TQComboBox(true,dummy);
if ( port_->lineEdit() )
port_->lineEdit()->setValidator( val );
- tout_ = new QLineEdit(dummy);
+ tout_ = new TQLineEdit(dummy);
tout_->setValidator( val );
masklabel->setBuddy(mask_);
@@ -360,11 +360,11 @@ NetworkScannerConfig::NetworkScannerConfig(NetworkScanner *scanner, const char *
port_->insertItem("9100");
port_->insertItem("9101");
port_->insertItem("9102");
- port_->setEditText(QString::number(scanner_->port()));
- tout_->setText(QString::number(scanner_->timeout()));
+ port_->setEditText(TQString::number(scanner_->port()));
+ tout_->setText(TQString::number(scanner_->timeout()));
- QGridLayout *main_ = new QGridLayout(dummy, 3, 2, 0, 10);
- QHBoxLayout *lay1 = new QHBoxLayout(0, 0, 5);
+ QGridLayout *main_ = new TQGridLayout(dummy, 3, 2, 0, 10);
+ QHBoxLayout *lay1 = new TQHBoxLayout(0, 0, 5);
main_->addWidget(masklabel, 0, 0);
main_->addWidget(portlabel, 1, 0);
main_->addWidget(toutlabel, 2, 0);
diff --git a/kdeprint/management/networkscanner.h b/kdeprint/management/networkscanner.h
index 2877a7596..5919990e4 100644
--- a/kdeprint/management/networkscanner.h
+++ b/kdeprint/management/networkscanner.h
@@ -20,9 +20,9 @@
#ifndef NETWORKSCANNER_H
#define NETWORKSCANNER_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdialogbase.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
class KDEPRINT_EXPORT NetworkScanner : public QWidget
@@ -30,25 +30,25 @@ class KDEPRINT_EXPORT NetworkScanner : public QWidget
Q_OBJECT
public:
- NetworkScanner( int port = 9100, QWidget *parent = 0, const char *name = 0 );
+ NetworkScanner( int port = 9100, TQWidget *parent = 0, const char *name = 0 );
~NetworkScanner();
struct SocketInfo
{
- QString IP;
- QString Name;
+ TQString IP;
+ TQString Name;
int Port;
};
- const QPtrList<NetworkScanner::SocketInfo>* printerList();
+ const TQPtrList<NetworkScanner::SocketInfo>* printerList();
int timeout() const;
void setTimeout( int to );
- QString subnet() const;
- void setSubnet( const QString& );
+ TQString subnet() const;
+ void setSubnet( const TQString& );
int port() const;
void setPort( int );
- bool checkPrinter( const QString&, int );
+ bool checkPrinter( const TQString&, int );
signals:
void scanStarted();
diff --git a/kdeprint/management/pluginaction.cpp b/kdeprint/management/pluginaction.cpp
index e03f8c4da..d876601e7 100644
--- a/kdeprint/management/pluginaction.cpp
+++ b/kdeprint/management/pluginaction.cpp
@@ -20,10 +20,10 @@
#include "pluginaction.h"
// automatically connect to "pluginActionActived(int)" in the receiver.
-PluginAction::PluginAction(int ID, const QString& txt, const QString& icon, int accel, QObject *parent, const char *name)
+PluginAction::PluginAction(int ID, const TQString& txt, const TQString& icon, int accel, TQObject *parent, const char *name)
: KAction(txt, icon, accel, parent, name), m_id(ID)
{
- connect(this, SIGNAL(activated()), SLOT(slotActivated()));
+ connect(this, TQT_SIGNAL(activated()), TQT_SLOT(slotActivated()));
}
void PluginAction::slotActivated()
diff --git a/kdeprint/management/pluginaction.h b/kdeprint/management/pluginaction.h
index f0addad4b..c39f5f700 100644
--- a/kdeprint/management/pluginaction.h
+++ b/kdeprint/management/pluginaction.h
@@ -27,7 +27,7 @@ class KDEPRINT_EXPORT PluginAction : public KAction
Q_OBJECT
public:
- PluginAction(int ID, const QString& txt, const QString& icon, int accel, QObject *parent = 0, const char *name = 0);
+ PluginAction(int ID, const TQString& txt, const TQString& icon, int accel, TQObject *parent = 0, const char *name = 0);
signals:
void activated(int);
diff --git a/kdeprint/management/sidepixmap.cpp b/kdeprint/management/sidepixmap.cpp
index 6469b935d..99a1e6198 100644
--- a/kdeprint/management/sidepixmap.cpp
+++ b/kdeprint/management/sidepixmap.cpp
@@ -19,20 +19,20 @@
#include "sidepixmap.h"
-#include <qpainter.h>
+#include <tqpainter.h>
#include <kstandarddirs.h>
-SidePixmap::SidePixmap(QWidget *parent, const char *name)
-: QFrame(parent, name)
+SidePixmap::SidePixmap(TQWidget *parent, const char *name)
+: TQFrame(parent, name)
{
setLineWidth(1);
- setFrameStyle(QFrame::WinPanel|QFrame::Sunken);
+ setFrameStyle(TQFrame::WinPanel|TQFrame::Sunken);
m_side.load(locate("data", "kdeprint/side.png"));
m_tileup.load(locate("data", "kdeprint/tileup.png"));
m_tiledown.load(locate("data", "kdeprint/tiledown.png"));
- setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Minimum));
+ setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Minimum));
}
bool SidePixmap::isValid()
@@ -42,12 +42,12 @@ bool SidePixmap::isValid()
&& (m_side.width() == m_tiledown.width()));
}
-QSize SidePixmap::sizeHint() const
+TQSize SidePixmap::sizeHint() const
{
- return (QSize(m_side.width()+lineWidth(), 300+lineWidth()));
+ return (TQSize(m_side.width()+lineWidth(), 300+lineWidth()));
}
-void SidePixmap::drawContents(QPainter *p)
+void SidePixmap::drawContents(TQPainter *p)
{
QRect r = contentsRect();
if (r.height() <= m_side.height())
diff --git a/kdeprint/management/sidepixmap.h b/kdeprint/management/sidepixmap.h
index 48bfebf47..33db2275c 100644
--- a/kdeprint/management/sidepixmap.h
+++ b/kdeprint/management/sidepixmap.h
@@ -20,20 +20,20 @@
#ifndef SIDEPIXMAP_H
#define SIDEPIXMAP_H
-#include <qframe.h>
-#include <qpixmap.h>
+#include <tqframe.h>
+#include <tqpixmap.h>
#include <kdelibs_export.h>
class KDEPRINT_EXPORT SidePixmap : public QFrame
{
public:
- SidePixmap(QWidget *parent = 0, const char *name = 0);
- QSize sizeHint() const;
+ SidePixmap(TQWidget *parent = 0, const char *name = 0);
+ TQSize sizeHint() const;
bool isValid();
protected:
- void drawContents(QPainter*);
+ void drawContents(TQPainter*);
private:
QPixmap m_side, m_tileup, m_tiledown;
diff --git a/kdeprint/management/smbview.cpp b/kdeprint/management/smbview.cpp
index 6cf5ee4c8..127a42e76 100644
--- a/kdeprint/management/smbview.cpp
+++ b/kdeprint/management/smbview.cpp
@@ -21,8 +21,8 @@
#include <kprocess.h>
#include <ktempfile.h>
-#include <qheader.h>
-#include <qapplication.h>
+#include <tqheader.h>
+#include <tqapplication.h>
#include <kiconloader.h>
#include <klocale.h>
@@ -30,19 +30,19 @@
#include <kmessagebox.h>
#include <kcursor.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
#include <cstdlib>
//*********************************************************************************************
-SmbView::SmbView(QWidget *parent, const char *name)
+SmbView::SmbView(TQWidget *parent, const char *name)
: KListView(parent,name)
{
addColumn(i18n("Printer"));
addColumn(i18n("Comment"));
- setFrameStyle(QFrame::WinPanel|QFrame::Sunken);
+ setFrameStyle(TQFrame::WinPanel|TQFrame::Sunken);
setLineWidth(1);
setAllColumnsShowFocus(true);
setRootIsDecorated(true);
@@ -52,9 +52,9 @@ SmbView::SmbView(QWidget *parent, const char *name)
m_proc = new KProcess();
m_proc->setUseShell(true);
m_passwdFile = 0;
- connect(m_proc,SIGNAL(processExited(KProcess*)),SLOT(slotProcessExited(KProcess*)));
- connect(m_proc,SIGNAL(receivedStdout(KProcess*,char*,int)),SLOT(slotReceivedStdout(KProcess*,char*,int)));
- connect(this,SIGNAL(selectionChanged(QListViewItem*)),SLOT(slotSelectionChanged(QListViewItem*)));
+ connect(m_proc,TQT_SIGNAL(processExited(KProcess*)),TQT_SLOT(slotProcessExited(KProcess*)));
+ connect(m_proc,TQT_SIGNAL(receivedStdout(KProcess*,char*,int)),TQT_SLOT(slotReceivedStdout(KProcess*,char*,int)));
+ connect(this,TQT_SIGNAL(selectionChanged(TQListViewItem*)),TQT_SLOT(slotSelectionChanged(TQListViewItem*)));
}
SmbView::~SmbView()
@@ -63,7 +63,7 @@ SmbView::~SmbView()
delete m_passwdFile;
}
-void SmbView::setLoginInfos(const QString& login, const QString& password)
+void SmbView::setLoginInfos(const TQString& login, const TQString& password)
{
m_login = login;
m_password = password;
@@ -77,7 +77,7 @@ void SmbView::setLoginInfos(const QString& login, const QString& password)
m_passwdFile = new KTempFile;
m_passwdFile->setAutoDelete(true);
- QTextStream *passwdFile = m_passwdFile->textStream();
+ TQTextStream *passwdFile = m_passwdFile->textStream();
if (!passwdFile) return; // Error
(*passwdFile) << "username = " << m_login << endl;
(*passwdFile) << "password = " << m_password << endl;
@@ -88,9 +88,9 @@ void SmbView::setLoginInfos(const QString& login, const QString& password)
void SmbView::startProcess(int state)
{
- m_buffer = QString::null;
+ m_buffer = TQString::null;
m_state = state;
- QApplication::setOverrideCursor(KCursor::waitCursor());
+ TQApplication::setOverrideCursor(KCursor::waitCursor());
m_proc->start(KProcess::NotifyOnExit,KProcess::Stdout);
emit running(true);
}
@@ -112,7 +112,7 @@ void SmbView::endProcess()
break;
}
m_state = Idle;
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
emit running(false);
// clean up for future usage
m_proc->clearArguments();
@@ -125,24 +125,24 @@ void SmbView::slotProcessExited(KProcess*)
void SmbView::slotReceivedStdout(KProcess*, char *buf, int len)
{
- m_buffer.append(QString::fromLocal8Bit(buf,len));
+ m_buffer.append(TQString::fromLocal8Bit(buf,len));
}
void SmbView::init()
{
// Open Samba configuration file and check if a WINS server is defined
- m_wins_server = QString::null;
- QString wins_keyword("wins server");
- QFile smb_conf ("/etc/samba/smb.conf");
+ m_wins_server = TQString::null;
+ TQString wins_keyword("wins server");
+ TQFile smb_conf ("/etc/samba/smb.conf");
if (smb_conf.exists () && smb_conf.open (IO_ReadOnly))
{
- QTextStream smb_stream (&smb_conf);
+ TQTextStream smb_stream (&smb_conf);
while (!smb_stream.atEnd ())
{
- QString smb_line = smb_stream.readLine ();
+ TQString smb_line = smb_stream.readLine ();
if (smb_line.contains (wins_keyword, FALSE) > 0)
{
- QString key = smb_line.section ('=', 0, 0);
+ TQString key = smb_line.section ('=', 0, 0);
key = key.stripWhiteSpace();
if (key.lower() == wins_keyword)
{
@@ -164,13 +164,13 @@ void SmbView::init()
smb_conf.close ();
}
m_wins_server = m_wins_server.isEmpty ()? " " : " -U " + m_wins_server + " ";
- QString cmd ("nmblookup" + m_wins_server +
+ TQString cmd ("nmblookup" + m_wins_server +
"-M -- - | grep '<01>' | awk '{print $1}' | xargs nmblookup -A | grep '<1d>'");
*m_proc << cmd;
startProcess(GroupListing);
}
-void SmbView::setOpen(QListViewItem *item, bool on)
+void SmbView::setOpen(TQListViewItem *item, bool on)
{
if (on && item->childCount() == 0)
{
@@ -189,7 +189,7 @@ void SmbView::setOpen(QListViewItem *item, bool on)
*m_proc << KProcess::quote(item->text(0));
*m_proc << " -W ";
*m_proc << KProcess::quote(item->parent()->text(0));
- if (m_login != QString::null)
+ if (m_login != TQString::null)
{
*m_proc << " -A ";
*m_proc << KProcess::quote(m_passwdFile->name());
@@ -197,19 +197,19 @@ void SmbView::setOpen(QListViewItem *item, bool on)
startProcess(ShareListing);
}
}
- QListView::setOpen(item,on);
+ TQListView::setOpen(item,on);
}
void SmbView::processGroups()
{
- QStringList grps = QStringList::split('\n',m_buffer,false);
+ QStringList grps = TQStringList::split('\n',m_buffer,false);
clear();
- for (QStringList::ConstIterator it=grps.begin(); it!=grps.end(); ++it)
+ for (TQStringList::ConstIterator it=grps.begin(); it!=grps.end(); ++it)
{
int p = (*it).find("<1d>");
if (p == -1)
continue;
- QListViewItem *item = new QListViewItem(this,(*it).left(p).stripWhiteSpace());
+ QListViewItem *item = new TQListViewItem(this,(*it).left(p).stripWhiteSpace());
item->setExpandable(true);
item->setPixmap(0,SmallIcon("network"));
}
@@ -217,7 +217,7 @@ void SmbView::processGroups()
void SmbView::processServers()
{
- QStringList lines = QStringList::split('\n',m_buffer,true);
+ QStringList lines = TQStringList::split('\n',m_buffer,true);
QString line;
uint index(0);
while (index < lines.count())
@@ -225,10 +225,10 @@ void SmbView::processServers()
line = lines[index++].stripWhiteSpace();
if (line.isEmpty())
break;
- QStringList words = QStringList::split(' ',line,false);
+ QStringList words = TQStringList::split(' ',line,false);
if (words[1] != "<00>" || words[3] == "<GROUP>")
continue;
- QListViewItem *item = new QListViewItem(m_current,words[0]);
+ QListViewItem *item = new TQListViewItem(m_current,words[0]);
item->setExpandable(true);
item->setPixmap(0,SmallIcon("kdeprint_computer"));
}
@@ -236,7 +236,7 @@ void SmbView::processServers()
void SmbView::processShares()
{
- QStringList lines = QStringList::split('\n',m_buffer,true);
+ QStringList lines = TQStringList::split('\n',m_buffer,true);
QString line;
uint index(0);
for (;index < lines.count();index++)
@@ -254,21 +254,21 @@ void SmbView::processShares()
break;
}
QString typestr(line.mid(15, 10).stripWhiteSpace());
- //QStringList words = QStringList::split(' ',line,false);
+ //QStringList words = TQStringList::split(' ',line,false);
//if (words[1] == "Printer")
if (typestr == "Printer")
{
QString comm(line.mid(25).stripWhiteSpace()), sharen(line.mid(0, 15).stripWhiteSpace());
//for (uint i=2; i<words.count(); i++)
// comm += (words[i]+" ");
- //QListViewItem *item = new QListViewItem(m_current,words[0],comm);
- QListViewItem *item = new QListViewItem(m_current,sharen,comm);
+ //QListViewItem *item = new TQListViewItem(m_current,words[0],comm);
+ QListViewItem *item = new TQListViewItem(m_current,sharen,comm);
item->setPixmap(0,SmallIcon("kdeprint_printer"));
}
}
}
-void SmbView::slotSelectionChanged(QListViewItem *item)
+void SmbView::slotSelectionChanged(TQListViewItem *item)
{
if (item && item->depth() == 2)
emit printerSelected(item->parent()->parent()->text(0),item->parent()->text(0),item->text(0));
diff --git a/kdeprint/management/smbview.h b/kdeprint/management/smbview.h
index 74932a964..e86f3d5ec 100644
--- a/kdeprint/management/smbview.h
+++ b/kdeprint/management/smbview.h
@@ -29,16 +29,16 @@ class SmbView : public KListView
{
Q_OBJECT
public:
- SmbView(QWidget *parent = 0, const char *name = 0);
+ SmbView(TQWidget *parent = 0, const char *name = 0);
~SmbView();
- void setLoginInfos(const QString& login, const QString& password);
- void setOpen(QListViewItem*, bool);
+ void setLoginInfos(const TQString& login, const TQString& password);
+ void setOpen(TQListViewItem*, bool);
void init();
void abort();
signals:
- void printerSelected(const QString& work, const QString& server, const QString& printer);
+ void printerSelected(const TQString& work, const TQString& server, const TQString& printer);
void running(bool);
protected:
@@ -51,7 +51,7 @@ protected:
protected slots:
void slotReceivedStdout(KProcess*, char*, int);
void slotProcessExited(KProcess*);
- void slotSelectionChanged(QListViewItem*);
+ void slotSelectionChanged(TQListViewItem*);
private:
enum State { GroupListing, ServerListing, ShareListing, Idle };
diff --git a/kdeprint/marginpreview.cpp b/kdeprint/marginpreview.cpp
index 2190b4958..b41a14388 100644
--- a/kdeprint/marginpreview.cpp
+++ b/kdeprint/marginpreview.cpp
@@ -21,7 +21,7 @@
#include <klocale.h>
#include <kdebug.h>
-#include <qpainter.h>
+#include <tqpainter.h>
#include <kcursor.h>
#define A4_WIDTH 595
@@ -34,7 +34,7 @@
#define SCALE(d,z) ((int)(float(d)*z+0.5))
#define UNSCALE(d,z) ((int)(float(d)/z+0.5))
-static void draw3DPage(QPainter *p, QRect r)
+static void draw3DPage(TQPainter *p, TQRect r)
{
// draw white page
p->fillRect(r,Qt::white);
@@ -52,8 +52,8 @@ static void draw3DPage(QPainter *p, QRect r)
p->lineTo(r.right()-1,r.top()+1);
}
-MarginPreview::MarginPreview(QWidget *parent, const char *name)
- : QWidget(parent,name)
+MarginPreview::MarginPreview(TQWidget *parent, const char *name)
+ : TQWidget(parent,name)
{
width_ = A4_WIDTH;
height_ = A4_HEIGHT;
@@ -102,7 +102,7 @@ void MarginPreview::setSymetric(bool on)
symetric_ = on;
}
-void MarginPreview::resizeEvent(QResizeEvent *)
+void MarginPreview::resizeEvent(TQResizeEvent *)
{
if (width_/height_ > float(width())/height())
{
@@ -124,11 +124,11 @@ void MarginPreview::resizeEvent(QResizeEvent *)
}
}
-void MarginPreview::paintEvent(QPaintEvent *)
+void MarginPreview::paintEvent(TQPaintEvent *)
{
QPainter p(this);
- QRect pagebox(QPoint(box_.left()-1,box_.top()-1),QPoint(box_.right()+2,box_.bottom()+2));
+ QRect pagebox(TQPoint(box_.left()-1,box_.top()-1),TQPoint(box_.right()+2,box_.bottom()+2));
if (nopreview_)
{
@@ -154,7 +154,7 @@ void MarginPreview::paintEvent(QPaintEvent *)
p.drawLine(box_.left(),m,box_.right(),m);
// fill useful area
- p.fillRect(margbox_,QColor(220,220,220));
+ p.fillRect(margbox_,TQColor(220,220,220));
}
}
@@ -169,7 +169,7 @@ void MarginPreview::setNoPreview(bool on)
// 2: bottom
// 3: left
// 4: right
-int MarginPreview::locateMouse(const QPoint& p)
+int MarginPreview::locateMouse(const TQPoint& p)
{
int tol = 2;
if (p.x() <= margbox_.left()+tol && p.x() >= margbox_.left()-tol)
@@ -184,7 +184,7 @@ int MarginPreview::locateMouse(const QPoint& p)
return 0;
}
-void MarginPreview::mouseMoveEvent(QMouseEvent *e)
+void MarginPreview::mouseMoveEvent(TQMouseEvent *e)
{
if (nopreview_ || state_ == Fixed)
return;
@@ -238,7 +238,7 @@ void MarginPreview::mouseMoveEvent(QMouseEvent *e)
}
}
-void MarginPreview::drawTempLine(QPainter *p)
+void MarginPreview::drawTempLine(TQPainter *p)
{
if (state_ >= LMoving)
{
@@ -260,7 +260,7 @@ void MarginPreview::drawTempLine(QPainter *p)
}
}
-void MarginPreview::mousePressEvent(QMouseEvent *e)
+void MarginPreview::mousePressEvent(TQMouseEvent *e)
{
if (e->button() != Qt::LeftButton || state_ != None)
return;
@@ -271,7 +271,7 @@ void MarginPreview::mousePressEvent(QMouseEvent *e)
}
}
-void MarginPreview::mouseReleaseEvent(QMouseEvent *e)
+void MarginPreview::mouseReleaseEvent(TQMouseEvent *e)
{
if (state_ > None)
{
diff --git a/kdeprint/marginpreview.h b/kdeprint/marginpreview.h
index 808c1188f..8cceba7bc 100644
--- a/kdeprint/marginpreview.h
+++ b/kdeprint/marginpreview.h
@@ -20,14 +20,14 @@
#ifndef MARGINPREVIEW_H
#define MARGINPREVIEW_H
-#include <qwidget.h>
+#include <tqwidget.h>
class MarginPreview : public QWidget
{
Q_OBJECT
public:
- MarginPreview(QWidget *parent = 0, const char *name = 0);
+ MarginPreview(TQWidget *parent = 0, const char *name = 0);
~MarginPreview();
// note : unit -> points (1/72th in)
void setPageSize(float w, float h);
@@ -43,13 +43,13 @@ signals:
void marginChanged(int type, float value);
protected:
- void paintEvent(QPaintEvent *);
- void resizeEvent(QResizeEvent *);
- void mouseMoveEvent(QMouseEvent *);
- void mousePressEvent(QMouseEvent *);
- void mouseReleaseEvent(QMouseEvent *);
- int locateMouse(const QPoint& p);
- void drawTempLine(QPainter*);
+ void paintEvent(TQPaintEvent *);
+ void resizeEvent(TQResizeEvent *);
+ void mouseMoveEvent(TQMouseEvent *);
+ void mousePressEvent(TQMouseEvent *);
+ void mouseReleaseEvent(TQMouseEvent *);
+ int locateMouse(const TQPoint& p);
+ void drawTempLine(TQPainter*);
private:
float width_, height_;
diff --git a/kdeprint/marginvaluewidget.cpp b/kdeprint/marginvaluewidget.cpp
index 87be3f7e3..1ef2233e1 100644
--- a/kdeprint/marginvaluewidget.cpp
+++ b/kdeprint/marginvaluewidget.cpp
@@ -21,7 +21,7 @@
#include <math.h>
-MarginValueWidget::MarginValueWidget(KNumInput *below, double value, QWidget *parent, const char *name)
+MarginValueWidget::MarginValueWidget(KNumInput *below, double value, TQWidget *parent, const char *name)
: KDoubleNumInput(below, value, parent, name)
{
m_mode = Pixels;
@@ -31,7 +31,7 @@ MarginValueWidget::MarginValueWidget(KNumInput *below, double value, QWidget *pa
m_margin = ( float )value;
setMode(m_mode);
setRange(0, 999, 1, false);
- connect(this, SIGNAL(valueChanged(double)), SLOT(slotValueChanged(double)));
+ connect(this, TQT_SIGNAL(valueChanged(double)), TQT_SLOT(slotValueChanged(double)));
}
float MarginValueWidget::margin()
diff --git a/kdeprint/marginvaluewidget.h b/kdeprint/marginvaluewidget.h
index ea444d4a9..40f471bb2 100644
--- a/kdeprint/marginvaluewidget.h
+++ b/kdeprint/marginvaluewidget.h
@@ -27,7 +27,7 @@ class MarginValueWidget : public KDoubleNumInput
Q_OBJECT
public:
enum Mode { Pixels = 0, IN, CM, MM };
- MarginValueWidget(KNumInput *below, double value = 18.0, QWidget *parent = 0, const char *name = 0);
+ MarginValueWidget(KNumInput *below, double value = 18.0, TQWidget *parent = 0, const char *name = 0);
float margin();
int resolution() const;
diff --git a/kdeprint/marginwidget.cpp b/kdeprint/marginwidget.cpp
index ddf714ae8..6061736a6 100644
--- a/kdeprint/marginwidget.cpp
+++ b/kdeprint/marginwidget.cpp
@@ -22,19 +22,19 @@
#include "marginvaluewidget.h"
#include "kprinter.h"
-#include <qcombobox.h>
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qwhatsthis.h>
+#include <tqcombobox.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
#include <kglobal.h>
-MarginWidget::MarginWidget(QWidget *parent, const char* name, bool allowMetricUnit)
-: QWidget(parent, name), m_default(4, 0), m_pagesize( 2 )
+MarginWidget::MarginWidget(TQWidget *parent, const char* name, bool allowMetricUnit)
+: TQWidget(parent, name), m_default(4, 0), m_pagesize( 2 )
{
//WhatsThis strings.... (added by pfeifle@kde.org)
- QString whatsThisTopMarginWidget = i18n( " <qt> "
+ TQString whatsThisTopMarginWidget = i18n( " <qt> "
" <p><b>Top Margin</b></p>. "
" <p>This spinbox/text edit field lets you control the top margin of your printout if the printing "
" application does not define its margins internally. </p> "
@@ -54,7 +54,7 @@ MarginWidget::MarginWidget(QWidget *parent, const char* name, bool allowMetricUn
" </p> "
" </qt>" );
- QString whatsThisBottomMarginWidget = i18n( " <qt> "
+ TQString whatsThisBottomMarginWidget = i18n( " <qt> "
" <p><b>Bottom Margin</b></p>. "
" <p>This spinbox/text edit field lets you control the bottom margin of your printout if the printing "
" application does not define its margins internally. </p> "
@@ -73,7 +73,7 @@ MarginWidget::MarginWidget(QWidget *parent, const char* name, bool allowMetricUn
" </pre>"
" </qt>" );
- QString whatsThisLeftMarginWidget = i18n( " <qt> "
+ TQString whatsThisLeftMarginWidget = i18n( " <qt> "
" <p><b>Left Margin</b></p>. "
" <p>This spinbox/text edit field lets you control the left margin of your printout if the printing "
" application does not define its margins internally. </p> "
@@ -92,7 +92,7 @@ MarginWidget::MarginWidget(QWidget *parent, const char* name, bool allowMetricUn
" </pre>"
" </qt>" );
- QString whatsThisRightMarginWidget = i18n( " <qt> "
+ TQString whatsThisRightMarginWidget = i18n( " <qt> "
" <p><b>Right Margin</b></p>. "
" <p>This spinbox/text edit field lets you control the right margin of your printout if the printing "
" application does not define its margins internally. </p> "
@@ -111,14 +111,14 @@ MarginWidget::MarginWidget(QWidget *parent, const char* name, bool allowMetricUn
" </pre>"
" </qt>" );
- QString whatsThisMeasurementUnitMarginWidget = i18n( " <qt> "
+ TQString whatsThisMeasurementUnitMarginWidget = i18n( " <qt> "
" <p><b>Change Measurement Unit<b></p>. "
" <p>You can change the units of measurement for the page"
" margins here. Select from Millimeter, Centimeter, Inch or Pixels (1 pixel == 1/72 inch). "
" </p> "
" </qt>" );
- QString whatsThisCheckboxMarginWidget = i18n( " <qt> "
+ TQString whatsThisCheckboxMarginWidget = i18n( " <qt> "
" <p><b>Custom Margins Checkbox</b></p>. "
" <p>Enable this checkbox if you want to modify the margins of your printouts "
" <p>You can change margin settings in 4 ways: "
@@ -135,7 +135,7 @@ MarginWidget::MarginWidget(QWidget *parent, const char* name, bool allowMetricUn
" fully utilize the KDEPrint framework, such as OpenOffice.org. </p> "
" </qt>" );
- QString whatsThisDragAndPreviewMarginWidget = i18n( " <qt> "
+ TQString whatsThisDragAndPreviewMarginWidget = i18n( " <qt> "
" <p><b>\"Drag-your-Margins\" </p>. "
" <p>Use your mouse to drag and set each margin on this little preview window. </p> "
" </qt>" );
@@ -145,22 +145,22 @@ MarginWidget::MarginWidget(QWidget *parent, const char* name, bool allowMetricUn
m_pagesize[ 1 ] = 842;
m_landscape = false;
- m_custom = new QCheckBox(i18n("&Use custom margins"), this);
- QWhatsThis::add(m_custom, whatsThisCheckboxMarginWidget);
+ m_custom = new TQCheckBox(i18n("&Use custom margins"), this);
+ TQWhatsThis::add(m_custom, whatsThisCheckboxMarginWidget);
m_top = new MarginValueWidget(0, 0.0, this);
- QWhatsThis::add(m_top, whatsThisTopMarginWidget);
+ TQWhatsThis::add(m_top, whatsThisTopMarginWidget);
m_bottom = new MarginValueWidget(m_top, 0.0, this);
- QWhatsThis::add(m_bottom, whatsThisBottomMarginWidget);
+ TQWhatsThis::add(m_bottom, whatsThisBottomMarginWidget);
m_left = new MarginValueWidget(m_bottom, 0.0, this);
- QWhatsThis::add(m_left, whatsThisLeftMarginWidget);
+ TQWhatsThis::add(m_left, whatsThisLeftMarginWidget);
m_right = new MarginValueWidget(m_left, 0.0, this);
- QWhatsThis::add(m_right, whatsThisRightMarginWidget);
+ TQWhatsThis::add(m_right, whatsThisRightMarginWidget);
m_top->setLabel(i18n("&Top:"), Qt::AlignLeft|Qt::AlignVCenter);
m_bottom->setLabel(i18n("&Bottom:"), Qt::AlignLeft|Qt::AlignVCenter);
m_left->setLabel(i18n("Le&ft:"), Qt::AlignLeft|Qt::AlignVCenter);
m_right->setLabel(i18n("&Right:"), Qt::AlignLeft|Qt::AlignVCenter);
- m_units = new QComboBox(this);
- QWhatsThis::add(m_units, whatsThisMeasurementUnitMarginWidget);
+ m_units = new TQComboBox(this);
+ TQWhatsThis::add(m_units, whatsThisMeasurementUnitMarginWidget);
m_units->insertItem(i18n("Pixels (1/72nd in)"));
if ( allowMetricUnit )
{
@@ -169,32 +169,32 @@ MarginWidget::MarginWidget(QWidget *parent, const char* name, bool allowMetricUn
m_units->insertItem( i18n( "Millimeters (mm)" ) );
}
m_units->setCurrentItem(0);
- connect(m_units, SIGNAL(activated(int)), m_top, SLOT(setMode(int)));
- connect(m_units, SIGNAL(activated(int)), m_bottom, SLOT(setMode(int)));
- connect(m_units, SIGNAL(activated(int)), m_left, SLOT(setMode(int)));
- connect(m_units, SIGNAL(activated(int)), m_right, SLOT(setMode(int)));
+ connect(m_units, TQT_SIGNAL(activated(int)), m_top, TQT_SLOT(setMode(int)));
+ connect(m_units, TQT_SIGNAL(activated(int)), m_bottom, TQT_SLOT(setMode(int)));
+ connect(m_units, TQT_SIGNAL(activated(int)), m_left, TQT_SLOT(setMode(int)));
+ connect(m_units, TQT_SIGNAL(activated(int)), m_right, TQT_SLOT(setMode(int)));
m_preview = new MarginPreview(this);
- QWhatsThis::add(m_preview, whatsThisDragAndPreviewMarginWidget);
+ TQWhatsThis::add(m_preview, whatsThisDragAndPreviewMarginWidget);
m_preview->setMinimumSize(60, 80);
m_preview->setPageSize(m_pagesize[ 0 ], m_pagesize[ 1 ]);
- connect(m_preview, SIGNAL(marginChanged(int,float)), SLOT(slotMarginPreviewChanged(int,float)));
- connect(m_top, SIGNAL(marginChanged(float)), SLOT(slotMarginValueChanged()));
- connect(m_bottom, SIGNAL(marginChanged(float)), SLOT(slotMarginValueChanged()));
- connect(m_left, SIGNAL(marginChanged(float)), SLOT(slotMarginValueChanged()));
- connect(m_right, SIGNAL(marginChanged(float)), SLOT(slotMarginValueChanged()));
+ connect(m_preview, TQT_SIGNAL(marginChanged(int,float)), TQT_SLOT(slotMarginPreviewChanged(int,float)));
+ connect(m_top, TQT_SIGNAL(marginChanged(float)), TQT_SLOT(slotMarginValueChanged()));
+ connect(m_bottom, TQT_SIGNAL(marginChanged(float)), TQT_SLOT(slotMarginValueChanged()));
+ connect(m_left, TQT_SIGNAL(marginChanged(float)), TQT_SLOT(slotMarginValueChanged()));
+ connect(m_right, TQT_SIGNAL(marginChanged(float)), TQT_SLOT(slotMarginValueChanged()));
slotMarginValueChanged();
- connect(m_custom, SIGNAL(toggled(bool)), m_top, SLOT(setEnabled(bool)));
- connect(m_custom, SIGNAL(toggled(bool)), m_left, SLOT(setEnabled(bool)));
- //connect(m_custom, SIGNAL(toggled(bool)), m_units, SLOT(setEnabled(bool)));
- connect(m_custom, SIGNAL(toggled(bool)), SLOT(slotCustomMarginsToggled(bool)));
- connect(m_custom, SIGNAL(toggled(bool)), m_preview, SLOT(enableRubberBand(bool)));
+ connect(m_custom, TQT_SIGNAL(toggled(bool)), m_top, TQT_SLOT(setEnabled(bool)));
+ connect(m_custom, TQT_SIGNAL(toggled(bool)), m_left, TQT_SLOT(setEnabled(bool)));
+ //connect(m_custom, TQT_SIGNAL(toggled(bool)), m_units, TQT_SLOT(setEnabled(bool)));
+ connect(m_custom, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotCustomMarginsToggled(bool)));
+ connect(m_custom, TQT_SIGNAL(toggled(bool)), m_preview, TQT_SLOT(enableRubberBand(bool)));
m_top->setEnabled(false);
m_bottom->setEnabled(false);
m_left->setEnabled(false);
m_right->setEnabled(false);
//m_units->setEnabled(false);
- QGridLayout *l3 = new QGridLayout(this, 7, 2, 0, 10);
+ QGridLayout *l3 = new TQGridLayout(this, 7, 2, 0, 10);
l3->addWidget(m_custom, 0, 0);
l3->addWidget(m_top, 1, 0);
l3->addWidget(m_bottom, 2, 0);
@@ -237,8 +237,8 @@ void MarginWidget::setSymetricMargins(bool on)
m_right->setEnabled(on && m_custom->isChecked());
if (on)
{
- connect(m_top, SIGNAL(marginChanged(float)), m_bottom, SLOT(setMargin(float)));
- connect(m_left, SIGNAL(marginChanged(float)), m_right, SLOT(setMargin(float)));
+ connect(m_top, TQT_SIGNAL(marginChanged(float)), m_bottom, TQT_SLOT(setMargin(float)));
+ connect(m_left, TQT_SIGNAL(marginChanged(float)), m_right, TQT_SLOT(setMargin(float)));
m_bottom->setMargin(m_top->margin());
m_right->setMargin(m_left->margin());
}
diff --git a/kdeprint/marginwidget.h b/kdeprint/marginwidget.h
index 885e1eb49..8e966b3f5 100644
--- a/kdeprint/marginwidget.h
+++ b/kdeprint/marginwidget.h
@@ -20,8 +20,8 @@
#ifndef MARGINWIDGET_H
#define MARGINWIDGET_H
-#include <qwidget.h>
-#include <qvaluevector.h>
+#include <tqwidget.h>
+#include <tqvaluevector.h>
#include <kdelibs_export.h>
@@ -34,7 +34,7 @@ class KDEPRINT_EXPORT MarginWidget : public QWidget
{
Q_OBJECT
public:
- MarginWidget(QWidget *parent = 0, const char *name = 0, bool allowMetricUnit = true);
+ MarginWidget(TQWidget *parent = 0, const char *name = 0, bool allowMetricUnit = true);
~MarginWidget();
void setSymetricMargins(bool on);
@@ -67,8 +67,8 @@ private:
QComboBox *m_units;
QCheckBox *m_custom;
bool m_symetric, m_block;
- QValueVector<float> m_default;
- QValueVector<float> m_pagesize;
+ TQValueVector<float> m_default;
+ TQValueVector<float> m_pagesize;
bool m_landscape;
};
diff --git a/kdeprint/messagewindow.cpp b/kdeprint/messagewindow.cpp
index b6c30b413..d4c4ae40d 100644
--- a/kdeprint/messagewindow.cpp
+++ b/kdeprint/messagewindow.cpp
@@ -19,30 +19,30 @@
#include "messagewindow.h"
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtimer.h>
-#include <qpixmap.h>
-#include <qhbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
+#include <tqpixmap.h>
+#include <tqhbox.h>
#include <kiconloader.h>
#include <kapplication.h>
#include <kdebug.h>
-QPtrDict<MessageWindow> MessageWindow::m_windows;
+TQPtrDict<MessageWindow> MessageWindow::m_windows;
-MessageWindow::MessageWindow( const QString& txt, int delay, QWidget *parent, const char *name )
- : QWidget( parent, name, WStyle_Customize|WStyle_NoBorder|WShowModal|WType_Dialog|WDestructiveClose )
+MessageWindow::MessageWindow( const TQString& txt, int delay, TQWidget *parent, const char *name )
+ : TQWidget( parent, name, WStyle_Customize|WStyle_NoBorder|WShowModal|WType_Dialog|WDestructiveClose )
{
- QHBox *box = new QHBox( this );
- box->setFrameStyle( QFrame::Panel|QFrame::Raised );
+ TQHBox *box = new TQHBox( this );
+ box->setFrameStyle( TQFrame::Panel|TQFrame::Raised );
box->setLineWidth( 1 );
box->setSpacing( 10 );
box->setMargin( 5 );
- QLabel *pix = new QLabel( box );
+ TQLabel *pix = new TQLabel( box );
pix->setPixmap( DesktopIcon( "kdeprint_printer" ) );
- m_text = new QLabel( txt, box );
+ m_text = new TQLabel( txt, box );
- QHBoxLayout *l0 = new QHBoxLayout( this, 0, 0 );
+ TQHBoxLayout *l0 = new TQHBoxLayout( this, 0, 0 );
l0->addWidget( box );
m_windows.insert( parent, this );
@@ -50,7 +50,7 @@ MessageWindow::MessageWindow( const QString& txt, int delay, QWidget *parent, co
if ( delay == 0 )
slotTimer();
else
- QTimer::singleShot( delay, this, SLOT( slotTimer() ) );
+ TQTimer::singleShot( delay, this, TQT_SLOT( slotTimer() ) );
}
MessageWindow::~MessageWindow()
@@ -60,8 +60,8 @@ MessageWindow::~MessageWindow()
void MessageWindow::slotTimer()
{
- QSize psz = parentWidget()->size(), sz = sizeHint();
- move( parentWidget()->mapToGlobal( QPoint( (psz.width()-sz.width())/2, (psz.height()-sz.height())/2 ) ) );
+ TQSize psz = parentWidget()->size(), sz = sizeHint();
+ move( parentWidget()->mapToGlobal( TQPoint( (psz.width()-sz.width())/2, (psz.height()-sz.height())/2 ) ) );
if ( !isVisible() )
{
show();
@@ -69,17 +69,17 @@ void MessageWindow::slotTimer()
}
}
-QString MessageWindow::text() const
+TQString MessageWindow::text() const
{
return m_text->text();
}
-void MessageWindow::setText( const QString& txt )
+void MessageWindow::setText( const TQString& txt )
{
m_text->setText( txt );
}
-void MessageWindow::add( QWidget *parent, const QString& txt, int delay )
+void MessageWindow::add( TQWidget *parent, const TQString& txt, int delay )
{
if ( !parent )
kdWarning( 500 ) << "Cannot add a message window to a null parent" << endl;
@@ -93,13 +93,13 @@ void MessageWindow::add( QWidget *parent, const QString& txt, int delay )
}
}
-void MessageWindow::remove( QWidget *parent )
+void MessageWindow::remove( TQWidget *parent )
{
if ( parent )
delete m_windows.find( parent );
}
-void MessageWindow::change( QWidget *parent, const QString& txt )
+void MessageWindow::change( TQWidget *parent, const TQString& txt )
{
if ( parent )
{
@@ -113,7 +113,7 @@ void MessageWindow::change( QWidget *parent, const QString& txt )
void MessageWindow::removeAll()
{
- QPtrDictIterator<MessageWindow> it( m_windows );
+ TQPtrDictIterator<MessageWindow> it( m_windows );
while ( it.current() )
delete it.current();
}
diff --git a/kdeprint/messagewindow.h b/kdeprint/messagewindow.h
index b364e85cf..a9a93731f 100644
--- a/kdeprint/messagewindow.h
+++ b/kdeprint/messagewindow.h
@@ -20,8 +20,8 @@
#ifndef MESSAGEWINDOW_H
#define MESSAGEWINDOW_H
-#include <qwidget.h>
-#include <qptrdict.h>
+#include <tqwidget.h>
+#include <tqptrdict.h>
#include <kdelibs_export.h>
@@ -34,22 +34,22 @@ class KDEPRINT_EXPORT MessageWindow : public QWidget
public:
~MessageWindow();
- static void add( QWidget *parent, const QString& txt, int delay = 500 );
- static void change( QWidget *parent, const QString& txt );
- static void remove( QWidget *parent );
+ static void add( TQWidget *parent, const TQString& txt, int delay = 500 );
+ static void change( TQWidget *parent, const TQString& txt );
+ static void remove( TQWidget *parent );
static void removeAll();
protected slots:
void slotTimer();
protected:
- MessageWindow( const QString& txt, int delay = 500, QWidget *parent = 0, const char *name = 0 );
- void setText( const QString& txt );
- QString text() const;
+ MessageWindow( const TQString& txt, int delay = 500, TQWidget *parent = 0, const char *name = 0 );
+ void setText( const TQString& txt );
+ TQString text() const;
private:
- QLabel *m_text;
- static QPtrDict<MessageWindow> m_windows;
+ TQLabel *m_text;
+ static TQPtrDict<MessageWindow> m_windows;
};
#endif
diff --git a/kdeprint/plugincombobox.cpp b/kdeprint/plugincombobox.cpp
index d029d0c41..038e9ddbd 100644
--- a/kdeprint/plugincombobox.cpp
+++ b/kdeprint/plugincombobox.cpp
@@ -21,16 +21,16 @@
#include "kmfactory.h"
#include "kmmanager.h"
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <klocale.h>
-#include <qwhatsthis.h>
+#include <tqwhatsthis.h>
-PluginComboBox::PluginComboBox(QWidget *parent, const char *name)
-:QWidget(parent, name)
+PluginComboBox::PluginComboBox(TQWidget *parent, const char *name)
+:TQWidget(parent, name)
{
- QString whatsThisCurrentPrintsystem = i18n(" <qt><b>Print Subsystem Selection</b>"
+ TQString whatsThisCurrentPrintsystem = i18n(" <qt><b>Print Subsystem Selection</b>"
" <p>This combo box shows (and lets you select)"
" a print subsystem to be used by KDEPrint. (This print"
" subsystem must, of course, be installed inside your"
@@ -40,22 +40,22 @@ PluginComboBox::PluginComboBox(QWidget *parent, const char *name)
" UNIX Printing System</em>."
" </qt>" );
- m_combo = new QComboBox(this, "PluginCombo");
- QWhatsThis::add(m_combo, whatsThisCurrentPrintsystem);
- QLabel *m_label = new QLabel(i18n("Print s&ystem currently used:"), this);
- QWhatsThis::add(m_label, whatsThisCurrentPrintsystem);
+ m_combo = new TQComboBox(this, "PluginCombo");
+ TQWhatsThis::add(m_combo, whatsThisCurrentPrintsystem);
+ QLabel *m_label = new TQLabel(i18n("Print s&ystem currently used:"), this);
+ TQWhatsThis::add(m_label, whatsThisCurrentPrintsystem);
m_label->setAlignment(AlignVCenter|AlignRight);
m_label->setBuddy(m_combo);
- m_plugininfo = new QLabel("Plugin information", this);
- QGridLayout *l0 = new QGridLayout(this, 2, 2, 0, 5);
+ m_plugininfo = new TQLabel("Plugin information", this);
+ QGridLayout *l0 = new TQGridLayout(this, 2, 2, 0, 5);
l0->setColStretch(0, 1);
l0->addWidget(m_label, 0, 0);
l0->addWidget(m_combo, 0, 1);
l0->addWidget(m_plugininfo, 1, 1);
- QValueList<KMFactory::PluginInfo> list = KMFactory::self()->pluginList();
+ TQValueList<KMFactory::PluginInfo> list = KMFactory::self()->pluginList();
QString currentPlugin = KMFactory::self()->printSystem();
- for (QValueList<KMFactory::PluginInfo>::ConstIterator it=list.begin(); it!=list.end(); ++it)
+ for (TQValueList<KMFactory::PluginInfo>::ConstIterator it=list.begin(); it!=list.end(); ++it)
{
m_combo->insertItem((*it).comment);
if ((*it).name == currentPlugin)
@@ -63,7 +63,7 @@ PluginComboBox::PluginComboBox(QWidget *parent, const char *name)
m_pluginlist.append((*it).name);
}
- connect(m_combo, SIGNAL(activated(int)), SLOT(slotActivated(int)));
+ connect(m_combo, TQT_SIGNAL(activated(int)), TQT_SLOT(slotActivated(int)));
configChanged();
}
@@ -88,7 +88,7 @@ void PluginComboBox::reload()
void PluginComboBox::configChanged()
{
- QString whatsThisCurrentConnection = i18n(" <qt><b>Current Connection</b>"
+ TQString whatsThisCurrentConnection = i18n(" <qt><b>Current Connection</b>"
" <p>This line shows which CUPS server your PC is"
" currently connected to for printing and retrieving"
" printer info. To switch to a different CUPS server,"
@@ -97,7 +97,7 @@ void PluginComboBox::configChanged()
" </qt>" );
m_plugininfo->setText(KMManager::self()->stateInformation());
- QWhatsThis::add(m_plugininfo, whatsThisCurrentConnection);
+ TQWhatsThis::add(m_plugininfo, whatsThisCurrentConnection);
}
diff --git a/kdeprint/plugincombobox.h b/kdeprint/plugincombobox.h
index 22ca8b390..4f31da974 100644
--- a/kdeprint/plugincombobox.h
+++ b/kdeprint/plugincombobox.h
@@ -20,19 +20,19 @@
#ifndef PLUGINCOMBOBOX_H
#define PLUGINCOMBOBOX_H
-#include <qwidget.h>
-#include <qstringlist.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
#include "kpreloadobject.h"
class QComboBox;
class QLabel;
-class KDEPRINT_EXPORT PluginComboBox : public QWidget, public KPReloadObject
+class KDEPRINT_EXPORT PluginComboBox : public TQWidget, public KPReloadObject
{
Q_OBJECT
public:
- PluginComboBox(QWidget *parent = 0, const char *name = 0);
+ PluginComboBox(TQWidget *parent = 0, const char *name = 0);
protected slots:
void slotActivated(int);
diff --git a/kdeprint/posterpreview.cpp b/kdeprint/posterpreview.cpp
index 1a89ee8f3..fbdfe5200 100644
--- a/kdeprint/posterpreview.cpp
+++ b/kdeprint/posterpreview.cpp
@@ -20,25 +20,25 @@
#include "posterpreview.h"
#include <kprocess.h>
-#include <qpainter.h>
-#include <qsimplerichtext.h>
-#include <qtimer.h>
-#include <qpixmap.h>
+#include <tqpainter.h>
+#include <tqsimplerichtext.h>
+#include <tqtimer.h>
+#include <tqpixmap.h>
#include <kprinter.h>
#include <klocale.h>
#include <kcursor.h>
#include <kglobalsettings.h>
-PosterPreview::PosterPreview( QWidget *parent, const char *name )
- : QFrame( parent, name )
+PosterPreview::PosterPreview( TQWidget *parent, const char *name )
+ : TQFrame( parent, name )
{
m_postersize = m_mediasize = "A4";
m_cutmargin = 5;
init();
}
-PosterPreview::PosterPreview( const QString& postersize, const QString& mediasize, QWidget *parent, const char *name )
- : QFrame( parent, name )
+PosterPreview::PosterPreview( const TQString& postersize, const TQString& mediasize, TQWidget *parent, const char *name )
+ : TQFrame( parent, name )
{
m_postersize = postersize;
m_mediasize = mediasize;
@@ -54,8 +54,8 @@ PosterPreview::~PosterPreview()
void PosterPreview::init()
{
m_process = new KProcess;
- connect( m_process, SIGNAL( receivedStderr( KProcess*, char*, int ) ), SLOT( slotProcessStderr( KProcess*, char*, int ) ) );
- connect( m_process, SIGNAL( processExited( KProcess* ) ), SLOT( slotProcessExited( KProcess* ) ) );
+ connect( m_process, TQT_SIGNAL( receivedStderr( KProcess*, char*, int ) ), TQT_SLOT( slotProcessStderr( KProcess*, char*, int ) ) );
+ connect( m_process, TQT_SIGNAL( processExited( KProcess* ) ), TQT_SLOT( slotProcessExited( KProcess* ) ) );
m_cols = m_rows = m_pw = m_ph = m_mw = m_mh = 0;
m_dirty = false;
@@ -83,7 +83,7 @@ void PosterPreview::setDirty()
if ( !m_dirty )
{
m_dirty = true;
- QTimer::singleShot( 1, this, SLOT( updatePoster() ) );
+ TQTimer::singleShot( 1, this, TQT_SLOT( updatePoster() ) );
}
}
@@ -92,7 +92,7 @@ void PosterPreview::updatePoster()
m_buffer = "";
m_process->clearArguments();
*m_process << "poster" << "-F" << "-m" + m_mediasize << "-p" + m_postersize
- << "-c" + QString::number( m_cutmargin ) + "%";
+ << "-c" + TQString::number( m_cutmargin ) + "%";
if ( !m_process->start( KProcess::NotifyOnExit, KProcess::Stderr ) )
{
m_rows = m_cols = 0;
@@ -101,10 +101,10 @@ void PosterPreview::updatePoster()
}
}
-void PosterPreview::drawContents( QPainter *painter )
+void PosterPreview::drawContents( TQPainter *painter )
{
- QPixmap pix( width(), height() );
- QPainter *p = new QPainter( &pix );
+ TQPixmap pix( width(), height() );
+ TQPainter *p = new TQPainter( &pix );
p->fillRect( 0, 0, width(), height(), colorGroup().background() );
@@ -112,16 +112,16 @@ void PosterPreview::drawContents( QPainter *painter )
{
if ( m_rows <= 0 || m_cols <= 0 || m_pw <= 0 || m_ph <= 0 )
{
- QString txt = i18n( "Poster preview not available. Either the <b>poster</b> "
+ TQString txt = i18n( "Poster preview not available. Either the <b>poster</b> "
"executable is not properly installed, or you don't have "
"the required version; available at http://printing.kde.org/downloads/." );
- QSimpleRichText richtext( ( m_buffer.isEmpty() ? txt : m_buffer.prepend( "<pre>" ).append( "</pre>" ) ), p->font() );
+ TQSimpleRichText richtext( ( m_buffer.isEmpty() ? txt : m_buffer.prepend( "<pre>" ).append( "</pre>" ) ), p->font() );
richtext.adjustSize();
int x = ( width()-richtext.widthUsed() )/2, y = ( height()-richtext.height() )/2;
x = QMAX( x, 0 );
y = QMAX( y, 0 );
- richtext.draw( p, x, y, QRect( x, y, richtext.widthUsed(), richtext.height() ), colorGroup() );
- m_boundingrect = QRect();
+ richtext.draw( p, x, y, TQRect( x, y, richtext.widthUsed(), richtext.height() ), colorGroup() );
+ m_boundingrect = TQRect();
}
else
{
@@ -131,7 +131,7 @@ void PosterPreview::drawContents( QPainter *painter )
p->scale( scale, -scale );
int x = ( int )( width()/scale-totalx )/2, y = ( int )( height()/scale-totaly )/2;
p->translate( x, y );
- m_boundingrect = p->xForm( QRect( 0, 0, totalx, totaly ) );
+ m_boundingrect = p->xForm( TQRect( 0, 0, totalx, totaly ) );
x = y = 0;
int px = m_posterbb.x(), py = m_posterbb.y(), pw = m_posterbb.width(), ph = m_posterbb.height();
@@ -165,7 +165,7 @@ void PosterPreview::drawContents( QPainter *painter )
painter->drawPixmap( 0, 0, pix );
}
-void PosterPreview::mouseMoveEvent( QMouseEvent *e )
+void PosterPreview::mouseMoveEvent( TQMouseEvent *e )
{
if ( m_boundingrect.isValid() )
{
@@ -176,7 +176,7 @@ void PosterPreview::mouseMoveEvent( QMouseEvent *e )
}
}
-void PosterPreview::mousePressEvent( QMouseEvent *e )
+void PosterPreview::mousePressEvent( TQMouseEvent *e )
{
if ( e->button() == Qt::LeftButton && m_boundingrect.isValid() )
{
@@ -208,7 +208,7 @@ void PosterPreview::mousePressEvent( QMouseEvent *e )
void PosterPreview::slotProcessStderr( KProcess*, char *buf, int len )
{
- m_buffer.append( QCString( buf, len ) );
+ m_buffer.append( TQCString( buf, len ) );
}
void PosterPreview::slotProcessExited( KProcess* )
@@ -227,7 +227,7 @@ void PosterPreview::setPosterSize( int s )
setPosterSize( pageSizeToPageName( KPrinter::PageSize( s ) ) );
}
-void PosterPreview::setPosterSize( const QString& s )
+void PosterPreview::setPosterSize( const TQString& s )
{
if ( m_postersize != s )
{
@@ -243,7 +243,7 @@ void PosterPreview::setMediaSize( int s )
setMediaSize( pageSizeToPageName( ( KPrinter::PageSize )s ) );
}
-void PosterPreview::setMediaSize( const QString& s )
+void PosterPreview::setMediaSize( const TQString& s )
{
if ( m_mediasize != s )
{
@@ -260,11 +260,11 @@ void PosterPreview::setCutMargin( int value )
setDirty();
}
-void PosterPreview::setSelectedPages( const QString& s )
+void PosterPreview::setSelectedPages( const TQString& s )
{
- QStringList l = QStringList::split( ",", s, false );
+ TQStringList l = TQStringList::split( ",", s, false );
m_selectedpages.clear();
- for ( QStringList::ConstIterator it=l.begin(); it!=l.end(); ++it )
+ for ( TQStringList::ConstIterator it=l.begin(); it!=l.end(); ++it )
{
int p;
if ( ( p = ( *it ).find( '-' ) ) == -1 )
@@ -281,11 +281,11 @@ void PosterPreview::setSelectedPages( const QString& s )
void PosterPreview::emitSelectedPages()
{
- QString s;
+ TQString s;
if ( m_selectedpages.count() > 0 )
{
- for ( QValueList<int>::ConstIterator it=m_selectedpages.begin(); it!=m_selectedpages.end(); ++it )
- s.append( QString::number( *it ) + "," );
+ for ( TQValueList<int>::ConstIterator it=m_selectedpages.begin(); it!=m_selectedpages.end(); ++it )
+ s.append( TQString::number( *it ) + "," );
s.truncate( s.length()-1 );
}
emit selectionChanged( s );
diff --git a/kdeprint/posterpreview.h b/kdeprint/posterpreview.h
index 6e84d048d..25fda31eb 100644
--- a/kdeprint/posterpreview.h
+++ b/kdeprint/posterpreview.h
@@ -20,8 +20,8 @@
#ifndef POSTERPREVIEW_H
#define POSTERPREVIEW_H
-#include <qframe.h>
-#include <qvaluelist.h>
+#include <tqframe.h>
+#include <tqvaluelist.h>
class KProcess;
@@ -29,29 +29,29 @@ class PosterPreview : public QFrame
{
Q_OBJECT
public:
- PosterPreview( QWidget *parent = 0, const char *name = 0 );
- PosterPreview( const QString& postersize, const QString& mediasize, QWidget *parent = 0, const char *name = 0 );
+ PosterPreview( TQWidget *parent = 0, const char *name = 0 );
+ PosterPreview( const TQString& postersize, const TQString& mediasize, TQWidget *parent = 0, const char *name = 0 );
~PosterPreview();
public slots:
void setPosterSize( int );
- void setPosterSize( const QString& );
+ void setPosterSize( const TQString& );
void setMediaSize( int );
- void setMediaSize( const QString& );
+ void setMediaSize( const TQString& );
void setCutMargin( int );
void updatePoster();
- void setSelectedPages( const QString& );
+ void setSelectedPages( const TQString& );
signals:
- void selectionChanged( const QString& );
+ void selectionChanged( const TQString& );
protected:
void parseBuffer();
- void drawContents( QPainter* );
+ void drawContents( TQPainter* );
void init();
void setDirty();
- void mouseMoveEvent( QMouseEvent* );
- void mousePressEvent( QMouseEvent* );
+ void mouseMoveEvent( TQMouseEvent* );
+ void mousePressEvent( TQMouseEvent* );
void emitSelectedPages();
protected slots:
@@ -62,14 +62,14 @@ private:
int m_rows, m_cols;
int m_pw, m_ph; // page size
int m_mw, m_mh; // cur margins
- QRect m_posterbb; // poster bounding box (without any margin)
+ TQRect m_posterbb; // poster bounding box (without any margin)
KProcess *m_process;
- QString m_buffer;
- QString m_postersize, m_mediasize;
+ TQString m_buffer;
+ TQString m_postersize, m_mediasize;
int m_cutmargin;
bool m_dirty;
- QRect m_boundingrect;
- QValueList<int> m_selectedpages;
+ TQRect m_boundingrect;
+ TQValueList<int> m_selectedpages;
};
#endif /* POSTERPREVIEW_H */
diff --git a/kdeprint/ppdloader.cpp b/kdeprint/ppdloader.cpp
index ca5ad2af4..9fbecc774 100644
--- a/kdeprint/ppdloader.cpp
+++ b/kdeprint/ppdloader.cpp
@@ -24,27 +24,27 @@
#include <kfilterdev.h>
#include <kdebug.h>
#include <klocale.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <math.h>
-void kdeprint_ppdscanner_init( QIODevice* );
+void kdeprint_ppdscanner_init( TQIODevice* );
void kdeprint_ppdscanner_terminate( bool deleteIt = true );
int kdeprint_ppdscanner_numberoflines();
-static QString processLocaleString( const QString& s )
+static TQString processLocaleString( const TQString& s )
{
- QString res;
+ TQString res;
uint pos = 0;
while ( pos < s.length() )
{
- QChar c = s[ pos++ ];
+ TQChar c = s[ pos++ ];
if ( c == '<' )
{
bool flag = false;
uint hc = 0;
while ( pos < s.length() )
{
- QChar cc = s[ pos++ ];
+ TQChar cc = s[ pos++ ];
uint _hc = 0;
if ( cc == '>' )
break;
@@ -55,7 +55,7 @@ static QString processLocaleString( const QString& s )
if ( flag )
{
hc |= _hc;
- res.append( QChar( hc ) );
+ res.append( TQChar( hc ) );
hc = 0;
}
else
@@ -71,10 +71,10 @@ static QString processLocaleString( const QString& s )
return res;
}
-static QValueList<float> splitNumberString( const QString& _s )
+static TQValueList<float> splitNumberString( const TQString& _s )
{
- QString s = _s.simplifyWhiteSpace();
- QValueList<float> l;
+ TQString s = _s.simplifyWhiteSpace();
+ TQValueList<float> l;
int p1 = 1, p2 = 0;
while ( true )
{
@@ -96,7 +96,7 @@ static QValueList<float> splitNumberString( const QString& _s )
struct PS_private
{
- QString name;
+ TQString name;
struct
{
float width, height;
@@ -117,14 +117,14 @@ PPDLoader::~PPDLoader()
{
}
-DrMain* PPDLoader::readFromFile( const QString& filename )
+DrMain* PPDLoader::readFromFile( const TQString& filename )
{
// Initialization
m_groups.clear();
m_option = NULL;
m_fonts.clear();
// Open driver file
- QIODevice *d = KFilterDev::deviceForFile( filename );
+ TQIODevice *d = KFilterDev::deviceForFile( filename );
if ( d && d->open( IO_ReadOnly ) )
{
DrMain *driver = new DrMain;
@@ -165,7 +165,7 @@ DrMain* PPDLoader::readFromFile( const QString& filename )
return 0;
}
-DrMain* PPDLoader::loadDriver( const QString& filename, QString* msg )
+DrMain* PPDLoader::loadDriver( const TQString& filename, TQString* msg )
{
PPDLoader loader;
DrMain *driver = loader.readFromFile( filename );
@@ -174,7 +174,7 @@ DrMain* PPDLoader::loadDriver( const QString& filename, QString* msg )
return driver;
}
-bool PPDLoader::openUi( const QString& name, const QString& desc, const QString& type )
+bool PPDLoader::openUi( const TQString& name, const TQString& desc, const TQString& type )
{
if ( m_option )
{
@@ -199,7 +199,7 @@ bool PPDLoader::openUi( const QString& name, const QString& desc, const QString&
return true;
}
-bool PPDLoader::endUi( const QString& name )
+bool PPDLoader::endUi( const TQString& name )
{
if ( m_option && ( m_option->name() == name || m_option->name() == name.mid( 1 ) ) )
{
@@ -207,7 +207,7 @@ bool PPDLoader::endUi( const QString& name )
delete m_option;
else
{
- QString defval = m_option->get( "default" );
+ TQString defval = m_option->get( "default" );
DrGroup *grp = 0;
if ( !defval.isEmpty() )
m_option->setValueText( defval );
@@ -229,7 +229,7 @@ bool PPDLoader::endUi( const QString& name )
return false;
}
-bool PPDLoader::openGroup( const QString& name, const QString& desc )
+bool PPDLoader::openGroup( const TQString& name, const TQString& desc )
{
DrGroup *grp = new DrGroup;
grp->setName( name );
@@ -242,7 +242,7 @@ bool PPDLoader::openGroup( const QString& name, const QString& desc )
return true;
}
-bool PPDLoader::endGroup( const QString& name )
+bool PPDLoader::endGroup( const TQString& name )
{
if ( m_groups.size() > 1 && m_groups.top()->name() == name )
{
@@ -252,7 +252,7 @@ bool PPDLoader::endGroup( const QString& name )
return false;
}
-bool PPDLoader::putStatement( const QString& keyword, const QString& name, const QString& desc, const QStringList& values )
+bool PPDLoader::putStatement( const TQString& keyword, const TQString& name, const TQString& desc, const TQStringList& values )
{
if ( m_option )
{
@@ -270,7 +270,7 @@ bool PPDLoader::putStatement( const QString& keyword, const QString& name, const
}
else
{
- QString fv = m_option->get( "fixedvals" );
+ TQString fv = m_option->get( "fixedvals" );
if ( fv.isEmpty() )
fv = name;
else
@@ -281,7 +281,7 @@ bool PPDLoader::putStatement( const QString& keyword, const QString& name, const
else if ( keyword == "FoomaticRIPOption" && name == m_option->name()
&& values.size() > 1 )
{
- QString type = values[ 0 ];
+ TQString type = values[ 0 ];
if ( type == "float" || type == "int" )
{
DrBase *opt = 0;
@@ -294,8 +294,8 @@ bool PPDLoader::putStatement( const QString& keyword, const QString& name, const
opt->set( "default", m_option->get( "default" ) );
if ( m_option->type() == DrBase::List )
{
- QStringList vals;
- QPtrListIterator<DrBase> it( *( static_cast<DrListOption*>( m_option )->choices() ) );
+ TQStringList vals;
+ TQPtrListIterator<DrBase> it( *( static_cast<DrListOption*>( m_option )->choices() ) );
for ( ; it.current(); ++it )
vals.append( it.current()->name() );
opt->set( "fixedvals", vals.join( "|" ) );
@@ -319,7 +319,7 @@ bool PPDLoader::putStatement( const QString& keyword, const QString& name, const
return true;
}
-bool PPDLoader::putStatement2( const QString& keyword, const QString& value )
+bool PPDLoader::putStatement2( const TQString& keyword, const TQString& value )
{
if ( !m_option && m_groups.size() == 1 )
{
@@ -339,7 +339,7 @@ bool PPDLoader::putStatement2( const QString& keyword, const QString& value )
return true;
}
-bool PPDLoader::putDefault( const QString& keyword, const QString& value )
+bool PPDLoader::putDefault( const TQString& keyword, const TQString& value )
{
if ( keyword == "Resolution" && m_groups.size() > 0 )
{
@@ -358,7 +358,7 @@ bool PPDLoader::putDefault( const QString& keyword, const QString& value )
return false;
}
-bool PPDLoader::putConstraint( const QString& opt1, const QString& opt2, const QString& ch1, const QString& ch2 )
+bool PPDLoader::putConstraint( const TQString& opt1, const TQString& opt2, const TQString& ch1, const TQString& ch2 )
{
if ( !m_option && m_groups.size() == 1 )
{
@@ -368,7 +368,7 @@ bool PPDLoader::putConstraint( const QString& opt1, const QString& opt2, const Q
return true;
}
-bool PPDLoader::putFooData( const QString& data )
+bool PPDLoader::putFooData( const TQString& data )
{
if ( !m_option && m_groups.size() == 1 )
{
@@ -377,16 +377,16 @@ bool PPDLoader::putFooData( const QString& data )
return true;
}
-bool PPDLoader::putFooProcessedData( const QVariant& var )
+bool PPDLoader::putFooProcessedData( const TQVariant& var )
{
- QMap<QString,QVariant>::ConstIterator it = var.mapFind( "args_byname" );
+ TQMap<TQString,TQVariant>::ConstIterator it = var.mapFind( "args_byname" );
if ( it != var.mapEnd() )
{
- QVariant opts = it.data();
+ TQVariant opts = it.data();
for ( it = opts.mapBegin(); it != opts.mapEnd(); ++it )
{
- QMap<QString,QVariant> opt = it.data().toMap();
- QString type = opt[ "type" ].toString();
+ TQMap<TQString,TQVariant> opt = it.data().toMap();
+ TQString type = opt[ "type" ].toString();
if ( type == "float" || type == "int" )
{
DrBase *o;
@@ -407,8 +407,8 @@ bool PPDLoader::putFooProcessedData( const QVariant& var )
{
if ( old->type() == DrBase::List )
{
- QStringList vals;
- QPtrListIterator<DrBase> it( *( static_cast<DrListOption*>( old )->choices() ) );
+ TQStringList vals;
+ TQPtrListIterator<DrBase> it( *( static_cast<DrListOption*>( old )->choices() ) );
for ( ; it.current(); ++it )
vals.append( it.current()->name() );
o->set( "fixedvals", vals.join( "|" ) );
@@ -427,9 +427,9 @@ bool PPDLoader::putFooProcessedData( const QVariant& var )
return true;
}
-bool PPDLoader::putPaperDimension( const QString& name, const QString& s )
+bool PPDLoader::putPaperDimension( const TQString& name, const TQString& s )
{
- QValueList<float> l = splitNumberString( s );
+ TQValueList<float> l = splitNumberString( s );
PS_private *ps = m_ps.find( name );
if ( !ps )
@@ -444,9 +444,9 @@ bool PPDLoader::putPaperDimension( const QString& name, const QString& s )
return true;
}
-bool PPDLoader::putImageableArea( const QString& name, const QString& s )
+bool PPDLoader::putImageableArea( const TQString& name, const TQString& s )
{
- QValueList<float> l = splitNumberString( s );
+ TQValueList<float> l = splitNumberString( s );
PS_private *ps = m_ps.find( name );
if ( !ps )
@@ -463,9 +463,9 @@ bool PPDLoader::putImageableArea( const QString& name, const QString& s )
return true;
}
-DrGroup* PPDLoader::findOrCreateGroupForOption( const QString& optname )
+DrGroup* PPDLoader::findOrCreateGroupForOption( const TQString& optname )
{
- QString grpname;
+ TQString grpname;
if ( optname == "PageSize" ||
optname == "InputSlot" ||
optname == "ManualFeed" ||
@@ -486,7 +486,7 @@ DrGroup* PPDLoader::findOrCreateGroupForOption( const QString& optname )
grpname = "Others";
DrGroup *grp = 0;
- for ( QPtrListIterator<DrGroup> it( m_groups[ 0 ]->groups() ); it.current(); ++it )
+ for ( TQPtrListIterator<DrGroup> it( m_groups[ 0 ]->groups() ); it.current(); ++it )
if ( it.current()->name() == grpname )
{
grp = it.current();
@@ -504,7 +504,7 @@ DrGroup* PPDLoader::findOrCreateGroupForOption( const QString& optname )
void PPDLoader::processPageSizes( DrMain *driver )
{
- QDictIterator<PS_private> it( m_ps );
+ TQDictIterator<PS_private> it( m_ps );
for ( ; it.current(); ++it )
{
//qDebug( "ADDING PAGESIZE: %16s, Size = ( %.2f, %.2f ), Area = ( %.2f, %.2f, %.2f, %.2f )", it.current()->name.latin1(),
@@ -520,12 +520,12 @@ void PPDLoader::processPageSizes( DrMain *driver )
m_ps.clear();
}
-void PPDLoader::setErrorMsg( const QString& msg )
+void PPDLoader::setErrorMsg( const TQString& msg )
{
m_errormsg = msg;
}
-QString PPDLoader::errorMsg() const
+TQString PPDLoader::errorMsg() const
{
return m_errormsg;
}
diff --git a/kdeprint/ppdloader.h b/kdeprint/ppdloader.h
index cd184fb35..703303fe8 100644
--- a/kdeprint/ppdloader.h
+++ b/kdeprint/ppdloader.h
@@ -20,11 +20,11 @@
#ifndef PPDLOADER_H
#define PPDLOADER_H
-#include <qvaluestack.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qvariant.h>
-#include <qdict.h>
+#include <tqvaluestack.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqvariant.h>
+#include <tqdict.h>
#include <kdelibs_export.h>
@@ -39,35 +39,35 @@ public:
PPDLoader();
~PPDLoader();
- DrMain* readFromFile( const QString& filename );
+ DrMain* readFromFile( const TQString& filename );
- bool openUi( const QString& name, const QString& desc, const QString& type );
- bool endUi( const QString& name );
- bool openGroup( const QString& name, const QString& desc );
- bool endGroup( const QString& name );
- bool putStatement( const QString& keyword, const QString& name, const QString& desc, const QStringList& values );
- bool putStatement2( const QString& keyword, const QString& value );
- bool putDefault( const QString& keyword, const QString& value );
- bool putConstraint( const QString& opt1, const QString& opt2, const QString& ch1, const QString& ch2 );
- bool putFooData( const QString& data );
- bool putFooProcessedData( const QVariant& var );
- bool putPaperDimension( const QString& name, const QString& s );
- bool putImageableArea( const QString& name, const QString& s );
+ bool openUi( const TQString& name, const TQString& desc, const TQString& type );
+ bool endUi( const TQString& name );
+ bool openGroup( const TQString& name, const TQString& desc );
+ bool endGroup( const TQString& name );
+ bool putStatement( const TQString& keyword, const TQString& name, const TQString& desc, const TQStringList& values );
+ bool putStatement2( const TQString& keyword, const TQString& value );
+ bool putDefault( const TQString& keyword, const TQString& value );
+ bool putConstraint( const TQString& opt1, const TQString& opt2, const TQString& ch1, const TQString& ch2 );
+ bool putFooData( const TQString& data );
+ bool putFooProcessedData( const TQVariant& var );
+ bool putPaperDimension( const TQString& name, const TQString& s );
+ bool putImageableArea( const TQString& name, const TQString& s );
- void setErrorMsg( const QString& msg );
- QString errorMsg() const;
+ void setErrorMsg( const TQString& msg );
+ TQString errorMsg() const;
- static DrMain* loadDriver( const QString& filename, QString* msg = NULL );
+ static DrMain* loadDriver( const TQString& filename, TQString* msg = NULL );
private:
- QValueStack<DrGroup*> m_groups;
+ TQValueStack<DrGroup*> m_groups;
DrBase* m_option;
- QDict<PS_private> m_ps;
- QStringList m_fonts;
- QString m_errormsg;
+ TQDict<PS_private> m_ps;
+ TQStringList m_fonts;
+ TQString m_errormsg;
friend int kdeprint_ppdparse(void*);
- DrGroup* findOrCreateGroupForOption( const QString& );
+ DrGroup* findOrCreateGroupForOption( const TQString& );
void processPageSizes( DrMain* );
};
diff --git a/kdeprint/ppdparser.cpp b/kdeprint/ppdparser.cpp
index 336362f13..00710b152 100644
--- a/kdeprint/ppdparser.cpp
+++ b/kdeprint/ppdparser.cpp
@@ -125,7 +125,7 @@
#define YYDEBUG 1
#define YYERROR_VERBOSE 1
#include <stdlib.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include "ppdloader.h"
@@ -1158,7 +1158,7 @@ yyreduce:
case 15:
#line 77 "./ppdparser.y"
- { builder->openUi(yyvsp[-2][0], QString::null, yyvsp[0][0]); ;}
+ { builder->openUi(yyvsp[-2][0], TQString::null, yyvsp[0][0]); ;}
break;
case 16:
@@ -1178,7 +1178,7 @@ yyreduce:
case 19:
#line 85 "./ppdparser.y"
- { builder->openGroup(yyvsp[0].join(" "), QString::null); ;}
+ { builder->openGroup(yyvsp[0].join(" "), TQString::null); ;}
break;
case 20:
@@ -1203,17 +1203,17 @@ yyreduce:
case 24:
#line 94 "./ppdparser.y"
- { builder->putConstraint(yyvsp[-2][0], yyvsp[0][0], yyvsp[-1][0], QString::null); ;}
+ { builder->putConstraint(yyvsp[-2][0], yyvsp[0][0], yyvsp[-1][0], TQString::null); ;}
break;
case 25:
#line 95 "./ppdparser.y"
- { builder->putConstraint(yyvsp[-2][0], yyvsp[-1][0], QString::null, yyvsp[0][0]); ;}
+ { builder->putConstraint(yyvsp[-2][0], yyvsp[-1][0], TQString::null, yyvsp[0][0]); ;}
break;
case 26:
#line 96 "./ppdparser.y"
- { builder->putConstraint(yyvsp[-1][0], yyvsp[0][0], QString::null, QString::null); ;}
+ { builder->putConstraint(yyvsp[-1][0], yyvsp[0][0], TQString::null, TQString::null); ;}
break;
case 27:
@@ -1223,7 +1223,7 @@ yyreduce:
case 28:
#line 100 "./ppdparser.y"
- { builder->putStatement(yyvsp[-3][0], yyvsp[-2][0], QString::null, yyvsp[0]); ;}
+ { builder->putStatement(yyvsp[-3][0], yyvsp[-2][0], TQString::null, yyvsp[0]); ;}
break;
case 29:
@@ -1233,7 +1233,7 @@ yyreduce:
case 30:
#line 102 "./ppdparser.y"
- { builder->putStatement(yyvsp[-4][0], yyvsp[-3][0], QString::null, yyvsp[-1]); ;}
+ { builder->putStatement(yyvsp[-4][0], yyvsp[-3][0], TQString::null, yyvsp[-1]); ;}
break;
case 31:
diff --git a/kdeprint/ppdscanner.cpp b/kdeprint/ppdscanner.cpp
index 48ce2f89a..1b138a491 100644
--- a/kdeprint/ppdscanner.cpp
+++ b/kdeprint/ppdscanner.cpp
@@ -538,14 +538,14 @@ char *yytext;
* Boston, MA 02110-1301, USA.
**/
-#include <qstringlist.h>
-#include <qiodevice.h>
+#include <tqstringlist.h>
+#include <tqiodevice.h>
#define YYSTYPE QStringList
#include "ppdparser.cpp.h"
#define yylval kdeprint_ppdlval
-QIODevice *kdeprint_ppdscanner_device = NULL;
+TQIODevice *kdeprint_ppdscanner_device = NULL;
#define YY_INPUT(buf,result,max_size) \
{ \
if (kdeprint_ppdscanner_device) \
@@ -1895,7 +1895,7 @@ int main()
#line 123 "./ppdscanner.l"
-void kdeprint_ppdscanner_init(QIODevice *d)
+void kdeprint_ppdscanner_init(TQIODevice *d)
{
kdeprint_ppdscanner_device = d;
kdeprint_ppdscanner_lno = 1;
diff --git a/kdeprint/printerfilter.cpp b/kdeprint/printerfilter.cpp
index a85944dc7..a6f02f077 100644
--- a/kdeprint/printerfilter.cpp
+++ b/kdeprint/printerfilter.cpp
@@ -25,8 +25,8 @@
#include <kglobal.h>
#include <kdebug.h>
-PrinterFilter::PrinterFilter(QObject *parent, const char *name)
-: QObject(parent, name)
+PrinterFilter::PrinterFilter(TQObject *parent, const char *name)
+: TQObject(parent, name)
{
m_locationRe.setWildcard(true);
update();
diff --git a/kdeprint/printerfilter.h b/kdeprint/printerfilter.h
index dba7c6fa7..7deb9d345 100644
--- a/kdeprint/printerfilter.h
+++ b/kdeprint/printerfilter.h
@@ -20,16 +20,16 @@
#ifndef PRINTERFILTER_H
#define PRINTERFILTER_H
-#include <qobject.h>
-#include <qregexp.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqregexp.h>
+#include <tqstringlist.h>
class KMPrinter;
class PrinterFilter : QObject
{
public:
- PrinterFilter(QObject *parent = 0, const char *name = 0);
+ PrinterFilter(TQObject *parent = 0, const char *name = 0);
~PrinterFilter();
bool filter(KMPrinter*);
diff --git a/kdeprint/rlpr/kmconfigproxy.cpp b/kdeprint/rlpr/kmconfigproxy.cpp
index 4c81ba6fc..0676fc7e6 100644
--- a/kdeprint/rlpr/kmconfigproxy.cpp
+++ b/kdeprint/rlpr/kmconfigproxy.cpp
@@ -20,10 +20,10 @@
#include "kmconfigproxy.h"
#include "kmproxywidget.h"
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klocale.h>
-KMConfigProxy::KMConfigProxy(QWidget *parent)
+KMConfigProxy::KMConfigProxy(TQWidget *parent)
: KMConfigPage(parent,"Proxy")
{
setPageName(i18n("Proxy"));
@@ -31,7 +31,7 @@ KMConfigProxy::KMConfigProxy(QWidget *parent)
setPagePixmap("proxy");
m_widget = new KMProxyWidget(this);
- QVBoxLayout *lay0 = new QVBoxLayout(this, 5, 0);
+ QVBoxLayout *lay0 = new TQVBoxLayout(this, 5, 0);
lay0->addWidget(m_widget);
lay0->addStretch(1);
}
diff --git a/kdeprint/rlpr/kmconfigproxy.h b/kdeprint/rlpr/kmconfigproxy.h
index ea3e80118..0fcfdaf55 100644
--- a/kdeprint/rlpr/kmconfigproxy.h
+++ b/kdeprint/rlpr/kmconfigproxy.h
@@ -28,7 +28,7 @@ class KConfig;
class KMConfigProxy : public KMConfigPage
{
public:
- KMConfigProxy(QWidget *parent = 0);
+ KMConfigProxy(TQWidget *parent = 0);
void loadConfig(KConfig*);
void saveConfig(KConfig*);
diff --git a/kdeprint/rlpr/kmproprlpr.cpp b/kdeprint/rlpr/kmproprlpr.cpp
index f13436e0b..3296949a3 100644
--- a/kdeprint/rlpr/kmproprlpr.cpp
+++ b/kdeprint/rlpr/kmproprlpr.cpp
@@ -21,21 +21,21 @@
#include "kmprinter.h"
#include "kmwizard.h"
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <klocale.h>
-KMPropRlpr::KMPropRlpr(QWidget *parent, const char *name)
+KMPropRlpr::KMPropRlpr(TQWidget *parent, const char *name)
: KMPropWidget(parent,name)
{
- m_host = new QLabel("",this);
- m_queue = new QLabel("",this);
+ m_host = new TQLabel("",this);
+ m_queue = new TQLabel("",this);
- QLabel *l1 = new QLabel(i18n("Host:"), this);
- QLabel *l2 = new QLabel(i18n("Queue:"), this);
+ QLabel *l1 = new TQLabel(i18n("Host:"), this);
+ QLabel *l2 = new TQLabel(i18n("Queue:"), this);
// layout
- QGridLayout *main_ = new QGridLayout(this, 3, 2, 10, 7);
+ QGridLayout *main_ = new TQGridLayout(this, 3, 2, 10, 7);
main_->setColStretch(0,0);
main_->setColStretch(1,1);
main_->setRowStretch(2,1);
diff --git a/kdeprint/rlpr/kmproprlpr.h b/kdeprint/rlpr/kmproprlpr.h
index 587321719..2c240f3db 100644
--- a/kdeprint/rlpr/kmproprlpr.h
+++ b/kdeprint/rlpr/kmproprlpr.h
@@ -27,7 +27,7 @@ class QLabel;
class KMPropRlpr : public KMPropWidget
{
public:
- KMPropRlpr(QWidget *parent = 0, const char *name = 0);
+ KMPropRlpr(TQWidget *parent = 0, const char *name = 0);
~KMPropRlpr();
void setPrinter(KMPrinter*);
diff --git a/kdeprint/rlpr/kmproxywidget.cpp b/kdeprint/rlpr/kmproxywidget.cpp
index 5e4256ecf..c6dd59189 100644
--- a/kdeprint/rlpr/kmproxywidget.cpp
+++ b/kdeprint/rlpr/kmproxywidget.cpp
@@ -19,34 +19,34 @@
#include "kmproxywidget.h"
-#include <qlineedit.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qvalidator.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqvalidator.h>
#include <klocale.h>
#include <kconfig.h>
#include <kcursor.h>
-KMProxyWidget::KMProxyWidget(QWidget *parent, const char *name)
-: QGroupBox(0, Qt::Vertical, i18n("Proxy Settings"), parent, name)
+KMProxyWidget::KMProxyWidget(TQWidget *parent, const char *name)
+: TQGroupBox(0, Qt::Vertical, i18n("Proxy Settings"), parent, name)
{
- QLabel *m_hostlabel = new QLabel(i18n("&Host:"), this);
- QLabel *m_portlabel = new QLabel(i18n("&Port:"), this);
- m_useproxy = new QCheckBox(i18n("&Use proxy server"), this);
+ QLabel *m_hostlabel = new TQLabel(i18n("&Host:"), this);
+ QLabel *m_portlabel = new TQLabel(i18n("&Port:"), this);
+ m_useproxy = new TQCheckBox(i18n("&Use proxy server"), this);
m_useproxy->setCursor(KCursor::handCursor());
- m_proxyhost = new QLineEdit(this);
- m_proxyport = new QLineEdit(this);
- m_proxyport->setValidator(new QIntValidator(m_proxyport));
+ m_proxyhost = new TQLineEdit(this);
+ m_proxyport = new TQLineEdit(this);
+ m_proxyport->setValidator(new TQIntValidator(m_proxyport));
m_hostlabel->setBuddy(m_proxyhost);
m_portlabel->setBuddy(m_proxyport);
- connect(m_useproxy,SIGNAL(toggled(bool)),m_proxyhost,SLOT(setEnabled(bool)));
- connect(m_useproxy,SIGNAL(toggled(bool)),m_proxyport,SLOT(setEnabled(bool)));
+ connect(m_useproxy,TQT_SIGNAL(toggled(bool)),m_proxyhost,TQT_SLOT(setEnabled(bool)));
+ connect(m_useproxy,TQT_SIGNAL(toggled(bool)),m_proxyport,TQT_SLOT(setEnabled(bool)));
m_proxyhost->setEnabled(false);
m_proxyport->setEnabled(false);
- QGridLayout *lay0 = new QGridLayout(layout(), 3, 2, 10);
+ QGridLayout *lay0 = new TQGridLayout(layout(), 3, 2, 10);
lay0->setColStretch(1,1);
lay0->addMultiCellWidget(m_useproxy,0,0,0,1);
lay0->addWidget(m_hostlabel,1,0);
@@ -58,14 +58,14 @@ KMProxyWidget::KMProxyWidget(QWidget *parent, const char *name)
void KMProxyWidget::loadConfig(KConfig *conf)
{
conf->setGroup("RLPR");
- m_proxyhost->setText(conf->readEntry("ProxyHost",QString::null));
- m_proxyport->setText(conf->readEntry("ProxyPort",QString::null));
+ m_proxyhost->setText(conf->readEntry("ProxyHost",TQString::null));
+ m_proxyport->setText(conf->readEntry("ProxyPort",TQString::null));
m_useproxy->setChecked(!m_proxyhost->text().isEmpty());
}
void KMProxyWidget::saveConfig(KConfig *conf)
{
conf->setGroup("RLPR");
- conf->writeEntry("ProxyHost",(m_useproxy->isChecked() ? m_proxyhost->text() : QString::null));
- conf->writeEntry("ProxyPort",(m_useproxy->isChecked() ? m_proxyport->text() : QString::null));
+ conf->writeEntry("ProxyHost",(m_useproxy->isChecked() ? m_proxyhost->text() : TQString::null));
+ conf->writeEntry("ProxyPort",(m_useproxy->isChecked() ? m_proxyport->text() : TQString::null));
}
diff --git a/kdeprint/rlpr/kmproxywidget.h b/kdeprint/rlpr/kmproxywidget.h
index 4c9dbf7e1..91314f3d3 100644
--- a/kdeprint/rlpr/kmproxywidget.h
+++ b/kdeprint/rlpr/kmproxywidget.h
@@ -20,7 +20,7 @@
#ifndef KMPROXYWIDGET_H
#define KMPROXYWIDGET_H
-#include <qgroupbox.h>
+#include <tqgroupbox.h>
class KConfig;
class QLineEdit;
@@ -29,7 +29,7 @@ class QCheckBox;
class KMProxyWidget : public QGroupBox
{
public:
- KMProxyWidget(QWidget *parent = 0, const char *name = 0);
+ KMProxyWidget(TQWidget *parent = 0, const char *name = 0);
void loadConfig(KConfig*);
void saveConfig(KConfig*);
diff --git a/kdeprint/rlpr/kmrlprmanager.cpp b/kdeprint/rlpr/kmrlprmanager.cpp
index eafb1a497..f455fd1ff 100644
--- a/kdeprint/rlpr/kmrlprmanager.cpp
+++ b/kdeprint/rlpr/kmrlprmanager.cpp
@@ -20,15 +20,15 @@
#include "kmrlprmanager.h"
#include "kmprinter.h"
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qtextstream.h>
-#include <qmap.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqtextstream.h>
+#include <tqmap.h>
#include <kstandarddirs.h>
#include <klocale.h>
-KMRlprManager::KMRlprManager(QObject *parent, const char *name, const QStringList & /*args*/)
+KMRlprManager::KMRlprManager(TQObject *parent, const char *name, const TQStringList & /*args*/)
: KMManager(parent,name)
{
setHasManagement(true);
@@ -88,7 +88,7 @@ void KMRlprManager::listPrinters()
discardAllPrinters(false);
}
-void KMRlprManager::loadPrintersConf(const QString& filename)
+void KMRlprManager::loadPrintersConf(const TQString& filename)
{
QFile f(filename);
if (f.exists() && f.open(IO_ReadOnly))
@@ -100,7 +100,7 @@ void KMRlprManager::loadPrintersConf(const QString& filename)
line = t.readLine().stripWhiteSpace();
if (line.isEmpty() || line[0] == '#')
continue;
- QStringList w = QStringList::split('\t',line,true);
+ QStringList w = TQStringList::split('\t',line,true);
if (w.count() < 3)
continue;
@@ -116,7 +116,7 @@ void KMRlprManager::loadPrintersConf(const QString& filename)
if (w.count() > 4) printer->setLocation(w[4]);
}
printer->setState(KMPrinter::Idle);
- printer->setDevice(QString::fromLatin1("lpd://%1/%2").arg(w[1]).arg(w[2]));
+ printer->setDevice(TQString::fromLatin1("lpd://%1/%2").arg(w[1]).arg(w[2]));
addPrinter(printer);
}
@@ -128,14 +128,14 @@ void KMRlprManager::savePrinters()
savePrintersConf(printerFile());
}
-void KMRlprManager::savePrintersConf(const QString& filename)
+void KMRlprManager::savePrintersConf(const TQString& filename)
{
QFile f(filename);
if (f.open(IO_WriteOnly))
{
QTextStream t(&f);
t << "# File generated by KDE print system. Don't edit by hand." << endl;
- QPtrListIterator<KMPrinter> it(m_printers);
+ TQPtrListIterator<KMPrinter> it(m_printers);
for (;it.current();++it)
{
if (!it.current()->name().isEmpty() && it.current()->instanceName().isEmpty())
@@ -152,7 +152,7 @@ void KMRlprManager::savePrintersConf(const QString& filename)
}
}
-QString KMRlprManager::printerFile()
+TQString KMRlprManager::printerFile()
{
return locateLocal("data","kdeprint/printers.conf");
}
diff --git a/kdeprint/rlpr/kmrlprmanager.h b/kdeprint/rlpr/kmrlprmanager.h
index 2a2e6844d..eb47f95df 100644
--- a/kdeprint/rlpr/kmrlprmanager.h
+++ b/kdeprint/rlpr/kmrlprmanager.h
@@ -21,13 +21,13 @@
#define KMRLPRMANAGER_H
#include "kmmanager.h"
-#include <qdict.h>
-#include <qdatetime.h>
+#include <tqdict.h>
+#include <tqdatetime.h>
class KMRlprManager : public KMManager
{
public:
- KMRlprManager(QObject *parent, const char *name, const QStringList & /*args*/);
+ KMRlprManager(TQObject *parent, const char *name, const TQStringList & /*args*/);
~KMRlprManager();
bool createPrinter(KMPrinter*);
@@ -37,9 +37,9 @@ public:
protected:
void listPrinters();
void savePrinters();
- void loadPrintersConf(const QString& filename);
- void savePrintersConf(const QString& filename);
- QString printerFile();
+ void loadPrintersConf(const TQString& filename);
+ void savePrintersConf(const TQString& filename);
+ TQString printerFile();
private:
QDateTime m_checktime;
diff --git a/kdeprint/rlpr/kmrlpruimanager.cpp b/kdeprint/rlpr/kmrlpruimanager.cpp
index 5cdb03b95..5ca7a2230 100644
--- a/kdeprint/rlpr/kmrlpruimanager.cpp
+++ b/kdeprint/rlpr/kmrlpruimanager.cpp
@@ -28,7 +28,7 @@
#include <klocale.h>
-KMRlprUiManager::KMRlprUiManager(QObject *parent, const char *name, const QStringList & /*args*/)
+KMRlprUiManager::KMRlprUiManager(TQObject *parent, const char *name, const TQStringList & /*args*/)
: KMUiManager(parent,name)
{
}
diff --git a/kdeprint/rlpr/kmrlpruimanager.h b/kdeprint/rlpr/kmrlpruimanager.h
index 5a31f4dee..3f244eb5b 100644
--- a/kdeprint/rlpr/kmrlpruimanager.h
+++ b/kdeprint/rlpr/kmrlpruimanager.h
@@ -25,7 +25,7 @@
class KMRlprUiManager : public KMUiManager
{
public:
- KMRlprUiManager(QObject *parent, const char *name, const QStringList & /*args*/);
+ KMRlprUiManager(TQObject *parent, const char *name, const TQStringList & /*args*/);
~KMRlprUiManager();
void setupPropertyPages(KMPropertyPage*);
diff --git a/kdeprint/rlpr/kmwrlpr.cpp b/kdeprint/rlpr/kmwrlpr.cpp
index 50006c14c..78f483db6 100644
--- a/kdeprint/rlpr/kmwrlpr.cpp
+++ b/kdeprint/rlpr/kmwrlpr.cpp
@@ -21,18 +21,18 @@
#include "kmprinter.h"
#include "kmwizard.h"
-#include <qdir.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qheader.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqheader.h>
#include <klistview.h>
#include <klocale.h>
#include <kiconloader.h>
-static QListViewItem* findChild(QListViewItem *c, const QString& txt)
+static TQListViewItem* findChild(TQListViewItem *c, const TQString& txt)
{
QListViewItem *item(c);
while (item)
@@ -43,7 +43,7 @@ static QListViewItem* findChild(QListViewItem *c, const QString& txt)
//*****************************************************************************************************
-KMWRlpr::KMWRlpr(QWidget *parent, const char *name)
+KMWRlpr::KMWRlpr(TQWidget *parent, const char *name)
: KMWizardPage(parent,name)
{
m_ID = KMWizard::Custom+1;
@@ -51,22 +51,22 @@ KMWRlpr::KMWRlpr(QWidget *parent, const char *name)
m_nextpage = KMWizard::Name;
m_view = new KListView(this);
- m_view->setFrameStyle(QFrame::WinPanel|QFrame::Sunken);
+ m_view->setFrameStyle(TQFrame::WinPanel|TQFrame::Sunken);
m_view->setLineWidth(1);
- m_view->addColumn(QString::fromLatin1(""));
+ m_view->addColumn(TQString::fromLatin1(""));
m_view->header()->hide();
m_view->setRootIsDecorated(true);
m_view->setSorting(0);
- m_host = new QLineEdit(this);
- m_queue = new QLineEdit(this);
- QLabel *m_hostlabel = new QLabel(i18n("Host:"), this);
- QLabel *m_queuelabel = new QLabel(i18n("Queue:"), this);
+ m_host = new TQLineEdit(this);
+ m_queue = new TQLineEdit(this);
+ QLabel *m_hostlabel = new TQLabel(i18n("Host:"), this);
+ QLabel *m_queuelabel = new TQLabel(i18n("Queue:"), this);
m_hostlabel->setBuddy(m_host);
m_queuelabel->setBuddy(m_queue);
- connect(m_view,SIGNAL(selectionChanged(QListViewItem*)),SLOT(slotPrinterSelected(QListViewItem*)));
+ connect(m_view,TQT_SIGNAL(selectionChanged(TQListViewItem*)),TQT_SLOT(slotPrinterSelected(TQListViewItem*)));
- QHBoxLayout *lay0 = new QHBoxLayout(this, 0, 10);
- QVBoxLayout *lay1 = new QVBoxLayout(0, 0, 5);
+ QHBoxLayout *lay0 = new TQHBoxLayout(this, 0, 10);
+ QVBoxLayout *lay1 = new TQVBoxLayout(0, 0, 5);
lay0->addWidget(m_view,1);
lay0->addLayout(lay1,1);
lay1->addWidget(m_hostlabel);
@@ -79,7 +79,7 @@ KMWRlpr::KMWRlpr(QWidget *parent, const char *name)
initialize();
}
-bool KMWRlpr::isValid(QString& msg)
+bool KMWRlpr::isValid(TQString& msg)
{
if (m_host->text().isEmpty())
msg = i18n("Empty host name.");
@@ -109,7 +109,7 @@ void KMWRlpr::initPrinter(KMPrinter *p)
void KMWRlpr::updatePrinter(KMPrinter *p)
{
- QString uri = QString::fromLatin1("lpd://%1/%2").arg(m_host->text()).arg(m_queue->text());
+ QString uri = TQString::fromLatin1("lpd://%1/%2").arg(m_host->text()).arg(m_queue->text());
p->setDevice(uri);
p->setOption("host",m_host->text());
p->setOption("queue",m_queue->text());
@@ -128,7 +128,7 @@ void KMWRlpr::updatePrinter(KMPrinter *p)
void KMWRlpr::initialize()
{
m_view->clear();
- QFile f(QDir::homeDirPath()+"/.rlprrc");
+ QFile f(TQDir::homeDirPath()+"/.rlprrc");
if (!f.exists()) f.setName("/etc/rlprrc");
if (f.exists() && f.open(IO_ReadOnly))
{
@@ -143,12 +143,12 @@ void KMWRlpr::initialize()
if ((p=line.find(':')) != -1)
{
host = line.left(p).stripWhiteSpace();
- QListViewItem *hitem = new QListViewItem(m_view,host);
+ QListViewItem *hitem = new TQListViewItem(m_view,host);
hitem->setPixmap(0,SmallIcon("kdeprint_computer"));
- QStringList prs = QStringList::split(' ',line.right(line.length()-p-1),false);
- for (QStringList::ConstIterator it=prs.begin(); it!=prs.end(); ++it)
+ QStringList prs = TQStringList::split(' ',line.right(line.length()-p-1),false);
+ for (TQStringList::ConstIterator it=prs.begin(); it!=prs.end(); ++it)
{
- QListViewItem *pitem = new QListViewItem(hitem,*it);
+ QListViewItem *pitem = new TQListViewItem(hitem,*it);
pitem->setPixmap(0,SmallIcon("kdeprint_printer"));
}
}
@@ -166,7 +166,7 @@ void KMWRlpr::initialize()
while (hitem) if (hitem->text(0) == "localhost") break; else hitem = hitem->nextSibling();
while (!t.eof())
{
- buffer = QString::null;
+ buffer = TQString::null;
while (!t.eof())
{
line = t.readLine().stripWhiteSpace();
@@ -186,20 +186,20 @@ void KMWRlpr::initialize()
QString name = buffer.left(p);
if (!hitem)
{
- hitem = new QListViewItem(m_view,"localhost");
+ hitem = new TQListViewItem(m_view,"localhost");
hitem->setPixmap(0,SmallIcon("kdeprint_computer"));
}
- QListViewItem *pitem = new QListViewItem(hitem,name);
+ QListViewItem *pitem = new TQListViewItem(hitem,name);
pitem->setPixmap(0,SmallIcon("kdeprint_printer"));
}
}
}
if (m_view->childCount() == 0)
- new QListViewItem(m_view,i18n("No Predefined Printers"));
+ new TQListViewItem(m_view,i18n("No Predefined Printers"));
}
-void KMWRlpr::slotPrinterSelected(QListViewItem *item)
+void KMWRlpr::slotPrinterSelected(TQListViewItem *item)
{
if (item && item->depth() == 1)
{
diff --git a/kdeprint/rlpr/kmwrlpr.h b/kdeprint/rlpr/kmwrlpr.h
index 5f66180ad..ec4c378b8 100644
--- a/kdeprint/rlpr/kmwrlpr.h
+++ b/kdeprint/rlpr/kmwrlpr.h
@@ -30,14 +30,14 @@ class KMWRlpr : public KMWizardPage
{
Q_OBJECT
public:
- KMWRlpr(QWidget *parent = 0, const char *name = 0);
+ KMWRlpr(TQWidget *parent = 0, const char *name = 0);
- bool isValid(QString&);
+ bool isValid(TQString&);
void initPrinter(KMPrinter*);
void updatePrinter(KMPrinter*);
protected slots:
- void slotPrinterSelected(QListViewItem*);
+ void slotPrinterSelected(TQListViewItem*);
protected:
void initialize();
diff --git a/kdeprint/rlpr/krlprprinterimpl.cpp b/kdeprint/rlpr/krlprprinterimpl.cpp
index 9c77518b6..1d4845bde 100644
--- a/kdeprint/rlpr/krlprprinterimpl.cpp
+++ b/kdeprint/rlpr/krlprprinterimpl.cpp
@@ -23,12 +23,12 @@
#include "kmmanager.h"
#include "kmprinter.h"
-#include <qfile.h>
+#include <tqfile.h>
#include <kstandarddirs.h>
#include <kconfig.h>
#include <klocale.h>
-KRlprPrinterImpl::KRlprPrinterImpl(QObject *parent, const char *name, const QStringList & /*args*/)
+KRlprPrinterImpl::KRlprPrinterImpl(TQObject *parent, const char *name, const TQStringList & /*args*/)
: KPrinterImpl(parent,name)
{
}
@@ -37,7 +37,7 @@ KRlprPrinterImpl::~KRlprPrinterImpl()
{
}
-bool KRlprPrinterImpl::setupCommand(QString& cmd, KPrinter *printer)
+bool KRlprPrinterImpl::setupCommand(TQString& cmd, KPrinter *printer)
{
// retrieve the KMPrinter object, to get host and queue name
KMPrinter *rpr = KMFactory::self()->manager()->findPrinter(printer->printerName());
@@ -54,12 +54,12 @@ bool KRlprPrinterImpl::setupCommand(QString& cmd, KPrinter *printer)
return false;
}
- cmd = QString::fromLatin1("%1 -H %2 -P %3 -\\#%4").arg(exestr).arg(quote(host)).arg(quote(queue)).arg(printer->numCopies());
+ cmd = TQString::fromLatin1("%1 -H %2 -P %3 -\\#%4").arg(exestr).arg(quote(host)).arg(quote(queue)).arg(printer->numCopies());
// proxy settings
KConfig *conf = KMFactory::self()->printConfig();
conf->setGroup("RLPR");
- QString host = conf->readEntry("ProxyHost",QString::null), port = conf->readEntry("ProxyPort",QString::null);
+ QString host = conf->readEntry("ProxyHost",TQString::null), port = conf->readEntry("ProxyPort",TQString::null);
if (!host.isEmpty())
{
cmd.append(" -X ").append(quote(host));
diff --git a/kdeprint/rlpr/krlprprinterimpl.h b/kdeprint/rlpr/krlprprinterimpl.h
index 14c054b1e..9ed5eeebb 100644
--- a/kdeprint/rlpr/krlprprinterimpl.h
+++ b/kdeprint/rlpr/krlprprinterimpl.h
@@ -27,10 +27,10 @@ class KProcess;
class KRlprPrinterImpl : public KPrinterImpl
{
public:
- KRlprPrinterImpl(QObject *parent, const char *name, const QStringList & /*args*/);
+ KRlprPrinterImpl(TQObject *parent, const char *name, const TQStringList & /*args*/);
~KRlprPrinterImpl();
- bool setupCommand(QString&, KPrinter*);
+ bool setupCommand(TQString&, KPrinter*);
};
#endif
diff --git a/kdeprint/tests/drawdemo.cpp b/kdeprint/tests/drawdemo.cpp
index f399d7d6d..443cc89e8 100644
--- a/kdeprint/tests/drawdemo.cpp
+++ b/kdeprint/tests/drawdemo.cpp
@@ -8,14 +8,14 @@
**
*****************************************************************************/
-#include <qwidget.h>
-#include <qpainter.h>
+#include <tqwidget.h>
+#include <tqpainter.h>
#include <kprinter.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qbuttongroup.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
+#include <tqbuttongroup.h>
#include <kapplication.h>
-#include <qapplication.h>
+#include <tqapplication.h>
#include <math.h>
@@ -24,27 +24,27 @@
// The coordinate system x=(0..500), y=(0..500) spans the paint device.
//
-void drawColorWheel( QPainter *p )
+void drawColorWheel( TQPainter *p )
{
- QFont f( "times", 18, QFont::Bold );
+ TQFont f( "times", 18, TQFont::Bold );
p->setFont( f );
p->setPen( Qt::black );
p->setWindow( 0, 0, 500, 500 ); // defines coordinate system
for ( int i=0; i<36; i++ ) { // draws 36 rotated rectangles
- QWMatrix matrix;
+ TQWMatrix matrix;
matrix.translate( 250.0F, 250.0F ); // move to center
matrix.shear( 0.0F, 0.3F ); // twist it
matrix.rotate( (float)i*10 ); // rotate 0,10,20,.. degrees
p->setWorldMatrix( matrix ); // use this world matrix
- QColor c;
+ TQColor c;
c.setHsv( i*10, 255, 255 ); // rainbow effect
p->setBrush( c ); // solid fill with color c
p->drawRect( 70, -10, 80, 10 ); // draw the rectangle
- QString n;
+ TQString n;
n.sprintf( "H=%d", i*10 );
p->drawText( 80+70+5, 0, n ); // draw the hue number
}
@@ -55,7 +55,7 @@ void drawColorWheel( QPainter *p )
// This function draws a few lines of text using different fonts.
//
-void drawFonts( QPainter *p )
+void drawFonts( TQPainter *p )
{
static const char *fonts[] = { "Helvetica", "Courier", "Times", 0 };
static int sizes[] = { 10, 12, 18, 24, 36, 0 };
@@ -64,9 +64,9 @@ void drawFonts( QPainter *p )
while ( fonts[f] ) {
int s = 0;
while ( sizes[s] ) {
- QFont font( fonts[f], sizes[s] );
+ TQFont font( fonts[f], sizes[s] );
p->setFont( font );
- QFontMetrics fm = p->fontMetrics();
+ TQFontMetrics fm = p->fontMetrics();
y += fm.ascent();
p->drawText( 10, y, "Quartz Glyph Job Vex'd Cwm Finks" );
y += fm.descent();
@@ -81,12 +81,12 @@ void drawFonts( QPainter *p )
// This function draws some shapes
//
-void drawShapes( QPainter *p )
+void drawShapes( TQPainter *p )
{
- QBrush b1( Qt::blue );
- QBrush b2( Qt::green, Qt::Dense6Pattern ); // green 12% fill
- QBrush b3( Qt::NoBrush ); // void brush
- QBrush b4( Qt::CrossPattern ); // black cross pattern
+ TQBrush b1( Qt::blue );
+ TQBrush b2( Qt::green, Qt::Dense6Pattern ); // green 12% fill
+ TQBrush b3( Qt::NoBrush ); // void brush
+ TQBrush b4( Qt::CrossPattern ); // black cross pattern
p->setPen( Qt::red );
p->setBrush( b1 );
@@ -100,7 +100,7 @@ void drawShapes( QPainter *p )
}
-typedef void (*draw_func)(QPainter*);
+typedef void (*draw_func)(TQPainter*);
struct DrawThing {
draw_func f;
@@ -131,15 +131,15 @@ DrawView::DrawView()
setBackgroundColor( white );
// Create a button group to contain all buttons
- bgroup = new QButtonGroup( this );
+ bgroup = new TQButtonGroup( this );
bgroup->resize( 200, 200 );
- connect( bgroup, SIGNAL(clicked(int)), SLOT(updateIt(int)) );
+ connect( bgroup, TQT_SIGNAL(clicked(int)), TQT_SLOT(updateIt(int)) );
// Calculate the size for the radio buttons
int maxwidth = 80;
int i;
const char *n;
- QFontMetrics fm = bgroup->fontMetrics();
+ TQFontMetrics fm = bgroup->fontMetrics();
for ( i=0; (n=ourDrawFunctions[i].name) != 0; i++ ) {
int w = fm.width( n );
maxwidth = QMAX(w,maxwidth);
@@ -147,7 +147,7 @@ DrawView::DrawView()
maxwidth = maxwidth + 20; // add 20 pixels
for ( i=0; (n=ourDrawFunctions[i].name) != 0; i++ ) {
- QRadioButton *rb = new QRadioButton( n, bgroup );
+ TQRadioButton *rb = new TQRadioButton( n, bgroup );
rb->setGeometry( 10, i*30+10, maxwidth, 30 );
if ( i == 0 )
rb->setChecked( true );
@@ -161,10 +161,10 @@ DrawView::DrawView()
printer = new KPrinter;
// Create and setup the print button
- print = new QPushButton( "Print...", bgroup );
+ print = new TQPushButton( "Print...", bgroup );
print->resize( 80, 30 );
print->move( maxwidth/2 - print->width()/2, maxindex*30+20 );
- connect( print, SIGNAL(clicked()), SLOT(printIt()) );
+ connect( print, TQT_SIGNAL(clicked()), TQT_SLOT(printIt()) );
bgroup->resize( maxwidth, print->y()+print->height()+10 );
@@ -197,7 +197,7 @@ void DrawView::updateIt( int index )
// Calls the drawing function as specified by the radio buttons.
//
-void DrawView::drawIt( QPainter *p )
+void DrawView::drawIt( TQPainter *p )
{
(*ourDrawFunctions[drawindex].f)(p);
}
@@ -210,7 +210,7 @@ void DrawView::printIt()
{
#ifndef QT_NO_PRINTER
if ( printer->setup( this ) ) {
- QPainter paint( printer );
+ TQPainter paint( printer );
drawIt( &paint );
}
#endif
@@ -220,9 +220,9 @@ void DrawView::printIt()
// Called when the widget needs to be updated.
//
-void DrawView::paintEvent( QPaintEvent * )
+void DrawView::paintEvent( TQPaintEvent * )
{
- QPainter paint( this );
+ TQPainter paint( this );
drawIt( &paint );
}
@@ -231,7 +231,7 @@ void DrawView::paintEvent( QPaintEvent * )
// Moves the button group to the upper right corner
// of the widget.
-void DrawView::resizeEvent( QResizeEvent * )
+void DrawView::resizeEvent( TQResizeEvent * )
{
bgroup->move( width()-bgroup->width(), 0 );
}
diff --git a/kdeprint/tests/drawdemo.h b/kdeprint/tests/drawdemo.h
index 81b201d54..5d2412477 100644
--- a/kdeprint/tests/drawdemo.h
+++ b/kdeprint/tests/drawdemo.h
@@ -16,12 +16,12 @@ public slots:
void updateIt( int );
void printIt();
protected:
- void drawIt( QPainter * );
- void paintEvent( QPaintEvent * );
- void resizeEvent( QResizeEvent * );
+ void drawIt( TQPainter * );
+ void paintEvent( TQPaintEvent * );
+ void resizeEvent( TQResizeEvent * );
private:
KPrinter *printer;
- QButtonGroup *bgroup;
+ TQButtonGroup *bgroup;
QPushButton *print;
int drawindex;
int maxindex;
diff --git a/kdeprint/tests/helpwindow.cpp b/kdeprint/tests/helpwindow.cpp
index 4fdc6d7a5..c2cdb1b22 100644
--- a/kdeprint/tests/helpwindow.cpp
+++ b/kdeprint/tests/helpwindow.cpp
@@ -10,99 +10,99 @@
#include "helpwindow.h"
#include "richpage.h"
-#include <qstatusbar.h>
-#include <qpixmap.h>
-#include <qpopupmenu.h>
+#include <tqstatusbar.h>
+#include <tqpixmap.h>
+#include <tqpopupmenu.h>
#include <kmenubar.h>
#include <ktoolbar.h>
#include <kstatusbar.h>
-#include <qtoolbutton.h>
-#include <qiconset.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qstylesheet.h>
-#include <qmessagebox.h>
-#include <qfiledialog.h>
-#include <qapplication.h>
-#include <qcombobox.h>
-#include <qevent.h>
-#include <qlineedit.h>
-#include <qobjectlist.h>
-#include <qfileinfo.h>
-#include <qdatastream.h>
+#include <tqtoolbutton.h>
+#include <tqiconset.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqstylesheet.h>
+#include <tqmessagebox.h>
+#include <tqfiledialog.h>
+#include <tqapplication.h>
+#include <tqcombobox.h>
+#include <tqevent.h>
+#include <tqlineedit.h>
+#include <tqobjectlist.h>
+#include <tqfileinfo.h>
+#include <tqdatastream.h>
#include <kprinter.h>
-#include <qsimplerichtext.h>
-#include <qpainter.h>
-#include <qpaintdevicemetrics.h>
+#include <tqsimplerichtext.h>
+#include <tqpainter.h>
+#include <tqpaintdevicemetrics.h>
#include <ctype.h>
-HelpWindow::HelpWindow( const QString& home_, const QString& _path,
- QWidget* parent, const char *name )
+HelpWindow::HelpWindow( const TQString& home_, const TQString& _path,
+ TQWidget* parent, const char *name )
: KMainWindow( parent, name, WDestructiveClose ),
pathCombo( 0 ), selectedURL()
{
readHistory();
readBookmarks();
- browser = new QTextBrowser( this );
+ browser = new TQTextBrowser( this );
browser->mimeSourceFactory()->setFilePath( _path );
- browser->setFrameStyle( QFrame::Panel | QFrame::Sunken );
- connect( browser, SIGNAL( textChanged() ),
- this, SLOT( textChanged() ) );
+ browser->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
+ connect( browser, TQT_SIGNAL( textChanged() ),
+ this, TQT_SLOT( textChanged() ) );
setCentralWidget( browser );
if ( !home_.isEmpty() )
browser->setSource( home_ );
- connect( browser, SIGNAL( highlighted( const QString&) ),
- statusBar(), SLOT( message( const QString&)) );
+ connect( browser, TQT_SIGNAL( highlighted( const TQString&) ),
+ statusBar(), TQT_SLOT( message( const TQString&)) );
resize( 640,700 );
- QPopupMenu* file = new QPopupMenu( this );
- file->insertItem( "&New Window", this, SLOT( newWindow() ), ALT | Key_N );
- file->insertItem( "&Open File", this, SLOT( openFile() ), ALT | Key_O );
- file->insertItem( "&Print", this, SLOT( print() ), ALT | Key_P );
+ TQPopupMenu* file = new TQPopupMenu( this );
+ file->insertItem( "&New Window", this, TQT_SLOT( newWindow() ), ALT | Key_N );
+ file->insertItem( "&Open File", this, TQT_SLOT( openFile() ), ALT | Key_O );
+ file->insertItem( "&Print", this, TQT_SLOT( print() ), ALT | Key_P );
file->insertSeparator();
- file->insertItem( "&Close", this, SLOT( close() ), ALT | Key_Q );
- file->insertItem( "E&xit", qApp, SLOT( closeAllWindows() ), ALT | Key_X );
+ file->insertItem( "&Close", this, TQT_SLOT( close() ), ALT | Key_Q );
+ file->insertItem( "E&xit", qApp, TQT_SLOT( closeAllWindows() ), ALT | Key_X );
// The same three icons are used twice each.
- QIconSet icon_back( QPixmap("back.xpm") );
- QIconSet icon_forward( QPixmap("forward.xpm") );
- QIconSet icon_home( QPixmap("home.xpm") );
+ TQIconSet icon_back( TQPixmap("back.xpm") );
+ TQIconSet icon_forward( TQPixmap("forward.xpm") );
+ TQIconSet icon_home( TQPixmap("home.xpm") );
- QPopupMenu* go = new QPopupMenu( this );
+ TQPopupMenu* go = new TQPopupMenu( this );
backwardId = go->insertItem( icon_back,
- "&Backward", browser, SLOT( backward() ),
+ "&Backward", browser, TQT_SLOT( backward() ),
ALT | Key_Left );
forwardId = go->insertItem( icon_forward,
- "&Forward", browser, SLOT( forward() ),
+ "&Forward", browser, TQT_SLOT( forward() ),
ALT | Key_Right );
- go->insertItem( icon_home, "&Home", browser, SLOT( home() ) );
+ go->insertItem( icon_home, "&Home", browser, TQT_SLOT( home() ) );
- QPopupMenu* help = new QPopupMenu( this );
- help->insertItem( "&About ...", this, SLOT( about() ) );
- help->insertItem( "About &Qt ...", this, SLOT( aboutQt() ) );
+ TQPopupMenu* help = new TQPopupMenu( this );
+ help->insertItem( "&About ...", this, TQT_SLOT( about() ) );
+ help->insertItem( "About &Qt ...", this, TQT_SLOT( aboutQt() ) );
- hist = new QPopupMenu( this );
- QStringList::Iterator it = history.begin();
+ hist = new TQPopupMenu( this );
+ TQStringList::Iterator it = history.begin();
for ( ; it != history.end(); ++it )
mHistory[ hist->insertItem( *it ) ] = *it;
- connect( hist, SIGNAL( activated( int ) ),
- this, SLOT( histChosen( int ) ) );
+ connect( hist, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( histChosen( int ) ) );
- bookm = new QPopupMenu( this );
- bookm->insertItem( tr( "Add Bookmark" ), this, SLOT( addBookmark() ) );
+ bookm = new TQPopupMenu( this );
+ bookm->insertItem( tr( "Add Bookmark" ), this, TQT_SLOT( addBookmark() ) );
bookm->insertSeparator();
- QStringList::Iterator it2 = bookmarks.begin();
+ TQStringList::Iterator it2 = bookmarks.begin();
for ( ; it2 != bookmarks.end(); ++it2 )
mBookmarks[ bookm->insertItem( *it2 ) ] = *it2;
- connect( bookm, SIGNAL( activated( int ) ),
- this, SLOT( bookmChosen( int ) ) );
+ connect( bookm, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( bookmChosen( int ) ) );
menuBar()->insertItem( tr("&File"), file );
menuBar()->insertItem( tr("&Go"), go );
@@ -113,29 +113,29 @@ HelpWindow::HelpWindow( const QString& home_, const QString& _path,
menuBar()->setItemEnabled( forwardId, false);
menuBar()->setItemEnabled( backwardId, false);
- connect( browser, SIGNAL( backwardAvailable( bool ) ),
- this, SLOT( setBackwardAvailable( bool ) ) );
- connect( browser, SIGNAL( forwardAvailable( bool ) ),
- this, SLOT( setForwardAvailable( bool ) ) );
+ connect( browser, TQT_SIGNAL( backwardAvailable( bool ) ),
+ this, TQT_SLOT( setBackwardAvailable( bool ) ) );
+ connect( browser, TQT_SIGNAL( forwardAvailable( bool ) ),
+ this, TQT_SLOT( setForwardAvailable( bool ) ) );
- QToolBar* toolbar = new QToolBar( this );
+ TQToolBar* toolbar = new TQToolBar( this );
addToolBar( toolbar, "Toolbar");
- QToolButton* button;
+ TQToolButton* button;
- button = new QToolButton( icon_back, tr("Backward"), "", browser, SLOT(backward()), toolbar );
- connect( browser, SIGNAL( backwardAvailable(bool) ), button, SLOT( setEnabled(bool) ) );
+ button = new TQToolButton( icon_back, tr("Backward"), "", browser, TQT_SLOT(backward()), toolbar );
+ connect( browser, TQT_SIGNAL( backwardAvailable(bool) ), button, TQT_SLOT( setEnabled(bool) ) );
button->setEnabled( false );
- button = new QToolButton( icon_forward, tr("Forward"), "", browser, SLOT(forward()), toolbar );
- connect( browser, SIGNAL( forwardAvailable(bool) ), button, SLOT( setEnabled(bool) ) );
+ button = new TQToolButton( icon_forward, tr("Forward"), "", browser, TQT_SLOT(forward()), toolbar );
+ connect( browser, TQT_SIGNAL( forwardAvailable(bool) ), button, TQT_SLOT( setEnabled(bool) ) );
button->setEnabled( false );
- button = new QToolButton( icon_home, tr("Home"), "", browser, SLOT(home()), toolbar );
+ button = new TQToolButton( icon_home, tr("Home"), "", browser, TQT_SLOT(home()), toolbar );
toolbar->addSeparator();
- pathCombo = new QComboBox( true, toolbar );
- connect( pathCombo, SIGNAL( activated( const QString & ) ),
- this, SLOT( pathSelected( const QString & ) ) );
+ pathCombo = new TQComboBox( true, toolbar );
+ connect( pathCombo, TQT_SIGNAL( activated( const TQString & ) ),
+ this, TQT_SLOT( pathSelected( const TQString & ) ) );
toolbar->setStretchableWidget( pathCombo );
setRightJustification( true );
setDockEnabled( DockLeft, false );
@@ -181,38 +181,38 @@ void HelpWindow::textChanged()
mHistory[ hist->insertItem( selectedURL ) ] = selectedURL;
} else
pathCombo->setCurrentItem( i );
- selectedURL = QString::null;
+ selectedURL = TQString::null;
}
}
HelpWindow::~HelpWindow()
{
history.clear();
- QMap<int, QString>::Iterator it = mHistory.begin();
+ TQMap<int, TQString>::Iterator it = mHistory.begin();
for ( ; it != mHistory.end(); ++it )
history.append( *it );
- QFile f( QDir::currentDirPath() + "/.history" );
+ TQFile f( TQDir::currentDirPath() + "/.history" );
f.open( IO_WriteOnly );
- QDataStream s( &f );
+ TQDataStream s( &f );
s << history;
f.close();
bookmarks.clear();
- QMap<int, QString>::Iterator it2 = mBookmarks.begin();
+ TQMap<int, TQString>::Iterator it2 = mBookmarks.begin();
for ( ; it2 != mBookmarks.end(); ++it2 )
bookmarks.append( *it2 );
- QFile f2( QDir::currentDirPath() + "/.bookmarks" );
+ TQFile f2( TQDir::currentDirPath() + "/.bookmarks" );
f2.open( IO_WriteOnly );
- QDataStream s2( &f2 );
+ TQDataStream s2( &f2 );
s2 << bookmarks;
f2.close();
}
void HelpWindow::about()
{
- QMessageBox::about( this, "HelpViewer Example",
+ TQMessageBox::about( this, "HelpViewer Example",
"<p>This example implements a simple HTML help viewer "
"using Qt's rich text capabilities</p>"
"<p>It's just about 100 lines of C++ code, so don't expect too much :-)</p>"
@@ -222,13 +222,13 @@ void HelpWindow::about()
void HelpWindow::aboutQt()
{
- QMessageBox::aboutQt( this, "QBrowser" );
+ TQMessageBox::aboutQt( this, "QBrowser" );
}
void HelpWindow::openFile()
{
#ifndef QT_NO_FILEDIALOG
- QString fn = QFileDialog::getOpenFileName( QString::null, QString::null, this );
+ TQString fn = TQFileDialog::getOpenFileName( TQString::null, TQString::null, this );
if ( !fn.isEmpty() )
browser->setSource( fn );
#endif
@@ -245,7 +245,7 @@ void HelpWindow::print()
#ifdef KDE_PRINT
KPrinter printer;
#else
- QPrinter printer;
+ TQPrinter printer;
#endif
printer.setFullPage(true);
printer.setDocName("Help Viewer");
@@ -255,8 +255,8 @@ void HelpWindow::print()
printer.addStandardPage(KPrinter::FilesPage);
#endif
if ( printer.setup(this) ) {
- QPainter p( &printer );
- QPaintDeviceMetrics metrics(p.device());
+ TQPainter p( &printer );
+ TQPaintDeviceMetrics metrics(p.device());
int dpix = metrics.logicalDpiX();
int dpiy = metrics.logicalDpiY();
#ifdef KDE_PRINT
@@ -264,26 +264,26 @@ void HelpWindow::print()
#else
const int margin = 72; // pt
#endif
- QRect body(margin*dpix/72, margin*dpiy/72,
+ TQRect body(margin*dpix/72, margin*dpiy/72,
metrics.width()-margin*dpix/72*2,
metrics.height()-margin*dpiy/72*2 );
#ifdef KDE_PRINT
- QFont font(printer.option("app-rich-fontname"), printer.option("app-rich-fontsize").toInt());
+ TQFont font(printer.option("app-rich-fontname"), printer.option("app-rich-fontsize").toInt());
#else
- QFont font("times",10);
+ TQFont font("times",10);
#endif
- QSimpleRichText richText( browser->text(), font, browser->context(), browser->styleSheet(),
+ TQSimpleRichText richText( browser->text(), font, browser->context(), browser->styleSheet(),
browser->mimeSourceFactory(), body.height() );
richText.setWidth( &p, body.width() );
- QRect view( body );
+ TQRect view( body );
int page = 1;
do {
richText.draw( &p, body.left(), body.top(), view, colorGroup() );
view.moveBy( 0, body.height() );
p.translate( 0 , -body.height() );
p.setFont( font );
- p.drawText( view.right() - p.fontMetrics().width( QString::number(page) ),
- view.bottom() + p.fontMetrics().ascent() + 5, QString::number(page) );
+ p.drawText( view.right() - p.fontMetrics().width( TQString::number(page) ),
+ view.bottom() + p.fontMetrics().ascent() + 5, TQString::number(page) );
if ( view.top() >= richText.height() )
break;
printer.newPage();
@@ -292,10 +292,10 @@ void HelpWindow::print()
}
}
-void HelpWindow::pathSelected( const QString &_path )
+void HelpWindow::pathSelected( const TQString &_path )
{
browser->setSource( _path );
- QMap<int, QString>::Iterator it = mHistory.begin();
+ TQMap<int, TQString>::Iterator it = mHistory.begin();
bool exists = false;
for ( ; it != mHistory.end(); ++it ) {
if ( *it == _path ) {
@@ -309,10 +309,10 @@ void HelpWindow::pathSelected( const QString &_path )
void HelpWindow::readHistory()
{
- if ( QFile::exists( QDir::currentDirPath() + "/.history" ) ) {
- QFile f( QDir::currentDirPath() + "/.history" );
+ if ( TQFile::exists( TQDir::currentDirPath() + "/.history" ) ) {
+ TQFile f( TQDir::currentDirPath() + "/.history" );
f.open( IO_ReadOnly );
- QDataStream s( &f );
+ TQDataStream s( &f );
s >> history;
f.close();
while ( history.count() > 20 )
@@ -322,10 +322,10 @@ void HelpWindow::readHistory()
void HelpWindow::readBookmarks()
{
- if ( QFile::exists( QDir::currentDirPath() + "/.bookmarks" ) ) {
- QFile f( QDir::currentDirPath() + "/.bookmarks" );
+ if ( TQFile::exists( TQDir::currentDirPath() + "/.bookmarks" ) ) {
+ TQFile f( TQDir::currentDirPath() + "/.bookmarks" );
f.open( IO_ReadOnly );
- QDataStream s( &f );
+ TQDataStream s( &f );
s >> bookmarks;
f.close();
}
diff --git a/kdeprint/tests/helpwindow.h b/kdeprint/tests/helpwindow.h
index 1de9e5e2b..93704046a 100644
--- a/kdeprint/tests/helpwindow.h
+++ b/kdeprint/tests/helpwindow.h
@@ -12,10 +12,10 @@
#define HELPWINDOW_H
#include <kmainwindow.h>
-#include <qtextbrowser.h>
-#include <qstringlist.h>
-#include <qmap.h>
-#include <qdir.h>
+#include <tqtextbrowser.h>
+#include <tqstringlist.h>
+#include <tqmap.h>
+#include <tqdir.h>
class QComboBox;
class QPopupMenu;
@@ -24,7 +24,7 @@ class HelpWindow : public KMainWindow
{
Q_OBJECT
public:
- HelpWindow( const QString& home_, const QString& path, QWidget* parent = 0, const char *name=0 );
+ HelpWindow( const TQString& home_, const TQString& path, TQWidget* parent = 0, const char *name=0 );
~HelpWindow();
private slots:
@@ -38,7 +38,7 @@ private slots:
void newWindow();
void print();
- void pathSelected( const QString & );
+ void pathSelected( const TQString & );
void histChosen( int );
void bookmChosen( int );
void addBookmark();
@@ -47,13 +47,13 @@ private:
void readHistory();
void readBookmarks();
- QTextBrowser* browser;
- QComboBox *pathCombo;
+ TQTextBrowser* browser;
+ TQComboBox *pathCombo;
int backwardId, forwardId;
- QString selectedURL;
- QStringList history, bookmarks;
- QMap<int, QString> mHistory, mBookmarks;
- QPopupMenu *hist, *bookm;
+ TQString selectedURL;
+ TQStringList history, bookmarks;
+ TQMap<int, TQString> mHistory, mBookmarks;
+ TQPopupMenu *hist, *bookm;
};
diff --git a/kdeprint/tests/main.cpp b/kdeprint/tests/main.cpp
index 4db031532..a1dc6b5e0 100644
--- a/kdeprint/tests/main.cpp
+++ b/kdeprint/tests/main.cpp
@@ -10,8 +10,8 @@
#include "helpwindow.h"
#include <kapplication.h>
-#include <qwindowsstyle.h>
-#include <qstylesheet.h>
+#include <tqwindowsstyle.h>
+#include <tqstylesheet.h>
#include <stdlib.h>
@@ -19,23 +19,23 @@ int main( int argc, char ** argv )
{
KApplication a(argc, argv, "helpviewer");
- QString home;
+ TQString home;
if (argc > 1)
home = argv[1];
else
- home = QString(getenv("QTDIR")) + "/doc/html/index.html";
+ home = TQString(getenv("QTDIR")) + "/doc/html/index.html";
HelpWindow *help = new HelpWindow(home, ".", 0, "help viewer");
- if ( QApplication::desktop()->width() > 400
- && QApplication::desktop()->height() > 500 )
+ if ( TQApplication::desktop()->width() > 400
+ && TQApplication::desktop()->height() > 500 )
help->show();
else
help->showMaximized();
- QObject::connect( &a, SIGNAL(lastWindowClosed()),
- &a, SLOT(quit()) );
+ TQObject::connect( &a, TQT_SIGNAL(lastWindowClosed()),
+ &a, TQT_SLOT(quit()) );
return a.exec();
}
diff --git a/kdeprint/tests/richpage.cpp b/kdeprint/tests/richpage.cpp
index 9b175894b..f12040b71 100644
--- a/kdeprint/tests/richpage.cpp
+++ b/kdeprint/tests/richpage.cpp
@@ -1,38 +1,38 @@
#include "richpage.h"
-#include <qlabel.h>
-#include <qspinbox.h>
-#include <qcombobox.h>
-#include <qfontdatabase.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqspinbox.h>
+#include <tqcombobox.h>
+#include <tqfontdatabase.h>
+#include <tqlayout.h>
-RichPage::RichPage(QWidget *parent, const char *name)
+RichPage::RichPage(TQWidget *parent, const char *name)
: KPrintDialogPage(parent,name)
{
m_title = "Rich Text Options";
- margin_ = new QSpinBox(this);
+ margin_ = new TQSpinBox(this);
margin_->setRange(1,999);
margin_->setValue(72);
- fontsize_ = new QSpinBox(this);
+ fontsize_ = new TQSpinBox(this);
fontsize_->setRange(4,100);
fontsize_->setValue(10);
- fontname_ = new QComboBox(this);
+ fontname_ = new TQComboBox(this);
QFontDatabase db;
QStringList fonts = db.families();
fontname_->insertStringList(fonts);
- fontname_->setCurrentItem(fonts.findIndex(QString::fromLatin1("times")));
+ fontname_->setCurrentItem(fonts.findIndex(TQString::fromLatin1("times")));
if (fontname_->currentItem() < 0) fontname_->setCurrentItem(0);
- QLabel *l1 = new QLabel("Margin:",this);
- QLabel *l2 = new QLabel("Font name:",this);
- QLabel *l3 = new QLabel("Font size:",this);
+ QLabel *l1 = new TQLabel("Margin:",this);
+ QLabel *l2 = new TQLabel("Font name:",this);
+ QLabel *l3 = new TQLabel("Font size:",this);
- QHBoxLayout *s1 = new QHBoxLayout(0, 0, 10);
- QHBoxLayout *s2 = new QHBoxLayout(0, 0, 10);
- QVBoxLayout *main_ = new QVBoxLayout(this, 10, 10);
+ QHBoxLayout *s1 = new TQHBoxLayout(0, 0, 10);
+ QHBoxLayout *s2 = new TQHBoxLayout(0, 0, 10);
+ QVBoxLayout *main_ = new TQVBoxLayout(this, 10, 10);
main_->addLayout(s1,0);
main_->addSpacing(20);
@@ -55,7 +55,7 @@ RichPage::~RichPage()
{
}
-void RichPage::setOptions(const QMap<QString,QString>& opts)
+void RichPage::setOptions(const TQMap<TQString,TQString>& opts)
{
QString value;
@@ -77,7 +77,7 @@ void RichPage::setOptions(const QMap<QString,QString>& opts)
fontsize_->setValue(value.toInt());
}
-void RichPage::getOptions(QMap<QString,QString>& opts, bool)
+void RichPage::getOptions(TQMap<TQString,TQString>& opts, bool)
{
opts["app-rich-margin"] = margin_->text();
opts["app-rich-fontname"] = fontname_->currentText();
diff --git a/kdeprint/tests/richpage.h b/kdeprint/tests/richpage.h
index 579e52bf2..e41f64e0d 100644
--- a/kdeprint/tests/richpage.h
+++ b/kdeprint/tests/richpage.h
@@ -9,11 +9,11 @@ class QComboBox;
class RichPage : public KPrintDialogPage
{
public:
- RichPage(QWidget *parent = 0, const char *name = 0);
+ RichPage(TQWidget *parent = 0, const char *name = 0);
~RichPage();
- void setOptions(const QMap<QString,QString>& opts);
- void getOptions(QMap<QString,QString>& opts, bool incldef = false);
+ void setOptions(const TQMap<TQString,TQString>& opts);
+ void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false);
private:
QSpinBox *margin_;
diff --git a/kdeprint/tools/escputil/escpwidget.cpp b/kdeprint/tools/escputil/escpwidget.cpp
index 103ad111b..ef0e2390b 100644
--- a/kdeprint/tools/escputil/escpwidget.cpp
+++ b/kdeprint/tools/escputil/escpwidget.cpp
@@ -19,11 +19,11 @@
#include "escpwidget.h"
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qaccel.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqaccel.h>
#include <kdemacros.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -37,12 +37,12 @@
class EscpFactory : public KLibFactory
{
public:
- EscpFactory(QObject *parent = 0, const char *name = 0) : KLibFactory(parent, name) {}
+ EscpFactory(TQObject *parent = 0, const char *name = 0) : KLibFactory(parent, name) {}
protected:
- QObject* createObject(QObject *parent = 0, const char *name = 0, const char * className = "QObject", const QStringList& args = QStringList())
+ TQObject* createObject(TQObject *parent = 0, const char *name = 0, const char * className = "TQObject", const TQStringList& args = TQStringList())
{
Q_UNUSED(className);
- KDialogBase *dlg = new KDialogBase(static_cast<QWidget*>(parent), name, true, i18n("EPSON InkJet Printer Utilities"), KDialogBase::Close);
+ KDialogBase *dlg = new KDialogBase(static_cast<TQWidget*>(parent), name, true, i18n("EPSON InkJet Printer Utilities"), KDialogBase::Close);
EscpWidget *w = new EscpWidget(dlg);
if (args.count() > 0)
w->setDevice(args[0]);
@@ -62,49 +62,49 @@ extern "C"
}
}
-EscpWidget::EscpWidget(QWidget *parent, const char *name)
-: QWidget(parent, name)
+EscpWidget::EscpWidget(TQWidget *parent, const char *name)
+: TQWidget(parent, name)
{
m_hasoutput = false;
- connect(&m_proc, SIGNAL(processExited(KProcess*)), SLOT(slotProcessExited(KProcess*)));
- connect(&m_proc, SIGNAL(receivedStdout(KProcess*,char*,int)), SLOT(slotReceivedStdout(KProcess*,char*,int)));
- connect(&m_proc, SIGNAL(receivedStderr(KProcess*,char*,int)), SLOT(slotReceivedStderr(KProcess*,char*,int)));
+ connect(&m_proc, TQT_SIGNAL(processExited(KProcess*)), TQT_SLOT(slotProcessExited(KProcess*)));
+ connect(&m_proc, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)), TQT_SLOT(slotReceivedStdout(KProcess*,char*,int)));
+ connect(&m_proc, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)), TQT_SLOT(slotReceivedStderr(KProcess*,char*,int)));
- QPushButton *cleanbtn = new QPushButton(this, "-c");
+ QPushButton *cleanbtn = new TQPushButton(this, "-c");
cleanbtn->setPixmap(DesktopIcon("exec"));
- QPushButton *nozzlebtn = new QPushButton(this, "-n");
+ QPushButton *nozzlebtn = new TQPushButton(this, "-n");
nozzlebtn->setPixmap(DesktopIcon("exec"));
- QPushButton *alignbtn = new QPushButton(this, "-a");
+ QPushButton *alignbtn = new TQPushButton(this, "-a");
alignbtn->setPixmap(DesktopIcon("exec"));
- QPushButton *inkbtn = new QPushButton(this, "-i");
+ QPushButton *inkbtn = new TQPushButton(this, "-i");
inkbtn->setPixmap(DesktopIcon("kdeprint_inklevel"));
- QPushButton *identbtn = new QPushButton(this, "-d");
+ QPushButton *identbtn = new TQPushButton(this, "-d");
identbtn->setPixmap(DesktopIcon("exec"));
QFont f(font());
f.setBold(true);
- m_printer = new QLabel(this);
+ m_printer = new TQLabel(this);
m_printer->setFont(f);
- m_device = new QLabel(this);
+ m_device = new TQLabel(this);
m_device->setFont(f);
- m_useraw = new QCheckBox(i18n("&Use direct connection (might need root permissions)"), this);
+ m_useraw = new TQCheckBox(i18n("&Use direct connection (might need root permissions)"), this);
- connect(cleanbtn, SIGNAL(clicked()), SLOT(slotButtonClicked()));
- connect(nozzlebtn, SIGNAL(clicked()), SLOT(slotButtonClicked()));
- connect(alignbtn, SIGNAL(clicked()), SLOT(slotButtonClicked()));
- connect(inkbtn, SIGNAL(clicked()), SLOT(slotButtonClicked()));
- connect(identbtn, SIGNAL(clicked()), SLOT(slotButtonClicked()));
+ connect(cleanbtn, TQT_SIGNAL(clicked()), TQT_SLOT(slotButtonClicked()));
+ connect(nozzlebtn, TQT_SIGNAL(clicked()), TQT_SLOT(slotButtonClicked()));
+ connect(alignbtn, TQT_SIGNAL(clicked()), TQT_SLOT(slotButtonClicked()));
+ connect(inkbtn, TQT_SIGNAL(clicked()), TQT_SLOT(slotButtonClicked()));
+ connect(identbtn, TQT_SIGNAL(clicked()), TQT_SLOT(slotButtonClicked()));
- QLabel *printerlab = new QLabel(i18n("Printer:"), this);
+ QLabel *printerlab = new TQLabel(i18n("Printer:"), this);
printerlab->setAlignment(AlignRight|AlignVCenter);
- QLabel *devicelab = new QLabel(i18n("Device:"), this);
+ QLabel *devicelab = new TQLabel(i18n("Device:"), this);
devicelab->setAlignment(AlignRight|AlignVCenter);
- QLabel *cleanlab = new QLabel(i18n("Clea&n print head"), this);
- QLabel *nozzlelab = new QLabel(i18n("&Print a nozzle test pattern"), this);
- QLabel *alignlab = new QLabel(i18n("&Align print head"), this);
- QLabel *inklab = new QLabel(i18n("&Ink level"), this);
- QLabel *identlab = new QLabel(i18n("P&rinter identification"), this);
+ QLabel *cleanlab = new TQLabel(i18n("Clea&n print head"), this);
+ QLabel *nozzlelab = new TQLabel(i18n("&Print a nozzle test pattern"), this);
+ QLabel *alignlab = new TQLabel(i18n("&Align print head"), this);
+ QLabel *inklab = new TQLabel(i18n("&Ink level"), this);
+ QLabel *identlab = new TQLabel(i18n("P&rinter identification"), this);
cleanlab->setAlignment(AlignLeft|AlignVCenter|ShowPrefix);
nozzlelab->setAlignment(AlignLeft|AlignVCenter|ShowPrefix);
@@ -112,17 +112,17 @@ EscpWidget::EscpWidget(QWidget *parent, const char *name)
inklab->setAlignment(AlignLeft|AlignVCenter|ShowPrefix);
identlab->setAlignment(AlignLeft|AlignVCenter|ShowPrefix);
- cleanbtn->setAccel(QAccel::shortcutKey(cleanlab->text()));
- nozzlebtn->setAccel(QAccel::shortcutKey(nozzlelab->text()));
- alignbtn->setAccel(QAccel::shortcutKey(alignlab->text()));
- inkbtn->setAccel(QAccel::shortcutKey(inklab->text()));
- identbtn->setAccel(QAccel::shortcutKey(identlab->text()));
+ cleanbtn->setAccel(TQAccel::shortcutKey(cleanlab->text()));
+ nozzlebtn->setAccel(TQAccel::shortcutKey(nozzlelab->text()));
+ alignbtn->setAccel(TQAccel::shortcutKey(alignlab->text()));
+ inkbtn->setAccel(TQAccel::shortcutKey(inklab->text()));
+ identbtn->setAccel(TQAccel::shortcutKey(identlab->text()));
KSeparator *sep = new KSeparator(this);
sep->setFixedHeight(10);
- QGridLayout *l0 = new QGridLayout(this, 8, 2, 10, 10);
- QGridLayout *l1 = new QGridLayout(0, 2, 2, 0, 5);
+ QGridLayout *l0 = new TQGridLayout(this, 8, 2, 10, 10);
+ QGridLayout *l1 = new TQGridLayout(0, 2, 2, 0, 5);
l0->addMultiCellLayout(l1, 0, 0, 0, 1);
l1->addWidget(printerlab, 0, 0);
l1->addWidget(devicelab, 1, 0);
@@ -144,7 +144,7 @@ EscpWidget::EscpWidget(QWidget *parent, const char *name)
l0->setColStretch(1, 1);
}
-void EscpWidget::startCommand(const QString& arg)
+void EscpWidget::startCommand(const TQString& arg)
{
bool useUSB(false);
@@ -192,9 +192,9 @@ void EscpWidget::startCommand(const QString& arg)
m_proc << "-u";
m_proc << arg << "-q";
- m_errorbuffer = m_outbuffer = QString::null;
+ m_errorbuffer = m_outbuffer = TQString::null;
m_hasoutput = ( arg == "-i" || arg == "-d" );
- for ( QValueList<QCString>::ConstIterator it=m_proc.args().begin(); it!=m_proc.args().end(); ++it )
+ for ( TQValueList<TQCString>::ConstIterator it=m_proc.args().begin(); it!=m_proc.args().end(); ++it )
kdDebug() << "ARG: " << *it << endl;
if (m_proc.start(KProcess::NotifyOnExit, KProcess::AllOutput))
setEnabled(false);
@@ -231,13 +231,13 @@ void EscpWidget::slotProcessExited(KProcess*)
void EscpWidget::slotReceivedStdout(KProcess*, char *buf, int len)
{
- QString bufstr = QCString(buf, len);
+ QString bufstr = TQCString(buf, len);
m_outbuffer.append(bufstr);
}
void EscpWidget::slotReceivedStderr(KProcess*, char *buf, int len)
{
- QString bufstr = QCString(buf, len);
+ QString bufstr = TQCString(buf, len);
m_errorbuffer.append(bufstr);
}
@@ -247,12 +247,12 @@ void EscpWidget::slotButtonClicked()
startCommand(arg);
}
-void EscpWidget::setPrinterName(const QString& p)
+void EscpWidget::setPrinterName(const TQString& p)
{
m_printer->setText(p);
}
-void EscpWidget::setDevice(const QString& dev)
+void EscpWidget::setDevice(const TQString& dev)
{
m_deviceURL = dev;
m_device->setText(dev);
diff --git a/kdeprint/tools/escputil/escpwidget.h b/kdeprint/tools/escputil/escpwidget.h
index 6de9f2c00..ce895f260 100644
--- a/kdeprint/tools/escputil/escpwidget.h
+++ b/kdeprint/tools/escputil/escpwidget.h
@@ -20,7 +20,7 @@
#ifndef ESCPWIDGET_H
#define ESCPWIDGET_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kprocess.h>
#include <kurl.h>
@@ -32,9 +32,9 @@ class EscpWidget : public QWidget
Q_OBJECT
public:
- EscpWidget(QWidget *parent = 0, const char *name = 0);
- void setDevice(const QString&);
- void setPrinterName(const QString&);
+ EscpWidget(TQWidget *parent = 0, const char *name = 0);
+ void setDevice(const TQString&);
+ void setPrinterName(const TQString&);
protected slots:
void slotReceivedStdout(KProcess*, char*, int);
@@ -43,7 +43,7 @@ protected slots:
void slotButtonClicked();
protected:
- void startCommand(const QString& arg);
+ void startCommand(const TQString& arg);
private:
KProcess m_proc;
diff --git a/kdeprint/treecombobox.cpp b/kdeprint/treecombobox.cpp
index e131d8c3c..1e4f1b694 100644
--- a/kdeprint/treecombobox.cpp
+++ b/kdeprint/treecombobox.cpp
@@ -19,15 +19,15 @@
#include "treecombobox.h"
-#include <qpainter.h>
+#include <tqpainter.h>
-TreeListBoxItem::TreeListBoxItem(QListBox *lb, const QPixmap& pix, const QString& txt, bool oneBlock)
- : QListBoxPixmap(pix, txt)
+TreeListBoxItem::TreeListBoxItem(TQListBox *lb, const TQPixmap& pix, const TQString& txt, bool oneBlock)
+ : TQListBoxPixmap(pix, txt)
{
if (oneBlock)
- m_path = QStringList(txt);
+ m_path = TQStringList(txt);
else
- m_path = QStringList::split('/', text(), false);
+ m_path = TQStringList::split('/', text(), false);
m_depth = m_path.count()-1;
m_child = m_next = m_parent = 0;
@@ -48,7 +48,7 @@ TreeListBoxItem::TreeListBoxItem(QListBox *lb, const QPixmap& pix, const QString
if (!parentItem)
{
// parent not found, add parent first into QListBox
- parentItem = new TreeListBoxItem(lb, QPixmap(), parentStr);
+ parentItem = new TreeListBoxItem(lb, TQPixmap(), parentStr);
}
// search last "child" of the parent item, to put the new one
// at the end
@@ -75,21 +75,21 @@ TreeListBoxItem::TreeListBoxItem(QListBox *lb, const QPixmap& pix, const QString
}
}
-int TreeListBoxItem::width(const QListBox *lb) const
+int TreeListBoxItem::width(const TQListBox *lb) const
{
int w = m_depth * stepSize() + 2;
if (pixmap())
w += (pixmap()->width() + 2);
if (!m_path[m_depth].isEmpty())
w += (lb->fontMetrics().width(m_path[m_depth]) + 2);
- return QMAX(w, QListBoxPixmap::width(lb));
+ return QMAX(w, TQListBoxPixmap::width(lb));
}
-void TreeListBoxItem::paint(QPainter *p)
+void TreeListBoxItem::paint(TQPainter *p)
{
if(!static_cast<TreeListBox*>(listBox())->m_painting)
{
- QListBoxPixmap::paint(p);
+ TQListBoxPixmap::paint(p);
return;
}
@@ -128,29 +128,29 @@ void TreeListBoxItem::paint(QPainter *p)
//-----------------------------------------------------------------------------------------
-TreeListBox::TreeListBox(QWidget *parent, const char *name)
- : QListBox(parent, name)
+TreeListBox::TreeListBox(TQWidget *parent, const char *name)
+ : TQListBox(parent, name)
{
m_painting = false;
}
-void TreeListBox::paintCell(QPainter *p, int row, int col)
+void TreeListBox::paintCell(TQPainter *p, int row, int col)
{
m_painting = true;
- QListBox::paintCell(p, row, col);
+ TQListBox::paintCell(p, row, col);
m_painting = false;
}
//-----------------------------------------------------------------------------------------
-TreeComboBox::TreeComboBox(QWidget *parent, const char *name)
- : QComboBox(parent, name)
+TreeComboBox::TreeComboBox(TQWidget *parent, const char *name)
+ : TQComboBox(parent, name)
{
m_listbox = new TreeListBox(this);
setListBox(m_listbox);
}
-void TreeComboBox::insertItem(const QPixmap& pix, const QString& txt, bool oneBlock)
+void TreeComboBox::insertItem(const TQPixmap& pix, const TQString& txt, bool oneBlock)
{
new TreeListBoxItem(m_listbox, pix, txt, oneBlock);
}
diff --git a/kdeprint/treecombobox.h b/kdeprint/treecombobox.h
index 78833aee7..398633752 100644
--- a/kdeprint/treecombobox.h
+++ b/kdeprint/treecombobox.h
@@ -20,9 +20,9 @@
#ifndef TREECOMBOBOX_H
#define TREECOMBOBOX_H
-#include <qlistbox.h>
-#include <qcombobox.h>
-#include <qstringlist.h>
+#include <tqlistbox.h>
+#include <tqcombobox.h>
+#include <tqstringlist.h>
/**
* Class that represents a single object in the tree
@@ -30,12 +30,12 @@
class TreeListBoxItem : public QListBoxPixmap
{
public:
- TreeListBoxItem(QListBox *lb, const QPixmap& pix, const QString& txt, bool oneBlock = false);
+ TreeListBoxItem(TQListBox *lb, const TQPixmap& pix, const TQString& txt, bool oneBlock = false);
- virtual int width(const QListBox *lb) const;
+ virtual int width(const TQListBox *lb) const;
protected:
- virtual void paint(QPainter *p);
+ virtual void paint(TQPainter *p);
int stepSize() const { return 16; }
private:
@@ -51,10 +51,10 @@ class TreeListBox : public QListBox
{
friend class TreeListBoxItem;
public:
- TreeListBox(QWidget *parent = 0, const char *name = 0);
+ TreeListBox(TQWidget *parent = 0, const char *name = 0);
protected:
- virtual void paintCell(QPainter *p, int row, int col);
+ virtual void paintCell(TQPainter *p, int row, int col);
private:
bool m_painting;
@@ -66,8 +66,8 @@ private:
class TreeComboBox : public QComboBox
{
public:
- TreeComboBox(QWidget *parent = 0, const char *name = 0);
- void insertItem(const QPixmap& pix, const QString& txt, bool oneBlock = false);
+ TreeComboBox(TQWidget *parent = 0, const char *name = 0);
+ void insertItem(const TQPixmap& pix, const TQString& txt, bool oneBlock = false);
private:
QListBox *m_listbox;
diff --git a/kdeprint/util.cpp b/kdeprint/util.cpp
index 7e8be8cf8..d95ca2c0c 100644
--- a/kdeprint/util.cpp
+++ b/kdeprint/util.cpp
@@ -18,14 +18,14 @@
**/
#include "util.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
-void urlToSmb(const KURL& url, QString& work, QString& server, QString& printer)
+void urlToSmb(const KURL& url, TQString& work, TQString& server, TQString& printer)
{
if (url.protocol() != "smb")
return;
QString h = url.host();
- QStringList l = QStringList::split('/', url.path(), false);
+ QStringList l = TQStringList::split('/', url.path(), false);
if (l.count() > 1)
{
work = h;
@@ -34,13 +34,13 @@ void urlToSmb(const KURL& url, QString& work, QString& server, QString& printer)
}
else
{
- work = QString::null;
+ work = TQString::null;
server = h;
printer = l[0];
}
}
-KURL smbToUrl(const QString& s)
+KURL smbToUrl(const TQString& s)
{
// allow to handle non-encoded chars in login/password
KURL url;
@@ -76,9 +76,9 @@ int findIndex(int ID)
return 4;
}
-QString buildSmbURI( const QString& work, const QString& server, const QString& printer, const QString& user, const QString& passwd )
+TQString buildSmbURI( const TQString& work, const TQString& server, const TQString& printer, const TQString& user, const TQString& passwd )
{
- QString uri = server + "/" + printer;
+ TQString uri = server + "/" + printer;
if ( !work.isEmpty() )
uri.prepend( work + "/" );
if ( !user.isEmpty() )
@@ -92,7 +92,7 @@ QString buildSmbURI( const QString& work, const QString& server, const QString&
return uri;
}
-bool splitSmbURI( const QString& uri, QString& work, QString& server, QString& printer, QString& user, QString& passwd )
+bool splitSmbURI( const TQString& uri, TQString& work, TQString& server, TQString& printer, TQString& user, TQString& passwd )
{
int p( 0 );
if ( !uri.startsWith( "smb://" ) )
@@ -118,7 +118,7 @@ bool splitSmbURI( const QString& uri, QString& work, QString& server, QString& p
}
else
p2 = p-1;
- QStringList l = QStringList::split( '/', uri.mid( p2+1 ), false );
+ TQStringList l = TQStringList::split( '/', uri.mid( p2+1 ), false );
switch ( l.count() )
{
case 3:
diff --git a/kdeprint/util.h b/kdeprint/util.h
index b7ccdcbd5..d51f248cf 100644
--- a/kdeprint/util.h
+++ b/kdeprint/util.h
@@ -21,19 +21,19 @@
#define UTIL_H
#include "kprinter.h"
-#include <qstring.h>
+#include <tqstring.h>
#include <kurl.h>
#include <klocale.h>
-KURL smbToUrl(const QString& work, const QString& server, const QString& printer);
-void urlToSmb(const KURL& url, QString& work, QString& server, QString& printer);
+KURL smbToUrl(const TQString& work, const TQString& server, const TQString& printer);
+void urlToSmb(const KURL& url, TQString& work, TQString& server, TQString& printer);
// those 2 are only workarounds when the login/password may contain
// strange characters ('@', '/'). In this case, those chars are not encoded
// as other SMB tools (smbspool) doesn't seem to support encoding. This
// utilities allow to continue working KURL class (and encoding) within
// KDEPrint, but without encoding outside KDEPrint (shoudl fix bug #38733)
-KDEPRINT_EXPORT QString buildSmbURI( const QString& work, const QString& server, const QString& printer, const QString& user, const QString& passwd );
-KDEPRINT_EXPORT bool splitSmbURI( const QString& uri, QString& work, QString& server, QString& printer, QString& user, QString& passwd );
+KDEPRINT_EXPORT TQString buildSmbURI( const TQString& work, const TQString& server, const TQString& printer, const TQString& user, const TQString& passwd );
+KDEPRINT_EXPORT bool splitSmbURI( const TQString& uri, TQString& work, TQString& server, TQString& printer, TQString& user, TQString& passwd );
static const struct pagesizestruct
{